I can't see what the second solution is from your post.  I
don't find it in my solver either:

  1 sudoku t26
Move 1 path 0 forced fills: 7 1 (7) 
Move 2 path 0 forced fills: 6 1 (5) 
Move 3 path 0 forced fills: 8 1 (6) 
Move 4 path 0 forced fills: 4 1 (4) 
Move 5 path 0 forced fills: 2 1 (8) 
Move 6 path 0 inferred fills: 1 0  2 2  0 5  4 3  6 7  8 0  
Move 7 path 0 forced fills: 0 5 (2) 1 0 (5) 2 2 (9) 4 3 (9) 6 7 (9) 8 0 (9) 
Move 8 path 0 forced fills: 8 2 (3) 
Move 9 path 0 forced fills: 7 0 (1) 
Move 10 path 0 inferred fills: 0 2  
Move 11 path 0 forced fills: 0 2 (4) 
Move 12 path 0 block-row/col removals: 5 6 (4) 5 7 (4) 5 8 (4) 
Move 13 path 0 block-row/col removals: 8 8 (4) 
Move 14 path 0 Subset analysis found closed subsets:
  (1 6) (2 7) (2 8) 
  (0 0) (0 3) 
  (2 8) (3 8) 
Move 15 path 0 block-row/col removals: 1 6 (3) 4 6 (3) 5 6 (3) 
Move 16 path 0 forced fills: 1 6 (6) 
Move 17 path 0 forced fills: 1 2 (7) 
Move 18 path 0 forced fills: 0 0 (6) 1 5 (3) 4 2 (6) 
Move 19 path 0 forced fills: 0 3 (7) 3 0 (3) 4 5 (5) 
Move 20 path 0 forced fills: 2 5 (6) 3 8 (4) 5 0 (7) 
Move 21 path 0 forced fills: 2 3 (5) 2 8 (3) 3 7 (6) 5 5 (4) 
Move 22 path 0 forced fills: 2 7 (4) 8 3 (8) 8 5 (1) 
Move 23 path 0 forced fills: 6 3 (3) 6 5 (7) 8 8 (2) 
Move 24 path 0 forced fills: 5 3 (6) 5 8 (8) 7 4 (4) 8 6 (4) 
Move 25 path 0 forced fills: 5 7 (3) 6 8 (1) 7 6 (3) 8 4 (5) 
Move 26 path 0 forced fills: 4 7 (1) 4 8 (7) 5 4 (2) 6 6 (8) 
Move 27 path 0 forced fills: 0 6 (1) 0 7 (8) 4 4 (3) 4 6 (2) 5 6 (5) 
Success in path 0.
---T-----------------┐
│52│6 3 4 7 9 2 1 8 5│
│  │5 1 7 4 8 3 6 2 9│
│  │2 8 9 5 1 6 7 4 3│
│  │3 2 5 1 7 8 9 6 4│
│  │8 4 6 9 3 5 2 1 7│
│  │7 9 1 6 2 4 5 3 8│
│  │4 5 2 3 6 7 8 9 1│
│  │1 7 8 2 4 9 3 5 6│
│  │9 6 3 8 5 1 4 7 2│
L--+------------------

I was able to solve the puzzle without guessing, using this technique in
move 14:

NB. Time for subset analysis.  For each group, we look for subsets of 
candidates whose
total
NB. number of unique elements is the same as the number of cells in the 
subsets.  Then,
NB. we remove those elements from the OTHER candidates in the group.

Henry Rich


