Locally Rainbow Paths
Till Fluschnik, Leon Kellerhals, Malte Renken
TL;DR
The paper introduces Locally Rainbow Path and Locally Rainbow Walk in vertex-colored digraphs, where an r-rainbow path/walk requires every block of r+1 consecutive vertices to have distinct colors. It shows NP-hardness for Locally Rainbow Path with fixed r≥2, but proves fixed-parameter tractability for Locally Rainbow Walk parameterized by r using an ordered representative framework, with a near-optimal ETH-based lower bound. The authors further develop a detailed length-bounding and distance-separator approach to obtain FPT results also when combining the detour length k with r. They also relate the walk and path problems through reductions, discuss edge-colored variants, and outline broader implications for resource-constrained and temporal-graph settings. Overall, the work provides a nuanced landscape: efficient FPT algorithms for walks under locality constraints and strong hardness for paths, with precise lower bounds guiding what can be feasibly computed in practice.
Abstract
We introduce the algorithmic problem of finding a locally rainbow path of length $\ell$ connecting two distinguished vertices $s$ and $t$ in a vertex-colored directed graph. Herein, a path is locally rainbow if between any two visits of equally colored vertices, the path traverses consecutively at least $r$ differently colored vertices. This problem generalizes the well-known problem of finding a rainbow path. It finds natural applications whenever there are different types of resources that must be protected from overuse, such as crop sequence optimization or production process scheduling. We show that the problem is computationally intractable even if $r=2$ or if one looks for a locally rainbow among the shortest paths. On the positive side, if one looks for a path that takes only a short detour (i.e., it is slightly longer than the shortest path) and if $r$ is small, the problem can be solved efficiently. Indeed, the running time of the respective algorithm is near-optimal unless the ETH fails.
