English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

do u guys know how to solve a sudoku puzzle?
is there a formula to solve the puzzle fast?
like the the first row = 45
second row = 45 and so on

and also first column = 45 and so on

can u guys tell me how u solve this puzzle ? the mathematics way? lol

2006-09-04 09:41:50 · 1 answers · asked by Anonymous in Science & Mathematics Mathematics

1 answers

Generally, for human, it is natural to use logic of what numbers can or cannot be in a location to solve it.

Using computer, few months ago I only found dynamic programming methods by doing trial and error serch, which is very time consuming.

Last week, with about an hour free time, I wrote a simple program that solve by elimination logic, which is very fast. I guess most of us apply the similar elimination logic, but very limited by our relative poor memory capability as compared to computers.

What you have suggested could be what is called the "back projection" method, which is used in computed tomography systems. However, this method is tedious and the use of computer is suitable.

Basically, you want to solve for numbers in the empty squares such that all rows and columns add up to 45. You may also easily add in the condition that numbers in each 3x3 subsquares also add up to 45. You will have 9+9+9=27 equations for solving for the unknowns.

One way is by assigning the average to the empty squares. E.g. Initiate all the empty squares with a number, may be 5 is preferable. If a row originally has 1,3,4,9, implying that the current sum is 1+3+4+9+5+5+5+5+5=42, then increase the unknown squares by adding (45-42)/5=0.6. Repeat this for every rows and columns and 3x3 subsquares, again and again, until, hopefully, solution is found.

However, the above may not be capable to solve for sudoku with more than 27 empty squares. Also, its solution may not satisfy the constraint of only integers 1 to 9, and no repetition in each row, column and subsquares.

By the way, the back projection can be implemented in another way without doing so many iterations.

2006-09-04 15:31:36 · answer #1 · answered by back2nature 4 · 0 0

The only mathematical way I can think of is to use a ton of logic statements... way too many to make it practical for the typical solver, I'm afraid.

2006-09-04 16:45:11 · answer #2 · answered by Louise 5 · 0 0

fedest.com, questions and answers