Main

 
NP-Complete Sudoku Solver

Sudoku Problem Solver

This applet demonstrates the solution of a sudoku puzzle by treating it as an NP-Complete problem, rather than through the application of sudoku problem solving strategies.

It's set up here with a 'super fiendish' puzzle from The Times. To set up your own puzzle, use the 'clear' button, and then key in the given values. It doesn't automatically tab, so be careful not to key more than one number in a position. It checks the input, so you'll know if you've keyed wrong.

Use the 'solve' button to set it going. Every one million iterations it will stop and ask if you want to continue. Often, it will complete in less than one million.... usually, no more than three. It's all a question of luck.

To run the puzzle again use the 'reset' button. You can also use the reset button at any point to make small adjustments to the givens.

Minimum Sudoku

This applet is setup with one of Gordon Royle's minimum single-solution sudokus with 17 givens.

If you're very lucky it may solve it, but it's very unlikely.

Try knocking out one of the givens. At least then it will come to a solution. If the knocked out given has its original value, then it's solved.

To restore the puzzle with its original content, refresh the page.

Practical Aspects of NP-Complete Problems

These applets are part of a set that I've designed to illustrate some practical aspects of NP-complete problems. If you want to read the associated articles, please go here.


...or perhaps you'd like to visit My Other Pages