News for hackers. Stuff that matters.
Re:There are only twelve 4x4 sudokus (and a cool trick for f... by Fran314 on Monday September 14, 2026 @08:10AM (#49695520)
In the last few days I went down the rabbithole of 4x4 sudokus, and found out that (up to permutations) there are only 12 possible solutions.

I decide to write up the small research I did as well as some fun findings discovered along the way in a blog post.

Also, yes this is extremely pointless and silly, and the math involved is not incredibly high level, but I still think it's an enjoyable bit of recreational math worth your time!

Re:There are only twelve 4x4 sudokus (and a cool trick for f... by redfast00 on Tuesday September 15, 2026 @08:08AM (#49711308)
Did you check for rotational and mirror symmetry? As in, are the 12 unique sudokus just the same one, rotated in 4 ways, and mirrored along the x or y axis?
Re:There are only twelve 4x4 sudokus (and a cool trick for f... by probably_wrong on Tuesday September 15, 2026 @08:24AM (#49711485)
I was wondering this myself so I wrote a script that shows that there are duplicated puzzles if you count a rotated Sudoku as being equivalent. Here's one example:

Puzzle 2 is

  1234
  3412
  2341
  4123
If you rotate it counterclockwise you have

  4213
  3142
  2431
  1324
And if you normalize it, replacing the first row with "1234" (brilliant idea from the post), you get

  1234
  4312
  2143
  3421
Which is listed as puzzle 7. A quick check gives me that puzzles 1, 2, 3, 5, 11 and 12 would be unique under rotation, but I wrote that check in five minutes so there must be bugs somewhere. Also, I performed no check for mirror symmetry whatsoever (update: I did a quick one, same result).

I don't want to miss my chance to say that the post is brilliant and that it convinced me to leave what I was doing to check for rotations. I was nerd sniped in the best way and I take my hat off for the OP.