> -----Original Message-----
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On Behalf Of R.E. Boss
> Sent: Tuesday, April 25, 2006 11:47 AM
> To: 'Programming forum'
> Subject: [Jprogramming] Sudoku solver
> 
> I did not succeed in solving
> 
>  
> 
>    x=: , 0&".;._2 (0 : 0)
> 
> 0 3 0 0 9 0 0 0 5
> 
> 0 1 0 4 8 0 0 2 9
> 
> 2 0 0 0 1 0 7 0 0
> 
> 0 2 5 1 7 8 9 0 0
> 
> 8 0 0 0 0 0 0 0 0
> 
> 0 9 1 0 0 0 0 0 0
> 
> 4 0 2 0 6 0 0 0 0
> 
> 0 0 8 2 0 9 0 5 6
> 
> 0 0 0 0 0 0 0 7 0
> 
> )
> 
>  
> 
> so I fed it to Hui's sudoku solver:
> 
>  
> 
>    see x, sudoku x
> 
> +-------------+-------------+
> 
> |+---+---+---+|+---+---+---+|
> 
> ||.3.|.9.|..5|||634|792|185||
> 
> ||.1.|48.|.29|||517|483|629||
> 
> ||2..|.1.|7..|||289|516|743||
> 
> |+---+---+---+|+---+---+---+|
> 
> ||.25|178|9..|||325|178|964||
> 
> ||8..|...|...|||846|935|217||
> 
> ||.91|...|...|||791|624|538||
> 
> |+---+---+---+|+---+---+---+|
> 
> ||4.2|.6.|...|||452|367|891||
> 
> ||..8|2.9|.56|||178|249|356||
> 
> ||...|...|.7.|||963|851|472||
> 
> |+---+---+---+|+---+---+---+|
> 
> +-------------+-------------+
> 
>  
> 
> The forced moves I had found also
> 
>  
> 
>    see t=: f^:a: x
> 
> +-------------+-------------+-------------+-------------+
> 
> |+---+---+---+|+---+---+---+|+---+---+---+|+---+---+---+|
> 
> ||.3.|.9.|..5|||.3.|.92|..5|||.34|.92|..5|||.34|.92|..5||
> 
> ||.1.|48.|.29|||.1.|48.|.29|||.1.|48.|.29|||51.|48.|.29||
> 
> ||2..|.1.|7..|||289|.1.|7..|||289|.1.|7..|||289|.1.|7..||
> 
> |+---+---+---+|+---+---+---+|+---+---+---+|+---+---+---+|
> 
> ||.25|178|9..|||.25|178|9..|||.25|178|9..|||.25|178|9..||
> 
> ||8..|...|...|||8..|9..|...|||84.|9..|...|||84.|9..|...||
> 
> ||.91|...|...|||.91|...|...|||.91|...|...|||.91|...|...||
> 
> |+---+---+---+|+---+---+---+|+---+---+---+|+---+---+---+|
> 
> ||4.2|.6.|...|||4.2|.6.|.9.|||452|.6.|.9.|||452|.6.|.9.||
> 
> ||..8|2.9|.56|||.78|2.9|.56|||178|2.9|.56|||178|2.9|.56||
> 
> ||...|...|.7.|||9..|...|.7.|||9..|...|.7.|||963|...|.7.||
> 
> |+---+---+---+|+---+---+---+|+---+---+---+|+---+---+---+|
> 
> +-------------+-------------+-------------+-------------+
> 
>  
> 
> But then you had to guess
> 
>  
> 
>    see g=: guess (ok#]) assign x
> 
> +-------------+-------------+
> 
> |+---+---+---+|+---+---+---+|
> 
> ||634|.92|..5|||734|.92|..5||
> 
> ||51.|48.|.29|||51.|48.|.29||
> 
> ||289|.1.|7..|||289|.1.|7..||
> 
> |+---+---+---+|+---+---+---+|
> 
> ||.25|178|9..|||.25|178|9..||
> 
> ||84.|9..|...|||84.|9..|...||
> 
> ||.91|...|...|||.91|...|...||
> 
> |+---+---+---+|+---+---+---+|
> 
> ||452|.6.|.9.|||452|.6.|.9.||
> 
> ||178|2.9|.56|||178|2.9|.56||
> 
> ||963|...|.7.|||963|...|.7.||
> 
> |+---+---+---+|+---+---+---+|
> 
> +-------------+-------------+
> 
>  
> 
> But both guesses led to a solution:
> 
>  
> 
>    see t0=: f^:a: 0{g
> 
> +-------------+-------------+-------------+-------------+-----
> --------+-----
> --------+-------------+-------------+-------------+
> 
> |+---+---+---+|+---+---+---+|+---+---+---+|+---+---+---+|+---+
> ---+---+|+---+
> ---+---+|+---+---+---+|+---+---+---+|+---+---+---+|
> 
> ||634|.92|..5|||634|792|..5|||634|792|..5|||634|792|..5|||634|
> 792|..5|||634|
> 792|..5|||634|792|..5|||634|792|..5|||634|792|185||
> 
> ||51.|48.|.29|||517|48.|.29|||517|48.|629|||517|483|629|||517|
> 483|629|||517|
> 483|629|||517|483|629|||517|483|629|||517|483|629||
> 
> ||289|.1.|7..|||289|.1.|7..|||289|.1.|7..|||289|.1.|743|||289|
> .1.|743|||289|
> 516|743|||289|516|743|||289|516|743|||289|516|743||
> 
> |+---+---+---+|+---+---+---+|+---+---+---+|+---+---+---+|+---+
> ---+---+|+---+
> ---+---+|+---+---+---+|+---+---+---+|+---+---+---+|
> 
> ||.25|178|9..|||325|178|96.|||325|178|964|||325|178|964|||325|
> 178|964|||325|
> 178|964|||325|178|964|||325|178|964|||325|178|964||
> 
> ||84.|9..|...|||846|9..|...|||846|9..|..7|||846|9..|..7|||846|
> 9.5|..7|||846|
> 9.5|..7|||846|9.5|..7|||846|9.5|2.7|||846|935|217||
> 
> ||.91|...|...|||791|...|...|||791|...|...|||791|...|...|||791|
> ..4|...|||791|
> 6.4|5..|||791|6.4|5..|||791|6.4|5.8|||791|624|538||
> 
> |+---+---+---+|+---+---+---+|+---+---+---+|+---+---+---+|+---+
> ---+---+|+---+
> ---+---+|+---+---+---+|+---+---+---+|+---+---+---+|
> 
> ||452|.6.|.9.|||452|.6.|.9.|||452|.67|.9.|||452|.67|.9.|||452|
> .67|.91|||452|
> .67|.91|||452|367|.91|||452|367|891|||452|367|891||
> 
> ||178|2.9|.56|||178|2.9|.56|||178|2.9|.56|||178|2.9|.56|||178|
> 2.9|.56|||178|
> 2.9|.56|||178|249|.56|||178|249|356|||178|249|356||
> 
> ||963|...|.7.|||963|...|.7.|||963|...|.7.|||963|..1|.7.|||963|
> ..1|.7.|||963|
> .51|.7.|||963|851|47.|||963|851|472|||963|851|472||
> 
> |+---+---+---+|+---+---+---+|+---+---+---+|+---+---+---+|+---+
> ---+---+|+---+
> ---+---+|+---+---+---+|+---+---+---+|+---+---+---+|
> 
> +-------------+-------------+-------------+-------------+-----
> --------+-----
> --------+-------------+-------------+-------------+
> 
>    see t0=: f^:a: 1{g
> 
> +-------------+-------------+-------------+-------------+-----
> --------+-----
> --------+-------------+-------------+
> 
> |+---+---+---+|+---+---+---+|+---+---+---+|+---+---+---+|+---+
> ---+---+|+---+
> ---+---+|+---+---+---+|+---+---+---+|
> 
> ||734|.92|..5|||734|692|..5|||734|692|..5|||734|692|..5|||734|
> 692|..5|||734|
> 692|815|||734|692|815|||734|692|815||
> 
> ||51.|48.|.29|||516|487|.29|||516|487|329|||516|487|329|||516|
> 487|329|||516|
> 487|329|||516|487|329|||516|487|329||
> 
> ||289|.1.|7..|||289|.1.|7..|||289|.1.|76.|||289|.1.|764|||289|
> .1.|764|||289|
> 31.|764|||289|315|764|||289|315|764||
> 
> |+---+---+---+|+---+---+---+|+---+---+---+|+---+---+---+|+---+
> ---+---+|+---+
> ---+---+|+---+---+---+|+---+---+---+|
> 
> ||.25|178|9..|||.25|178|9..|||.25|178|9..|||625|178|9..|||625|
> 178|943|||625|
> 178|943|||625|178|943|||625|178|943||
> 
> ||84.|9..|...|||847|9..|...|||847|9..|...|||847|9..|...|||847|
> 9..|...|||847|
> 9.3|.11|||847|923|511|||847|923|511||
> 
> ||.91|...|...|||.91|...|..7|||.91|...|..7|||.91|...|..7|||391|
> ...|..7|||391|
> 5..|.87|||391|526|687|||391|526|687||
> 
> |+---+---+---+|+---+---+---+|+---+---+---+|+---+---+---+|+---+
> ---+---+|+---+
> ---+---+|+---+---+---+|+---+---+---+|
> 
> ||452|.6.|.9.|||452|76.|.9.|||452|76.|.9.|||452|76.|.98|||452|
> 761|198|||452|
> 761|198|||452|761|198|||452|761|198||
> 
> ||178|2.9|.56|||178|2.9|.56|||178|2.9|.56|||178|239|456|||178|
> 239|456|||178|
> 239|456|||178|239|456|||178|239|456||
> 
> ||963|...|.7.|||963|...|.7.|||963|8..|.7.|||963|8..|.7.|||963|
> 8..|.7.|||963|
> 8..|272|||963|85.|272|||963|854|272||
> 
> |+---+---+---+|+---+---+---+|+---+---+---+|+---+---+---+|+---+
> ---+---+|+---+
> ---+---+|+---+---+---+|+---+---+---+|
> 
> +-------------+-------------+-------------+-------------+-----
> --------+-----
> --------+-------------+-------------+
> 
>  
> 
>  
> 
> Question remains: why did not 'sudoku x' show both solutions, 
> as is stated
> in http://www.jsoftware.com/jwiki/Essays/Sudoku?
> 
>  
> 
> R.E. Boss
> 
> ----------------------------------------------------------------------
> For information about J forums see 
> http://www.jsoftware.com/forums.htm

----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to