Unofficial Hacker News companion — get notified on comment replies, and more.

Sudoku's Hidden Rule (opens external site)

478 points by multifasciatus 1 day ago | cyrusjavan.com | 213 comments on HN | Vote on HN (opens Hacker News) |

View full thread · View on Hacker News

Comment thread (17)

  1. I’ve talked with folks who won’t use these kinds of uniqueness techniques or others like “guess and check”. More well known is Simon Anthony from Cracking the Cryptic who eschews uniqueness techniques in his solving videos unless the rules explicitly state something about uniqueness.
    Replies (4)
    1. I mentioned this in another comment but this is why I was so surprised that their own Classic Sudoku app includes a puzzle which is designed to use uniqueness as part of the solve.

      I really cannot explain it logically, but unlike every other obscure technique uniqueness just feels wrong. I think it might have to do with wanting the puzzle to contain logic which clearly shows its one unique solution without having to trust it to have one?

      It's almost like a magic trick which requires you to understand the trick or you won't be fooled. It feels backwards.

    2. Is it even possible to avoid guess and check? In every sudoku puzzle I come across, besides very easy puzzles, there comes a point where I have to guess and check. It's why I gave up on doing sudoku, because that is just tedious and not at all fun.
      Replies (4)
      1. I used to do hard ones and never had to guess and check, following rules only. Maybe you missed a trick or two?
        Replies (1)
        1. It's often also a difference between proper made sudokus and some bad ones you can find in a random magazine. The proper ones have an intended way of solving and deductions.
      2. It is usually never required... depending on how pedantic you want to be about what constitutes a guess and check. Some deductions do require following through multiple consequential steps.
        Replies (1)
        1. For me the difference comes down to two criteria:

          1. there's no clear/obvious logical step/steps -- e.g. identifying hidden pairs, X/Y wings, or other patterns;

          2. the chain of logic goes above ~3-4 moves where you can't easily keep the state in your head and/or clearly annotate on the grid, so have to effectively play the move assuming it's correct and have to backtrack if that assumption is wrong.

      3. Basically, at every point in a well-designed puzzle you should be able to make a non-random choice. If you're an amateur solver, you might not be aware of all of the solving tricks and might think that if you have iteratively identified all singles you are forced to blindly guess, test and backtrack.

        An X-Wing is a common technique, and similar to the examples in the OP. When you have four cells that form a rectangle that can only be 2 or 5, for example, you can exclude 2 and 5 from all other cells in the rows and columns these cells belong to.

        Replies (1)
        1. Thanks, that is helpful. I had never even heard of the existence of sudoku solving techniques, so I guess the issue here is a lack of knowledge on my part.
          Replies (1)
          1. A site like https://sudoku.coach/en/learn goes through many of the non-trivial techniques.
            Replies (1)
            1. And you really don't need to go past Swordfish (which is just really an X-wing extended past 2x2), and maybe Y-wing.

              Pretty much everything beyond those are a combination or slight extension of things before it.

              SET Theory is maybe the only other thing worth mentioning, but this will basically only come up in constructed puzzles and it'll be heavily telegraphed by geometry (that is, all of the known digits will form a nice geometry pattern). Had a big moment 3-4 years ago, but got played out fairly quickly.

              https://crackingthecryptic.fandom.com/wiki/Set_Equivalence_T...

              https://www.youtube.com/watch?v=pezlnN4X52g (the Phistomephel Ring was the first discovery of it, but it can be extended to any other geometry by the same logic)

      4. ksudoku will say if you need to guess (and after how many moves) and you can generate a new puzzle if so. At least hard difficulty (with random symmetry) usually does not require guessing so it is easy to try again if one does. Above that it is at leat not easy to get one without guessing and I'm not sure if it is possible.

        https://apps.kde.org/ksudoku/

        It seems to me that guessing isn't fundamentally different from other techniques other than requiring more memory than humans can easily manage :/.

    3. Uniqueness is really not in the same category as guess and check. Uniqueness uses a meta fact about the way (most) puzzles are published that isn't in the rules. Guess and check uses the rules as written, just in a way that's considered inelegant, and there's certainly a gray area around what classifies as a bifurcation vs. a deduction.
      Replies (1)
      1. Both are relying on the same underlying rule though. If (in theory) a particular Sudoku had multiple solutions, then assuming the uniqueness rule and guess and check would both prevent you from finding all solutions.
        Replies (1)
        1. That's a very good point that I had completely overlooked, perhaps because I was thinking in terms of an algorithm I had recently implemented. The case where you guess wrong and backtrack is a valid way to rule something out. If you guess right, however, and find a solution, you'd strictly speaking have to backtrack anyway, to rule out the other path. A computer can easily be programmed to do the additional backtracking to verify that the solution is unique, but no human solver in their right mind would behave that way, and instead simply consider the puzzle solved.
          Replies (1)
          1. This theory conflicts with human (or probabilistic AI) psychology. A human can always make a mistake. There's no objective way to distinguish a mistake from an intentional alternate strategy.
    4. There is a school of thought in which deductive solvability and uniqueness are the same thing.

      https://news.ycombinator.com/item?id=50699970