Sudoku Programmers Forum Index

 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister   ProfileProfile   Log inLog in          Games  Calendar

Log in to check your private messagesLog in to check your private messages   



COMPULSORY UPGRADE!!! Request an upgrade NOW! 32+ Pre-installed Modifications! 3 Server Locations to choose from: USA, UK and JAPAN.

11th December 2012 - setBB: All servers are upgraded to run using SSD drive. Click Here to report problems!
DLX Optimisations, Observations and Questions
Goto page Previous  1, 2, 3, 4, 5
 
Post new topic   Reply to topic    Sudoku Programmers Forum Index -> Programming sudoku
View previous topic :: View next topic  
Author Message
BryanL

Joined: 17 Jun 2010
Posts: 86
:

Items
PostPosted: Sun Aug 07, 2011 12:57 pm    Post subject: Reply with quote

Hi blue,

thanks for all the explanations

blue wrote:
Quote:
I have never tried it but i think it may be possible to also cover eliminated candidates.

It did the thing that you mentioned: if some/any kind of testing reveals that a candidate can be eliminated, it can be removed from consideration by the DLX code, by unlinking the nodes in its (corresponding) DLX row, from thier respective columns.
To backtrack through something like that, you need code to link the nodes back into thier columns at the appropriate time, and bookkeeping code, to indicate when it's the "appropriate time", and which row to re-link.
For unlinking & re-linking, code similar to the innermost loop in the cover/uncover routines, will work.
Just be sure to handle every node in the row, instead of "all but one", like the cover/uncover code does.

I had thought that covering row nodes would do the trick and was going to ask in the other thread.

I am only thinking of solving to a point and then calling dlx, never back and forth. So i assume that covering the relevant row nodes after covering the givens and then uncovering them before uncovering the givens would suffice without any other bookkeeping code?

tarek wrote:
Afmob wrote:
You could only make it faster if you find a way to implement it with less additional columns and rows. Or you don't use DLX for intersections.
Right then ... I'll try to think of something else then ..... Idea

Hopefully tarek, finding eliminations using normal methods, and applying those to the dlx matrix will give it a speed boost - how much? we will have to test...

Quote:
On your comment about "large N", I agree, whole-heartedly.
Even (rare) 16x16 puzzles can run overnight, with no resolution, using stock DLX code.

Ouch!

Thx again,

bryan
.
Back to top
View user's profile Send private message
blue

Joined: 12 May 2010
Posts: 318
:

Items
PostPosted: Sun Aug 07, 2011 3:56 pm    Post subject: Reply with quote

Hi Bryan,

Quote:
I am only thinking of solving to a point and then calling dlx, never back and forth. So i assume that covering the relevant row nodes after covering the givens and then uncovering them before uncovering the givens would suffice without any other bookkeeping code?

You'ld need to re-link the rows, in the reverse unlink order.
As long as you can do that, you're fine.

Regards,
Blue.
Back to top
View user's profile Send private message
     
Display posts from previous:   
Post new topic   Reply to topic    Sudoku Programmers Forum Index -> Programming sudoku All times are GMT
Goto page Previous  1, 2, 3, 4, 5
Page 5 of 5

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Sudoku Programmers topic RSS feed 


Powered by phpBB © 2001, 2005 phpBB Group

Igloo Theme Version 1.0 :: Created By: Andrew Charron

FREE FORUM HOSTING by AtFreeForum. Terms of Service - Privacy Policy
FASHION ACCESSORIES - BLING BLING - LADIES WATCHES - KOREAN CHILDREN CLOTHING - ONLINE BARGAIN STORE - FASHION JEWELLERIES