A Multi-Valued Decision Diagram-Based Approach to Constrained Optimal Path Problems over Directed Acyclic Graphs

Mingwei Zhang, Liangda Fang, Zhenhao Gu, Quanlong Guan, Yong Lai, Luoxi Jing, Nan Yin

Abstract

Finding optimal paths in Directed Acyclic Graphs (DAGs) under complex logical constraints is a fundamental problem in optimization, appearing in applications ranging from Viterbi decoding to the 0-1 knapsack problem. Traditional approaches, such as BDD-constrained search (BCS), represent constraints using Binary Decision Diagrams (BDDs) by treating each edge as a Boolean variable. However, this representation fails to account for the structural constraints of DAGs, where choosing one edge at a vertex precludes others, leading to significant search redundancy. This paper proposes MDD-constrained search (MCS), which utilizes Multi-Valued Decision Diagrams (MDDs) to model vertex-based choices directly. By incorporating domain reduction to eliminate irrelevant edges, MCS drastically reduces the search space. Experiments show that MCS provides up to a 12x speedup and significant memory savings over state-of-the-art BDD-based methods.

Introduction

Many classic optimization problems—including the 0-1 knapsack problem, edit distance, and Viterbi decoding—can be modeled as finding the shortest or longest path through a Directed Acyclic Graph (DAG). In real-world scenarios, these paths must often satisfy complex "global constraints," such as mandatory checkpoints or mutually exclusive edge selections. Efficiently navigating these constraints while searching for an optimal path is a significant computational challenge.

The previous state-of-the-art approach, BDD-constrained search (BCS), handles these constraints by representing them as Boolean functions using Binary Decision Diagrams (BDDs). In BCS, every edge in the DAG is treated as a separate Boolean variable. However, this creates a structural mismatch: in a DAG, selecting one outgoing edge from a vertex automatically excludes all other outgoing edges from that same vertex. Because BDDs do not inherently recognize this "one-out-of-many" constraint, the search algorithm processes many physically impossible edge combinations, generating redundant states and wasting memory.

MDD-Constrained Search (MCS)

To address these inefficiencies, the authors introduce MDD-constrained search (MCS). The core innovation lies in changing the representation of the decision variables:

  1. Vertex-based Variables: Instead of edges, MCS uses vertices as multi-valued variables. The value assigned to a vertex variable corresponds to the specific outgoing edge chosen from that vertex.
  2. Multi-Valued Decision Diagrams (MDDs): By using MDDs instead of BDDs, the algorithm naturally captures the mutually exclusive nature of edge choices at each vertex. This ensures that every state explored in the search corresponds to a valid partial path.
  3. Domain Reduction: The authors further optimize the MDD by identifying "irrelevant" edges—those that do not affect the satisfaction of a constraint—and grouping them into a single "null" value ($\emptyset$). This technique significantly compresses the MDD.
Comparison of a weighted DAG (a) and its representation using a BDD (b) versus MDDs without (c) and with (d) domain reduction.

Key Results

The MCS algorithm was evaluated on several benchmarks, including general DAGs, 0-1 Knapsack, Edit Distance, and Viterbi Path problems. The results demonstrate a clear superiority over the BDD-based approach:

  • Computational Speed: MCS achieved consistent speedups. For instance, on Viterbi path datasets with complex constraints, MCS was nearly 12x faster than BCS (2.0 seconds vs. 23.8 seconds).
  • Memory Efficiency: The number of search states was drastically reduced. In the same Viterbi instance, MCS required only ~1.4 million entries compared to ~10.5 million for BCS.
  • MDD Compression: The domain reduction technique achieved a compression rate of at least 3.57x for the number of arcs in the decision diagrams across various datasets.

Conclusion

By aligning the underlying data structure with the physical constraints of the problem, MDD-constrained search (MCS) eliminates the massive redundancy inherent in BDD-based methods. This approach not only accelerates pathfinding in constrained DAGs but also makes it feasible to solve larger, more complex optimization problems with significantly lower memory overhead. Future work may extend this framework to graphs with cycles or integrate it with other heuristic search techniques.

Summary updated

BibTeX
@inproceedings{zhang2024multi,
  author = {Mingwei Zhang and Liangda Fang and Zhenhao Gu and Quanlong Guan and Yong Lai and Luoxi Jing and Nan Yin},
  title = {{A Multi-Valued Decision Diagram-Based Approach to Constrained Optimal Path Problems over Directed Acyclic Graphs}},
  booktitle = {International Joint Conference on Artificial Intelligence},
  year = {2024},
  url = {https://openreview.net/forum?id=hIao6ozu12},
}
Figure