View previous topic :: View next topic |
Author |
Message |
| garthd
| Joined: 29 Apr 2006 | Posts: 32 | : | | Items |
|
Posted: Thu Aug 06, 2009 12:13 pm Post subject: Is this Samurai puzzle unique? |
|
|
I have a samurai generator which has come up with the following puzzle. My solver reckons the following samurai / gattai puzzle has a single unique solution...
Code: | ..9...6.......8......6....11...7....9.82..7..3.69......5.3...8..8..4........5....
..............4......27.5.6.9.....3...3..572.6....7.9..5......3...8..9......3..6.
.8.2...5......................6.........4....5.4..7....2....9.5..84...236.1.9....
.......2....4....82.....6.1....6.......8...7..9....8..3.6.5.....12.8.9...4.6.31..
9.5..3....23......................9......2.45.5.....31.7.5.48.3...7.....4.1.6..7. |
Solution
Code: | 419527638567138492832694571125473869948261753376985124754312986683749215291856347
964153872527684319138279546792418635813965724645327198451796283376842951289531467
986273451215984376347156289879621534132549768564837192423768915798415623651392847
879516423165432798234978651458267319623891574791345862386159247512784936947623185
915873426623945187847216359364157298189632745752489631276594813538721964491368572 |
However, JSudoku indicates there are multiple solutions. Does anyone else (thinking Mike Metcalfe) have a solver that can validate if this grid has a unique solution or not.
Thanks! |
|
Back to top |
|
|
| m_b_metcalf
| Joined: 13 Mar 2006 | Posts: 210 | : | Location: Berlin | Items |
|
Posted: Mon Aug 10, 2009 1:36 pm Post subject: Re: Is this Samurai puzzle unique? |
|
|
garthd wrote: | Does anyone else (thinking Mike Metcalf) have a solver that can validate if this grid has a unique solution or not.
|
He does, but is away from base until the end of the month.
Sorry,
Mike Metcalf |
|
Back to top |
|
|
| tarek
| Joined: 31 Dec 2005 | Posts: 153 | : | Location: London, UK | Items |
|
Posted: Mon Aug 10, 2009 7:57 pm Post subject: |
|
|
Hi garthd,
Code: | Solution 1
219534678567198432834627591125473869948216753376985124451362987683749215792851346
542163879768954312931278546897412635413695728625387194156749283374826951289531467
987234156215869374346571289132658497879143562564927831423786915798415623651392748
879516423165432798234978651458267319623891574791345862386159247512784936947623185
915683427623457189748291356362145798197832645854976231279514863536728914481369572
+-------+-------+-------+-------+-------+-------+-------+
| 2 1 9 | 5 3 4 | 6 7 8 | | 5 4 2 | 1 6 3 | 8 7 9 |
| 5 6 7 | 1 9 8 | 4 3 2 | | 7 6 8 | 9 5 4 | 3 1 2 |
| 8 3 4 | 6 2 7 | 5 9 1 | | 9 3 1 | 2 7 8 | 5 4 6 |
+-------+-------+-------+-------+-------+-------+-------+
| 1 2 5 | 4 7 3 | 8 6 9 | | 8 9 7 | 4 1 2 | 6 3 5 |
| 9 4 8 | 2 1 6 | 7 5 3 | | 4 1 3 | 6 9 5 | 7 2 8 |
| 3 7 6 | 9 8 5 | 1 2 4 | | 6 2 5 | 3 8 7 | 1 9 4 |
+-------+-------+-------+-------+-------+-------+-------+
| 4 5 1 | 3 6 2 | 9 8 7 | 2 3 4 | 1 5 6 | 7 4 9 | 2 8 3 |
| 6 8 3 | 7 4 9 | 2 1 5 | 8 6 9 | 3 7 4 | 8 2 6 | 9 5 1 |
| 7 9 2 | 8 5 1 | 3 4 6 | 5 7 1 | 2 8 9 | 5 3 1 | 4 6 7 |
+-------+-------+-------+-------+-------+-------+-------+
| | | 1 3 2 | 6 5 8 | 4 9 7 | | |
| | | 8 7 9 | 1 4 3 | 5 6 2 | | |
| | | 5 6 4 | 9 2 7 | 8 3 1 | | |
+-------+-------+-------+-------+-------+-------+-------+
| 8 7 9 | 5 1 6 | 4 2 3 | 7 8 6 | 9 1 5 | 6 8 3 | 4 2 7 |
| 1 6 5 | 4 3 2 | 7 9 8 | 4 1 5 | 6 2 3 | 4 5 7 | 1 8 9 |
| 2 3 4 | 9 7 8 | 6 5 1 | 3 9 2 | 7 4 8 | 2 9 1 | 3 5 6 |
+-------+-------+-------+-------+-------+-------+-------+
| 4 5 8 | 2 6 7 | 3 1 9 | | 3 6 2 | 1 4 5 | 7 9 8 |
| 6 2 3 | 8 9 1 | 5 7 4 | | 1 9 7 | 8 3 2 | 6 4 5 |
| 7 9 1 | 3 4 5 | 8 6 2 | | 8 5 4 | 9 7 6 | 2 3 1 |
+-------+-------+-------+-------+-------+-------+-------+
| 3 8 6 | 1 5 9 | 2 4 7 | | 2 7 9 | 5 1 4 | 8 6 3 |
| 5 1 2 | 7 8 4 | 9 3 6 | | 5 3 6 | 7 2 8 | 9 1 4 |
| 9 4 7 | 6 2 3 | 1 8 5 | | 4 8 1 | 3 6 9 | 5 7 2 |
+-------+-------+-------+-------+-------+-------+-------+
Solution 2
219534678567198432834627591125473869948216753376985124451362987683749215792851346
542163879867954312931278546798412635413695728625387194156749283374826951289531467
987234156215869374346571289132658497879143562564927831423786915798415623651392748
879516423165432798234978651458267319623891574791345862386159247512784936947623185
915683427623457189748291356362145798197832645854976231279514863536728914481369572
+-------+-------+-------+-------+-------+-------+-------+
| 2 1 9 | 5 3 4 | 6 7 8 | | 5 4 2 | 1 6 3 | 8 7 9 |
| 5 6 7 | 1 9 8 | 4 3 2 | | 8 6 7 | 9 5 4 | 3 1 2 |
| 8 3 4 | 6 2 7 | 5 9 1 | | 9 3 1 | 2 7 8 | 5 4 6 |
+-------+-------+-------+-------+-------+-------+-------+
| 1 2 5 | 4 7 3 | 8 6 9 | | 7 9 8 | 4 1 2 | 6 3 5 |
| 9 4 8 | 2 1 6 | 7 5 3 | | 4 1 3 | 6 9 5 | 7 2 8 |
| 3 7 6 | 9 8 5 | 1 2 4 | | 6 2 5 | 3 8 7 | 1 9 4 |
+-------+-------+-------+-------+-------+-------+-------+
| 4 5 1 | 3 6 2 | 9 8 7 | 2 3 4 | 1 5 6 | 7 4 9 | 2 8 3 |
| 6 8 3 | 7 4 9 | 2 1 5 | 8 6 9 | 3 7 4 | 8 2 6 | 9 5 1 |
| 7 9 2 | 8 5 1 | 3 4 6 | 5 7 1 | 2 8 9 | 5 3 1 | 4 6 7 |
+-------+-------+-------+-------+-------+-------+-------+
| | | 1 3 2 | 6 5 8 | 4 9 7 | | |
| | | 8 7 9 | 1 4 3 | 5 6 2 | | |
| | | 5 6 4 | 9 2 7 | 8 3 1 | | |
+-------+-------+-------+-------+-------+-------+-------+
| 8 7 9 | 5 1 6 | 4 2 3 | 7 8 6 | 9 1 5 | 6 8 3 | 4 2 7 |
| 1 6 5 | 4 3 2 | 7 9 8 | 4 1 5 | 6 2 3 | 4 5 7 | 1 8 9 |
| 2 3 4 | 9 7 8 | 6 5 1 | 3 9 2 | 7 4 8 | 2 9 1 | 3 5 6 |
+-------+-------+-------+-------+-------+-------+-------+
| 4 5 8 | 2 6 7 | 3 1 9 | | 3 6 2 | 1 4 5 | 7 9 8 |
| 6 2 3 | 8 9 1 | 5 7 4 | | 1 9 7 | 8 3 2 | 6 4 5 |
| 7 9 1 | 3 4 5 | 8 6 2 | | 8 5 4 | 9 7 6 | 2 3 1 |
+-------+-------+-------+-------+-------+-------+-------+
| 3 8 6 | 1 5 9 | 2 4 7 | | 2 7 9 | 5 1 4 | 8 6 3 |
| 5 1 2 | 7 8 4 | 9 3 6 | | 5 3 6 | 7 2 8 | 9 1 4 |
| 9 4 7 | 6 2 3 | 1 8 5 | | 4 8 1 | 3 6 9 | 5 7 2 |
+-------+-------+-------+-------+-------+-------+-------+ |
tarek |
|
Back to top |
|
|
| garthd
| Joined: 29 Apr 2006 | Posts: 32 | : | | Items |
|
Posted: Thu Aug 13, 2009 8:56 pm Post subject: Is this Samurai puzzle unique |
|
|
Damn - I've realised I've done something quite dumb. I set up my solver so it would generate all possible combinations for each overlapping subgrid - I was then using this to test each of the four 'outer' grids in turn for a unique solution. However, I've realised that this will lead to a single valid solution (if one exists) but doesn't give any capacity to confirm if a puzzle is genuinely unique or not...back to the drawing board. I think a better way is perhaps to try and work out solutions for the middle grid, and then look at solving the outer grids |
|
Back to top |
|
|
| m_b_metcalf
| Joined: 13 Mar 2006 | Posts: 210 | : | Location: Berlin | Items |
|
Posted: Fri Feb 26, 2010 8:08 am Post subject: Re: Is this Samurai puzzle unique |
|
|
garthd wrote: | ...back to the drawing board. I think a better way is perhaps to try and work out solutions for the middle grid, and then look at solving the outer grids |
If the middle grid has only five clues (a possibility demonstrated elsewhere), you might find that the number of solutions to the middle grid turns out to be rather large! One method is to try to advance the solution to each grid as far as possible iteratively, taking each grid in turn, the middle one last, and sharing the candidates in the overlapping regions. That will solve many, but not all, samurais.
Regards,
Mike Metcalf |
|
Back to top |
|
|
|