Information about Binary Decision Diagrams
A binary decision diagram (BDD), like a negation normal form (NNF) or a propositional directed acyclic graph (PDAG), is a data structure that is used to represent a Boolean function. A Boolean function can be represented as a rooted, directed, acyclic graph,
which consists of decision nodes and two terminal nodes called 0-terminal and 1-terminal. Each decision node is labeled by a Boolean variable and has two child nodes called low child and high child. The edge from a node to a low (high) child represents an assignment of the variable to 0 (1).
Such a BDD is called 'ordered' if different variables appear in the same order on all paths from the root. It is called 'reduced' if the graph is reduced according to two rules:
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 child (high child) from a node, then that node's variable is assigned to 0 (1).
BDDs are extensively used in CAD (Computer Aided Design) software to synthesize circuits (logic synthesis) and in formal verification.
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.
The full potential for efficient algorithms based on the data structure was investigated by 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 (Bryant 1986, Bryant 1992). 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 (Brace, Rudell, Bryant 1990). The notion of a BDD is now generally used to refer to that particular data structure.
On a more abstract level, BDDs can be considered as a compressed representation of sets or relations. Unlike other compressed representations, the actual operations are performed directly on that compressed representation, i.e. without decompression.
then depending upon the ordering of the variables we would end up getting a graph whose number of nodes would be linear at the best and exponential at the worst case.
Let us consider the Boolean function
.
Using the variable ordering
, the BDD needs
nodes to represent the function.
Using the ordering
, the BDD consists of
nodes.
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 NP-hard [Bollig and Wegener 1996]. For any constant c>1 it is even NP-hard to compute a variable ordering resulting in an OBDD with a size that is at most c times larger than an optimal one [Sieling 2002]. However there exist efficient heuristics to tackle the problem.
There are functions for which the graph size is always exponential — independent of variable ordering. This holds e. g. for the multiplication function (an indication as to the apparent complexity of factoring ). Researchers have of late suggested refinements on the BDD data structure giving way to a number of related graphs: BMD (Binary Moment Diagrams), ZDD (Zero Suppressed Decision Diagram), FDD (Free Binary Decision Diagrams), PDD (Parity decision Diagrams), etc.
/* The basic data structure */ struct vertex { char *φ; struct vertex *hi, *lo; .. }
/* The interface to the Unique Table */ struct vertex *old_or_new(char *φ, struct vertex *hi, *lo) { if(“a vertex v = (φ, hi, lo) exists”) return v; else { v <- “new vertex pointing at (φ, hi, lo); return v; } }
Data Structure for Building the ROBDD
struct vertex *robdd_build(struct expr
, int i)
{
struct vertex *hi, *lo;
struct char *φ;
if(equal(f, '0')) return v0; else if (equal(f, '1')) return v1; else{ φ ← п(i); hi ← robdd_build(
, i+1);
lo ← robdd_build(
, i+1);
if(lo == hi) return lo; else return old_or_new(φ, hi, lo); } }
Factoring can refer to the following:
..... Click the link for more information.
- Merge any isomorphic subgraphs.
- Eliminate any node whose two children are isomorphic.
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 child (high child) from a node, then that node's variable is assigned to 0 (1).
BDDs are extensively used in CAD (Computer Aided Design) software to synthesize circuits (logic synthesis) and in formal verification.
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, a dotted (solid) line represents an edge to a low (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 Shannon expansion. A switching function is split into two sub-functions (cofactors) by assigning one variable (cf. if-then-else normal form). If such a sub-function is considered as sub-tree, it can be represented by a binary decision tree. Binary decision diagrams (BDD) were introduced by Lee (Lee 1959), and further studied and made known by Akers (Akers 1978) and Boute (Boute 1976).The full potential for efficient algorithms based on the data structure was investigated by 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 (Bryant 1986, Bryant 1992). 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 (Brace, Rudell, Bryant 1990). The notion of a BDD is now generally used to refer to that particular data structure.
On a more abstract level, BDDs can be considered as a compressed representation of sets or relations. Unlike other compressed representations, the actual operations are performed directly on that compressed representation, i.e. without decompression.
Variable ordering
The size of the BDD is determined both by the function being represented and the chosen ordering of the variables. For some functions, the size of a BDD may vary between a linear to an exponential range depending upon the ordering of the variables. Simply put, if we have a boolean function
then depending upon the ordering of the variables we would end up getting a graph whose number of nodes would be linear at the best and exponential at the worst case.
Let us consider the Boolean function
.
Using the variable ordering
, the BDD needs
nodes to represent the function.
Using the ordering
, the BDD consists of
nodes.
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 NP-hard [Bollig and Wegener 1996]. For any constant c>1 it is even NP-hard to compute a variable ordering resulting in an OBDD with a size that is at most c times larger than an optimal one [Sieling 2002]. However there exist efficient heuristics to tackle the problem.
There are functions for which the graph size is always exponential — independent of variable ordering. This holds e. g. for the multiplication function (an indication as to the apparent complexity of factoring ). Researchers have of late suggested refinements on the BDD data structure giving way to a number of related graphs: BMD (Binary Moment Diagrams), ZDD (Zero Suppressed Decision Diagram), FDD (Free Binary Decision Diagrams), PDD (Parity decision Diagrams), etc.
Logical operations on BDDs
Many logical operations on BDDs can be implemented by polynomial-time graph manipulation algorithms.- conjunction
- disjunction
- negation
- existential abstraction
- universal abstraction
See also
- Boolean satisfiability problem
- Data structure
- Model checking
- Negational normal form (NNF)
- Propositional directed acyclic graph (PDAG)
- Radix tree
- Binary key - a method of species identification in biology using binary trees
Implementation
This is a crude way to build a BDD in C. Declare the data structure as follows and then proceed accordingly./* The basic data structure */ struct vertex { char *φ; struct vertex *hi, *lo; .. }
/* The interface to the Unique Table */ struct vertex *old_or_new(char *φ, struct vertex *hi, *lo) { if(“a vertex v = (φ, hi, lo) exists”) return v; else { v <- “new vertex pointing at (φ, hi, lo); return v; } }
Data Structure for Building the ROBDD
struct vertex *robdd_build(struct expr
, int i)
{
struct vertex *hi, *lo;
struct char *φ;
if(equal(f, '0')) return v0; else if (equal(f, '1')) return v1; else{ φ ← п(i); hi ← robdd_build(
, i+1);
lo ← robdd_build(
, i+1);
if(lo == hi) return lo; else return old_or_new(φ, hi, lo); } }
Available Packages
- ABCD: The ABCD package by Armin Biere
- BuDDy: A BDD package by Jørn Lind-Nielsen
- CMU BDD, BDD package, Carnegie Mellon University, Pittsburgh
- CrocoPat, BDD package and a high-level querying language, University of California, Berkeley
- CUDD: BDD package, University of Colorado, Boulder
- JavaBDD, a Java port of BuDDy that also interfaces to CUDD, CAL, and JDD
- The Berkeley CAL package which does breadth-first manipulation
- TUD BDD: A BDD package and a world-level package by Stefan Höreth
- Vahidi's JDD, a java library that supports common BDD and ZBDD operations
- Vahidi's JBDD, a Java interface to BuDDy and CUDD packages
- Maiki & Boaz BDD-PROJECT, a web application for BDD reduction and visualization
References
- C. Y. Lee. "Representation of Switching Circuits by Binary-Decision Programs". Bell Systems Technical Journal, 38:985–999, 1959.
- Sheldon B. Akers. 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.
- 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.
- Randal E. Bryant. "Graph-Based Algorithms for Boolean Function Manipulation". IEEE Transactions on Computers, C-35(8):677–691, 1986.
- R. 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.
- Ch. Meinel, T. Theobald, "Algorithms and Data Structures in VLSI-Design: OBDD - Foundations and Applications", Springer-Verlag, Berlin, Heidelberg, New York, 1998.
- 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.
External links
- H. Andersen "An Introduction to Binary Decision Diagrams," Lecture Notes, http://www.itu.dk/people/hra/bdd97-abstract.html, October 1997.
- Ch. Meinel, T. Theobald, "Algorithms and Data Structures in VLSI-Design: OBDD - Foundations and Applications" (complete text), Springer-Verlag, Berlin, Heidelberg, New York, 1998.
A logical formula is in negation normal form if negation occurs only immediately above elementary propositions, and are the only allowed Boolean connectives. In classical logic each formula can be brought into this form by replacing implications and equivalences by their
..... Click the link for more information.
..... Click the link for more information.
A propositional directed acyclic graph (PDAG) is a data structure that is used to represent a Boolean function. A Boolean function can be represented as a rooted, directed acyclic graph of the following form:
..... Click the link for more information.
- Leaves are labeled with (true), (false), or a Boolean variable.
..... Click the link for more information.
data structure is a way of storing data in a computer so that it can be used efficiently. Often a carefully chosen data structure will allow the most efficient algorithm to be used. The choice of the data structure often begins from the choice of an abstract data type.
..... Click the link for more information.
..... Click the link for more information.
A Boolean function describes how to determine a Boolean value output based on some logical calculation from Boolean inputs. These play a basic role in questions of complexity theory as well as the design of circuits and chips for digital computers.
..... Click the link for more information.
..... Click the link for more information.
graph theory is the study of graphs; mathematical structures used to model pairwise relations between objects from a certain collection. A "graph" in this context refers to a collection of vertices or 'nodes' and a collection of edges
..... Click the link for more information.
..... Click the link for more information.
tree is a widely-used data structure that emulates a tree structure with a set of linked nodes.
..... Click the link for more information.
Nodes
A node may contain a value or a condition or represents a separate data structure or a tree of its own...... Click the link for more information.
In mathematics, an isomorphism (Greek: isos "equal", and morphe "shape") is a bijective map f such that both f and its inverse f −1 are homomorphisms, i.e., structure-preserving mappings.
..... Click the link for more information.
..... Click the link for more information.
In mathematics, an isomorphism (Greek: isos "equal", and morphe "shape") is a bijective map f such that both f and its inverse f −1 are homomorphisms, i.e., structure-preserving mappings.
..... Click the link for more information.
..... Click the link for more information.
In operations research, specifically in decision analysis, a decision tree (or tree diagram) is a decision support tool that uses a graph or model of decisions and their possible consequences, including chance event outcomes, resource costs, and utility.
..... Click the link for more information.
..... Click the link for more information.
A truth table is a mathematical table used in logic — specifically in connection with Boolean algebra, boolean functions, and propositional calculus — to compute the functional values of logical expressions on each of their functional arguments, that is, on each
..... Click the link for more information.
..... Click the link for more information.
This article or section may be confusing or unclear for some readers.
Please [improve the article] or discuss this issue on the talk page. This article has been tagged since December 2006.
..... Click the link for more information.
Please [improve the article] or discuss this issue on the talk page. This article has been tagged since December 2006.
..... Click the link for more information.
Randal E. Bryant (born October 27, 1952) is an American computer scientist and academic noted for his research on formally verifying digital hardware, and more recently some forms of software.
..... Click the link for more information.
..... Click the link for more information.
Carnegie Mellon University is a private research university in Pittsburgh, Pennsylvania, United States. It began as the Carnegie Technical Schools, founded by Andrew Carnegie in 1900. In 1912, the school became Carnegie Institute of Technology and began granting four-year degrees.
..... Click the link for more information.
..... Click the link for more information.
- See also:
Factoring can refer to the following:
- A form of commercial finance - see factoring (finance); structured settlement factoring transaction
- Factorization, a mathematical concept
..... Click the link for more information.
A binary moment diagram (BMD) is a generalization of the binary decision diagram (BDD) to linear functions over domains such as booleans (like BDDs), but also to integers or to real numbers.
..... Click the link for more information.
..... Click the link for more information.
A zero suppressed decision diagram (ZSDD) is a version of binary decision diagram (BDD) where instead of nodes being introduced when the positive and the negative part are different, they are introduced when negative part is different from constant 0.
..... Click the link for more information.
..... Click the link for more information.
Satisfiability is the problem of determining if the variables of a given boolean formula can be assigned in such a way as to make the formula evaluate to TRUE. Equally important is to determine whether no such assignments exist, which would imply that the function expressed by the
..... Click the link for more information.
..... Click the link for more information.
data structure is a way of storing data in a computer so that it can be used efficiently. Often a carefully chosen data structure will allow the most efficient algorithm to be used. The choice of the data structure often begins from the choice of an abstract data type.
..... Click the link for more information.
..... Click the link for more information.
Model checking is the process of checking whether a given model satisfies a given logical formula. The concept is general and applies to all kinds of logics and their models.
..... Click the link for more information.
..... Click the link for more information.
Negative Normal form is way to represent the formula by keeping the negation symbol only to the literals.
If α and φ are boolean formulas, then αφ , αφ, α, αφ are all boolean formulas.
..... Click the link for more information.
If α and φ are boolean formulas, then αφ , αφ, α, αφ are all boolean formulas.
..... Click the link for more information.
A propositional directed acyclic graph (PDAG) is a data structure that is used to represent a Boolean function. A Boolean function can be represented as a rooted, directed acyclic graph of the following form:
..... Click the link for more information.
- Leaves are labeled with (true), (false), or a Boolean variable.
..... Click the link for more information.
A radix tree, Patricia trie/tree, or crit bit tree is a specialized set data structure based on the trie that is used to store a set of strings. In contrast with a regular trie, the edges of a Patricia trie are labelled with sequences of characters rather than
..... Click the link for more information.
..... Click the link for more information.
C
The C Programming Language, Brian Kernighan and Dennis Ritchie, the original edition that served for many years as an informal specification of the language.
..... Click the link for more information.
The C Programming Language, Brian Kernighan and Dennis Ritchie, the original edition that served for many years as an informal specification of the language.
..... Click the link for more information.
EUROMICRO is an international scientific, engineering and educational organization dedicated to advancing the arts, sciences and applications of information technology and microelectronics. EUROMICRO is a non-profit organization.
..... Click the link for more information.
..... Click the link for more information.
This article is copied from an article on Wikipedia.org - the free encyclopedia created and edited by online user community. The text was not checked or edited by anyone on our staff. Although the vast majority of the wikipedia encyclopedia articles provide accurate and timely information please do not assume the accuracy of any particular article. This article is distributed under the terms of GNU Free Documentation License.
Herod_Archelaus
