Unofficial Hacker News client - receive Push Notifications on replies.

Sudoku's Hidden Rule (opens external site)

464 points by multifasciatus 23 hours ago | cyrusjavan.com | 211 comments on HN | Vote on HN (opens Hacker News)

View full thread · View on Hacker News

Comment thread (31)

  1. These are just standard sudoku techniques aren't they?

    why is there stigma in using them when it's what's need to solve regular sudokus?

    From another direction, are there people who solve sudoku's without the idea that the puzzle has 1 solution? That seems very boring.

    Replies (9)
    1. Yeah I'm totally confused by this
      Replies (1)
      1. Likewise I was expecting the cheatcode of Sudoku and I read it thinking... I already do this, it must be leading to something else.
    2. 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.

              Continue this thread (1 replies) →

        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

    3. > why is there stigma in using them when it's what's need to solve regular sudokus?

      This isn't a standard Sudoku solving technique. You can have a Sudoku problem where 1) there's a unique solution if you assume there's a unique solution and 2) there are multiple solutions if you do not assume there's a unique solution

      To give a comparison, the equation:

        x^2 = a
      
      has an infinite number of solutions. Now, if you assume there's a unique solution to the equation, you get x = a = 0. You're only able to get the unique solution by assuming there's a unique solution
      Replies (1)
      1. How does assuming a unique solution lead to x = a = 0 and not x = a = 1?
        Replies (1)
        1. Because there are two solutions to x^2 = 1 but only one solution to x^2 = 0
          Replies (1)
          1. Oh, I see what you meant. I got caught up on 'x' having to equal 'a', rather than a single (unique) 'x' for a given 'a'
    4. Uniqueness is usually seen as a shortcut. Handcrafted puzzles often have an intended solution which requires some insight or logic that the puzzle setter wanted you to discover. Uniqueness can sidestep that.

      Uniqueness also assumes the puzzle is correct. Especially if you're a test solver you can't assume that, as the setter may have made a mistake.

      I will say I don't think that way about solves with a BUG in them. The BUG usually only appears as the absolute last step of a solve. If you encounter it, it's probably the intended solve.

      Replies (1)
      1. > Especially if you're a test solver you can't assume that, as the setter may have made a mistake.

        Why would you bother a human test solver before checking mechanically for uniqueness and other 'correctness' issues?

    5. Dont really get the post either, I thought everyone uses these techniques
    6. So you don't need uniqueness.

      The reason I don't like it is other deduction techniques are 'resistant to broken puzzles', you won't ever accidentally 'solve' an incorrect puzzle using them (I'm assuming you are deducing here, not guessing).

      Using uniqueness if the puzzle isn't unique can get you a solution, when other solutions existed -- you should have got stuck but you 'skipped'.

    7. I only do sudoku on a flight. I didn’t know the uniqueness was given. They might be standard techniques for those who want to go deeper with sudoku. I don’t think it is easy to find these hidden rules if you don’t think in the perspective of designers.
    8. For those who have learnt or picked them up along the way yes and you can extend this trick to triples and quadruples.
    9. For a sudoku puzzle with a solution, it is trivial to check that all other rules are satisfied, but it is not so easy to check whether a solution is the only solution.

      You might argue that it's not a proper sudoku puzzle if it has multiple solutions, but the problem is if you encounter a random puzzle in the corner of non specialized newspaper or magazine how do you know it's a proper sudoku puzzle. Majority of people working for a newspaper are not sudoku experts and lack the expertise and don't care to verify that the random puzzle they found online for adding as filler is a "proper sudoku". There are some which employ a puzzle expert, which if not a sudoku specialist at least will have enough care to use a high quality source or know which software to use and how to configure it for verifying it's proper sudoku with unique solution. Do you think a factory somewhere in China making novelty toilet paper with sudoku puzzles printed on it (among many other decorative patterns) care about making high quality puzzles?

      Assuming that puzzle has unique solution when it doesn't can lead to contradiction/dead end.

      Sure if you are participating in serious speed sudoku competition, you can be quite sure the organizers did their diligence while preparing proper puzzles, and even if they didn't there is motivation to use every technique available for speedup. The risk is sufficiently low and a more likely result of incorrect puzzle is finding one of the solution instead of conflict from assumption of uniqueness rule.

      There is a bit of similarity with sport. For the highest level professional games every official rule will be more are less followed. But when you play football with your friends for fun, quite a lot of rules will not be followed as strictly or are completely impractical to check or enforce. Even for amateur league, there is high chance of taking some leeway. Does it mean that no one except few thousand top level professional athletes have ever played football and whatever they did with ball at school during PE should be renamed to fake football.