Abstract
Finding optimal paths in Directed Acyclic Graphs (DAGs) is a fundamental problem in combinatorial optimization, appearing in tasks ranging from resource allocation to sequence analysis. When these paths must satisfy specific logical constraints, the problem becomes significantly more complex. While BDD-constrained search (BCS) has been a leading approach, it suffers from inherent redundancies by treating every edge as a binary variable. This paper introduces MDD-constrained search (MCS), which shifts the focus to a vertex-centric model using Multi-Valued Decision Diagrams (MDDs). By representing constraints as multi-valued functions and applying domain reduction, MCS achieves substantial performance gains over existing methods.
Introduction
Many optimization problems—such as the 0-1 knapsack problem, edit distance calculation, and finding Viterbi paths in hidden Markov models—can be framed as finding an optimal path through a DAG. Real-world scenarios often impose additional logical constraints (e.g., "if edge A is selected, edge B must be excluded").
The previous state-of-the-art, BDD-constrained search (BCS), utilizes Binary Decision Diagrams to manage these constraints. However, BCS treats each edge as an independent Boolean variable. Since a path can only traverse one outgoing edge from any vertex, this edge-centric approach forces the search algorithm to process numerous logically impossible "forbidden" edges, leading to a bloated search space and redundant computations.
The MCS Approach: From Edges to Vertices
To address the inefficiencies of BCS, the authors propose MCS. The core innovation is a transition from an edge-centric to a vertex-centric representation of constraints.
Multi-Valued Variables and MDDs
Instead of thousands of binary variables representing edges, MCS uses vertex variables. The value of a vertex variable corresponds to the specific outgoing edge chosen at that vertex, or a null value ($\emptyset$) if the vertex is not part of the path. Because these variables are multi-valued, Multi-Valued Decision Diagrams (MDDs) are used to represent the global constraints. This naturally encodes the "choose exactly one" constraint inherent in graph traversal, eliminating the need to explicitly handle mutually exclusive edge choices.
Domain Reduction
A key optimization in MCS is domain reduction. This technique identifies "irrelevant" edges—those that do not influence whether a constraint is satisfied—and collapses them into the null value. This significantly reduces the size of the MDD, making it more compact and efficient for search operations.
Experimental Evaluation
The researchers evaluated MCS against BCS across four problem domains: general DAGs, 0-1 Knapsack, Edit Distance, and Viterbi Path. They tested two primary constraint types: Checkpoint (requiring visits to specific edge sets) and Disjunction (preventing simultaneous visits to certain edge pairs).
Key Results
- Performance: MCS consistently outperformed BCS. In complex Viterbi path scenarios with checkpoint constraints, BCS was found to take up to 11.6 times longer than MCS.
- Memory Efficiency: By maintaining "correct" local constraints and avoiding redundant path prefixes, MCS requires significantly fewer entries in its dynamic programming tables.
- Scalability: MCS demonstrated superior scalability on large graphs (exceeding 350,000 edges) where BCS began to struggle with search space explosion.
Conclusion
The shift to a vertex-centric, multi-valued representation aligns the constraint-handling mechanism with the natural structural geometry of path-finding in DAGs. By eliminating the redundancy inherent in edge-based Boolean frameworks and utilizing domain reduction, MCS offers a more efficient and scalable solution for constrained optimal path problems. Future work may address the compilation time for complex MDDs and explore extending these techniques to graphs with cycles.
Summary updated