Presentation is loading. Please wait.

Presentation is loading. Please wait.

Resolution Based Search John Hooker GSIA Feb 2003.

Similar presentations


Presentation on theme: "Resolution Based Search John Hooker GSIA Feb 2003."— Presentation transcript:

1 Resolution Based Search John Hooker GSIA Feb 2003

2 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)

3 Some Definitions In propositional logic: x j – atomic proposition x j – negated proposition  – (inclusive) “or” x j, x j – literals x 1  x 2 – clause

4 Resolution x 1  x 2  x 4 x 1  x 2  x 3 ------------------------------- x 2  x 3  x 4 Parents of resolvent Resolvent Absorption x1  x2x1  x2 absorbs (is contained in) x1  x2  x3x1  x2  x3 For clauses, absorption  implication

5 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.

6 Prime Implicates Clause C is a prime implicate of clause set S if C is a strongest clause implied by S. That is, if S implies a clause C that absorbs C then C = C. Theorem (Quine): The resolution algorithm converts S to the set of prime implicates of S.

7 Sample Problem

8 Replace negative variables with complements = 1 – x 3

9 Resolution-Based Search Consider the partial assignment (x 1, x 2, x 3, x 4, x 5 ) = (0,0,0,0,?) It is redundant; i.e., already violates a constraint x 3 + x 4  1 Add a nogood to avoid repeating this partial assignment: Minimal nogood: x 1  x 2  x 3  x 4 Dependent nogood: x 3  x 4

10 Partial assignment Nogoods generated Nogoods after resolution 1234 x3  x4x3  x4 x3  x4x3  x4 x3  x4x3  x4 x3x3 x3  x4x3  x4 x3x4x3x4 12345 x1  x5x1  x5 x3x4x1  x5x3x4x1  x5 x1  x3x1  x3 x3x4x1x3x4x1 x1  x3x1  x3  Resolution-Based Search (x 1, x 2, x 3, x 4, x 5 ) = (0,0,0,0,?) Since nogoods after resolution are prime implicates, we can find a partial assignment consistent with them without backtracking

11 Partial assignment Nogoods generated Nogoods after resolution 1234 x3  x4x3  x4 x3  x4x3  x4 x3  x4x3  x4 x3x3 x3  x4x3  x4 x3x4x3x4 12345 x1  x5x1  x5 x3x4x1  x5x3x4x1  x5 x1  x3x1  x3 x3x4x1x3x4x1 x1  x3x1  x3  Resolution-Based Search Feasible solutions in green. Dependent nogoods based on objective function.

12 Depth-first branching = Resolution-Based Search with Parallel Resolution and Minimal Nogoods x 1  x 2  x 4 x 2  x 3  x 4 ------------------------------- x 1  x 2  x 3 penultimate literals in blue ultimate literals in red resolve on ultimate literals only parallel resolvent

13 Parallel Absorption parallel absorbs x1  x2x1  x2 x2  x3  x4x2  x3  x4 Ultimate literal in first clause is penultimate in second clause

14 1 2 3 4 5 6 7 8 9 1011 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 2930 31 1 2 2 3 3 4 4 4 4 55 55 3 3 4 4 4 4 5 5 3 3 4 4 4 4 2 2 1 Depth-first branching tree

15 Leaf node Partial assignment Nogoods generated Nogoods after parallel resolution 612345 x1x2x3x4x5x1x2x3x4x5 x1x2x3x4x5x1x2x3x4x5 7 x1x2x3x4x5x1x2x3x4x5 x1x2x3x4x1x2x3x4 81234 x1x2x3x4x1x2x3x4 x1x2x3x1x2x3 101234 x1x2x3x4x1x2x3x4 x1x2x3x1x2x3x4x1x2x3x1x2x3x4 111234 x1x2x3x4x1x2x3x4 x1x2x1x2 13125125 x1x2x5x1x2x5 x1x2x1x2x5x1x2x1x2x5 1612534 x1x2x5x3x4x1x2x5x3x4 x1x2x1x2x5x1x2x5x3x4x1x2x1x2x5x1x2x5x3x4 1712534 x1x2x5x3x4x1x2x5x3x4 x1x2x1x2x5x1x2x5x3x1x2x1x2x5x1x2x5x3 Partial assignments must conform to nogoods. Must begin with values opposite to signs of penultimate literals.

16 Leaf node Partial assignment Nogoods generated Nogoods after parallel resolution 612345 x1x2x3x4x5x1x2x3x4x5 x1x2x3x4x5x1x2x3x4x5 7 x1x2x3x4x5x1x2x3x4x5 x1x2x3x4x1x2x3x4 81234 x1x2x3x4x1x2x3x4 x1x2x3x1x2x3 101234 x1x2x3x4x1x2x3x4 x1x2x3x1x2x3x4x1x2x3x1x2x3x4 111234 x1x2x3x4x1x2x3x4 x1x2x1x2 13125125 x1x2x5x1x2x5 x1x2x1x2x5x1x2x1x2x5 1612534 x1x2x5x3x4x1x2x5x3x4 x1x2x1x2x5x1x2x5x3x4x1x2x1x2x5x1x2x5x3x4 1712534 x1x2x5x3x4x1x2x5x3x4 x1x2x1x2x5x1x2x5x3x1x2x1x2x5x1x2x5x3 1 2 3 4 5 6 7 8 9 1011 12 13 14 15 16 17 18 19 20 1 2 2 3 3 4 4 4 4 55 55 3 3 4 4 4 4

