7

I have a sudoku puzzle seen below that I am trying to solve. I know I can punch this into some sudoku solver and get the answer but I am looking for techniques I can use to solve this. Any advice?

Sudoku board

Peter Taylor
  • 4,531
  • 21
  • 35
Plinth
  • 173
  • 1
  • 4
  • You've got some major errors there. Bottom right corner is unsolvable (Select 1 and 5 squares, makes 2 remaining squares both 4). I find sudokos to be nearly impossible to fix after a couple of mistakes, so I'd erase and start fresh – Chris Cudmore Apr 07 '16 at 15:44
  • @ChrisCudmore You're missing the fact that the 2's aren't marked. Those cells could also be 2. – f'' Apr 07 '16 at 15:46
  • @ChrisCudmore I added an explanation. Also, this sudoku penalizes for wrong placement (It's timed). So I know every large number is correct. – Plinth Apr 07 '16 at 15:46
  • 2
    it would be a lot more helpful to see the 2s, at least for me – Matt Apr 07 '16 at 15:47
  • 1
    Looks like on first pass, the two's would be everywhere except Row 6, Column 5 and center box. – Chris Cudmore Apr 07 '16 at 15:52
  • Sometimes, it better to do some hypothesis on paper. If you try with 1 on selected case, you can place another one on middle left square, then on top right square, then bottom right, then bottom left... It could lead you nowhere, but since it's a case with only two possibilities and can fill a lot of other cells, I would try to do like this. Even if it's not a real strategy, it could work (maybe you can find something strong, but I haven't passed enough time yet to find it) – Shkeil Apr 07 '16 at 16:04
  • The no 3 in the mid left box and the no 3 in the mid right that you have entered appear to be conditional of each other and may not be correct from what I can see... Assuming your entries are the turquoise coloured ones? – LiamH Apr 07 '16 at 16:09
  • @LiamH It seem the turquoise are only the row and the column of the selected case (middle right box, middle right cell). I don't think we're able to see which cells are the entries of the OP. – Shkeil Apr 07 '16 at 16:13
  • @LiamH Shkeil is right. I last clicked on the C9, R5 box which highlights the column and row – Plinth Apr 07 '16 at 16:15
  • aren't there too may ungivens for this to be solved? – JMP Apr 07 '16 at 16:18
  • Oh yes obviously that's what the turquoise is. How could I be so oblivious?! Is there any way of knowing which numbers are inputed and which numbers are given? – LiamH Apr 07 '16 at 17:01
  • this is like 7-coloring a graph. – JMP Apr 07 '16 at 17:18
  • You should add the 2's. Then you can fill in any numbers that are alone in their squares. For really hard sudokus you will probably need to find two squares that can only be one of two numbers (preferably ones that will give you a good amount of info about the rest of the puzzle). Then, you just pick one of the two options and continue filling out the puzzle. If you hit an error, go back and switch the placement of the original two numbers. You may have to do this several times before finding an error, but exhaust both options for the most recent guess before going back to the original. – gannolloy Apr 07 '16 at 17:46
  • 1
    The total amount of time wasted by everyone who was confused by the lack of twos was almost certainly less than it took me to edit the image in the GIMP and add them. I did it because I felt generous: I could as easily have said "If it's too much work for you to put effort into asking your question clearly, it's too much work for anyone else to put effort into answering it". – Peter Taylor Apr 07 '16 at 19:45
  • Newbie here :) Thanks for all the info above and naming strategies. After reading them all, I guess I've been using nearly all of them without knowing their names for about 4 years now. – Joe Jones Dec 09 '16 at 22:10

2 Answers2

29

I'll just state some sudoku solving strategies in general, so not for the sudoku posted by you in particular. (NOTE: You probably know the first few, but I just state all of them for completeness.)

1. Naked Single

Probably the easiest one that everyone knows: When there is only one candidate available, you can simply fill it in. For example:

enter image description here

We can only fill in a 6 at the marked cell, since any of the other numbers would conflict.

2. Hidden Single

Again, a pretty easy one that everyone knows: When there is only one place in a particular row, column or block for a specific number to go, we can just fill it in. For example:

enter image description here

Here there is only one place for the 2 to go, and that is the marked cell.

3. Block / Column / Row Interactions

Now we go to some strategies to remove potential candidates for cells.

enter image description here

Here we know the 7 can't be on the same row as the 7 displayed, so it must be at either of the green marked cells. At the same time, we can dismiss the 7 as candidate from all the purple marked cells.

4. Block / Block Interactions

If a number only has two candidates for two cells in two different blocks AND both cells are in the same column or row, we can remove that number as candidate in all other columns or rows. For example:

enter image description here

Here the 3 can only be in one of the green marked cells. Since there are only two candidates per block, we can dismiss all the purple marked cells to contain a 3.

enter image description here

Same principle. We know the 2 has to be in two of the green marked cells. Because it can only be in the green cells in the two blocks, we can dismiss it as candidates in the purple cells of the third block.

5. Naked Pair, Triplet, Quad

If two cells in the same row, column or block have only the same two candidates, we can dismiss them from all the other cells in the same row, column or block.

enter image description here

Let's look at the green marked cells. Here we see a 2 and 3. Because in one of the two green cells we must have a 2, and in the other a 3 (or vice-versa), we know there can't be any 2s or 3s in the same column, so we can dismiss the 2s and 3s from the purple marked cells.

In addition. The same two green cells are also in the same block, so we can also dismiss the 2s and 3s from the yellow marked cells.

The same strategy can be used with three or even four cells.

6. Hidden Pair, Triplet, Quad

Hidden Pair is pretty similar to Naked Pair, but instead of dismissing numbers from other cells, it dismisses other numbers from the paired cells themselves.

enter image description here

Look at the two green cells. They are both in the same row, and both have the numbers 3 and 5 as potential candidates, AND the other empty cells in the same row doesn't have the 3 and 5 as potential candidates. So we know the 3 and 5 have to be in the green cells. Because of that, we can dismiss all other candidates in the green cells, so only the 3s and 5s are left.

7. X-Wing

enter image description here

If we look at the green cells we see two rows each containing two possible candidate cells for the number 9. For both of these rows, the two possible cells are in the same column. If we put a 9 in the top-right green cell, we know the top-left and bottom-right green cells are dismissed and the other 9 has to be in the bottom-left green cell. Because of that, we can dismiss the 9 from all the purple cells since they are in the same column.

8. Swordfish

Now we get into pretty obscure strategies in my personal opinion. Swordfish states that three columns can each have two or three candidates for the given number, as long as they fall on three common rows (or column & row vice-versa of course). It's pretty similar to X-Wing, but with a three times three net, instead of a two times two net. For example:

enter image description here

If we look at the green cells we see that in the three columns they only have two possible candidates for the number 1. Because each of those columns must contain one 1, and they also share three of the same rows, it means we can eliminate the 1 from the purple marked cells.

9. XY-Wing

enter image description here

Let's say we have the candidates distributed like above. We can dismiss Z from the marked cell because of the following rules:

  • If XY becomes number X, then XZ must be number Z, so * cannot be number Z
  • If XY becomes number Y, then YZ must be number Z, so * cannot be number Z

enter image description here

Same rule applies for the image above.

enter image description here

In the above image we can dismiss the 7s from the purple cells. Because:

  • If row4-column4 (containing 57) becomes 5,
    • then row4-column7 (containing 25) must be 2,
    • then row6-column8 (containing 27) must be 7 (because they are in the same block),
    • then the purple cells can't be 7 anymore.
  • If row4-column4 (containing 57) becomes 7,
    • then the purple cells can't be 7 anymore.

Both paths lead to the same conclusion, so we can dismiss 7 from the purple marked cells.

10. Colouring

With colouring we look for chains, and based on that we can eliminate candidates. For example:

enter image description here

  • If row8-column3 (green cell containing 12) is a 1, the red marked cell cannot be 1.
  • If row8-column3 is not a 1,
    • then row4-column3 (orange cell containing 12) must be a 1,
    • then row5-column1 (green cell containing 19) can't be a 1 (because they are in the same block),
    • then row5-column4 (orange cell containing 17) must be a 1,
    • so the red marked cell cannot be a 1.

Because both chains come to the same conclusion, we can eliminate candidate 1 from the red marked cell.

11. Remote Pairs

This is a combination of Naked Pairs and Colouring.

enter image description here

Let's look at cell row2-column6:

  • If row2-column6 is a 1,
    • then row2-column8 must be a 2,
    • then row3-column7 must be a 1,
    • then row4-column7 must be a 2
  • If row2-column6 is a 2,
    • then row2-column must be a 1,
    • then row3-column7 must be a 2,
    • then row4-column7 must be a 1

Either way of the other, in case of both chains, there can't be any 1s or 2s in the purple marked cell, so we can dismiss those as candidates.

NOTE: There must be an even number of cells in the chain to dismiss. For example, if the chain would only be row2-column8 -> row3-column7 -> row4-column7, then if row2-column8 is a 1, so must row4-column7; and if row2-column8 is a 2, so must row4-column7. All we know is that both cells contain the same number, but we don't know which of the two, so we cannot dismiss the 1s and 2s from row5-column8.

12. XY-Chain

Let's say we have the following cells:

enter image description here

The numbers displayed are the ONLY candidates. We can build a chain like this:

  • If row1-column1 is a 3,
    • then row1-column5 must be 7,
    • then row2-column6 must be 6,
    • then row2-column8 must be 8,
    • then row3-column9 must be 1

So, we know that either row1-column1 or row3-column9 must be a 1. Because of that, we can dismiss the 1s from the marked cells.

enter image description here

  • If row1-column2 is a 5,
    • then row6-column2 must be 4,
    • then row6-column8 must be 7,
    • then row6-column1 must be 1

So we know that either row1-column2 or row6-column1 must be a 1. Because of that, we can dismiss the 1s from the purple marked cells.

13. Forcing Chains

enter image description here

  • If row2-column1 is a 2,
    • then row1-column2 must be a 7
  • If row2-column1 is a 1,
    • then row5-column1 must be a 2,
    • then row6-column2 must be a 1,
    • then row6-column8 must be a 3,
    • then row1-column8 must be a 2,
    • then row1-column2 must be a 7

Both chains lead to the same conclusion: row1-column2 must be a 7, so we can fill it in.

14. Trial and Error

If all hope fails, you can always just guess. Just store your current state somewhere, pick an empty cell (preferably one with only two possible candidates) and fill one in. Then continue with the strategies above and see if you can solve it completely. If you can, congrats. If you cannot, try the other one. (If you still can't solve it, guess another starting cell with two possible candidates and repeat.)


So, I hope these solving strategies will help you solve your sudoku.

Sorry all for the long post, but I wanted to include all strategies.

Kevin Cruijssen
  • 4,588
  • 20
  • 39
10

I don’t know whether there’s a standard, concise method for discussing Sudoku puzzles, so I’ll use Excel notation:

legend

(Unfortunately, Excel wouldn’t let me draw borders to the left of Column A or above Row 1, so I just left off all the outside borders.)

$\color{red}{\text{First,}}$ the only cells in the DEF/123 box where 4 and 7 can go are cells D3 and E3.  Therefore, those two values, and no others, must go into those two cells:

That may be the breakthrough you needed.  I’ll take you through the next few steps, anyway.

$\color{orange}{\text{Second,}}$ that means that the only cell in the DEF/123 box where 1 can go is cell D2:
$\color{green}{\text{Third,}}$ that means that cells H2 and I2 cannot contain 1, so it must go into G1 or G3:
$\color{blue}{\text{Fourth,}}$ cell G6 must contain 5, because every other digit appears somewhere else in Column G and/or Row 6.  And then cell G9 must contain 2, by the same argument:

It seems to be fairly straightforward from there.  Here’s the final answer:

Peregrine Rook
  • 4,880
  • 2
  • 26
  • 40