ps:
I mean this puzzle :
--- --- ---
--- --3 -85
--1 -2- ---
--- 5-7 ---
--4 --- 1--
-9- --- ---
5-- --- -73
--2 -1- ---
--- -4- --9
--- --- ---
--- --3 -85
--1 -2- ---
--- 5-7 ---
--4 --- 1--
-9- --- ---
5-- --- -73
--2 -1- ---
--- -4- --9
L = 1
FOR I = 1 TO 20
IF A(P) = A(C(P, I)) THEN
L = 0
EXIT FOR
END IF
NEXT I
IF L = 0 THEN GOTO NLGL
FOR I = 1 TO 20
IF A(P) = A(C(P, I)) THEN GOTO NLGL
NEXT I
oysterkite wrote:After I posted that "mean" puzzle I'm glad you used Paul's alogorithm to solve it. I guess a few others have played the puzzle but you are the first to point out the solution has a top row of 987654321 and therefore really puts the CPU to work for "brute-force" type solvers.
oysterkite wrote:How about if we want to study suduko grids with an unknown number of solutions?
Can you give an example of any other solver (with source code provided) that finds ALL solutions to a Sudoku grid?
536020900008000000000000000600285009000903000800761004000000000004000000201000007
Unk wrote:Regarding
- Code: Select all
4...3....
...6..8..
........1
....5..9.
.8.....6.
.7.2.....
...1.27..
5.3....4.
9........
I get to this pointwhich implies at least 2 solutions exist.
- Code: Select all
4 5 1 8 3 7 6 2 9
7 3 2 6 1 9 8 5 4
6 9 8 4 2 5 3 7 1
1 46 46 3 5 8 2 9 7
2 8 5 9 7 1 4 6 3
3 7 9 2 6 4 5 1 8
8 46 46 1 9 2 7 3 5
5 1 3 7 8 6 9 4 2
9 2 7 5 4 3 1 8 6
4 . . | . 3 . | . . .
. . . | 6 . . | 8 . .
. . . | . . . | . . 1
-------+-------+------
. . . | . 5 . | . 9 .
. 8 . | . . . | 6 . .
. 7 . | 2 . . | . . .
-------+-------+------
. . . | 1 . 2 | 7 . .
5 . 3 | . . . | . 4 .
9 . . | . . . | . . .
gsf wrote:yes, on the programmer's forum
time to count all solutions for this puzzle with 957263 solutions on a 3.2GHz p4
- Code: Select all
536020900008000000000000000600285009000903000800761004000000000004000000201000007
dukosu's (10.3s)
soultalker's dlx modified to count (2.7s)
3 of mine (5.9s 40.9s 0.66s)