17 21 22 23 24 25 26 27 28 2930 31 5 5 3 3 4 4 4 4 2 2 Leaf node Partial assignment Nogoods generated Nogoods after parallel resolution 1912534 x1x2x5x3x4x1x2x5x3x4 x1x2x1x2x5x1x2x5x3x1x2x5x3x4x1x2x1x2x5x1x2x5x3x1x2x5x3x4 2012534 x1x2x5x3x4x1x2x5x3x4 x1x1 2515342 x1x5x3x4x2x1x5x3x4x2 x1x1x5x3x4x2x1x1x5x3x4x2 2615342 x1x5x3x4x2x1x5x3x4x2 x1x1x5x3x4x1x1x5x3x4 271534 x1x5x3x4x1x5x3x4 x1x1x5x3x1x1x5x3 2915341534 x1x5x3x4x1x5x3x4 x1x1x5x3x1x5x3x4x1x1x5x3x1x5x3x4 301534 x1x5x3x4x1x5x3x4 x1x1x5x1x1x5 3115 x1x5x1x5 

18 1 2 3 4 5 6 7 8 9 1011 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 2930 31 1 2 2 3 3 4 4 4 4 55 55 3 3 4 4 4 4 5 5 3 3 4 4 4 4 2 2 1 violates Backtrack to here Since infeasibility established by this point. Backjumping

19 Backjumping = Parallel resolution search that uses minimal nogoods, except that dependent nogoods are used whenever two consecutive nogoods have a parallel resolvent.

20 1 2 3 4 5 6 7 8 9 1011 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 2930 31 1 2 2 3 3 4 4 4 4 55 55 3 3 4 4 4 4 5 5 3 3 4 4 4 4 2 2 1 Replace minimal nogoods x 1  x 2  x 3  x 4  x 5 with dependent nogoods x 1  x 5 x 1  x 2  x 5 “missing” literals must be added prior to last penultimate literal

21 Backchecking and Backmarking These also have interpretations as forms of parallel resolution search.

22 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.

23 Partial assignment Nogoods generated Nogoods after parallel resolution 1234 x3x4x3x4 x3x4x3x4 3124 x3x4x3x4 x3x3 1234 x3x4x3x4 x3x3x4x3x3x4 31245 x1x5x1x5 x3x3x4x1x5x3x3x4x1x5 13245 optimal x1 x3x1 x3 x3x1x3x1 12345 x3x4x3x4 x3x1x3x4x3x1x3x4 31245 x3x1x3x1  Must choose x 4 as ultimate literal Either literal can be ultimate Only x 3 is fixed; others chosen as desired Partial Order Dynamic Backtracking Note that a nogood can occur twice

24 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.

25 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.

26 Partial assignment Nogoods generated Nogoods after parallel resolution Ultimate variable groups 125 x1x2x5x1x2x5 x1x2x5x1x2x5 x 1 x 2 x 3 x 4 x 5 125 x1x5x1x5 x1x5x2x1x1x5x2x1 x 1 x 5 x 2 x 3 x 4 234 x3x4x3x4 x1x5x2x1x3x4x1x5x2x1x3x4 x 1 x 5 x 2 x 3 x 4 234234 x3x4x3x4 x1x5x2x1x3x1x5x2x1x3 215 x 1  x 5 x 2  x 1 x 3 x 1  x 5 x 2  x 5 x 1 x 5 x 2 x 3 x 4 Generalized partial order dynamic backtracking x 1 and x 2 fixed x 1 precedes x 5, but both can become ultimate. This merges two groups.

27 Partial assignment Nogoods generated Nogoods after parallel resolution Ultimate variable groups 125 x1x2x5x1x2x5 x1x2x5x1x2x5 x 1 x 2 x 3 x 4 x 5 125 x1x5x1x5 x1x5x2x1x1x5x2x1 x 1 x 5 x 2 x 3 x 4 234 x3x4x3x4 x1x5x2x1x3x4x1x5x2x1x3x4 x 1 x 5 x 2 x 3 x 4 234234 x3x4x3x4 x1x5x2x1x3x1x5x2x1x3 215 x 1  x 5 x 2  x 1 x 3 x 1  x 5 x 2  x 5 x 1 x 5 x 2 x 3 x 4 x 1  x 5 resolves with x 1  x 2  x 5 x 2 fixed ultimate variables must be x 4 only, or x 3 and x 4.. The latter merges 2 groups

28 Partial assignment Nogoods generated Nogoods after parallel resolution Ultimate variable groups 21342134 x3x4x3x4 x 1  x 5 x 2  x 1 x 3 x 1  x 5 x 2  x 5 x 4 x 1 x 5 x 2 x 3 x 4 21345 optimal x3x1x3x1 x 1  x 5 x 3 x 1  x 5 x 4 x 2 x 1 x 5 x 2 x 3 x 4 12345 optimal x3x1x3x1 x 1  x 5 x 3 x 1  x 5 x 4 x 2 x 3  x 1 x 3  x 5 x 1 x 5 x 2 x 3 x 4 31245 x3x1x3x1  x 1 x 5 x 2 x 3 x 4 Completion of the algorithm


Download ppt "Resolution Based Search John Hooker GSIA Feb 2003."

Similar presentations


Ads by Google