Introduction
description
Transcript of Introduction
![Page 1: Introduction](https://reader035.fdocuments.in/reader035/viewer/2022062501/568161f7550346895dd222f4/html5/thumbnails/1.jpg)
Introduction Combining two frameworks
AND/OR Search Spaces Multi-valued Decision Diagrams (MDDs)
Both are more compact ways to represent problems.
Their combination yields an even more compact representation.
Decision Diagrams are known to allow online speed queries.
1
![Page 2: Introduction](https://reader035.fdocuments.in/reader035/viewer/2022062501/568161f7550346895dd222f4/html5/thumbnails/2.jpg)
Introduction
2
)()()()()()(
ABCFCDFBDFBCFABEFACFF A
D
B C
E
F
Compiled structure
OFFLINE
ONLINE
Evaluate answer
Polytime? Constant time?
ONCE
MANY
Query
![Page 3: Introduction](https://reader035.fdocuments.in/reader035/viewer/2022062501/568161f7550346895dd222f4/html5/thumbnails/3.jpg)
Ordered Binary Decision Diagram
3
A B C f(ABC)0 0 0 00 0 1 00 1 0 00 1 1 11 0 0 01 0 1 11 1 0 01 1 1 1
B = {0,1} f : B3 → B
Table
B
A
C
0 0
C
0 1
B
C
0 1
C
0 1
SimplifyMerge terminal nodes
B
A
C C
0 1
B
C C
1) Merge nodes with identical children
B
A
C
0 1
B
C
2) Remove redundant nodes
B
A
0 1
B
C
B
A
0 1
C
OBDD[Bryant86]
Ordering enables efficient operations
B
A
C
0 0
C
0 1
B
C
0 1
C
0 1
Decision tree
A
B
C
![Page 4: Introduction](https://reader035.fdocuments.in/reader035/viewer/2022062501/568161f7550346895dd222f4/html5/thumbnails/4.jpg)
Decision Diagrams
4
f = (A ∨ E) ∧ (B ∨ F)
g = (C ∨ G) ∧ (D ∨ H)
B
A
F
10
E
B
E f ∧ g = ?
f ∧ g =
OBDD
OBDD
D
C
H
10
G
D
G
ANDD
C
H
10
G
D
G
B
A
F
10
E
B
E
0 1
B
A
C
D D
C
B
D D
C
D D
C
D D
E E E E E E E E
F F
H
GG
F F
![Page 5: Introduction](https://reader035.fdocuments.in/reader035/viewer/2022062501/568161f7550346895dd222f4/html5/thumbnails/5.jpg)
AOMDDs
5
Point dead-ends to terminal node “0”
Point goods to terminal node “1”
0
A
0 1
B
0 1
1
C
0 1
B
0 1
Decision Diagram
A
B
C
A B C f(ABC)0 0 0 00 0 1 00 1 0 00 1 1 11 0 0 01 0 1 11 1 0 01 1 1 1
A
0 1
B
1
C
1
B
0 1
Minimal AND/OR graph
![Page 6: Introduction](https://reader035.fdocuments.in/reader035/viewer/2022062501/568161f7550346895dd222f4/html5/thumbnails/6.jpg)
Removing Redundancy
6
0
A
0 1
B
0 1
1
C
0 1
B
0 1
redundant
Group OR node together with its AND children into a meta-node
0
A
0 1
B
0 1
1
C
0 1
B
0 1
0
A
0 1
B
0 1
1
C
0 1
OBDD(pseudo tree is a chain)
A
B
C
A B C f(ABC)0 0 0 00 0 1 00 1 0 00 1 1 11 0 0 01 0 1 11 1 0 01 1 1 1
0
A
0 1
B
0 1
1
C
0 1
![Page 7: Introduction](https://reader035.fdocuments.in/reader035/viewer/2022062501/568161f7550346895dd222f4/html5/thumbnails/7.jpg)
AOBDD
7
A
B
C
A B C f(ABC)0 0 0 00 0 1 00 1 0 00 1 1 11 0 0 01 0 1 11 1 0 01 1 1 1
0
A
0 1
B
0 1
1
C
0 1*
A
B
D
A
B
DC
=
A B D g(ABD)0 0 0 00 0 1 00 1 0 00 1 1 11 0 0 01 0 1 11 1 0 11 1 1 0
0
A
0 1
B
0 1
1
D
0 1
D
0 1
B
0 1
A
0 1
B
0 1
0
C
0 1
D
0 1
1
B
0 1
D
0 1
![Page 8: Introduction](https://reader035.fdocuments.in/reader035/viewer/2022062501/568161f7550346895dd222f4/html5/thumbnails/8.jpg)
Apply Operator
8
0
A
0 1
B
0 1
1
C
0 1* =
0
A
0 1
B
0 1
1
D
0 1
D
0 1
B
0 1
A
B
DC
A1
A2
A3
A4
A5
B1
B2
B3
B4
B5
B6
B7
A1B1
A
0 1A1B1
A2B2
A4B6
B
0 1A2B2
A3B3
A4B4
0
![Page 9: Introduction](https://reader035.fdocuments.in/reader035/viewer/2022062501/568161f7550346895dd222f4/html5/thumbnails/9.jpg)
Apply Operator
9
0
A
0 1
B
0 1
1
C
0 1* =
0
A
0 1
B
0 1
1
D
0 1
D
0 1
B
0 1
A
B
DC
A1
A2
A3
A4
A5
B1
B2
B3
B4
B5
B6
B7
A
0 1A1B1
A4B6
B
0 1A2B2
A4B4
0
A4
B4
![Page 10: Introduction](https://reader035.fdocuments.in/reader035/viewer/2022062501/568161f7550346895dd222f4/html5/thumbnails/10.jpg)
Apply Operator
10
0
A
0 1
B
0 1
1
C
0 1* =
0
A
0 1
B
0 1
1
D
0 1
D
0 1
B
0 1
A
B
DC
A1
A2
A3
A4
A5
B1
B2
B3
B4
B5
B6
B7
A
0 1A1B1
A4B6
B
0 1A2B2
0
A4
B4
C
0 1A4
D
0 1B4
1
![Page 11: Introduction](https://reader035.fdocuments.in/reader035/viewer/2022062501/568161f7550346895dd222f4/html5/thumbnails/11.jpg)
Apply Operator
11
0
A
0 1
B
0 1
1
C
0 1* =
0
A
0 1
B
0 1
1
D
0 1
D
0 1
B
0 1
A
B
DC
A1
A2
A3
A4
A5
B1
B2
B3
B4
B5
B6
B7
A
0 1A1B1
A4B6
B
0 1A2B2
0
C
0 1A4
D
0 1B4
1
B
0 1A4B6
A4B4
A4B7
![Page 12: Introduction](https://reader035.fdocuments.in/reader035/viewer/2022062501/568161f7550346895dd222f4/html5/thumbnails/12.jpg)
Apply Operator
12
0
A
0 1
B
0 1
1
C
0 1* =
0
A
0 1
B
0 1
1
D
0 1
D
0 1
B
0 1
A
B
DC
A1
A2
A3
A4
A5
B1
B2
B3
B4
B5
B6
B7
A
0 1A1B1
B
0 1A2B2
0
C
0 1A4
D
0 1B4
1
B
0 1A4B6
A4B7
D
0 1B7
![Page 13: Introduction](https://reader035.fdocuments.in/reader035/viewer/2022062501/568161f7550346895dd222f4/html5/thumbnails/13.jpg)
And/Or Multi-Valued Decision Diagrams
AOMDDs are:
AND/OR search graphs
canonical representations, given a pseudo tree
Defined by two rules: All isomorphic subgraphs are merged There are no redundant (meta) nodes
13
![Page 14: Introduction](https://reader035.fdocuments.in/reader035/viewer/2022062501/568161f7550346895dd222f4/html5/thumbnails/14.jpg)
14
Example:
HG
ED
C F
B
A
F0 1
H0 1
0 1C1
A0 1
H0 1
0 1C2
A0 1
B0 1
G0 1
G0 1
B0 1
0 1C3
F0 1
G0 1
0 1C4
A0 1
E0 1
0 1C6
C0 1
E0 1
0 1C7
C0 1
D0 1
D0 1
0 1C8
B0 1
C0 1
0 1C9
B0 1
F0 1
0 1C5
m1
m3
m7
m6
m4 m 2m 5
A0 1
F0 1
H0 1
F0 1
H0 1
0 1m1
A0 1
B0 1
G0 1
F0 1
B0 1
G0 1
0 1m2
A0 1
E0 1
C0 1
0 1m4
C0 1
D0 1
D0 1
0 1m5
A0 1
B0 1
F0 1
G0 1
H0 1
F0 1
G0 1
B0 1
F0 1
F0 1
H0 1
0 1m3
A0 1
B0 1
C0 1
C0 1
D0 1
E0 1
D0 1
B0 1
C0 1
C0 1
0 1m6
m7
A
F
H
D
C B F
AE
G
H
primal graph
A
B
C F
D E G H
pseudo tree
A
B
F
G H
C
D
A
B
C
D E
A
B
C F
D E G H
A
B
F
G
C
E
A
(f h) (a∨ ∧ ∨ !h) (a#b#g) (f g) ∧ ∧ ∨ ∧(b f) (a e) (c e) (c#d) (b c)∨ ∧ ∨ ∧ ∨ ∧ ∧ ∨
![Page 15: Introduction](https://reader035.fdocuments.in/reader035/viewer/2022062501/568161f7550346895dd222f4/html5/thumbnails/15.jpg)
Example (continued)
15
B
A
m7
A0 1
B0 1
F0 1
G0 1
H0 1
F0 1
G0 1
B0 1
F0 1
F0 1
H0 1
0 1m3
A0 1
B0 1
C0 1
C0 1
D0 1
E0 1
D0 1
B0 1
C0 1
C0 1
0 1m6
A
B
C F
D E G H
m7
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
![Page 16: Introduction](https://reader035.fdocuments.in/reader035/viewer/2022062501/568161f7550346895dd222f4/html5/thumbnails/16.jpg)
AOBDD vs. OBDD
16
D
C
B
F
A
E
G
H
1 0
B
CC C
D D D D D
E E
F F F
G G G G
H
AOBDD18 nonterminals47 arcs
OBDD27 nonterminals54 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
![Page 17: Introduction](https://reader035.fdocuments.in/reader035/viewer/2022062501/568161f7550346895dd222f4/html5/thumbnails/17.jpg)
17
Constraint Optimization - AND/OR Tree
A B C f1(ABC)
0 0 0 80 0 1 80 1 0 80 1 1 21 0 0 81 0 1 21 1 0 81 1 1 2
A B D f2(ABD)
0 0 0 10 0 1 80 1 0 00 1 1 21 0 0 61 0 1 51 1 0 61 1 1 5
B D E f3(BDE)
0 0 0 80 0 1 30 1 0 80 1 1 41 0 0 81 0 1 31 1 0 81 1 1 4
A
E
B D
C
f2(ABD)f1(ABC)
f3(BDE)
A
E
B
DC
[ ]
[A]
[AB]
[BD]
[AB]
B
10
A
10
C
10
8 8
D
101 8
E
10
8 3E
10
8 4
C
10
8 2D
100 2
E
10
8 3E
10
8 4
B
10
C
10
8 2D
106 5
E
10
8 3E
10
8 4
C
10
8 2D
106 5
E
10
8 3E
10
8 4
![Page 18: Introduction](https://reader035.fdocuments.in/reader035/viewer/2022062501/568161f7550346895dd222f4/html5/thumbnails/18.jpg)
18
AND/OR Context Minimal Graph
B
10
A
10
C
10
8 8
D
101 8
E
10
8 3E
10
8 4
C
10
8 2D
100 2
E
10
8 3E
10
8 4
B
10
C
10
8 2D
106 5
C
10
8 2D
106 5
A B C f1(ABC)
0 0 0 80 0 1 80 1 0 80 1 1 21 0 0 81 0 1 21 1 0 81 1 1 2
A B D f2(ABD)
0 0 0 10 0 1 80 1 0 00 1 1 21 0 0 61 0 1 51 1 0 61 1 1 5
B D E f3(BDE)
0 0 0 80 0 1 30 1 0 80 1 1 41 0 0 81 0 1 31 1 0 81 1 1 4
A
E
B D
C
f2(ABD)f1(ABC)
f3(BDE)
A
E
B
DC
[ ]
[A]
[AB]
[BD]
[AB]
![Page 19: Introduction](https://reader035.fdocuments.in/reader035/viewer/2022062501/568161f7550346895dd222f4/html5/thumbnails/19.jpg)
19
AOMDD – Compilation by Search
B
10
A
10
C
10
8 8
D
101 8
E
10
8 3E
10
8 4
C
10
8 2D
100 2
E
10
8 3E
10
8 4
B
10
C
10
8 2D
106 5
C
10
8 2D
106 5
A
10
B
10
C
10
8 8
0
C
10
8 2D
100 2
E
10
8 3
A
E
B
DC
E
10
8 4
redundant
1
![Page 20: Introduction](https://reader035.fdocuments.in/reader035/viewer/2022062501/568161f7550346895dd222f4/html5/thumbnails/20.jpg)
20
AOMDD – Compilation by Search
B
10
A
10
C
10
8 8
D
101 8
E
10
8 3E
10
8 4
C
10
8 2D
100 2
E
10
8 3E
10
8 4
B
10
C
10
8 2D
106 5
C
10
8 2D
106 5
A
10
B
10
10
C
10
8 2D
100 2
E
10
8 3
A
E
B
DC
E
10
8 4
B
10
C
10
8 2D
106 5
E
10
8 3
isomorphic
isomorphic
E
10
8 4 isomorphic
![Page 21: Introduction](https://reader035.fdocuments.in/reader035/viewer/2022062501/568161f7550346895dd222f4/html5/thumbnails/21.jpg)
21
AOMDD – Compilation by Search
B
10
A
10
C
10
8 8
D
101 8
E
10
8 3E
10
8 4
C
10
8 2D
100 2
E
10
8 3E
10
8 4
B
10
C
10
8 2D
106 5
C
10
8 2D
106 5
A
10
B
10
10
C
10
8 2D
100 2
E
10
8 3
A
E
B
DC
E
10
8 4
B
10
D
106 5
C
10
8 2isomorphic
D
106 5 isomorphi
c
![Page 22: Introduction](https://reader035.fdocuments.in/reader035/viewer/2022062501/568161f7550346895dd222f4/html5/thumbnails/22.jpg)
22
AOMDD – Compilation by Search
B
10
A
10
C
10
8 8
D
101 8
E
10
8 3E
10
8 4
C
10
8 2D
100 2
E
10
8 3E
10
8 4
B
10
C
10
8 2D
106 5
C
10
8 2D
106 5
A
10
B
10
10
C
10
8 2D
100 2
E
10
8 3
A
E
B
DC
E
10
8 4
B
10
D
106 5
redundant
![Page 23: Introduction](https://reader035.fdocuments.in/reader035/viewer/2022062501/568161f7550346895dd222f4/html5/thumbnails/23.jpg)
23
AOMDD for Constraint OptimizationA
10
B
10
10
C
10
8 2D
100 2
E
10
8 3E
10
8 4
D
106 5
A=0
E=1
B=1
D=0C=12
3
A=0
E=1
B=1
D=1C=12 2
4
A=1
E=1
B=0
D=0C=12 6
3
A=1
E=1
B=0
D=1C=12 5
4
A=1
E=1
B=1
D=0C=12 6
3
A=1
E=1
B=1
D=1C=12 5
4cost = 5 cost = 8 cost = 11 cost = 11 cost = 11 cost = 11
AOMDD for all solutions
A
10
B
10
10
C
10
8 2D
100 2
E
10
8 3E
10
8 4
AOMDD for two best solutions
![Page 24: Introduction](https://reader035.fdocuments.in/reader035/viewer/2022062501/568161f7550346895dd222f4/html5/thumbnails/24.jpg)
Complexity of Compilation The size of the AOMDD is O(n kw*)
The compilation time is also bounded by O(n kw*)
24
k = domain sizen = number of variablesw*= treewidth
![Page 25: Introduction](https://reader035.fdocuments.in/reader035/viewer/2022062501/568161f7550346895dd222f4/html5/thumbnails/25.jpg)
Semantic Treewidth Given a network, there may exist a sparser
equivalent network. Challenges the idea of using induced width
to measure the difficulty of the problem AOMDD sizes are much smaller than the
bound
25
![Page 26: Introduction](https://reader035.fdocuments.in/reader035/viewer/2022062501/568161f7550346895dd222f4/html5/thumbnails/26.jpg)
Semantic Treewidth With respect to a pseudo tree, this is the
smallest treewidth over all equivalent networks that can have that pseudo tree
With respect to the network, this is the smallest semantic treewidth over all pseudo trees that can express the set of solutions
Instead of the induced width bounding AOMDD size, we can use semantic treewidth.
26
![Page 27: Introduction](https://reader035.fdocuments.in/reader035/viewer/2022062501/568161f7550346895dd222f4/html5/thumbnails/27.jpg)
Semantic Treewidth
27
Equality constraint network results
![Page 28: Introduction](https://reader035.fdocuments.in/reader035/viewer/2022062501/568161f7550346895dd222f4/html5/thumbnails/28.jpg)
Constraint Propagation We can also prune the search space during
compilation without removing possible solutions.
In Bayesian networks, prune a subtree if the weight of the assignment is 0.
28
![Page 29: Introduction](https://reader035.fdocuments.in/reader035/viewer/2022062501/568161f7550346895dd222f4/html5/thumbnails/29.jpg)
Experiments What about the pseudo-tree height
parameter? Problems: WCSP instances
ISCAS 89 Circuits SPOT5 Satellites Mastermind CELAR6 Radio Frequencies
Time bound for compilation: 3 hours
29
![Page 30: Introduction](https://reader035.fdocuments.in/reader035/viewer/2022062501/568161f7550346895dd222f4/html5/thumbnails/30.jpg)
Experiments Compilation was for finding the optimal
solution Used AOBB with static mini-bucket
heuristics (i-bound = 10) Tried different implementations of MinFill
Existing implementation in the compiler daoopt (gets lower h because it considers it
too) CVO
30
![Page 31: Introduction](https://reader035.fdocuments.in/reader035/viewer/2022062501/568161f7550346895dd222f4/html5/thumbnails/31.jpg)
Experiments BnB pruning makes the size unpredictable
as a function of the parameters Need to modify the routine for solution
counting so the entire AOMDD is actually compiled
31
![Page 32: Introduction](https://reader035.fdocuments.in/reader035/viewer/2022062501/568161f7550346895dd222f4/html5/thumbnails/32.jpg)
Experiments (BN) Reproduce and extend BN results in JAIR
2008 paper UAI 2006 Bayesian network benchmarks
Domain sizes of 2 Evidence on 30 random variables (to simplify
the networks slightly) Many elements with “0” support
Compile with constraint propagation
32
![Page 33: Introduction](https://reader035.fdocuments.in/reader035/viewer/2022062501/568161f7550346895dd222f4/html5/thumbnails/33.jpg)
To do Perform experiments to compare
optimization vs. full compilation Need to extend code for WCSPs
Another way to deal with unpredictability of w/h vs. size in optimization? Compute many orderings with equal w/h and
average the search space/AOMDD sizes.
33
![Page 34: Introduction](https://reader035.fdocuments.in/reader035/viewer/2022062501/568161f7550346895dd222f4/html5/thumbnails/34.jpg)
Future Work? Try regressing curves that depend on w, h,
or both Evaluation of bottom-up version of
compilation (Robert’s algorithm in CP 2006)
34