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 (12)

  1. Very interesting to see this pop up now.

    I've used this "unspoken" rule for many years, and often had a hard time explaining it to others.

    I often called it "No two solutions", meaning that the puzzle was not allowed to have two solutions.

    Personally, I prefer solving sudoku on paper. Just my preference.

    So I've done a lot of sudoku appearing in newspapers. I found that many of the "harder", maybe they were called "5 star" newspaper sudoke, would fall to this rule of "No two solutions", so I generally avoid using it, unless the puzzle is _really- hard, and I can't find any other way.

    EDIT: I found this image from when I was emailing a friend about this.

    This is how I've typically used this rule:

    https://nullimage.org/6xvubQNs7D4zMteBvDRBGm#k=KACWzJ3qsPnoY...

    Replies (3)
    1. And yet the Sudoko in my daily paper occasionally breaks that rule and has multiple solutions ..... while it's annoying I consider both solutions valid
      Replies (2)
      1. I don't doubt your experience, but with all the Sudoku's I've played, if I end up with a degenerate solution, I know that I've made a mistake somewhere along the line.
        Replies (1)
        1. What do you mean by degenerate? A system of variables can be exactly determined, overdetermined or underdetermined.

          If the sudoku has an answer, it certainly can't be overdetermined. Assuming that, if you spot a contradiction, you know _you_, the solver, made a mistake somewhere.

          However, if you have no contradiction at all (each rule checks out: no duplicate numbers on rows, columns and within the 3x3 blocks), yet the answer is different from the "correct" one, you know that the system was underdetermined, and the sudoku had a flawed design, i.e. it wasn't "valid" to begin with.

          Replies (1)
          1. Oops, I should have said, "two or more identical solutions." I also noticed the hidden rule early on.
      2. The definition of "valid" for a sudoku board includes the fact that it has a single unique solution. So by definition they are not valid sudokus. Of course that doesn't mean you can't enjoy them and play them anyway.
    2. Interesting, I've built up an intuition on sudoku over the years but have never used such a rule. Intuitively, I understand that sudokus must be unique (so that it's solvable without guessing), but how does one utilize this rule to solve puzzles?
      Replies (2)
      1. In my own "writing a Sudoku solver" explorations, I've used https://www.sudokuwiki.org/ for guides for the algorithms.

        https://www.sudokuwiki.org/Unique_Rectangles is the one that covers the unique solution rectangles with examples.

        https://www.sudokuwiki.org/sudoku.htm?bd=0008060002000100740...

            ... 8.6 ... 
            2.. .1. .74
            ..9 7.. .1.
            
            ..6 ... 2.1
            3.. ... 6.. 
            .2. ... ...
            
            .3. ..5 ...
            ..2 ... .8.
            81. ..2 953
        
        This is one such puzzle. Clicking on the 'Solve Path', you'll see the path with it. It is possible to still solve it with some more advanced techniques if rules 8 and 21 are unselected ... being able to solve it with the 'WXYZ-Wing'.

        It gets to the situation where box 9 has a [[14],[14]] pair and box 8 has a [[14],[1439]] pair. That forces box 8 to not have [[14], [14]], and so the second cell in question must be a [39] because a 1 or a 4 will cause it to fail uniqueness.

        This happens again with boxes 4 and 6 with a box 4 having [[158],[158]] and box 6 having [[15],[15]] forcing a 1 into one of those two cells and removing 1 from the other cells in box 4.

      2. I found this image from when I was emailing a friend about this.

        This is how I've typically used this rule:

        https://nullimage.org/6xvubQNs7D4zMteBvDRBGm#k=KACWzJ3qsPnoY...

        Sorry it's a pastebin'd image, re-creating it in text seemed, tedious 8-)

        Also, I also didn't find this rule to be intuitive. I just happened to stumble across a few instances where the conclusion was made obvious to me, and so I started using it when necessary.

        Replies (1)
        1. Thank you! Don't worry, the pastebin image is plenty clear to me. Will keep an eye out for possible solves using this in the future
    3. Is this just a shortcut? Or did puzzles end up in a state where you had to use it? For instance, the linked image doesn’t need this logic, since neither 6 nor 7 can go in R1C4, so it must be a 9 regardless.
      Replies (1)
      1. Yes, the image is just an example. Others aren't so obvious.

        And I think it would be fair to call this a shortcut.

        As I mentioned, after discovering it, I tried not to use it unless I could find no other way to solve the puzzle. It felt a little like cheating to me (just my personal impression).

        But I "think", there is always another way. It's just that sometimes it was beyond me.

        Some sudoku are REALLY hard 8-)

        I've looked at some of the the championship trial games and found it amazing that anyone could solve them...