Sudoku solver utility

=====================


What is a sudoku?

=================

A sudoku consists in 9 times 9 squares. In each row each digit from 1 to 9 may

appear only once. The same goes for the columns and also for the 9 smaller

squares within the bigger one. I refer to them as sectors. As far as I know, a

sudoku must only have one solution so the procedure of creating a sudoku

with enough challenge is another project that I never studied further.

If you don´t know what a sudoku is then you probably wouldn´t be reading this

text, so I expect you to be a bit curious.


Background

=========

Solving a sudoku is quite exciting, but can take a great deal of time. Of course

that is what makes it funny. Wouldn´t it be good if someone could be completely

focused on the task of solving it without making silly mistakes and thus has to

start over again from scratch? I´m not that focused, but I know many different 

approaches on how to reduce the number of possible solutions for a square.

With the help of speculation where my knowledge doesn´t lead to a solved

matrix, a solver can make a work I´d never have the patience to do.

This program is the result of a long time of practice and hints. Nowadays I almost

never solve sudokus, but I have really enjoyed developing the solver for my

calculator. So really: This program is written for my pleasure and it wasn´t meant

to be used actually. I just wanted it to work and now I feel like I can move on to

other projects.


Usage

=====

Find a sudoku you, for some reason, wan´t to solve and start this program.

You can´t run it in "Split Screen" mode, because of the window size.

Fill empty squares with zeros and all numbers as they appear(ignoring the fact

that often the sudoku is printed with nine squares within the big 9x9 one).

If it looks okay, press F1 and let the calculator work for a few seconds(at most)

and you will either see the solution or a message telling what went wrong. If

the sudoku is partially solved then you can study how far the program could get.


Solving method

==============

The program uses all my known methods of eliminating possible solutions for

each square. There are many methods included plus the emergency speculation

mechanism which only affects the matrix in case it can easily find only one

solution. As far as I know, this program can´t solve sudokus with more than one

solution(and that´s just the way as it should be). The methods used to solve is not

mentioned in this text. It would make it quite long.


Enjoy and have a nice day!

Regards

Pär Wiklund


Update 1.2:

The program has been optimized regarding both speed and size. The most

frequently called algorithm is faster and similarities in the more seldom used

algorithms has been utilized. As a result, the program is smaller and a little bit more

clever as well.. In this case a reduced program size should be more valueable than

a slightly slower execution.