9 comments

  • Fran314 1 day ago
    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!

    • redfast00 12 hours ago
      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?
      • probably_wrong 12 hours ago
        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.

  • drmajormccheese 9 hours ago
    This looks related to https://oeis.org/A107739.

    If the 4x4 sudoku has 288 / 4! = 12 distinct solutions, then does the 9x9 sudoku have 6670903752021072936960 / 9! distinct solutions?

  • gilleain 12 hours ago
    There is a way of understanding all this through group theory. eg:

    https://arxiv.org/html/2607.20669

    'Counting, Symmetries and Equivalence Classes of Sudoku Grids' where an 'equivalence class' is a set of structures (such as filled Sudoku grids) that are all equivalent under some relation.

    • qsort 11 hours ago
      Can't you just describe the group that defines those transformations and use Burnside?
      • gilleain 11 hours ago
        Sadly my group theory knowledge is rudimentary, and rusty. Probably you could? No idea.
  • irusik 1 day ago
    I love articles where a seemingly simple puzzle turns out to be much more interesting when you look at it from the perspective of math and code. It’s especially interesting to learn that there aren’t actually that many possible 4×4 Sudoku grids. I also enjoy working with puzzles and creating my own crosswords in SuperColoring. Articles like this make me want to try creating a more unusual crossword and see how much harder it would be to solve.
    • Fran314 1 day ago
      I'm glad this inspired something in you!
  • _usefulcat 9 hours ago
    That's interesting, less than I thought. I'm curious about this because I'm working on a sudoku variant that has two pieces of data in each cell - such as numbers and letters. I am keen to try out your process with that arrangement.
  • Polizeiposaune 8 hours ago
    In addition to the (n^2)^2 sudokus, you can also make them with rectangular sub-blocks -- (n x m) ^ 2 sudokus -- such as a 6x6 grid with six (3x2) sub-blocks, or a 10x10 with 10 5x2 sub-blocks.
  • antonTobi 8 hours ago
    Here is one possible way of generating all 12 solutions by 2x2x3 choices:

    1. Fill the upper left box with 1-2-3-4

    2. Choose where to put the 1 in the top right box (2 choices)

    3. Choose where to put the 1 in the lower left box (2 choices)

    4. Choose which digit to put diagonally opposite the 1 in the lower right box (3 choices)

    Is there a nicer way which makes it obvious that there is exactly one solution for each choice in the last step?

    • Someone 7 hours ago
      > Choose which digit to put diagonally opposite the 1 in the lower right box (3 choices)

      There are only two choices there. You cannot put a 1, nor the digit (3 or 4) that’s in the top the column where you try to put the number.

      > Is there a nicer way which makes it obvious that there is exactly one solution for each choice in the last step?

      There isn’t. You may end up with a degree of freedom after step 4

        1234    1234
        ..1.    ..1.
        ...1    ...1
        .1..    .14.
      
      leads to

        1234
        ..12
        ..21
        2143
      
      which allows for 2 solutions:

        1234    1234
        3412    4312
        4321    3421
        2143    2143
      • antonTobi 6 hours ago
        My procedure starts with filling the top-left box, not the top row. So it looks something like this after the third step:

          12..
          34.1
          .1.x
          ..1.
        
        From here x can be any of [2,3,4], and each yields exactly one solution!
  • cochleari_major 9 hours ago
    I’ll plug a 4x4 variant sudoku generator that Claude put together a few months ago.

    https://yakymp.github.io/sudoku4x4/

  • cole_ilands 1 day ago
    [dead]