graph algorithms

Enumerating Length-Bounded Simple Paths and Cycles in Directed Graphs with Delay Using Edge-Consistent Node Barriers

arXiv:2607.14745

summary

The paper identifies flaws in existing algorithms for enumerating length-bounded simple paths and cycles in directed graphs and introduces a new O(k(n+m)) delay algorithm (BS-DFS) based on a novel edge-consistency invariant.

Abstract

Enumerating simple paths and cycles subject to a given length bound is a fundamental problem in graph algorithms. Recent algorithms, namely BC-DFS (Peng et al. 2019, 2021) and CYCLE_SEARCH (Gupta and Suzumura 2021, arXiv:2105.10094v2), employ cached barrier values to prune fruitless searches. Both algorithms turn out to produce incomplete output, and their delay-bound arguments rely on flawed claims. For CYCLE_SEARCH this is known (arXiv:2512.08392); here we establish the analogous results for BC-DFS by exhibiting graphs on which paths are missed, by identifying the defect in its barrier-update procedure, and by refuting the monotonicity claim on which its delay-bound proof rests. As our main contribution, we introduce edge-consistency, a local invariant on barrier values analogous to heuristic consistency in informed search. It provides an incremental mechanism for maintaining admissible barrier estimates and yields concise correctness proofs. We use edge-consistency as a unifying framework for design and analysis of Bounded-Scope Depth-First Search (BS-DFS) --- a new algorithm for enumerating simple paths or cycles of length at most in a directed graph. For BS-DFS we prove a worst-case delay of at most elementary steps between consecutive events (start, each output, termination) and an amortized delay of at most steps per event, the -th event being reached within steps; both bounds are in . Barrier admissibility alone is not sufficient for the delay bound: for two variants with simpler barrier management, we exhibit a graph family forcing delay between outputs. Experiments on two families of random graphs confirm our findings, support the significance of the incompleteness result, and show that achieving completeness has modest empirical cost.

Submitted to the Journal of Graph Algorithms and Applications (JGAA)

Topics & keywords

#enumeration#simple paths#cycles#directed graphs#delay analysisedge-consistencyBS-DFSO(k(n+m)) delaybarrier valuesbounded-scope depth-first search
Enumerating Length-Bounded Simple Paths and Cycles in Directed Graphs with $O(k(n+m))$ Delay Using Edge-Consistent Node Barriers · wovepaper