Presentation is loading. Please wait.

Presentation is loading. Please wait.

Message-Passing and Sudoku Scott Kirkpatrick, HUJI Danny Bickson, HUJI TAU, June 18, 2006.

Similar presentations

Presentation on theme: "Message-Passing and Sudoku Scott Kirkpatrick, HUJI Danny Bickson, HUJI TAU, June 18, 2006."— Presentation transcript:

1 Message-Passing and Sudoku Scott Kirkpatrick, HUJI Danny Bickson, HUJI TAU, June 18, 2006

2 What is Sudoku? 9x9 puzzles: Easy: >35 clues (43% of squares) Evil: <25 clues (30% of squares) 16x16 puzzles: Easy > 150 clues (60% of squares) Evil: < 110 clues (43% of squares) nxn puzzle has O ( (n!)^n configurations ) Sudokus are automatically generated, using some proprietary tricks plus known algorithms. k^2 x k^2 puzzles… Copyright 2006:

3 Where do Sudokus come from? Build bottom-up from a completely concealed solution. –Use a solver which instantiates the desired set of solution rules. Easy – elimination only Medium – elimination plus uniqueness plus …? Hard, Evil, Demonic, … -- use various multipoint extrapolation chains of increasing length –Expose squares of the solution until the solver succeeds. Start with the solution exposed and conceal until the problem is hard enough. –This needs a fast exhaustive solver, which halts when a second solution is found, or proves uniqueness. Plus a test for desired degree of difficulty. Are the results the same from top and from bottom?

4 Why study Sudoku? Reasons not to bother: –Won’t make the world a better place –9x9 problems are small enough for exact analysis, larger problems too large for most humans to find interesting Reasons for its interest: –This is a new category of statistical mechanics, distinct from Optimization (ground states of spin glasses) Stochastic encoding and decoding (uniform embeddings) –Requirement for unique solution requires finding and dealing with very rare states (not unlike ground states) –Belief propagation not expected to work in such dense graphs

5 Unique solutions are quite rare Odd, even puzzles differ. Part of the reason is the middle square (in odd puzzles).

6 Entropy for random initial conditions 1 of 10 initial conditions makes an easy puzzle (based only on 9x9, 16x16 cases)

7 Beliefs for Sudoku Most natural set of beliefs are probabilities that the entry in each square takes a particular value. Update rule: Probability that square i takes value j is product that no other square in same row, column, or region is j. This converges, even though this is an extremely loopy graph: But is it useful?

8 Beliefs converge, but… Despite loopiness, beliefs converge, but may represent a linear combination of possible solutions Decimation moves this process forward. Beliefs improve steadily. Beliefs evaluated with this simple formula can violate a different normalization – each variable must appear only once per region.

9 BP effectiveness and next steps Easy and Medium Sudokus almost always solved using BP, decimation, and uniqueness within some region. Hard Sudokus solved all,½, ¼, or 1/8 of the time. –Why? This is a measure of remaining search depth. Evil Sudokus require additional rules (extending evidence from pairs of sites) to solve many, with the remainder succeeding ½, ¼ of the time. So it appears the simplest BP simply reproduces a rule, called “elimination” and works when loopy because of the absence of frustration. Next step is more accurate calculation of probabilities.

Download ppt "Message-Passing and Sudoku Scott Kirkpatrick, HUJI Danny Bickson, HUJI TAU, June 18, 2006."

Similar presentations

Ads by Google