Table of Contents
Fetching ...

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.

Edge-Minimum Walk of Modular Length in Polynomial Time

TL;DR

This work introduces the Edge-Minimum Walk of Modular Length (EWM) problem, asking for an -walk whose length is 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 with complexity . 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 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.

Paper Structure

This paper contains 38 sections, 22 theorems, 1 equation, 8 figures.

Key Result

Theorem 1.1

There is an algorithm solving EWM in time: $n^{O(\log q)} \cdot 2^{O(q \log^2 q)}$.

Figures (8)

  • Figure 1: An example of a graph with different answers to the problems of finding the edge-minimum odd $st$-walk, the shortest odd $st$-walk, and the shortest odd simple $st$-path. First, every simple path from $s$ to $t$ is of even length, so there is no shortest odd $st$-path. Second, the shortest odd $st$-walk uses the bottom cycle $s, f, g, h, i, j, k, g, h, t$: it has length 9 and uses 8 distinct edges. Third, the edge-minimum odd $st$-walk uses the top cycle: $s, a, b, c, d, e, a, b, c, d, e, t$. It has length 11 but uses only 7 distinct edges.
  • Figure 2: Specific shape of solutions to EWM for $q=2$. Each "edge" in the figure represents a subpath, not necessarily a single edge. The cycle $C$ is of odd length.
  • Figure 3: A walk $w$ and its decomposition into 7 segments, denoted by various colors.
  • Figure 4: Schema illustrating the two paths $p_\sigma$ and $\overline{p_\sigma}$, the detour $\mathrm{det}_\sigma$, and the two edges $w[j]$ and $w[k]$ that are part of $\mathrm{det}_\sigma$, from \ref{['lem:segment-contains-detour']}. The edge $w[j]$ is the only edge of the detour which is guaranteed to be a first-visited edge.
  • Figure 5: Illustrating the three cases of the proof of \ref{['lem:sccstrut']} to show that the successive SCCs of a walk are always linearly ordered by the reachability relation. Squares denote strongly connected components, labeled with their SCC number in the decomposition of $G_{w,i-1}$. The new edge is dashed in orange, and new SCCs are also dashed in orange.
  • ...and 3 more figures

Theorems & Definitions (67)

  • Theorem 1.1
  • Definition 4.1: Segment end, Segment detour
  • Example 4.2
  • Lemma 4.3
  • proof : Proof of Lemma \ref{['lem:segment-contains-detour']}
  • Example 4.4
  • Lemma 4.5: Segment Decomposition Lemma
  • Definition 4.6
  • Definition 4.7
  • proof : Proof of \ref{['lem:bounding-number-of-segments']}
  • ...and 57 more