From Sudopedia, the free Sudoku reference guide
Talk:Ariadne's Thread
From Sudopedia
The article currently states that Ariadne's Thread assumes that the Sudoku has a unique solution.
I don't think this is true. Here is an algorithmic outline of Ariadne's Thread as it applies to Sudoku:
- For each solved cell (including initial clues), eliminate its value as a candidate from all cells that share a house with that cell.
- Proceed to the first unsolved cell (call it c). Choose its first candidate value (call it v).
- Make a copy of the Sudoku, but consider c solved with value v.
- Apply the rules of Sudoku to the grid:
- For each solved cell, eliminate its value as a candidate from all cells that share a house with the solved cell.
- If any cell is left with only one candidate, mark that cell as solved and repeat this step as long as it results in newly-solved cells.
- If all cells are solved, we have discovered the solution for the puzzle.
- Otherwise, check the puzzle for unsolved cells with no candidates. The existence of such a cell means that our assumption (that c has the value v) must be wrong. We must backtrack:
- Discard the copy of the Sudoku.
- Remove v as a candidate from cell c. Mark c as solved if it has only one remaining candidate.
- Repeat the entire algorithm.
This algorithm works just fine on Sudokus with more than one solution. In fact, if you hand it a puzzle with no clues whatsoever, it ends up constructing a Sudoku.
Professor Prune 15:45, 2 February 2008 (EST)
I put in the 4 February 2008 edit. I forgot to log in first, so it didn't go under my name. Sorry about that!
Professor Prune 15:53, 4 February 2008 (EST)

