solver source : how many solutions for a grid ?

Programs which generate, solve, and analyze Sudoku puzzles

solver source : how many solutions for a grid ?

Postby dorad » Tue Oct 03, 2006 10:33 am

I seek a source who determine the number of solution of a given grid .

php , c , other ?

it's for studient masking , not for make a other solver.

thanks by advance for web links or other solutions,

i have many masks of one grid in a sql database and i need to determine what grids are good and drop the others;

i seek why some masks are ok and not the others , and the function who link the valids masks.
dorad
 
Posts: 1
Joined: 28 August 2006

Solver

Postby Papy » Fri Oct 06, 2006 8:18 am

With the same number of clues or with variable count?
Papy
Papy
 
Posts: 131
Joined: 15 August 2006

Postby coloin » Fri Oct 06, 2006 9:11 am

It depends what you really want to do !

If you want to know how many minimal puzzles [solutions] in a grid -its about 10^16 - this is too much!

If you want to know how many puzzles in a partially filled grid we can do this up to about 40 clues ! - then it gets too big

If you want to know how many ways to complete a puzzle from say 15 clues we can do this up to about 7 additional clues -it takes too long adding more than 7!

If you want to count the number of grids which would fit say 16 clues - we can do this [range 2 solutions to 100,000,000 solutions]

If you want to know whether a mask pattern will solve a grid we can do this 1000 per second !

you should be do all the above with free programs from here !
http://magictour.free.fr/sudoku.htm

suexk is a solver - gives number of grid solutions for a partial grid

suexmult gives clue solutions for a partial or full mask

suexmu35 gives minimal clue solutions for a given mask

suex9s generates puzzles from a single grid

and more

Brilliant !

If I can help you to use the programs to do what you want pm me

C

Regards
coloin
 
Posts: 2383
Joined: 05 May 2005
Location: Devon

Postby ronk » Fri Oct 06, 2006 5:33 pm

coloin wrote:you should be do all the above with free programs from here !
http://magictour.free.fr/sudoku.htm

...

suexmu35 gives minimal clue solutions for a given mask

suex9s generates puzzles from a single grid

Can't find those two there. However, suex9- generates minimals ... but I don't yet know whether that means one minimal even if several are available, or all minimals. I would like a program to do the latter.
ronk
2012 Supporter
 
Posts: 4764
Joined: 02 November 2005
Location: Southeastern USA

Postby coloin » Sat Oct 07, 2006 2:09 am

Ah
http://magictour.free.fr/suexmu35

http://magictour.free.fr/suex9s

they are not listed but the links work !

No it generates how many minimals you set the seed to !
eg C:\suex9s file.txt seed 10000 27 p>filesols

This will generate 10,000 sudoku puzzles [size 28 and bigger] from a single [partial or full] grid and print them to another file.
It can do multiple grid lines at the same time -

You wont get all possible minimals ........at least not in your lifetime.....there are perhaps 10^16 per grid...see post http://forum.enjoysudoku.com/viewtopic.php?t=4771

suexmult/suexmu35

Here is an good example

with 14 common clues use suexmult.exe over this text file


Code: Select all
111121211121111111121111111111211112211111111211111211211121111111111111111112122
639241785284765193517983624123857946796432851458619237342178569861594372975326418


suexmult file.txt 3 1 = 29 sudokus
suexmult file.txt 3 4 = 29 [17 clue] sudokus found
suexmult file.txt 4 4 = 2076 [18 clue] sudokus found

.......a considerable number of these will be non minimal.

EDIT...using suexmu35.exe which is modified to only print or count minimal puzzles
suexmu35 sf.txt 4 4 = 397 [18 clue] sudokus found
suexmu35 sf.txt 5 4 = 6316 [19 clue] sudokus found


the 2 is the mask clue the 1 is a possible clue and the 0 is omitted clue

3 2 prints progress
3 4 counts sudokus

to use it as a pattern mask use all [except 1] 2s and a single 1 command: suexmult file.txt 1 1

this will solve over all your grids

It works !

C
coloin
 
Posts: 2383
Joined: 05 May 2005
Location: Devon


Return to Software