Chain-Reduced ZDDs (CZDDs)
- Chain-Reduced ZDDs (CZDDs) are defined as ZDDs enhanced with chain reduction to absorb contiguous don’t-care chains and compress Boolean function representations.
- The conversion algorithm transforms standard ZDDs into CZDDs via postorder processing and unique table lookups, efficiently removing redundant nodes.
- Empirical benchmarks show CZDDs offer significant size and performance benefits over ZDDs and BDDs in applications ranging from combinatorial generation to digital circuit analysis.
Chain-Reduced Zero-Suppressed Decision Diagrams (CZDDs) extend the data structure of Zero-Suppressed Decision Diagrams (ZDDs) by incorporating chain reduction, enabling compact symbolic representation of Boolean functions that exploit both the zero-suppression of ZDDs and the don’t-care skipping of Binary Decision Diagrams (BDDs). For any Boolean function, the node count of a CZDD is guaranteed to be no greater than that of a ZDD, and at most twice that of a BDD. CZDDs provide performance and size benefits particularly for sparse and combinatorial structures, as well as robust guarantees on dense logic representations (Bryant, 2017).
1. Structural Definition and Reduction Properties
A chain-reduced ZDD generalizes the standard ZDD by allowing each nonterminal node to cover a contiguous range of levels rather than a single variable. Concretely, a CZDD node is a 4-tuple , where and , are pointers to child nodes (or the 0/1 terminals). Each node encodes the subfunction:
- If variables through are all $0$, evaluate ;
- Otherwise, evaluate .
If , this reduces to the standard Shannon node on as in ZDDs.
CZDDs employ three reduction operations:
- Zero-Suppression: Any node with is removed, with all incoming edges redirected to . This is identical to standard ZDD zero-suppression.
- Node Merging: Nodes with identical children are merged.
- Chain Reduction: Sequences of nodes representing contiguous don’t-care chains are collapsed. Specifically, for and , replace with .
The two fundamental size guarantees for any Boolean function are:
- .
- .
The first follows from the strictly reducing transformations; the second is demonstrated by mapping each BDD edge to at most one CZDD node, so that the CZDD node count does not exceed twice the corresponding BDD node count.
2. Conversion Algorithm from ZDDs to CZDDs
Chain reduction is performed on a reduced, ordered ZDD as follows:
- Initialization: Assign ZDD nodes at level as CZDD nodes .
- Unique-Table Maintenance: Maintain a unique table keyed by .
- Postorder Processing:
- For each node , recognize and absorb chains: if and is a chain-head , set (or if terminal).
- Lookup or insert in the unique table.
- Zero-Suppression: Remove nodes with .
The following pseudocode captures the reduction process:
1 2 3 4 5 6 7 8 9 10 11 12 13 |
def CHAIN_REDUCE(u): if is_terminal(u): return u lo_prime = CHAIN_REDUCE(u.lo) hi_prime = CHAIN_REDUCE(u.hi) t = level(u) b = t while lo_prime == hi_prime and is_nonterminal(lo_prime) and lo_prime.t == b + 1: b = lo_prime.b lo_prime, hi_prime = lo_prime.lo, lo_prime.hi if hi_prime == 0: return lo_prime return UNIQUE_LOOKUP(t, b, lo_prime, hi_prime) |
Both time and space complexities are linear in the ZDD size: nodes visited, and for the unique table.
3. Boolean Operations and Apply Mechanism
Standard Boolean-apply routines (including ITE) generalize to CZDDs by defining:
- Splitting Range : , by a minimum over children, as specified in equation (6) of (Bryant, 2017).
- Cofactor Cases: Depending on the relationship between and , each argument node is cofactored appropriately, with explicit cases for how chains are continued or terminated.
- Recursive Step: Recurse on the derived cofactors.
- Result Reconstruction and Chain Reduction: The results are reconstructed, possibly merging chains via rebuild rules. Special cases handle zero-suppression and don’t-care reduction.
The complexity matches standard apply: worst-case for binary operations. Memory usage increases negligibly, as node keys employ two indices. In practice, runtime and memory scale with the size of the output DAG plus a small overhead.
4. Empirical Benchmarks and Observed Performance
Evaluations on three classes of benchmarks demonstrate practical impact:
| Instance | BDD Size | ZDD Size | CZDD Size | ZDD/BDD | CZDD/BDD |
|---|---|---|---|---|---|
| Dictionary (one-hot) | 9,701,439 | 297,681 | 297,681 | 15.50 | 15.50 |
| 15-Queens (one-hot) | 51,889,029 | 4,796,504 | 4,796,504 | 10.82 | 10.82 |
| ISCAS c3540 circuit | 3,345,341 | 4,181,847 | 3,538,982 | 1.25 | 1.06 |
Key empirical conclusions:
- CZDD = ZDD at final reduction when compressible don’t-care chains are absent.
- Substantial reduction of intermediate DAG size during construction, e.g., dictionary encoding completes 3–15× faster than with ZDD, as chain reduction prevents blowup.
- CZDD/BDD never exceeds 2× in node count; in practice, ratios are often much lower (≤1.5× on digital circuits, 10–30× smaller for sparse functions).
5. Applications, Practical Considerations, and Trade-offs
CZDDs are particularly effective in contexts requiring generic Boolean-apply operations rather than specialized ZDD routines, notably:
- Applications for sparse combinatorial generation and set manipulation, such as word-list encoding and combinatorial problems, benefit from ZDD-like compactness while avoiding intermediate don’t-care chain blowup.
- Mixed-density applications (digital circuits, some encoding schemes) can use CZDDs as a single representation with size guarantees within constant factors of both ZDD and BDD.
Several properties underlie CZDD efficacy:
- Zero-suppression compresses sparse solution sets.
- Don’t-care chain absorption limits the growth of the DAG in unconstrained regions, as in BDDs.
- Size guarantee: .
Trade-offs and limitations include:
- Node Key Size: Each CZDD node requires two indices, although packing into 32 bits avoids pointer size increases.
- Algorithmic Overhead: The apply algorithm is more complex (more cofactor and rebuild cases), but the increase in overhead is minor relative to the reduction in subgraph size.
- Dynamic Variable Reordering: Not implemented for CZDDs in most packages as of publication; supporting variable swaps would require generalization to two-level nodes.
CZDDs thus provide a “best-of-both-worlds” structure suitable for a wide range of applications, ensuring the compactness of ZDDs and the bounded overhead relative to BDDs in dense function domains (Bryant, 2017).
6. Theoretical Implications and Future Directions
Chain-reduction’s guarantee that is tight in the worst case, but empirical results suggest CZDDs are rarely near this bound for practical instances. Extension to chain-reduced BDDs (CBDDs) further generalizes the idea: CBDDs yield representations no larger than BDDs and at most three times the size of CZDDs. A plausible implication is that, as CZDD library implementations mature—specifically with respect to dynamic variable reordering—CZDDs will become viable as a universal DAG representation for Boolean functions in both sparse and dense regimes. The persistent need for optimized symbolic set manipulation and function representation underscores the relevance of further algorithmic and implementation research in chain reduction (Bryant, 2017).