Binary decision diagrams
What Are Binary Decision Diagrams?
Binary decision diagrams (BDDs) are graph-based data structures that represent Boolean functions in a canonical, compact form suitable for efficient manipulation by computer algorithms. A BDD is a rooted directed acyclic graph in which each internal node is labeled by a Boolean variable and has exactly two outgoing edges, one for the case where that variable is assigned the value 0 (false) and one for the case where it is assigned 1 (true). Terminal nodes are labeled 0 or 1 and represent the function's output for all variable assignments consistent with the path from the root. The ordered BDD (OBDD) variant, introduced by Randal Bryant in his 1986 paper in the IEEE Transactions on Computers, imposes a consistent variable ordering on all paths from root to terminal; this ordering, combined with a reduction rule that merges equivalent subgraphs, yields a canonical form called a reduced ordered BDD (ROBDD) in which any two equivalent Boolean functions have identical graph representations. This canonicity property makes ROBDDs particularly powerful for equivalence checking, a fundamental problem in logic design verification.
Representation and Manipulation
The canonical nature of ROBDDs means that checking whether two Boolean functions are equivalent reduces to checking whether their ROBDD representations are the same graph, a test that runs in constant time once both graphs are constructed. Satisfiability (the question of whether any variable assignment makes the function true) is similarly efficient, requiring only a check for the presence of a 1-terminal reachable from the root. Logical operations such as AND, OR, and NOT can be computed directly on ROBDD representations through recursive algorithms that run in time proportional to the product of the sizes of the two graphs being combined, rather than in time exponential in the number of variables. These properties make BDDs superior to truth tables or sum-of-products expressions for many functions that arise in practice, particularly those with regular structure such as arithmetic circuits, parity functions, and finite-state machine transition relations. UC Berkeley's formal methods lecture materials on BDDs provide a detailed treatment of these algorithms and their complexity.
Variable Ordering and Scalability
The size of an ROBDD depends critically on the variable ordering chosen. For some Boolean functions, the optimal ordering produces a graph with size linear in the number of variables, while a poor ordering produces an exponentially larger graph. Determining the optimal variable ordering is itself an NP-complete problem, so practitioners rely on heuristic ordering methods or apply domain-specific knowledge about the circuit structure to guide ordering choices. Functions that represent multiplier circuits, for example, have been shown to require exponential-size BDDs under any variable ordering, which limits BDD-based verification for arithmetic-intensive designs. Research into BDD extensions, including multi-terminal BDDs (for integer-valued functions), algebraic decision diagrams, and zero-suppressed BDDs (optimized for sparse set representations), has extended the applicability of the approach to problems where standard ROBDDs are intractable. The ACM guide on BDD techniques for formal verification surveys the range of BDD variants developed to address these scalability limitations.
Applications in Electronic Design Automation
BDDs became the dominant data structure for Boolean function manipulation in electronic design automation (EDA) during the late 1980s and 1990s, enabling symbolic model checking of finite-state systems at scales previously inaccessible to explicit-state enumeration methods. Symbolic model checking, developed by Clarke, McMillan, and collaborators at Carnegie Mellon University, uses BDDs to represent sets of states and transition relations compactly, allowing the verification of hardware designs with state spaces too large for explicit enumeration. Logic synthesis tools use BDDs to optimize combinational circuits, identify equivalent sub-expressions, and compute covers for programmable logic devices. The ScienceDirect review of BDD-based circuit verification methods documents the practical impact of BDDs on industrial verification workflows during the era when VLSI complexity first outpaced manual inspection methods.
Applications
Binary decision diagrams have applications across a range of computational fields, including:
- Hardware formal verification and model checking of digital circuits
- Logic synthesis and optimization in electronic design automation tools
- Network verification and packet classification in software-defined networking
- Probabilistic model checking and reliability analysis
- Combinatorial optimization and constraint satisfaction