|
![](/i/fill.gif) |
> This in turn causes SEqual{} to function correctly.
>
> It's quite slow, but
>
> SEqual{List[1, 2, 3], List[3, 1, x]}
>
> does eventually yield x := 2.
So for the first row in a sudoku I'd expect something like this:
SEqual{List[1..9], List[3,a,b,c,1,d,e,f,8]}
That should work, as both lists are the same length (so the 2nd list
must contain the each of the elements 1-9 once).
But I'm guessing it's going to be very slow, especially when you add in
the other 26 SEqual statements all ANDed together...
Shame, as I think it's a really neat way to write a solver.
Post a reply to this message
|
![](/i/fill.gif) |