Calcudoku puzzle forumhttp://www.calcudoku.org/forum/ The solution of a 6x6 and a 9x9 puzzles with "strange cages"http://www.calcudoku.org/forum/viewtopic.php?f=16&t=105 Page 3 of 5

 Author: pnm  [ Tue Nov 15, 2011 8:46 pm ] Post subject: Re: The solution of a 6x6 and a 9x9 puzzles with "strange ca clm wrote: We could try your idea and see what happens, I broke (in my solution) a big cage into two parts:That cut it considerably: 15 seconds to find all 350 solutions Patrick

 Author: clm  [ Tue Nov 15, 2011 9:32 pm ] Post subject: Re: The solution of a 6x6 and a 9x9 puzzles with "strange ca pnm wrote:clm wrote: We could try your idea and see what happens, I broke (in my solution) a big cage into two parts:That cut it considerably: 15 seconds to find all 350 solutions Patrick An additional restriction, breaking another cage:631,+,a1b1c1a2c2a3b3c32,+,b2150,x,d1d2d3e3f34,+,e22,-,e1f1f23600,x,a4b4c4a5c5a6b6c63,+,b519,+,d4e4f4f5f63,-,d5d6e65,+,e5 Here is the graphic with the new splitting

 Author: pnm  [ Tue Nov 15, 2011 10:39 pm ] Post subject: Re: The solution of a 6x6 and a 9x9 puzzles with "strange ca Bombarding my solver with puzzles helps: I found an annoying bugthat only crops up for cages with 8 or more cells (!)In this case, this caused the solver to state there were no solutionsfor your last puzzle, when clearly there is at least one.I fixed the bug, and reran the solver on versions a, b, and c (as I called them):a: 42672 solutions, found after 495 secondsb: 4280 solutions, found after 87 secondsc: 512 solutions, found after 7.3 secondsPatrick

 Author: clm  [ Wed Nov 16, 2011 12:24 am ] Post subject: Re: The solution of a 6x6 and a 9x9 puzzles with "strange ca pnm wrote:Bombarding my solver with puzzles helps: I found an annoying bugthat only crops up for cages with 8 or more cells (!)In this case, this caused the solver to state there were no solutionsfor your last puzzle, when clearly there is at least one.I fixed the bug, and reran the solver on versions a, b, and c (as I called them):a: 42672 solutions, found after 495 secondsb: 4280 solutions, found after 87 secondsc: 512 solutions, found after 7.3 secondsPatrick It looks like your version a is the faster (and the better also considering that probably as the solutions are being found it becomes more difficult to find new ones). Once the bug is fixed we must rethink everything, that is, the original result of 6492 solutions in half an hour for the 6x6 is not longer valid, now with that proportion it will go to 150000 solutions in half an hour or so (version a) and with more time who knows... if there are more...what would be the real number...?. Perhaps we may load again the original puzzle with the four "strange cages", without restrictions, and see what happens. In the other hand, the 9x9... perhaps now, that the solver is fixed and faster, it may find in one hour some solution... and If it founds many we could initiate the restriction process... but your HAL software may protest for so much bombarding!!!

 Author: pnm  [ Wed Nov 16, 2011 10:08 am ] Post subject: Re: The solution of a 6x6 and a 9x9 puzzles with "strange ca clm wrote:there are more...what would be the real number...?I didn't make that clear: those are the real numbers, i.e. the total number of solutions.Patrick

 Author: clm  [ Wed Nov 16, 2011 11:49 am ] Post subject: Re: The solution of a 6x6 and a 9x9 puzzles with "strange ca pnm wrote:clm wrote:there are more...what would be the real number...?I didn't make that clear: those are the real numbers, i.e. the total number of solutions.Patrick Sorry, I thought you was just testing the versions and stopped running the software. Thanks. However, then, why those big differences in the results between the versions? why version c stops at 7.3 seconds with 512 solutions, i.e, while version a continues finding solutions up to 495 seconds and 42672? I believe you use different techniques for the loops that look for the solutions, right?. Anyway here is a third broken cage:615,+,a1b1c1c2c32,+,b216,+,a2a3b3150,x,d1d2d3e3f34,+,e22,-,e1f1f23600,x,a4b4c4a5c5a6b6c63,+,b519,+,d4e4f4f5f63,-,d5d6e65,+,e5

 Author: pnm  [ Wed Nov 16, 2011 11:54 am ] Post subject: Re: The solution of a 6x6 and a 9x9 puzzles with "strange ca clm wrote: Sorry, I thought you was just testing the versions and stopped running the software. Thanks. However, then, why those big differences in the results between the versions? why version c stops at 7.3 seconds with 512 solutions, i.e, while version a continues finding solutions up to 495 seconds and 42672? I believe you use different techniques for the loops that look for the solutions, right?.No, sorry, again I should have been more clear: the versions refer to the puzzle versions: so version (a)is the first 6x6, version (b) the 6x6 with the single "split", version (c) the 6x6 with 2 splits.clm wrote:Anyway here is a third broken cage:So this will become version (d)...Patrick

 Author: pnm  [ Wed Nov 16, 2011 12:50 pm ] Post subject: Re: The solution of a 6x6 and a 9x9 puzzles with "strange ca clm wrote: Anyway here is a third broken cage:That last one ("version d") has 66 solutions, computed in about 0.1 seconds.Patrick

 Author: clm  [ Wed Nov 16, 2011 9:50 pm ] Post subject: Re: The solution of a 6x6 and a 9x9 puzzles with "strange ca pnm wrote:clm wrote: Anyway here is a third broken cage:That last one ("version d") has 66 solutions, computed in about 0.1 seconds.Patrick Ok, thanks, now it is clear. As we introduce restrictions we reduce the number of solutions. Let's try now the "version e" (all four big cages broken):615,+,a1b1c1c2c32,+,b216,+,a2a3b3150,x,d1d2d3e3f34,+,e22,-,e1f1f2450,x,a4a5a6b6c61,-,b4c4c53,+,b519,+,d4e4f4f5f63,-,d5d6e65,+,e5 And the corresponding graphic:

 Author: pnm  [ Wed Nov 16, 2011 9:59 pm ] Post subject: Re: The solution of a 6x6 and a 9x9 puzzles with "strange ca That last one ("version e") had 9 solutions, computed in 0.03 seconds.You see how hard it is to create puzzles with a single solution: especiallyfor the larger puzzles I like to add more large cages, but they(1) increase solving time, and (2) make it more likely there is more than onesolution. Also, generally, puzzles with more symmetry are more likelyto have more than one solution (can't prove this, only intuition confirmed).Another cheap way of reducing the number of solutions is by adding single cell cages(e.g. split a double cell, or remove one from a larger cell).

 Page 3 of 5 All times are UTC + 1 hour [ DST ] Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Grouphttp://www.phpbb.com/