Papers
Topics
Authors
Recent
Search
2000 character limit reached

Interval-Memoized Backtracking on ZDDs

Updated 17 February 2026
  • The paper introduces a novel interval memoization technique that efficiently bypasses redundant exploration in ZDD backtracking for cost-bounded problems.
  • It leverages the structural sharing of ZDDs to compress and merge nodes, enabling scalable enumeration of complex combinatorial solution spaces.
  • Empirical evaluations on Hamiltonian path and grid graph instances show significant speedup and reduced memory usage compared to conventional methods.

Interval-memoized backtracking on Zero-suppressed Decision Diagrams (ZDDs) is a fast and memory-efficient algorithm for exactly enumerating all feasible solutions to combinatorial problems that fall below a specified cost bound. The technique leverages the structural sharing properties of ZDDs and introduces a novel memoization approach based on cost intervals, enabling it to avoid redundant exploration of subproblems and scale efficiently with large numeric bounds whenever the underlying ZDD representations are compact (Minato et al., 2022).

1. Zero-suppressed Decision Diagrams (ZDDs): Structure and Semantics

Let I={1,2,,n}I = \{1,2, \ldots, n\} denote a universe of items. A ZDD is a directed acyclic graph (DAG) constructed with two special terminal nodes, $0$ and $1$, and a set VV of non-terminal nodes. Each non-terminal node vVv \in V is represented as a triple:

  • lvl(v)I\mathrm{lvl}(v) \in I: the item index tested at vv
  • low(v)\mathrm{low}(v): the 0-child of vv
  • high(v)\mathrm{high}(v): the 1-child of vv

Each root-to-$1$ path in the ZDD encodes a subset XIX \subseteq I such that if the high-edge of a node at level ii is traversed, then iXi \in X, and if the low-edge is taken, then iXi \notin X. The "zero-suppressed" property ensures that any node whose high-child is $0$ is deleted, and any two nodes with identical (lvl,low,high)(\mathrm{lvl}, \mathrm{low}, \mathrm{high}) triples are merged, leading to substantial compression for collections of sets with many shared prefixes. The partial evaluation function is defined by Selv(0)=low(v)\mathrm{Sel}_v(0) = \mathrm{low}(v) and Selv(1)=high(v)\mathrm{Sel}_v(1) = \mathrm{high}(v) (Minato et al., 2022).

2. Interval-Memoized Backtracking: Core Mechanism

The objective is to enumerate all feasible subsets XX represented by the ZDD ff such that the total cost Cost(X)=iXci\mathrm{Cost}(X) = \sum_{i \in X} c_i does not exceed some upper bound bb. A naïve approach would recursively traverse the ZDD and revisit the same node multiple times for different residual budgets, incurring exponential overhead in scenarios with a large cost range. Interval-memoized backtracking introduces a mechanism to sidestep this inefficiency.

For each node vv, the algorithm maintains a set MvM_v of disjoint cost intervals [L,U)[L, U), each associated with a ZDD node hh that represents all subsolutions below vv with cost at most bb for any b[L,U)b \in [L, U). The crucial definition is:

  • A "safe" interval [L,U)Z[L, U) \subseteq \mathbb{Z} for node vv is one where, for any b,bb, b' such that Lb<b<UL \leq b < b' < U, the sets of subsolutions of cost b\leq b and b\leq b' are identical.

This structure enables memoization of entire ranges of budgets, significantly reducing redundant computation relative to canonical memoization schemes indexed by exact budget values (Minato et al., 2022).

3. Recursive Algorithm and Memo-table Structure

The main recursion is specified as Rec(v,b)(h,aw,rb)\mathrm{Rec}(v, b) \rightarrow (h, aw, rb), where:

  • hh is the ZDD for all root–vv paths of cost at most bb
  • awaw ("accept_worst") is the maximum budget for which hh remains valid
  • rbrb ("reject_best") is the minimum budget above which hh would change

The memo-table Memo[v]\mathrm{Memo}[v] is a sorted map keyed by disjoint intervals [L,U)[L, U), maintaining pairings to ZDDZDD nodes for quick retrieval. If a budget query bb falls within a stored interval, the algorithm immediately returns the associated subresult; otherwise, it descends recursively, updating bb for the high-child by subtracting the corresponding cost(i)\mathrm{cost}(i). The combined results from the 0-child and 1-child are merged via MakeZDD(i,hlow,hhigh)\mathrm{MakeZDD}(i, h_\mathrm{low}, h_\mathrm{high}).

A summary of key operations:

