Introduction Configuration Checking The CCBM Heuristic Experimental Analysis Conclusion References Focused Random Walk with Configuration Checking and Break Minimum for Satisfiability Chuan Luo 1 Shaowei Cai 2 Wei Wu 1 , 3 Kaile Su 3 , 4 1 Key Laboratory of High Confidence Software Technologies, Peking University 2 Queensland Research Laboratory, National ICT Australia 3 College of Mathematics, Physics and Information Engineering, Zhejiang Normal University 4 Institute for Integrated and Intelligent Systems, Griffith University September, 2013 1 / 32
Introduction Configuration Checking The CCBM Heuristic Experimental Analysis Conclusion References Outline Introduction 1 Configuration Checking 2 The CCBM Heuristic 3 4 Experimental Analysis Conclusion 5 References 6 2 / 32
Introduction Configuration Checking The CCBM Heuristic Experimental Analysis Conclusion References Outline Introduction 1 Configuration Checking 2 The CCBM Heuristic 3 4 Experimental Analysis Conclusion 5 References 6 3 / 32
Introduction Configuration Checking The CCBM Heuristic Experimental Analysis Conclusion References The SAT Problem A set of Boolean variables: X = { x 1 , x 2 , ..., x n } . Literals: x 1 , ¬ x 1 , x 2 , ¬ x 2 , ..., x n , ¬ x n A set of Clauses: x 1 ∨ ¬ x 2 , x 2 ∨ x 3 , x 2 ∨ ¬ x 4 , ¬ x 1 ∨ ¬ x 3 ∨ x 4 , ... A Conjunctive Normal Form (CNF) formula: F = ( x 1 ∨ ¬ x 2 ) ∧ ( x 2 ∨ x 3 ) ∧ ( x 2 ∨ ¬ x 4 ) ∧ ( ¬ x 1 ∨ ¬ x 3 ∨ x 4 ) The satisfiability problem (SAT): test whether all clauses in F can be satisfied by some consistent assignment of truth values to variables X → { 0 , 1 } . 4 / 32
Introduction Configuration Checking The CCBM Heuristic Experimental Analysis Conclusion References Importance of SAT Theoretical importance Its the first NP-Complete problem discovered by Cook in 1971 Application everywhere Very-large-scale integration Bounded Model Checking AI Planning Theorem Proving Software modeling and verification ... 5 / 32
Introduction Configuration Checking The CCBM Heuristic Experimental Analysis Conclusion References Solving SAT Complete methods for SAT: DPLL procedure [Davis and Putnam 1960; Davis, Logemann and Loveland 1962] Branch and cut Resolution Learning and non-chronological backtracking, 1996 Incomplete methods for SAT: Local search [Selman et al. 1994] Modify the solution step by step Unable to prove unsatisfiability, but may find solutions for a satisfying problem quickly Better choice when the knowledge about the problem domain is rather limited 6 / 32
Introduction Configuration Checking The CCBM Heuristic Experimental Analysis Conclusion References Local Search for SAT View the solution space as a set of points connected to each other. There is a cost function which needs to be minimized that can be computed for each point, i.e. number of unsatisfied clauses. Local search involves starting at some point in the solution space, and moving to neighboring points in an attempt to lower the cost function. 7 / 32
Introduction Configuration Checking The CCBM Heuristic Experimental Analysis Conclusion References Local Search for SAT Local search for SAT works as follows: starts with a truth assignment, which is usually randomly generated. iteratively flips the value of a variable, until it seeks out a satisfying assignment or time out. The essential part: decide which variable to be flipped in each step. 8 / 32
Introduction Configuration Checking The CCBM Heuristic Experimental Analysis Conclusion References Notations Two variables are neighbors when they appear in at least one clause. As x and y are variables, we define two notations as follows: N ( x ) = { y | y ∈ V ( F ) , y and x are neighbors } CL ( x ) = { c | c is a clause which x appears in } Common properties of a variable x : make ( x ): the number of currently unsatisfied clauses that would become satisfied by flipping variable x . break ( x ): the number of currently satisfied clauses that would become unsatisfied by flipping variable x (used in WalkSAT). score ( x ): the increase in the total number of satisfied clauses by flipping variable x (can be understood as make ( x ) − break ( x )). 9 / 32
Introduction Configuration Checking The CCBM Heuristic Experimental Analysis Conclusion References Outline Introduction 1 Configuration Checking 2 The CCBM Heuristic 3 4 Experimental Analysis Conclusion 5 References 6 10 / 32
Introduction Configuration Checking The CCBM Heuristic Experimental Analysis Conclusion References Configuration Checking Configuration checking (CC) techniques have proven successful in SLS algorithms for SAT [Cai and Su 2011; Luo, Su and Cai 2012]. The main idea of configuration checking is to forbid flipping any variable whose circumstance information has not been changed since its last flip. In the context of SAT, the first definition of configuration was based on neighboring variables [Cai and Su 2011]. In this work, we adopt the alternative definition of configuration based on clause states [Luo, Su and Cai 2012]. 11 / 32
Introduction Configuration Checking The CCBM Heuristic Experimental Analysis Conclusion References Configuration Checking Definition 1 Given a CNF formula F and a complete assignment α to V ( F ), the configuration of a variable x ∈ V ( F ) is a vector configuration ( x ) consisting of the states of all clauses in CL ( x ) under assignment α . Configuration Checking for SAT: when selecting a variable to flip, for a variable x ∈ V ( F ), if the configuration of x has not changed since x ’s last flip, then it should not be flipped. This strategy is reasonable in terms of avoiding cycles; otherwise, the algorithm is led to a scenario it has recently faced, which is likely to cause a cycle. 12 / 32
Introduction Configuration Checking The CCBM Heuristic Experimental Analysis Conclusion References An Implementation of Configuration Checking for SAT Employ an integer array ConfTimes . ConfTimes [ x ] > 0 means the configuration of x has changed since x ’s last flip; ConfTimes [ x ] = 0 on the contrary. 13 / 32
Introduction Configuration Checking The CCBM Heuristic Experimental Analysis Conclusion References An Implementation of Configuration Checking for SAT Employ an integer array ConfTimes . ConfTimes [ x ] > 0 means the configuration of x has changed since x ’s last flip; ConfTimes [ x ] = 0 on the contrary. Maintain the ConfTimes array Rule 1: In the beginning, for each variable x ∈ V ( F ), ConfTimes ( x ) is set to 1. Rule 2: Whenever a variable x is flipped, ConfTimes ( x ) is reset to 0. Then each clause c ∈ CL ( x ) is checked whether its state is changed by flipping x . If this is the case, for each variable y ( y � = x ) in c , ConfTimes ( y ) is increased by 1. 14 / 32
Introduction Configuration Checking The CCBM Heuristic Experimental Analysis Conclusion References Outline Introduction 1 Configuration Checking 2 The CCBM Heuristic 3 4 Experimental Analysis Conclusion 5 References 6 15 / 32
Introduction Configuration Checking The CCBM Heuristic Experimental Analysis Conclusion References The CCBM Heuristic Definition 2 Given a CNF formula F and a complete assignment α to V ( F ), a variable x is configuration changed decreasing (CCD) if and only if score ( x ) > 0 and ConfTimes ( x ) > 0. This work utilizes CCDVars(c) to denote the set of all CCD variables in clause c . Definition 3 Given a CNF formula F and a complete assignment α to V ( F ), for each clause c , a variable x is the break minimum (BM) variable of clause c if and only if x appears in clause c and break ( x ) = min { break ( y ) | y appears in c } . This work utilizes BMVars(c) to denote the set of all BM variables of clause c . 16 / 32
Introduction Configuration Checking The CCBM Heuristic Experimental Analysis Conclusion References The CCBM Heuristic The CCBM heuristic works as follows: first select an unsatisfied clause c randomly; If CCDVars(c) is not empty , select the variable with the greatest score in CCDVars(c) ; Otherwise, With probability p , select the variable with the greatest ConfTimes in BMVars(c) ; With probability 1 − p , select the variable with the greatest ConfTimes in clause c ; 17 / 32
Introduction Configuration Checking The CCBM Heuristic Experimental Analysis Conclusion References The FrwCB Algorithm Algorithm 1 : FrwCB Input : CNF-formula F , maxSteps Output : A satisfiable assignment α of F or Unknown begin generate a random assignment α ; initialize ConfTimes ( x ) as 1 for each variable x ; for step ← 1 to maxSteps do if α satisfies F then return α ; c ← an unsatisfied clause chosen randomly; if CCDVars(c) is not empty then v ← x with the greatest score ( x ) in CCDVars(c) , breaking ties by preferring the one with the greatest ConfTimes ( x ); else if with the fixed probability p then v ← x with the greatest ConfTimes ( x ) in BMVars(c) , breaking ties by preferring the least recently flipped one; else v ← x with the greatest ConfTimes ( x ) in clause c , breaking ties by preferring the least recently flipped one; flip v and update ConfTimes ; return Unknown ; end 18 / 32
Recommend
More recommend