Sudoku RoyaleDownload

Nishio in Sudoku: Contradiction Chains

English

Nishio is a contradiction check on one digit. You assume one candidate of a digit is true, place that digit, and follow only what this forces for the same digit: every row, column and box still needs exactly one. If some row, column or box is left with no place for the digit, the assumption was false and you remove that candidate. Nothing else is placed or kept.

Below is a real Nishio from the Sudoku Royale library, three forced 6s long, then the line between a Nishio and simply trying a number to see if the puzzle comes out.

What counts as Nishio

The name comes from the Japanese puzzle author Tetsuya Nishio. Sources do not use it the same way. David Eppstein's paper Solving Single-digit Sudoku Subproblems defines the Nishio rule on a single digit: a candidate is removed when it cannot be part of any valid placement of that digit, one per row, column and box. Andries Brouwer's sudoku solving notes describe both uses, a single-digit check and a check of what one value in one cell leads to, and say the single-digit one may be the correct version. Other sites, such as thesudoku.com, use the word for any assumption followed by ordinary logic on the whole grid.

This page uses the single-digit meaning. Assumptions that are followed with every digit are covered on our forcing chains page.

A worked example: can R1C5 be 6?

Cells are named by row and column, so R1C5 is row 1, column 5. In this position R1C5 holds 6 and 8. The diagram shows only the 6s. There is one placed 6, in R7C4, and 21 candidate 6s.

Nishio on 6. Assume R1C5 is 6. Then R2C1 is 6, R3C9 is 6 and R5C6 is 6. Row 6 has 6 candidates only in R6C1, R6C5 and R6C6, and all three are now removed, so row 6 has no place for a 6.C1R1C2R2C3R3C4R4C5R5C6R6C7R7C8R8C9R943256766165193624767614235626437167832564166154667325276931843687162616682673
  • Assumed: R1C5 is 6
  • Forced 6 in this trace
  • Each 6 forces the next
  • 6 lost in row 6
Three forced 6s after the assumption. Row 6 is shaded: its three candidate 6s are each removed by a different 6 of the trace.
  1. Assume R1C5 is 6. That removes the 6 from R1C7 and R1C8 (row 1), R2C6 (box 2) and R6C5 (column 5).
  2. R2C1 is 6. Row 2 had a 6 only in R2C1 and R2C6, and R2C6 is gone. This removes the 6 from R3C1 and R3C3 (box 1) and from R6C1 (column 1).
  3. R3C9 is 6. Row 3 had 6s in R3C1, R3C3 and R3C9. Only R3C9 is left. This removes the 6 from R5C9 and R8C9 (column 9).
  4. R5C6 is 6. Row 5 had a 6 only in R5C6 and R5C9, and R5C9 is gone. This removes the 6 from R6C6 (column 6 and box 5).
  5. Row 6 has no 6. Its only candidates were R6C1, R6C5 and R6C6. R6C5 went in step 1, R6C1 in step 2 and R6C6 in step 4.

Every row needs a 6, so the assumption is false: R1C5 is not 6. Remove the 6, and R1C5 is left with only 8. Box 2 now has a single place for its 6, R2C6, so 6 goes there too. None of the 6s in the trace (R2C1, R3C9, R5C6) is written in. They were only true under an assumption that turned out false.

Every step used only the 6s. You never had to check what any other digit can do, which is what makes Nishio checkable by hand: you can redo the whole trace by looking at one digit on the grid.

Puzzle 201009 from the Sudoku Royale library. Givens (row by row, dots are blanks): .....7.....1.3.24....14.35.2.4.7.....8.25..1..1.4...3.5.7.9318.3.................. The candidates shown are what is left after singles, pointing and claiming, naked and hidden pairs, triples and quads, X-Wing and Swordfish, with nothing else applied.

The same elimination as a chain

The same 6 is removed by an X-Chain with three strong links: R2C6 and R2C1 (row 2), then R6C1 and R4C2 (box 4), then R4C8 and R1C8 (column 8), joined by weak links in column 1 and row 4. One of its ends, R2C6 or R1C8, is a 6, and R1C5 sees both.

