1 / 32

Binary Decision Diagrams (BDD)

Binary Decision Diagrams (BDD). What are they?. BDDs are an advanced form of a binary tree. What’s wrong with representing data with Binary Trees?. Binary trees require a lot of data to represent Boolean functions Binary Trees require 2 n -1 nodes

khan
Download Presentation

Binary Decision Diagrams (BDD)

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Binary Decision Diagrams (BDD)

  2. What are they? • BDDs are an advanced form of a binary tree

  3. What’s wrong with representing data with Binary Trees? • Binary trees require a lot of data to represent Boolean functions • Binary Trees require 2n -1 nodes • When dealing with large databases that contain millions of variables, it’s very inefficient and memory consuming.

  4. Binary Tree Representation of Boolean Function

  5. How does a BDD remedy this memory problem? • BDDs use reduction process in order to eliminate redundant nodes and terminals.

  6. Variable Ordering • Assign arbitrary total ordering to variables • e.g., x1 < x2 < x3 • Variables must appear in ascending order along all paths OK Not OK • Properties • No conflicting variable assignments along path • Simplifies manipulation

  7. Decision Structures Truth Table Decision Tree • Vertex represents decision • Follow green (dashed) line for value 0 • Follow red (solid) line for value 1 • Function value determined by leaf value.

  8. a a a Reduction Rule #1 Merge equivalent leaves

  9. x x x x x x y z y z y z Reduction Rule #2 Merge isomorphic nodes

  10. x y y Reduction Rule #3 Eliminate Redundant Tests

  11. Example BDD Initial Graph Reduced Graph (x1+x2)x3

  12. What’s go great about BDDs? • BDDs are a memory-efficient storage and convenient processing media for Boolean or multi-valued functions • They can lead to new, implicit and efficient formulas. • They provide canonical representations of data • for every object, there is only one representation • for given variable ordering • Two functions are equivalent if and only if the graphs are isomorphic • Can be tested in linear time

  13. Binary Decision Diagrams • Graphical encoding of a truth table. x1 0 edge 1 edge x2 x2 x3 x3 x3 x3 x4 x4 x4 x4 x4 x4 x4 x4 0 1 1 1 0 0 0 1 0 0 0 1 0 0 0 0

  14. Binary Decision Diagrams • Collapse redundant nodes. x1 x2 x2 x3 x3 x3 x3 x4 x4 x4 x4 x4 x4 x4 x4 0 1 1 1 0 0 0 1 0 0 0 1 0 0 0 0

  15. Binary Decision Diagrams • Collapse redundant nodes. x1 x2 x2 x3 x3 x3 x3 x4 x4 x4 x4 x4 x4 x4 x4 0 1

  16. Binary Decision Diagrams • Collapse redundant nodes. x1 x2 x2 x3 x3 x3 x3 x4 x4 x4 0 1

  17. Binary Decision Diagrams • Collapse redundant nodes. x1 x2 x2 x3 x3 x3 x4 x4 x4 0 1

  18. Binary Decision Diagrams • Eliminate unnecessary nodes. x1 x2 x2 x3 x3 x3 x4 x4 x4 0 1

  19. Binary Decision Diagrams • Eliminate unnecessary nodes. x1 x2 x2 x3 x3 x4 0 1

  20. Yoga BABY!!!

  21. What’s a Boolean function? B(F, G) = F*G if(F&&G) A(F,G) = F + G if(F||G) OR(F, G) And(F, G )

  22. a a b b b a b c b c c 0 1 0 1 0 1 0 1 0 1 0 1 Generating BDD from a Circuit Task:Represent output functions of gate network as BDDs. A new_var ("a"); B new_var ("b"); C new_var ("c"); T1  And (A, B); T2  And (B, C); O1  Or (T1, T2); Network Evaluation A T1 B O1 C T2 O1 Resulting Graphs T1 T2 A B C

  23. T3 A C O2 B a b b a b c c c 0 1 0 1 0 1 Checking Circuit Equivalence Determine: Do 2 networks compute same Boolean function? Method: Compute BDDs for both networks and compare Evaluation T3  Or (A, C); O2  And (T3, B); if (O2 == O1) then Equivalent else Different Alternate Circuit O2 Resulting Graphs T3 A B C a 0 1 0 1

  24. T3 A C O2 B BDDs can simplify problems • These two are actually equivalent, however the second one is reduced. AB + BC (A + C)B AB + BC = B(A + C) A T1 B O1 C T2

  25. What are BDDs Used For? • BDDs are useful for signatures when storing objects in hash tables. • BDDs are extensively used in CAD software which is used to synthesize circuits • It’s becoming more frequently used for gathering data and storing it in sets.

  26. BDDs Can Still Be Improved • While BDDs are much more efficient memory wise, they still require lots of memory when working with sparse sets • A set is sparse when the number of elements are much smaller than the total number of elements that may appear in a set.

  27. ZBDD(Zero-Suppressed Binary Decision Diagram) • The Zero-Suppressed Binary Decision Diagram resolves the issue with dealing with sparse data

  28. What’s different about ZBDDs? • For BDDs, the node is removed from the decision tree if both its edges point to the same node. • For ZBDDs, the node is removed if its positive edge (then-edge) points to the terminal node 0

  29. ZBDD Representation

  30. ZBDD Importance • ZBDDs are important because they further reduce the memory consumption that the BDD requires. • Because of this, we can deal with much larger amounts of data • Function • Set • ….

  31. That’s All! • Thanks for listening!

  32. Credits • MaciejCiesielski, Electrical & Computer Engineering, University of Massachusetts, Amherst, USA • http://en.wikipedia.org/wiki/Binary_decision_diagram • http://www.eecs.berkeley.edu/~alanmi/publications/2001/tech01_zdd.pdf • http://en.wikipedia.org/wiki/Binary_decision_diagram • http://en.wikipedia.org/wiki/Binary_decision_diagram • http://www.ecs.umass.edu/ece/labs/vlsicad/slides/BDD.ppt • http://sp09.pbworks.com/f/pointer-analysis2.ppt

More Related