170 likes | 300 Views
CS 4700: Foundations of Artificial Intelligence. Carla P. Gomes gomes@cs.cornell.edu Module: Instance Hardness and Phase Transitions (Reading R&N: page 224-225). Instance Hardness. Beyond NP-Completeness. NP-Completeness is a worst-case notion! Not all problems instances are the same!
E N D
CS 4700:Foundations of Artificial Intelligence Carla P. Gomes gomes@cs.cornell.edu Module: Instance Hardness and Phase Transitions (Reading R&N: page 224-225)
Beyond NP-Completeness • NP-Completeness is a worst-case notion! • Not all problems instances are the same! • We now have means for discriminating easy from hard instances • structural differences between instances of the same problem class.
Number Backtracks: 1820 165 150 Are all the Latin Square Instances (of same size) Equally Difficult? What is the fundamental difference between instances?
Number Backtracks: 150 Fraction of preassignment: 35% Are all Latin Square Instances Equally Difficult? 1820 165 50% 40%
Critically constrained area Underconstrained area Overconstrained area 20% 42% 50% Complexity of Latin Square Completion Median Runtime (log scale) Fraction of pre-assignment
Complexity Graph Phase transition from almost all solvable to almost all unsolvable Almost all solvable area Almost all unsolvable area Phase Transition Fraction of unsolvable cases Fraction of pre-assignment
32% holes Latin Squares with Holes • Given a full Latin Square, “punch” holes into it Difficulty:how to generate the full quasigroup, uniformly. Question:does this give challenging instances?
Markov Chain Monte Carlo (MCMM) • We use a Markov chain Monte Carlo method (MCMM) whose stationary (ergodic) distribution is uniform over the space of NxN Latin Squares(Jacobson and Matthews 96). • Startwith arbitrary Latin Square • Random walk on a sequence of Squares obtained via local modifications
Generation of Latin Squares with Holes (LSWH) • Use MCMM to generate solved Latin Square • Punch holes - i.e.,uncolor a fraction of the entries • The resulting instances are guaranteed satisfiable • LSWH is NP-Hard Is there % holes where instances are truly hard on average?
Order 30, 33, 36 Easy-Hard-Easy Pattern in Backtracking Search Peak near 32% (LSCP peaks near 42%) Computational Cost Research Question: why the peak? % holes
Local (Walksat) Search Order 30, 33, 36 Easy-Hard-Easy Pattern in Local Search Research Question: why the peak? Computational Cost % holes First solid statistics for overconstrainted area!
These results for Latin Squares - a structured problem -nicely complement previous results on phase transition and computational complexity for random instances such as SAT, Graph Coloring, etc.
Propositional Satisfiability problem(SAT) • Satifiability (SAT): Given a formula in propositional logic, is there a model • (i.e., a satisfying interpretation, an assignment to its variables) making it true? • We consider clausal form, e.g.: • ( ab c ) AND ( b c) AND ( ac) possible assignments SAT: prototypical hard combinatorial search and reasoning problem. Problem is NP-Complete. (Cook 1971) Surprising “power” of SAT for encoding computational problems.
3 SAT (all clauses have 3 literals) Early Results Complexity peak Runtime of interest for alg. design More about Propositional Logic and SAT in the Logic module SAT phase The phase transition Prob. satisfiable UNSAT phase Thanks Bart Selman! Ratioof Clauses to Varables
Phase transition Random Walk DP DP’ GSAT Walksat SP Random 3-SAT as of 2005 Linear time algs. Mitchell, Selman, and Levesque ’92
5.19 5.081 4.762 4.596 4.506 4.601 4.643 Random Walk DP DP’ GSAT Walksat SP Random 3-SAT as of 2005 Linear time algs. Upper bounds by combinatorial arguments (’92 – ’05)