Operation Description Complexity
Lookup in Memo Finds [L,U)[L,U) covering bb in Memo[v]\mathrm{Memo}[v] O(logk)O(\log k)
Recursive call on children 0-child (budget bb), 1-child (budget bcb-c)
Interval update after recursion Computes new safe [aw,rb)[aw, rb), inserts into Memo[v]\mathrm{Memo}[v] O(logk)O(\log k)
Output ZDD merge/creation MakeZDD(i,hlow,hhigh)\mathrm{MakeZDD}(i, h_\mathrm{low}, h_\mathrm{high})

The result is an output ZDD containing all solutions not exceeding the given cost bound. This approach builds, shares, and memoizes subproblems efficiently by exploiting the cost-interval invariance properties emergent in many combinatorial search spaces (Minato et al., 2022).

4. Complexity Analysis and Theoretical Guarantees

Let V|V| denote the number of nodes in the input ZDD ff, and N=hN = |h| the number of nodes in the output ZDD hh. Assuming each interval lookup and insertion in Memo[v]\mathrm{Memo}[v] requires O(logk)O(\log k) time (with kNk \leq N current intervals per node), the total time complexity to compute the filtered ZDD is O(V+NlogN)O(|V| + N \log N). Each new visit to a pair (v,b)(v, b) not covered by existing intervals incurs such a cost and leads to a unique node in the output ZDD and insertion in the memo table.

In contrast, traditional pseudo-polynomial dynamic programming would fill a table of size V×B|V| \times B, where BB is the numeric cost bound, resulting in O(VB)O(|V| B) time and space. For large costs BB, classical DP becomes infeasible; the interval-memoized method's efficiency depends solely on the compressed sizes of the input/output ZDDs, making it practical for instances with large numeric domains but well-compressed decision diagrams (Minato et al., 2022).

5. Empirical Evaluation: Hamiltonian Path Instances

Practical efficiency is demonstrated on nontrivial instances, such as the Hamiltonian path problem for the 48-state US map (with V=48V = 48 vertices and E=105E = 105 edges), and on n×nn \times n grid graphs with random edge costs. Notable empirical results include:

  • On the US map, the frontier-based ZDD has Vf=3616|V_f| = 3616. For increasing cost-bounds (up to 20% above minimum), the number of solutions expands to approximately 9.4×1059.4 \times 10^5. The interval-memoized approach constructs the filtered ZDD (Vh|V_h| up to 7.3×1047.3 \times 10^4) in about $0.09$ seconds with 1.6×1051.6 \times 10^5 recursive calls.
  • In comparison, conventional memoization (by exact budgets) entails O(106)O(10^6) calls and $0.66$ seconds; answer set programming solvers such as “clingo” require tens of seconds or may fail to complete.
  • On 8×88 \times 8 grid graphs (144 edges), up to 2.7×1092.7 \times 10^9 Hamiltonian paths are enumerated in 11 seconds, and 2.7×10122.7 \times 10^{12} in 255 seconds.
  • For 10×1010 \times 10 grids, as many as 1.4×10151.4 \times 10^{15} paths are enumerated in under one hour.

These findings corroborate the significant efficiency gains of interval-memoized backtracking over more conventional methods for extensive enumeration tasks (Minato et al., 2022).

6. Comparison with Classical Methods and Scope of Applicability

Traditional branch-and-bound approaches are efficient for finding a single optimum but require enumeration of many intermediate solutions if all those with cost b\leq b are required, with minimal subproblem sharing. Pseudo-polynomial dynamic programming explodes in cost when faced with high numeric bounds, as its memory requirements scale linearly with BB. In contrast, the ZDD-based interval-memoized approach’s performance is tied to the sizes Vf|V_f| (feasibility) and Vh|V_h| (output), both of which can be orders of magnitude smaller than a brute-force decision tree in problems exhibiting prefix-sharing, such as in path enumeration, matroid optimization, and knapsack-like problems.

A plausible implication is that for combinatorial problems where the set of all feasible solutions admits compact ZDD representations (i.e., with high prefix-sharing or exploitably sparse solution spaces), interval-memoized backtracking not only enables the enumeration of billions to trillions of constrained solutions efficiently, but also provides a practical alternative where classical paradigms are computationally infeasible (Minato et al., 2022).

Definition Search Book Streamline Icon: https://streamlinehq.com
References (1)

Topic to Video (Beta)

No one has generated a video about this topic yet.

Whiteboard

No one has generated a whiteboard explanation for this topic yet.

Follow Topic

Get notified by email when new papers are published related to Interval-Memoized Backtracking on ZDDs.