Edge-Minimum Walk of Modular Length in Polynomial Time
Antoine Amarilli, Benoît Groz, Nicole Wein
TL;DR
This work introduces the Edge-Minimum Walk of Modular Length (EWM) problem, asking for an $st$-walk whose length is $r \bmod q$ while minimizing the number of distinct edges used. The authors develop a structural approach that bounds the cutwidth of optimal solutions via a segment decomposition, enabling a polynomial-time algorithm for constant $q$ with complexity $n^{O(\log q)} \cdot 2^{O(q \log^2 q)}$. They extend the framework to weighted graphs (costs on edges/vertices and edge lengths) and to a multi-pair generalization akin to Directed Steiner Network with modular constraints, proving tractability when the number of pairs $k$ and the modularities are constant. The key technical contributions include the Segment Decomposition Lemma, segment-based cutwidth bounding, and a configuration-graph DP that computes optimal subgraphs guaranteeing the modular walk witnesses. These results tie EWM to classic network-design problems like DSN/SCSS, providing a unified, tractable treatment under fixed modularity and endpoint-count assumptions with potential applications to regular path queries over graph databases. The work thus advances understanding of modularity-constrained subgraph design and offers practical algorithms for modular walk witnesses in directed graphs.
Abstract
We study the problem of finding, in a directed graph, an st-walk of length r mod q which is edge-minimum, i.e., uses the smallest number of distinct edges. Despite the vast literature on paths and cycles with modularity constraints, to the best of our knowledge we are the first to study this problem. Our main result is a polynomial-time algorithm that solves this task when r and q are constants. We also show how our proof technique gives an algorithm to solve a generalization of the well-known Directed Steiner Network problem, in which connections between endpoint pairs are required to satisfy modularity constraints on their length. Our algorithm is polynomial when the number of endpoint pairs and the modularity constraints on the pairs are constants.
