Re: sudoku dictionary attack

2005-06-20 Thread Jonathan


[EMAIL PROTECTED] wrote:
> Thought I'd offer a method for solving all possible 9x9 sudoku puzzles
> in one go. It'll takes a bit of time to run however (and 9x9 seems to
> be about as big as is reasonably possible before combinatorial
> explosion completely scuppers this type of program)...
>
> Basic idea:-
>
> Start with a grid initialised with:
>
> 123456789
> 234567891
> 345678912
> 456789123
> 567891234
> 678912345
> 789123456
> 891234567
> 912345678
>
> Note that all rows and columns contain all 9 digits (but that the
> sub-tiles aren't correct for a sudoku solution).
>
> Next write a program which permutes all 9 columns, and then for each of
> those permutations permutes the last 8 rows. This will, I believe,
> generate all possible grids with no digit repetitions in any row or
> column. It will generate 14,631,321,600 (9!*8!) possible sudoku
> candidates. Finally, check each candidate to see if any 3x3 subtile has
> a repeated digit in it and discard as soon as a repeat is found (sooner
> the better). Any that come through unscathed get written as a 82 (81 +
> lf) char string to an output file.

I'm having trouble coming up with anything that fits this grid:

..12.
..2x.
.
.
.
.
.
.
.

where x is not 3, by permuting columns, then rows.  You may also have
to permute the numbers.  Although, even then, x=1 is still impossible.

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: sudoku dictionary attack

2005-06-20 Thread Oliver Albrecht
Has some one an sodoku-task-generator?
Here another solutions-ways:
http://www.python-forum.de/viewtopic.php?t=3378

-- 
input
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: sudoku dictionary attack

2005-06-20 Thread r.e.s.
"Oliver Albrecht" <[EMAIL PROTECTED]> wrote ...
> Has some one an sodoku-task-generator?

Sudoku puzzles can be generated (and solved) online at
http://act365.com/sudoku/
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: sudoku dictionary attack

2005-06-21 Thread Nick Atty
On Mon, 20 Jun 2005 23:30:27 +0200, Oliver Albrecht
<[EMAIL PROTECTED]> wrote:

>Has some one an sodoku-task-generator?
>Here another solutions-ways:
>http://www.python-forum.de/viewtopic.php?t=3378

It's presumably easy to turn a solver into a generator.

Start with a random grid, and remove squares at random, and then solve
it.   Once solving it reaches a certain level of difficulty, then
there's your problem.
-- 
On-line canal route planner: http://www.canalplan.org.uk

(Waterways World site of the month, April 2001)
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: sudoku dictionary attack

2005-06-22 Thread Nigel Greenwood


Nick Atty wrote:

> On-line canal route planner: http://www.canalplan.org.uk

So the Travelling Salesman goes by narrow boat these days, does he?

Nigel

--
ScriptMaster language resources (Chinese/Modern & Classical
Greek/IPA/Persian/Russian/Turkish):
http://www.elgin.free-online.co.uk

-- 
http://mail.python.org/mailman/listinfo/python-list