Presentation is loading. Please wait.

Presentation is loading. Please wait.

Introduction Combining two frameworks

Similar presentations


Presentation on theme: "Introduction Combining two frameworks"— Presentation transcript:

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

2 Introduction ONCE MANY Compiled structure Query A D B C E F OFFLINE
ONLINE Evaluate answer Polytime? Constant time? MANY

3 Ordered Binary Decision Diagram
B = {0,1} f : B3 → B B A C 1 Decision tree B A C 1 B A C 1 B A C 1 B A 1 C B A 1 C OBDD [Bryant86] A B C f(ABC) 1 Table 1) Merge nodes with identical children Merge terminal nodes Simplify 2) Remove redundant nodes Ordering enables efficient operations

4 ? Decision Diagrams f = (A ∨ E) ∧ (B ∨ F) f ∧ g = OBDD
1 B A C D E F H G f = (A ∨ E) ∧ (B ∨ F) B A F 1 E ? f ∧ g = OBDD g = (C ∨ G) ∧ (D ∨ H) AND D C H 1 G B A F E D C H 1 G f ∧ g = OBDD

5 AOMDDs Point dead-ends to terminal node “0”
B C f(ABC) 1 A Point dead-ends to terminal node “0” Point goods to terminal node “1” B C A 1 B C Decision Diagram A 1 B C Minimal AND/OR graph

6 Removing Redundancy A B C f(ABC) 1 A Group OR node together with its AND children into a meta-node B C A 1 B C redundant A 1 B C A 1 B C A 1 B C OBDD (pseudo tree is a chain)

7 = * AOBDD A A A B B B C D C D A B C f(ABC) 1 A B D g(ABD) 1 A 1 B C A
1 A A B D g(ABD) 1 A A B B B C D C D A 1 B C A 1 B D A 1 B C D = *

8 = * Apply Operator 1 1 A1 B1 A2 B2 B6 A4 B4 B7 A3 A5 B3 B5 A1B1 A1B1
D C Apply Operator A1 A 1 B1 A 1 A1B1 A 1 A1B1 = * B 1 B 1 A2B2 B 1 A4B6 A2 B 1 B2 B6 A2B2 C 1 A4 B4 D 1 D 1 A4B4 B7 A3 1 A5 B3 1 B5 A3B3

9 = * Apply Operator 1 1 A1 B1 A2 B2 B6 A4 B4 B7 A3 A5 B3 B5 A1B1 A4B6
D C Apply Operator A1 A 1 B1 A 1 A 1 A1B1 = * B 1 B 1 B 1 A4B6 A2 B 1 B2 B6 A2B2 C 1 A4 B4 D 1 D 1 A4 A4B4 B4 B7 A3 1 A5 B3 1 B5

10 = * Apply Operator 1 1 1 A1 B1 A2 B2 B6 A4 B4 B7 A3 A5 B3 B5 A1B1 A4B6
D C Apply Operator A1 A 1 B1 A 1 A 1 A1B1 = * B 1 A4B6 A2 B 1 B2 B 1 B 1 B6 A2B2 C 1 A4 B4 D 1 D 1 C 1 A4 D 1 B4 A4 B4 B7 A3 1 A5 B3 1 B5 1

11 = * Apply Operator 1 1 1 A1 B1 A2 B2 B6 A4 B4 B7 A3 A5 B3 B5 A1B1 A4B6
D C Apply Operator A1 A 1 B1 A 1 A 1 A1B1 = * B 1 A4B6 B 1 A2 B 1 B2 B 1 B 1 B6 A2B2 A4B6 C 1 A4 B4 D 1 D 1 C 1 D 1 A4B4 A4B7 A4 B4 B7 A3 1 A5 B3 1 B5 1

12 = * Apply Operator 1 1 1 A1 B1 A2 B2 B6 A4 B4 B7 A3 A5 B3 B5 A1B1 A2B2
D C Apply Operator A1 A 1 B1 A 1 A 1 A1B1 = * B 1 B 1 B 1 B 1 A2 B 1 B2 B6 A2B2 A4B6 C 1 A4 B4 D 1 D 1 C 1 D 1 D 1 A4B7 A4 B4 B7 B7 A3 1 A5 B3 1 B5 1 Implementation Two caches: “Operation” cache to prevent recursive calls with the same arguments. Cache to store all nodes to catch isomorphism (coming up with a node that results in the same variable and same children lists)

13 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

