From AND/OR Search to AND/OR BDDs
-
Upload
ahmed-salazar -
Category
Documents
-
view
45 -
download
1
description
Transcript of From AND/OR Search to AND/OR BDDs
Verification/constraints
workshop, 2006
From AND/OR Search to AND/OR BDDs
Rina Dechter
Information and Computer Science, UC-Irvine, and
Radcliffe Institue of Advanced Study, Cambridge
Joint work with Robert Mateescu and John Cobb
Combining Decision Diagrams
f = A*E + B*F g = C*G +D*H
B
A
F
0 1
E
B
E
D
C
H
0 1
G
D
G
B
A
C
D D
C
B
D D
C
D D
0 1
H
G G
F F F
EE E E E E
OBDD f * g =
Combining AND/OR BDDsf = A*E + B*F g = C*G +D*H
B
A
F
0 1
E
B
E
D
C
H
0 1
G
D
G
AOBDD f * g =
B
A
F
0 1
E
B
E
D
C
H
0 1
G
D
G
AND
OBDDs vs AOBDD f * g =
B
A
F
0 1
E
B
E
D
C
H
0 1
G
D
G
AND
B
A
C
D D
C
B
D D
C
D D
0 1
H
G G
F F F
EE E E E E
AOBDD
OBDD
Outline
Background in Graphical models AND/OR search trees and Graphs Minimal AND/OR graphs From AND/OR graphs to AOMDDs Compilation of AOMDDs AOMDDs and earlier BDDs
A Bred greenred yellowgreen redgreen yellowyellow greenyellow red
Example: map coloring Variables - countries (A,B,C,etc.)
Values - colors (red, green, blue)
Constraints: etc. ,ED D, AB,A
C
A
B
DE
F
G
A
Constraint Networks
A
B
E
G
DF
C
Constraint graph
Semantics: set of all solutionsPrimary task: find a solution
A graphical model (X,D,C): X = {X1,…Xn} variables D = {D1, … Dn} domains C = {F1,…,Ft} functions
(constraints, CPTS, cnfs)
Graphical models
CAFF
CAFPF
i
i
:
),|(:
A
D
B C
E
F
All these tasks are NP-hard identify special cases approximate
Examples:
•Constraint networks•Belief networks•Cost networks•Markov random fields•Influence diagrams
Tree-solving is easy
Belief updating (sum-prod)
MPE (max-prod)
CSP – consistency (projection-join)
#CSP (sum-prod)
P(X)
P(Y|X) P(Z|X)
P(T|Y) P(R|Y) P(L|Z) P(M|Z)
)(XmZX
)(XmXZ
)(ZmZM)(ZmZL
)(ZmMZ)(ZmLZ
)(XmYX
)(XmXY
)(YmTY
)(YmYT
)(YmRY
)(YmYR
Trees are processed in linear time and memory
Transforming into a Tree
By Inference (thinking) Transform into a single, equivalent
tree of sub-problems
By Conditioning (guessing) Transform into many tree-like sub-
problems.
Inference and Treewidth
EK
F
L
H
C
BA
M
G
J
D
ABC
BDEF
DGF
EFH
FHK
HJ KLM
treewidth = 4 - 1 = 3treewidth = (maximum cluster size) - 1
Inference algorithm:Time: exp(tree-width)Space: exp(tree-width)
Conditioning and Cycle cutset
C P
J A
L
B
E
DF M
O
H
K
G N
C P
J
L
B
E
DF M
O
H
K
G N
A
C P
J
L
E
DF M
O
H
K
G N
B
P
J
L
E
DF M
O
H
K
G N
C
Cycle cutset = {A,B,C}
C P
J A
L
B
E
DF M
O
H
K
G N
C P
J
L
B
E
DF M
O
H
K
G N
C P
J
L
E
DF M
O
H
K
G N
C P
J A
L
B
E
DF M
O
H
K
G N
Search over the Cutset
A=yellow A=green
• Inference may require too much memory
• Condition (guessing) on some of the variables
C
B K
G
L
D
FH
M
J
E
C
B K
G
L
D
FH
M
J
E
AC
B K
G
L
D
FH
M
J
E
GraphColoringproblem
Search over the Cutset (cont)
A=yellow A=green
B=red B=blue B=red B=blueB=green B=yellow
C
K
G
L
D
FH
M
J
E
C
K
G
L
D
FH
M
J
E
C
K
G
L
D
FH
M
J
E
C
K
G
L
D
FH
M
J
E
C
K
G
L
D
FH
M
J
E
C
K
G
L
D
FH
M
J
E
• Inference may require too much memory
• Condition on some of the variablesA
C
B K
G
L
D
FH
M
J
E
GraphColoringproblem
Inference vs. Conditioning
By Inference (thinking)
E K
F
L
H
C
BA
M
G
J
DABC
BDEF
DGF
EFH
FHK
HJ KLM
By Conditioning (guessing)
Exponential in treewidth
Time and memory
Exponential in cycle-cutsetTime-wise, linear memory
A=yellow A=green
B=blue B=red B=blueB=green
CK
G
LD
F H
M
J
EACB K
G
LD
F H
M
J
E
CK
G
LD
F H
M
J
EC
K
G
LD
F H
M
J
EC
K
G
LD
F H
M
J
E
Variable-eliminationDirectional resolutionJoin-tree clustering
BacktrackingBranch and boundDepth-first search
Outline
Background in Graphical models AND/OR search trees and Graphs Minimal AND/OR graphs From AND/OR graphs to AOMDDs Compilation of AOMDDs AOMDDs and earlier BDDs
Classic OR Search Space
0 1 0 1 0 1 0 1
0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1
0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1
0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1
0 1 0 1
E
C
F
D
B
A 0 1
Ordering: A B E C Ordering: A B E C D FD F
A
D
B C
E
F
AND/OR Search Space
AOR
0AND 1
BOR B
0AND 1 0 1
EOR C E C E C E C
OR D F D F D F D F D F D F D F D F
AND 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1
AND 0 10 1 0 10 1 0 10 1 0 10 1
A
D
B C
E
F
A
D
B
CE
F
Primal graph DFS tree
A
D
B C
E
F
A
D
B C
E
F
AND/OR vs. ORAOR
0AND 1
BOR B
0AND 1 0 1
EOR C E C E C E C
OR D F D F D F D F D F D F D F D F
AND 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1
AND 0 10 1 0 10 1 0 10 1 0 10 1
E 0 1 0 1 0 1 0 1
0C 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1
F 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 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E C
D F D F
0 1 0 1 0 1 0 1
OR
AND
OR
AND
OR
OR
AND
AND 0 10 1
A
D
B C
E
F
AND node: Combination operator (product)OR node: Marginalization operator (summation)
A
D
B
CE
F
1 1 1 0 1 1 0
1
0
2 1
2
2 0
0
2
1
2
4
B
1
1 0 1
E C E C E C
D F D F D F D F D F D F
0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1
0 10 1 0 10 1 0 10 1
1 0 1 0 0 1 0
1
0
1 1
1
1 0
0
1
0
1
1
1 1 1 0 1 1 1
1
0
2 1
2
2 1
2
4
0
1
4
1 0 1 0 0 1 1
0
0
1 1
1
1 1
1
2
1
1
2
5 6
11
65
Value of node = number of solutions below it
solution
Pseudo-Trees (Freuder 85, Bayardo 95, Bodlaender and Gilbert, 91)
(a) Graph
4 61
3 2 7 5
(b) DFS treedepth=3
(c) pseudo- treedepth=2
(d) Chaindepth=6
4 6
1
3
2 7
5 2 7
1
4
3 5
6
4
6
1
3
2
7
5
m <= w* log n
Tasks and value of nodes V( n) is the value of the tree T(n) for the task:
Consistency: v(n) is 0 if T(n) inconsistent, 1 othewise. Counting: v(n) is number of solutions in T(n) Optimization: v(n) is the optimal solution in T(n) Belief updating: v(n), probability of evidence in T(n). Partition function: v(n) is the total probability in T(n).
Goal: compute the value of the root node recursively using dfs search of the AND/OR tree.
AND/OR search tree and algorithms are ([Freuder & Quinn85], [Collin, Dechter & Katz91], [Bayardo & Miranker95],[Darwiche 2001], [Bacchus et. Al, 2003])
Space: O(n) Time: O(exp(m)), where m is the depth of the pseudo-tree Time: O(exp(w* log n)) BFS is time and space O(exp(w* log n)
From AND/OR Tree
A
D
B C
E
F
A
D
B
CE
F
G H
J
K
G
H
J
KAOR
0AND 1
BOR B
0AND 1 0 1
EOR C E C E C E C
OR D F D F D F D F D F D F D F D F
AND
AND 0 10 1 0 10 1 0 10 1 0 10 1
OR
OR
AND
AND
0
G
H H
0 1 0 1
0 1
1
G
H H
0 1 0 1
0 1
0
J
K K
0 1 0 1
0 1
1
J
K K
0 1 0 1
0 1
0
G
H H
0 1 0 1
0 1
1
G
H H
0 1 0 1
0 1
0
J
K K
0 1 0 1
0 1
1
J
K K
0 1 0 1
0 1
0
G
H H
0 1 0 1
0 1
1
G
H H
0 1 0 1
0 1
0
J
K K
0 1 0 1
0 1
1
J
K K
0 1 0 1
0 1
0
G
H H
0 1 0 1
0 1
1
G
H H
0 1 0 1
0 1
0
J
K K
0 1 0 1
0 1
1
J
K K
0 1 0 1
0 1
0
G
H H
0 1 0 1
0 1
1
G
H H
0 1 0 1
0 1
0
J
K K
0 1 0 1
0 1
1
J
K K
0 1 0 1
0 1
0
G
H H
0 1 0 1
0 1
1
G
H H
0 1 0 1
0 1
0
J
K K
0 1 0 1
0 1
1
J
K K
0 1 0 1
0 1
0
G
H H
0 1 0 1
0 1
1
G
H H
0 1 0 1
0 1
0
J
K K
0 1 0 1
0 1
1
J
K K
0 1 0 1
0 1
0
G
H H
0 1 0 1
0 1
1
G
H H
0 1 0 1
0 1
0
J
K K
0 1 0 1
0 1
1
J
K K
0 1 0 1
0 1
To an AND/ORGraph
A
D
B C
E
F
A
D
B
CE
F
G H
J
K
G
H
J
KAOR
0AND 1
BOR B
0AND 1 0 1
EOR C E C E C E C
OR D F D F D F D F D F D F D F D F
AND
AND 0 10 1 0 10 1 0 10 1 0 10 1
OR
OR
AND
AND
0
G
H H
0 1 0 1
0 1
1
G
H H
0 1 0 1
0 1
0
J
K K
0 1 0 1
0 1
1
J
K K
0 1 0 1
0 1
AND/OR Search Graphs
Any two nodes that root identical subtrees/subgraphs (are unifiable) can be merged
Minimal AND/OR search graph: of R relative to tree T is the closure under merge of the AND/OR search tree of R relative to T, where inconsistent subtrees are pruned.
Canonicity: The minimal AND/OR graph relative to T is unique for all constraints equivalent to R.
Context based caching Caching is possible when context is the same
context = parent-separator set in induced pseudo-graph
= current variable + ancestors connected to subtree below
A
D
B C
E
F
A
D
B
CE
F
G H
J
K
G
H
J
K
context(B) = {A, B}
context(C) = {A,B,C}
context(D) = {D}
context(F) = {F}
CachingA
D
B C
E
F
A
D
B
CE
F
G H
J
K
G
H
J
KAOR
0AND 1
BOR B
0AND 1 0 1
EOR C E C E C E C
OR D F D F D F D F D F D F D F D F
AND
AND 0 10 1 0 10 1 0 10 1 0 10 1
OR
OR
AND
AND
0
G
H H
0 1 0 1
0 1
1
G
H H
0 1 0 1
0 1
0
J
K K
0 1 0 1
0 1
1
J
K K
0 1 0 1
0 1
0
G
H H
0 1 0 1
0 1
1
G
H H
0 1 0 1
0 1
0
J
K K
0 1 0 1
0 1
1
J
K K
0 1 0 1
0 1
0
G
H H
0 1 0 1
0 1
1
G
H H
0 1 0 1
0 1
0
J
K K
0 1 0 1
0 1
1
J
K K
0 1 0 1
0 1
0
G
H H
0 1 0 1
0 1
1
G
H H
0 1 0 1
0 1
0
J
K K
0 1 0 1
0 1
1
J
K K
0 1 0 1
0 1
0
G
H H
0 1 0 1
0 1
1
G
H H
0 1 0 1
0 1
0
J
K K
0 1 0 1
0 1
1
J
K K
0 1 0 1
0 1
0
G
H H
0 1 0 1
0 1
1
G
H H
0 1 0 1
0 1
0
J
K K
0 1 0 1
0 1
1
J
K K
0 1 0 1
0 1
0
G
H H
0 1 0 1
0 1
1
G
H H
0 1 0 1
0 1
0
J
K K
0 1 0 1
0 1
1
J
K K
0 1 0 1
0 1
0
G
H H
0 1 0 1
0 1
1
G
H H
0 1 0 1
0 1
0
J
K K
0 1 0 1
0 1
1
J
K K
0 1 0 1
0 1
context(B) = {A, B}context(C) = {A,B,C}context(D) = {D}context(F) = {F}
Caching
A
D
B C
E
F
A
D
B
CE
F
G H
J
K
G
H
J
KAOR
0AND 1
BOR B
0AND 1 0 1
EOR C E C E C E C
OR D F D F D F D F D F D F D F D F
AND
AND 0 10 1 0 10 1 0 10 1 0 10 1
OR
OR
AND
AND
0
G
H H
0 1 0 1
0 1
1
G
H H
0 1 0 1
0 1
0
J
K K
0 1 0 1
0 1
1
J
K K
0 1 0 1
0 1
context(D)={D}
context(F)={F}
All Four Search Spaces
Full OR search tree
126 nodes
Full AND/OR search tree
54 AND nodes
Context minimal OR search graph
28 nodes
Context minimal AND/OR search graph
18 AND nodes
0 1 0 1 0 1 0 1
0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1
0 1 0 1 0 1 0 10 1 0 1 0 1 0 1 0 1 0 1 0 1 0 10 1 0 1 0 1 0 1 0 1 0 1 0 1 0 10 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1
0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1
0 1 0 1
C
D
F
E
B
A 0 1
AOR
0AND
BOR
0AND
OR E
OR F F
AND 0 1 0 1
AND 0 1
C
D D
0 1 0 1
0 1
1
E
F F
0 1 0 1
0 1
C
D D
0 1 0 1
0 1
1
B
0
E
F F
0 1 0 1
0 1
C
D D
0 1 0 1
0 1
1
E
F F
0 1 0 1
0 1
C
D D
0 1 0 1
0 1
0 1 0 1 0 1 0 1
0 1 0 1 0 1 0 1
0 1
0 1 0 1
0 1 0 1
C
D
F
E
B
A 0 1
AOR0ANDBOR
0AND
OR E
OR F F
AND 0 1
AND 0 1
C
D D
0 1
0 1
1
EC
D D
0 1
1
B
0
E
F F
0 1
C
1
EC
A
E
C
B
F
D
Properties of minimal AND/OR graphs
Complexity: Minimal AND/OR R relative to pseudo-tree T is
O(exp(w*)) where w* is the tree-width of R along T.
Minimal OR search graph is O(exp(pw*)) where pw* is path-width
w* ≤ pw*, pw* ≤ w*log n
Canonicity: The minimal AND/OR search graph is unique (canonical)
for all equivalent formulas (Boolean or Constraints), consistent with its pseudo tree.
Searching AND/OR Graphs
AO(j): searches depth-first, cache i-context j = the max size of a cache table (i.e.
number of variables in a context)
i=0
i=w*
Space: O(n)
Time: O(exp(w* log n))
Space: O(exp w*)
Time: O(exp w*)Space: O(exp(j) )
Time: O(exp(m_j+j )
j
Context-Based CachingA
D
B
EC
F
context(A) = {A}context(B) = {B,A}context(C) = {C,B}context(D) = {D}context(E) = {E,A}context(F) = {F}
Cache Table (C)
B CValu
e0 0 50 1 21 0 21 1 0
A
0
B
0
EC
D D
0 1
1
EC
D D
0 1
1
B
0
EC
1
EC
5
5
5 2
3
6
2 0
4
5
4 4
46
7
7
A
E
C
B
F
D
Primal graph
Space: O(exp(2))
Outline
Background in Graphical models AND/OR search trees and Graphs Minimal AND/OR graphs From AND/OR search graphs to AOMDDs Compilation of AOMDDs AOMDDs and earlier BDDs
OR Search Graphs vs OBDDs
A
B
C
A B C f(ABC)
0 0 0 0
0 0 1 0
0 1 0 0
0 1 1 1
1 0 0 0
1 0 1 1
1 1 0 0
1 1 1 1
A
0 1
B
0 1
C
0 1
C
0 1
B
0 1
C
0 1
C
0 1
Full AND/OR search tree
A
0 1
B
1
C
1
B
0 1
C
1
C
1
Backtrack free AND/OR search tree
A
0 1
B
1
B
0 1
C
1
Minimal AND/OR search graph
redundant
A
0 1
B
1
C
1
An OBDD
AND/OR Search Graphs; AOBDDs
A
B
DC
A
0 1
B
1
C
1
D
1
D
0
redundancy
F(A,B,C,D)= (0,1,1,1), (1,0,1,0), (1,1,1,0)
A
0 1
B
1
C
1
D
1
D
0
B
0 1
AOBDD(F)
AND/OR Search Graphs; AOBDDs
A
B
DC
A
0 1
B
1
C
1
D
1
D
0
redundancy
F(A,B,C,D)= (0,1,1,1), (1,0,1,0), (1,1,1,0)
A
0 1
B
1
C
1
D
1
D
0
B
0 1
AOBDD(F)
AOBDD Conventions
A
B
DC
A
0 1
B
1
C
1
D
1
D
0
Point dead-ends to terminal 0Point goods to terminal 1
A
0 1
B
0 1
0
C
0 1
1
D
0 1
D
0 1
Combining AOBDD (apply)A
B
C
A B C f(ABC)
0 0 0 0
0 0 1 0
0 1 0 0
0 1 1 1
1 0 0 0
1 0 1 1
1 1 0 0
1 1 1 1
0
A
0 1
B
0 1
1
C
0 1
*
A
B
D
A B D g(ABC)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terminals
47 arcs
OBDD
27 nonterminals
54 arcs
A0 1
B0 1
C0 1
0
D0 1
1
F0 1
G0 1
H0 1
C0 1
D0 1
E0 1
F0 1
G0 1
B0 1
C0 1
F0 1
C0 1
F0 1
H0 1
A
B
C F
D E G H
A
B
C
F
D
E
G
H
D
C B F
AE
G
H
primal graph
Complexity
Complexity of apply: Complexity of apply is bounded quadratically by the product of input AOBDDs restricted to each branch in the output pseudo-tree.
Complexity of VE-AOBDD: is exponential in the tree-width along the pseudo-tree.
Related work
Related work in Search Backjumping + learning (Freuder 1988,Dechter
1990,Bayardo and Mirankar 1996) Recursive-conditioning (Darwiche 2001) Value elimination (Bacchus et. Al. 2003) Search over tree-decompositions (Trrioux et. Al. 2002)
Related to compilation schemes: Minimal AND/OR – related to tree-OBDDs (McMillan 94), d-DNNF (Darwiche et. Al. 2002) Case-factor diagrams (Mcallester, Collins, Pereira, 2005)
Tutorial references: Dechter, Constraint processing, Morgan Kauffman, 2003 Dechter, Tractable Structures of Constraint Satisfaction
problems,In Handbook of constraint solving, forthcoming.
Conclusion
AND/OR search should always be used.
AND/OR BDDs are superior to OBDDs.
A search algorithm with good and no-good learning generates an OBDD or an AND/OR Bdds.
Dynamic variable ordering can be incorporated
With caching, AND/OR search is similar to inference (variable-elimination)
The real tradeoff should be rephrased: Time vs space rather than search vs inference, or search vs model-
checking.
Search methods are more sensitive to this tradeoff.