X-Chain on 6: R2C6, R2C1, R6C1, R4C2, R4C8, R1C8. Strong links in row 2, box 4 and column 8. R1C5 sees both ends and loses its 6.C1R1C2R2C3R3C4R4C5R5C6R6C7R7C8R8C9R943256766165193624767614235626437167832564166154667325276931843687162616682673
  • Chain cells
  • Chain cells (other side of each strong link)
  • Strong link
  • Weak link
  • 6 removed
The X-Chain view of the same move. R1C5 shares box 2 with R2C6 and row 1 with R1C8.

The shorter one-digit patterns, the Skyscraper and the 2-String Kite, do not remove this 6. Nishio is the way in when you cannot see the chain: you pick a candidate and let the digit show you whether it breaks.

No contradiction proves nothing

Nishio only ever removes a candidate. If a trace runs out without a contradiction, you have learned nothing. Started from R1C8, the trace places a 6 in every row with no conflict. Started from R8C7, it forces nothing at all. Both cells are 6 in the solution, but the traces do not show that: other digits might still rule out the 6s they placed.

In this position, each of the 13 wrong 6 candidates breaks its own trace, so testing every candidate 6 would leave only the eight true ones. That is many traces to run. In practice, start with candidates whose 6 removes the second option from a row, column or box that has only two, as R1C5 does to row 2.

Nishio or guessing?

Both start with "suppose this cell is 6". What differs is what you do next and what you are allowed to conclude.

  • Trying a value to completion: you write a digit in and keep solving the whole grid until it is full or breaks. Write 8 in R1C5 here and singles fill the remaining 24 cells, so the puzzle comes out. That gets the answer, but every one of those 25 digits rested on a choice you had not proved when you made it.
  • Nishio: you never write the assumed digit in pen. You follow one digit, stop at the first contradiction, and the only thing you may keep is the removal of the candidate you assumed.

Writing 6 in R1C5 and solving on with singles on every digit also breaks within a few placements. As long as every step after the assumption is forced, that is still a proof, a contradiction chain on many digits like the one in can you solve sudoku without guessing. It becomes a guess when you make a second assumption on top of the first, or stop checking that each step is forced.

How to run a Nishio by hand

  1. Check your candidates for the digit. One missing candidate can make a step look forced when it is not.
  2. Pick a digit with few candidates, then one of its candidates. A good start is a candidate that takes away one of only two places for the digit in some row, column or box.
  3. Place the digit on scrap paper or in your head, not on the grid, and cross off that digit in its row, column and box.
  4. Place every forced copy of the digit. A forced copy is the last place left for it in a row, column or box. Cross off again after each one.
  5. Stop at the first empty house. If a row, column or box has no place left for the digit, remove the candidate you started from. If nothing is forced any more and no house is empty, the trace proves nothing: drop it and pick another candidate.

Practise one-digit reasoning

Sudoku Royale's Dojo has no Nishio drill. Simple Colouring works the same way, on one digit at a time, following which candidates force each other. Open the Simple Colouring drill on your iPhone.

Get Sudoku Royale: Free on iOS

Frequently Asked Questions

What is Nishio in sudoku?

Nishio is a contradiction check on one digit. Assume one candidate of a digit is true, place every copy of that digit it forces, and if a row, column or box is left with no place for the digit, the candidate is false and you remove it.

Is Nishio the same as guessing?

No. A guess writes a digit in and keeps solving on it. Nishio never writes the assumed digit in, follows only forced placements of one digit, and keeps nothing except the removal of the assumed candidate when the trace breaks.

What is a Nishio forcing chain?

It is a forcing chain that stays on one digit: start from one candidate of the digit and follow what it forces for that digit until a contradiction appears. Some sites use the name for assumptions followed with every digit, which is a general forcing chain.

What if the trace ends without a contradiction?

Then it proves nothing. A trace without a contradiction does not show the candidate is true, because the other digits were never checked. Drop it and try another candidate.

Is Nishio the same as an X-Chain?

They prove the same kind of thing on one digit. In the example on this page, the 6 that Nishio removes from R1C5 is also removed by an X-Chain on 6 with three strong links. Nishio is a way to find such a removal without spotting the chain first.

Do I need Nishio for Sudoku Royale puzzles?

No. Sudoku Royale's hints and Dojo drills do not use Nishio; the drills go up to the XY-Wing and Simple Colouring.

Sudoku Royale: classic sudoku, no ads, live matches when you want themDownload Free