14 Example: (f ∨ h) ∧ (a ∨ !h) ∧ (a#b#g) ∧ (f ∨ g) ∧
(b ∨ f) ∧ (a ∨ e) ∧ (c ∨ e) ∧ (c#d) ∧ (b ∨ c) A B C F D E G H pseudo tree H G E D C F B A m7 m7 D C B F A E G H primal graph A 1 B C D E m6 A 1 B F G H m3 A B C F D E G H m3 m6 A 1 B G F m2 A B F G H A 1 E C m4 A 1 F H m1 A B C D E B 1 C C9 C 1 D m5 B 1 F C5 m5 m4 m2 m1 C 1 D C8 A 1 E C6 C 1 E C7 A 1 B G C3 C E A A B F G F 1 H C1 A 1 H C2 A F H F 1 G C4 C D

15 Example (continued) m7 A m7 A B C D F G H E B m6 m3 A B C D E A B F G
1 B C D F G H E m7 B A 1 B C D E m6 A 1 B F G H m3 A B C F D E G H

16 AOBDD vs. OBDD AOBDD 18 nonterminals 47 arcs OBDD 27 nonterminals
F A E G H primal graph A B B C C C C A 1 B C D F G H E D D D D D D E E E F F F F G G G G G A H H B C 1 D A B C F D E G H AOBDD 18 nonterminals 47 arcs OBDD 27 nonterminals 54 arcs E F G H

17 Constraint Optimization - AND/OR Tree
B D C f2(ABD) f1(ABC) f3(BDE) A E B D C [ ] [A] [AB] [BD] A B C f1(ABC) 8 1 2 A B D f2(ABD) 1 8 2 6 5 B D E f3(BDE) 8 1 3 4 B 1 A C 8 D E 3 4 2 6 5

18 AND/OR Context Minimal Graph
B D C f2(ABD) f1(ABC) f3(BDE) A E B D C [ ] [A] [AB] [BD] A B C f1(ABC) 8 1 2 A B D f2(ABD) 1 8 2 6 5 B D E f3(BDE) 8 1 3 4 B 1 A C 8 D E 3 4 2 6 5

19 AOMDD – Compilation by Search
1 B B B 1 1 C D C D C D C D C D 8 8 1 8 8 2 2 8 2 6 5 8 2 6 5 1 1 1 1 1 1 1 1 E E E E E 8 3 8 4 8 3 8 4 1 1 1 1 A 1 B 1 C 1 8 C 1 8 2 D 1 2 redundant E 1 8 3 E 1 8 4 1

20 AOMDD – Compilation by Search
1 B B B 1 1 C D C D C D C D C D 8 8 1 8 8 2 2 8 2 6 5 8 2 6 5 1 1 1 1 1 1 1 1 E E E E E 8 3 8 4 8 3 8 4 1 1 1 1 A 1 B 1 B 1 C 1 8 2 D 1 2 C 1 8 2 D 1 6 5 isomorphic E 1 8 3 E 1 8 4 E 1 8 3 E 1 8 4 isomorphic isomorphic 1

21 AOMDD – Compilation by Search
1 B B B 1 1 C D C D C D C D C D 8 8 1 8 8 2 2 8 2 6 5 8 2 6 5 1 1 1 1 1 1 1 1 E E E E E 8 3 8 4 8 3 8 4 1 1 1 1 A 1 B 1 B 1 D 1 2 C 1 8 2 D 1 6 5 C 1 8 2 D 1 6 5 isomorphic isomorphic E 1 8 3 E 1 8 4 1

22 AOMDD – Compilation by Search
1 B B B 1 1 C D C D C D C D C D 8 8 1 8 8 2 2 8 2 6 5 8 2 6 5 1 1 1 1 1 1 1 1 E E E E E 8 3 8 4 8 3 8 4 1 1 1 1 A 1 B 1 B 1 redundant C 1 8 2 D 1 2 D 1 6 5 E 1 8 3 E 1 8 4 1

23 AOMDD for Constraint Optimization
1 B C 8 2 D E 3 4 6 5 A 1 B C 8 2 D E 3 4 AOMDD for two best solutions AOMDD for all solutions A=0 E=1 B=1 D=0 C=1 2 3 A=0 E=1 B=1 D=1 C=1 2 4 A=1 E=1 B=0 D=0 C=1 2 6 3 A=1 E=1 B=0 D=1 C=1 2 5 4 A=1 E=1 B=1 D=0 C=1 2 6 3 A=1 E=1 B=1 D=1 C=1 2 5 4 cost = 5 cost = 8 cost = 11 cost = 11 cost = 11 cost = 11

24 Complexity of Compilation
The size of the AOMDD is O(n kw*) The compilation time is also bounded by O(n kw*) k = domain size n = number of variables w*= treewidth

25 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

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

27 Equality constraint network results
Semantic Treewidth Equality constraint network results

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

29 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

30 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

31 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

32 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

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

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


Download ppt "Introduction Combining two frameworks"

Similar presentations


Ads by Google