[math-fun] Solvable sudoku?
I was wondering: how does one determine: 1) if a particular sudoku grid is solvable at all, and 2) if a particular sudoku grid is solvable solely by "logic". I realize that there's some disagreement as to which procedures are allowed in "logic only" solutions, but still: is there some way, short of brute-force solving [either with full guess/retrace (1 above) or only using some set of deduction-rules (2 above)] for figuring out if a grid is solvable? /Bernie\ -- Bernie Cosell Fantasy Farm Fibers mailto:bernie@fantasyfarm.com Pearisburg, VA --> Too many people, too few sheep <--
I assume you mean "without backing up" -- always making forward progress. I think the current best way (on a computer) is Knuth's method. If I understand your question, and based on my (currently quite limited) array of rules, I think that the answer is no -- I think that there are sudoku's the effectively force you to consider the global solution, and therefore seriously warp the notion of a "forward only" method. Since Knuth's method considers the whole square, it is effectively a global method. If you look at a number of sudoku's, you learn that you need to 'spread the information' around the square as fast as possible. E.g., if there is only one '3', then you should use that particular '3' as quickly as possible, or quickly manufacture more 3's. At 07:04 AM 5/6/2006, Bernie Cosell wrote:
I was wondering: how does one determine: 1) if a particular sudoku grid is solvable at all, and 2) if a particular sudoku grid is solvable solely by "logic".
I realize that there's some disagreement as to which procedures are allowed in "logic only" solutions, but still: is there some way, short of brute-force solving [either with full guess/retrace (1 above) or only using some set of deduction-rules (2 above)] for figuring out if a grid is solvable?
/Bernie\
-- Bernie Cosell Fantasy Farm Fibers mailto:bernie@fantasyfarm.com Pearisburg, VA --> Too many people, too few sheep <--
I've found that a very effective way of solving Sudoku's is to translate them into a satisfiability problem in conjunctive normal form, and then apply "SAT solving" techniques. I've found, empirically, that a linear time method -- called hyperresolution with equality propagation can solve at least 95% of the Sudoku's that I find -- including the "very hard" one that stumped the champion in the recent contest. This method doesn't involve any backtracking at all. It is global though -- to solve it it needs to construct a labeled digraph and find the strongly connected components. -- Victor S. Miller | " ... Meanwhile, those of us who can compute can hardly victor@idaccr.org | be expected to keep writing papers saying 'I can do the CCR, Princeton, NJ | following useless calculation in 2 seconds', and indeed 08540 USA | what editor would publish them?" -- Oliver Atkin
participants (3)
-
Bernie Cosell -
Henry Baker -
victor@idaccr.org