Date post: | 20-Dec-2015 |
Category: |
Documents |
View: | 216 times |
Download: | 0 times |
Resolution Based Search
John HookerGSIA
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
Resolution
x1 x2 x4
x1 x2 x3
-------------------------------
x2 x3 x4
Parents of resolvent
Resolvent
Absorption
x1 x2 absorbs (is contained in) x1 x2 x3
For clauses, absorption implication
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 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.
}1,0{1234
032
1
3324
332
3223subject tominimize
543
4321
43
521
541
5321
31
jxxxx
xxxx
xx
xxx
xxx
xxxxxx
Sample Problem
3234
332
1
3324
232
2223subject tominimize
543
4321
43
521
541
5321
31
xxx
xxxx
xx
xxx
xxx
xxxxxx
Replace negative variables with complements
= 1 – x3
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
Partial assignment
Nogoods generated
Nogoods after
resolution
1234 x3 x4 x3 x4
1234 x3 x4 x3
1234 x3 x4
x3
x4
12345 x1 x5
x3
x4
x1 x5
12345 x1 x3
x3
x4
x1
12345 x1 x3
Resolution-Based Search
(x1, x2, x3, x4, x5) = (0,0,0,0,?)
3234
332
1
3324
232
2223subject tominimize
543
4321
43
521
541
5321
31
xxx
xxxx
xx
xxx
xxx
xxxxxx
Since nogoods after resolution are prime implicates, we can find a partial assignment consistent with them without backtracking
Partial assignment
Nogoods generated
Nogoods after
resolution
1234 x3 x4 x3 x4
1234 x3 x4 x3
1234 x3 x4
x3
x4
12345 x1 x5
x3
x4
x1 x5
12345 x1 x3
x3
x4
x1
12345 x1 x3
Resolution-Based Search
3234
332
1
3324
232
2223subject tominimize
543
4321
43
521
541
5321
31
xxx
xxxx
xx
xxx
xxx
xxxxxx
Feasible solutions in green.
Dependent nogoods based on objective function.
Depth-first branching = Resolution-Based Search with Parallel Resolution and Minimal Nogoods
x1 x2 x4
x2 x3 x4
-------------------------------
x1 x2 x3
penultimate literals in blue
ultimate literals in red
resolve on ultimate literals only
parallel resolvent
Parallel Absorption
parallel absorbsx1 x2 x2 x3 x4
Ultimate literal in first clause is penultimate in second clause
1
2
3
4
5
6 7
8
9
10 11
12
13 14
15
16 17
18
19 20
21
22
23
24
25 26
27
28
29 30
31
1
2 2
3 3
4 4 4 4
5 5
5 5
3 3
4 4 4 4
5 5
3 3
4 4 4 4
2 2
1
Depth-first branching tree
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
x1x2x3
x1x2x3x4
11 1234 x1x2x3x4 x1x2
13 125 x1x2x5
x1x2
x1x2x5
16 12534 x1x2x5x3x4
x1x2
x1x2x5
x1x2x5x3x4
17 12534 x1x2x5x3x4
x1x2
x1x2x5
x1x2x5x3
Partial assignments must conform to nogoods.
Must begin with values opposite to signs of penultimate literals.
Leaf node
Partial assignment
Nogoods generatedNogoods after
parallel resolution
6 12345 x1x2x3x4x5 x1x2x3x4x5
7 12345 x1x2x3x4x5 x1x2x3x4
8 1234 x1x2x3x4 x1x2x3
10 1234 x1x2x3x4
x1x2x3
x1x2x3x4
11 1234 x1x2x3x4 x1x2
13 125 x1x2x5
x1x2
x1x2x5
16 12534 x1x2x5x3x4
x1x2
x1x2x5
x1x2x5x3x4
17 12534 x1x2x5x3x4
x1x2
x1x2x5
x1x2x5x3
1
2
3
4
5
6 7
8
9
10 11
12
13 14
15
16 17
18
19 20
1
2 2
3 3
4 4 4 4
5 5
5 5
3 3
4 4 4 4
21
22
23
24
25 26
27
28
29 30
31
5 5
3 3
4 4 4 4
2 2
Leaf nodePartial
assignmentNogoods generated
Nogoods after parallel resolution
19 12534 x1x2x5x3x4
x1x2
x1x2x5
x1x2x5x3
x1x2x5x3x4
20 12534 x1x2x5x3x4 x1
25 15342 x1x5x3x4x2
x1
x1x5x3x4x2
26 15342 x1x5x3x4x2
x1
x1x5x3x4
27 1534 x1x5x3x4
x1
x1x5x3
29 1534 x1x5x3x4
x1
x1x5x3
x1x5x3x4
30 1534 x1x5x3x4
x1
x1x5
31 15 x1x5
1
2
3
4
5
6 7
8
9
10 11
12
13 14
15
16 17
18
19 20
21
22
23
24
25 26
27
28
29 30
31
1
2 2
3 3
4 4 4 4
5 5
5 5
3 3
4 4 4 4
5 5
3 3
4 4 4 4
2 2
1
violates
2223 5321 xxxx
232 541 xxx
violates
Backtrack to here
Since infeasibility established by this point.
Backjumping
Backjumping = Parallel resolution search that uses minimal nogoods, except that dependent nogoods are used whenever two consecutive nogoods have a parallel resolvent.
1
2
3
4
5
6 7
8
9
10 11
12
13 14
15
16 17
18
19 20
21
22
23
24
25 26
27
28
29 30
31
1
2 2
3 3
4 4 4 4
5 5
5 5
3 3
4 4 4 4
5 5
3 3
4 4 4 4
2 2
1Replace minimal nogoods
x1x2x3x4x5
x1x2x3x4x5
with dependent nogoods
x1x5
x1x2x5
“missing” literals must be added prior to last penultimate literal
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.
Partial assignment
Nogoods generated
Nogoods after parallel
resolution
1234 x3x4 x3x4
3124 x3x4 x3
1234 x3x4
x3
x3x4
31245 x1x5
x3
x3x4
x1x5
13245optimal
x1 x3
x3
x1
12345 x3x4
x3
x1
x3x4
31245 x3x1
Must choose x4 as ultimate literal
Either literal can be ultimate
Only x3 is fixed; others chosen as desired
Partial Order Dynamic Backtracking
Note that a nogood can occur twice
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.
Partial assignment
Nogoods generated
Nogoods after parallel
resolution
Ultimate variable groups
125 x1x2x5 x1x2x5 x1 x2 x3 x4 x5
125 x1x5
x1x5
x2x1
x1x5 x2 x3 x4
234 x3x4
x1x5
x2x1
x3x4
x1x5 x2 x3 x4
234 x3x4
x1x5
x2x1
x3
x1x5 x2 x3x4
215 x1 x5
x1x5
x2x1
x3
x1 x5
x2x5
x1x5 x2 x3x4
Generalized partial order dynamic backtracking
x1 and x2 fixed
x1 precedes x5, but both can become ultimate. This merges two groups.
Partial assignment
Nogoods generated
Nogoods after parallel
resolution
Ultimate variable groups
125 x1x2x5 x1x2x5 x1 x2 x3 x4 x5
125 x1x5
x1x5
x2x1
x1x5 x2 x3 x4
234 x3x4
x1x5
x2x1
x3x4
x1x5 x2 x3 x4
234 x3x4
x1x5
x2x1
x3
x1x5 x2 x3x4
215 x1 x5
x1x5
x2x1
x3
x1 x5
x2x5
x1x5 x2 x3x4
x1x5 resolves with x1x2x5
x2 fixed
ultimate variables must be x4 only, or x3 and x4..
The latter merges 2 groups
Partial assignment
Nogoods generated
Nogoods after parallel
resolution
Ultimate variable groups
2134 x3x4
x1x5
x2x1
x3
x1 x5
x2x5
x4
x1x5 x2 x3x4
21345optimal
x3x1
x1x5
x3
x1 x5
x4
x2
x1x5 x2 x3x4
12345optimal
x3x1
x1x5
x3
x1 x5
x4
x2
x3x1
x3x5
x1x5 x2 x3x4
31245 x3x1 x1x5 x2 x3x4
Completion of the algorithm