Binary decision diagram: Difference between revisions
Extended confirmed users, Page movers, File movers, New page reviewers, Pending changes reviewers, Rollbackers, Template editors 683,146 edits Fix CS1 cite error (extra text in "page" or "edition" parameter), and genfixes |
→Variable ordering: Adding information about BDD and cellular automata Tag: Reverted |
||
Line 57: | Line 57: | ||
There are functions for which the graph size is always exponential — independent of variable ordering. This holds e.g. for the multiplication function.<ref name="Bryant1986"/> In fact, the function computing the middle bit of the product of two <math>n</math>-bit numbers does not have an OBDD smaller than <math>2^{\lfloor n/2 \rfloor} / 61 - 4</math> vertices.<ref>Philipp Woelfel. "[http://www.sciencedirect.com/science/article/pii/S002200000500067X Bounds on the OBDD-size of integer multiplication via universal hashing]." ''Journal of Computer and System Sciences'' 71, pp. 520-534, 2005.</ref> (If the multiplication function had polynomial-size OBDDs, it would show that [[integer factorization]] is in [[P/poly]], which is not known to be true.<ref>[[Richard J. Lipton]]. [https://rjlipton.wordpress.com/2009/06/16/bdds-and-factoring/ "BDD's and Factoring"]. ''Gödel's Lost Letter and P=NP'', 2009.</ref>) |
There are functions for which the graph size is always exponential — independent of variable ordering. This holds e.g. for the multiplication function.<ref name="Bryant1986"/> In fact, the function computing the middle bit of the product of two <math>n</math>-bit numbers does not have an OBDD smaller than <math>2^{\lfloor n/2 \rfloor} / 61 - 4</math> vertices.<ref>Philipp Woelfel. "[http://www.sciencedirect.com/science/article/pii/S002200000500067X Bounds on the OBDD-size of integer multiplication via universal hashing]." ''Journal of Computer and System Sciences'' 71, pp. 520-534, 2005.</ref> (If the multiplication function had polynomial-size OBDDs, it would show that [[integer factorization]] is in [[P/poly]], which is not known to be true.<ref>[[Richard J. Lipton]]. [https://rjlipton.wordpress.com/2009/06/16/bdds-and-factoring/ "BDD's and Factoring"]. ''Gödel's Lost Letter and P=NP'', 2009.</ref>) |
||
For [[cellular automata]] with simple behavior, the minimal BDD typically grows linearly on successive steps. For rule 254, for example, it is 8t+2, while for [[rule 90]] it is 4t+2. For cellular automata with more complex behavior, it typically grows roughly exponentially. Thus for [[rule 30]] it is {7, 14, 29, 60, 129} and for [[rule 110]] {7, 15, 27, 52, 88}. The size of the minimal BDD can depend on the order in which variables are specified; thus for example, just reflecting rule 30 to give rule 86 yields {6, 11, 20, 36, 63}. |
|||
Researchers have suggested refinements on the BDD data structure giving way to a number of related graphs, such as BMD ([[binary moment diagram]]s), ZDD ([[zero-suppressed decision diagram]]), FDD ([[free binary decision diagram]]s), PDD ([[parity decision diagram]]s), and MTBDDs (multiple terminal BDDs). |
Researchers have suggested refinements on the BDD data structure giving way to a number of related graphs, such as BMD ([[binary moment diagram]]s), ZDD ([[zero-suppressed decision diagram]]), FDD ([[free binary decision diagram]]s), PDD ([[parity decision diagram]]s), and MTBDDs (multiple terminal BDDs). |
Revision as of 16:56, 6 March 2019
In
Definition
A Boolean function can be represented as a rooted, directed, acyclic graph, which consists of several decision nodes and terminal nodes. There are two types of terminal nodes called 0-terminal and 1-terminal. Each decision node is labeled by Boolean variable and has two
- Merge any isomorphic subgraphs.
- Eliminate any node whose two children are isomorphic.
In popular usage, the term BDD almost always refers to Reduced Ordered Binary Decision Diagram (ROBDD in the literature, used when the ordering and reduction aspects need to be emphasized). The advantage of an ROBDD is that it is canonical (unique) for a particular function and variable order.[1] This property makes it useful in functional equivalence checking and other operations like functional technology mapping.
A path from the root node to the 1-terminal represents a (possibly partial) variable assignment for which the represented Boolean function is true. As the path descends to a low (or high) child from a node, then that node's variable is assigned to 0 (resp. 1).
Example
The left figure below shows a binary decision tree (the reduction rules are not applied), and a truth table, each representing the function f (x1, x2, x3). In the tree on the left, the value of the function can be determined for a given variable assignment by following a path down the graph to a terminal. In the figures below, dotted lines represent edges to a low child, while solid lines represent edges to a high child. Therefore, to find (x1=0, x2=1, x3=1), begin at x1, traverse down the dotted line to x2 (since x1 has an assignment to 0), then down two solid lines (since x2 and x3 each have an assignment to one). This leads to the terminal 1, which is the value of f (x1=0, x2=1, x3=1).
The binary decision tree of the left figure can be transformed into a binary decision diagram by maximally reducing it according to the two reduction rules. The resulting BDD is shown in the right figure.
History
The basic idea from which the data structure was created is the
The full potential for efficient algorithms based on the data structure was investigated by Randal Bryant at Carnegie Mellon University: his key extensions were to use a fixed variable ordering (for canonical representation) and shared sub-graphs (for compression). Applying these two concepts results in an efficient data structure and algorithms for the representation of sets and relations.[5][6] By extending the sharing to several BDDs, i.e. one sub-graph is used by several BDDs, the data structure Shared Reduced Ordered Binary Decision Diagram is defined.[7] The notion of a BDD is now generally used to refer to that particular data structure.
In his video lecture Fun With Binary Decision Diagrams (BDDs),[8] Donald Knuth calls BDDs "one of the only really fundamental data structures that came out in the last twenty-five years" and mentions that Bryant's 1986 paper was for some time one of the most-cited papers in computer science.
Adnan Darwiche and his collaborators have shown that BDDs are one of several normal forms for Boolean functions, each induced by a different combination of requirements. Another important normal form identified by Darwiche is Decomposable Negation Normal Form or DNNF.
Applications
BDDs are extensively used in
Every arbitrary BDD (even if it is not reduced or ordered) can be directly implemented in hardware by replacing each node with a 2 to 1
Variable ordering
The size of the BDD is determined both by the function being represented and the chosen ordering of the variables. There exist Boolean functions for which depending upon the ordering of the variables we would end up getting a graph whose number of nodes would be linear (in n) at the best and exponential at the worst case (e.g., a
It is of crucial importance to care about variable ordering when applying this data structure in practice. The problem of finding the best variable ordering is
There are functions for which the graph size is always exponential — independent of variable ordering. This holds e.g. for the multiplication function.[1] In fact, the function computing the middle bit of the product of two -bit numbers does not have an OBDD smaller than vertices.[14] (If the multiplication function had polynomial-size OBDDs, it would show that integer factorization is in P/poly, which is not known to be true.[15])
For
Researchers have suggested refinements on the BDD data structure giving way to a number of related graphs, such as BMD (binary moment diagrams), ZDD (zero-suppressed decision diagram), FDD (free binary decision diagrams), PDD (parity decision diagrams), and MTBDDs (multiple terminal BDDs).
Logical operations on BDDs
Many logical operations on BDDs can be implemented by polynomial-time graph manipulation algorithms:[16]: 20
However, repeating these operations several times, for example forming the conjunction or disjunction of a set of BDDs, may in the worst case result in an exponentially big BDD. This is because any of the preceding operations for two BDDs may result in a BDD with a size proportional to the product of the BDDs' sizes, and consequently for several BDDs the size may be exponential. Also, since constructing the BDD of a Boolean function solves the NP-complete Boolean satisfiability problem and the co-NP-complete tautology problem, constructing the BDD can take exponential time in the size of the Boolean formula even when the resulting BDD is small.
Computing existential abstraction over multiple variables of reduced BDDs is NP-complete.[17]
See also
- NP-complete computational problem
- L/poly, a complexity class that captures the complexity of problems with polynomially sized BDDs[citation needed]
- Model checking
- Radix tree
- Barrington's theorem
- Hardware acceleration
References
- ^ a b Graph-Based Algorithms for Boolean Function Manipulation, Randal E. Bryant, 1986
- ^ C. Y. Lee. "Representation of Switching Circuits by Binary-Decision Programs". Bell System Technical Journal, 38:985–999, 1959.
- ^ Sheldon B. Akers, Jr.. Binary Decision Diagrams, IEEE Transactions on Computers, C-27(6):509–516, June 1978.
- ^ Raymond T. Boute, "The Binary Decision Machine as a programmable controller". EUROMICRO Newsletter, Vol. 1(2):16–22, January 1976.
- ^ Randal E. Bryant. "Graph-Based Algorithms for Boolean Function Manipulation". IEEE Transactions on Computers, C-35(8):677–691, 1986.
- ^ Randal E. Bryant, "Symbolic Boolean Manipulation with Ordered Binary Decision Diagrams", ACM Computing Surveys, Vol. 24, No. 3 (September, 1992), pp. 293–318.
- ^ Karl S. Brace, Richard L. Rudell and Randal E. Bryant. "Efficient Implementation of a BDD Package". In Proceedings of the 27th ACM/IEEE Design Automation Conference (DAC 1990), pages 40–45. IEEE Computer Society Press, 1990.
- ^ "Stanford Center for Professional Development". scpd.stanford.edu. Retrieved 23 April 2018.
- ^ R. M. Jensen. "CLab: A C+ + library for fast backtrack-free interactive product configuration". Proceedings of the Tenth International Conference on Principles and Practice of Constraint Programming, 2004.
- ^ H. L. Lipmaa. "First CPIR Protocol with Data-Dependent Computation". ICISC 2009.
- ^ Beate Bollig, Ingo Wegener. Improving the Variable Ordering of OBDDs Is NP-Complete, IEEE Transactions on Computers, 45(9):993–1002, September 1996.
- ^ Detlef Sieling. "The nonapproximability of OBDD minimization." Information and Computation 172, 103–138. 2002.
- ^ Rice, Michael. "A Survey of Static Variable Ordering Heuristics for Efficient BDD/MDD Construction" (PDF).
- ^ Philipp Woelfel. "Bounds on the OBDD-size of integer multiplication via universal hashing." Journal of Computer and System Sciences 71, pp. 520-534, 2005.
- Richard J. Lipton. "BDD's and Factoring". Gödel's Lost Letter and P=NP, 2009.
- ^ Andersen, H. R. (1999). "An Introduction to Binary Decision Diagrams" (PDF). Lecture Notes. IT University of Copenhagen.
- )
- R. Ubar, "Test Generation for Digital Circuits Using Alternative Graphs (in Russian)", in Proc. Tallinn Technical University, 1976, No.409, Tallinn Technical University, Tallinn, Estonia, pp. 75–81.
Further reading
- D. E. Knuth, " available for download.
- Ch. Meinel, T. Theobald, "Algorithms and Data Structures in VLSI-Design: OBDD – Foundations and Applications", Springer-Verlag, Berlin, Heidelberg, New York, 1998. Complete textbook available for download.
- Rüdiger Ebendt; Görschwin Fey; Rolf Drechsler (2005). Advanced BDD optimization. Springer. ISBN 978-0-387-25453-1.
- Bernd Becker; Rolf Drechsler (1998). Binary Decision Diagrams: Theory and Implementation. Springer. ISBN 978-1-4419-5047-5.
External links
- Fun With Binary Decision Diagrams (BDDs), lecture by Donald Knuth
- List of BDD software libraries for several programming languages.