280 likes | 388 Views
Resolution Based Search. John Hooker GSIA Feb 2003. Previous Work. This talk generalizes & unifies contributions of: Gaschnig 1977 (backjumping, backmarking, backchecking) Ginsberg 1993 (dynamic backtracking) McAllester 1993 (partial order dynamic backtracking)
E N D
Resolution Based Search John Hooker GSIA Feb 2003
Previous Work • This talk generalizes & unifies contributions of: • Gaschnig 1977 (backjumping, backmarking, backchecking) • Ginsberg 1993 (dynamic backtracking) • McAllester 1993 (partial order dynamic backtracking) • Ginsberg & McAllester 1994 (generalized dynamic backtracking)
Some Definitions • In propositional logic: • xj– atomic proposition • xj– negated proposition • – (inclusive) “or” xj, xj– literals x1 x2–clause
Parents of resolvent Resolvent Absorption x1 x2 x1 x2 x3 absorbs (is contained in) For clauses, absorption implication Resolution x1 x2 x4 x1 x2 x3 ------------------------------- x2 x3 x4
Resolution Algorithm To apply the resolution algorithm to a clause set S: While there are 2 clauses in S with a resolvent R that no clause in S absorbs: Remove from S all clauses absorbed by R. Add R to S.
Prime Implicates Clause C is a prime implicate of clause set Sif C is a strongest clause implied by S. That is, if S implies a clause Cthat absorbs C then C = C. Theorem (Quine): The resolution algorithm converts S to the set of prime implicates of S.
Resolution-Based Search Consider the partial assignment(x1, x2, x3, x4, x5) = (0,0,0,0,?) It is redundant; i.e., already violates a constraint x3 + x4 1 Add a nogood to avoid repeating this partial assignment: Minimal nogood:x1 x2 x3 x4 Dependent nogood:x3 x4
(x1, x2, x3, x4, x5) = (0,0,0,0,?) Resolution-Based Search Since nogoods after resolution are prime implicates, we can find a partial assignment consistent with them without backtracking
Feasible solutions in green. Dependent nogoods based on objective function. Resolution-Based Search
penultimate literals inblue ultimate literals inred parallel resolvent Depth-first branching = Resolution-Based Search with Parallel Resolution and Minimal Nogoods x1 x2 x4 x2 x3 x4 ------------------------------- x1 x2 x3 resolve on ultimate literals only
Ultimate literal in first clause is penultimate in second clause Parallel Absorption x1 x2 parallel absorbs x2 x3 x4
1 1 1 Depth-first branching tree 2 21 2 2 5 5 3 12 31 22 3 5 5 3 3 3 4 9 14 13 23 28 4 4 4 4 3 4 3 4 4 4 10 11 5 8 15 18 24 29 30 27 4 5 5 4 4 4 2 2 6 17 16 19 7 20 25 26
Leaf node Partial assignment Nogoods generated Nogoods after parallel resolution 6 12345 x1x2x3x4x5 x1x2x3x4x5 7 12345 x1x2x3x4x5 x1x2x3x4 8 1234 x1x2x3x4 x1x2x3 10 1234 x1x2x3x4 x1x2x3x1x2x3x4 11 1234 x1x2x3x4 x1x2 13 125 x1x2x5 x1x2x1x2x5 16 12534 x1x2x5x3x4 x1x2x1x2x5x1x2x5x3x4 17 12534 x1x2x5x3x4 x1x2x1x2x5x1x2x5x3 Partial assignments must conform to nogoods. Must begin with values opposite to signs of penultimate literals.
Leaf node Partial assignment Nogoods generated Nogoods after parallel resolution 6 12345 x1x2x3x4x5 x1x2x3x4x5 7 12345 x1x2x3x4x5 x1x2x3x4 8 1234 x1x2x3x4 x1x2x3 10 1234 x1x2x3x4 x1x2x3x1x2x3x4 11 1234 x1x2x3x4 x1x2 13 125 x1x2x5 x1x2x1x2x5 16 12534 x1x2x5x3x4 x1x2x1x2x5x1x2x5x3x4 17 12534 x1x2x5x3x4 x1x2x1x2x5x1x2x5x3 1 1 2 2 2 3 12 3 5 5 3 4 9 14 13 4 4 4 4 3 3 10 11 5 8 15 18 4 5 5 4 4 4 6 17 16 19 7 20
Leaf node Partial assignment Nogoods generated Nogoods after parallel resolution 19 12534 x1x2x5x3x4 x1x2x1x2x5x1x2x5x3x1x2x5x3x4 20 12534 x1x2x5x3x4 x1 25 15342 x1x5x3x4x2 x1x1x5x3x4x2 26 15342 x1x5x3x4x2 x1x1x5x3x4 27 1534 x1x5x3x4 x1 x1x5x3 29 1534 x1x5x3x4 x1 x1x5x3x1x5x3x4 30 1534 x1x5x3x4 x1 x1x5 31 15 x1x5 21 5 5 31 22 3 3 23 28 4 4 4 4 24 29 30 27 2 2 25 26
Backtrack to here Since infeasibility established by this point. violates violates 1 1 1 Backjumping 2 21 2 2 5 5 3 12 31 22 3 5 5 3 3 3 4 9 14 13 23 28 4 4 4 4 3 4 3 4 4 4 10 11 5 8 15 18 24 29 30 27 4 5 5 4 4 4 2 2 6 17 16 19 7 20 25 26
Parallel resolution search that uses minimal nogoods, except that dependent nogoods are used whenever two consecutive nogoods have a parallel resolvent. Backjumping =
Replace minimal nogoods x1x2x3x4x5x1x2x3x4x5 with dependent nogoods x1x5x1x2x5 “missing” literals must be added prior to last penultimate literal 1 1 1 2 21 2 2 5 5 3 12 31 22 3 5 5 3 3 3 4 9 14 13 23 28 4 4 4 4 3 4 3 4 4 4 10 11 5 8 15 18 24 29 30 27 4 5 5 4 4 4 2 2 6 17 16 19 7 20 25 26
Backchecking and Backmarking These also have interpretations as forms of parallel resolution search.
Partial Order Dynamic Backtracking Partial order = dynamic backtracking Parallel resolution search that uses minimal nogoods. The ultimate literals in the nogoods imply a partial order on the variables in which penultimate variables must precede ultimate ones. The choice of ultimate literal in a new nogood must be consistent with this partial order.
Only x3 is fixed; others chosen as desired Must choose x4 as ultimate literal Either literal can be ultimate Note that a nogood can occur twice Partial Order Dynamic Backtracking
Theorem.Any partial assignment that conforms to the current nogoods in parallel resolution search is nonredundant. Theorem.Parallel resolution search terminates after an exhaustive implicit enumeration. Theorem.The complexity of parallel resolution in the context of parallel resolution search is O(N), where N is the number of literals in the current nogoods.
Generalized Partial Order Dynamic Backtracking Partition variables into groups of ultimate variables. Associate a group with each new nogood to define its ultimate variables (possibly > 1). Ultimate variables define partial order: penultimate variables precede them. Groups merge when their representatives are chosen to be ultimate in the same clause. Parallel resolve on any ultimate variable. Parallel absorption also generalized. Fewer penultimate variables more freedom to search. All variables ultimate full resolution search.
x1 and x2 fixed x1 precedes x5, but both can become ultimate. This merges two groups. Generalized partial order dynamic backtracking
x1x5resolves withx1x2x5 x2 fixed ultimate variables must be x4 only, or x3 and x4.. The latter merges 2 groups