On the Complexity of Locally Rainbow Path
摘要
This paper investigates the computational complexity of Locally Rainbow Path on undirected graphs. In this problem, given a vertex-colored graph with q colors, two vertices s, t, and two integers \(r,\ell \) , we seek an s-t path of length at most \(\ell \) where every subpath of length at most r contains vertices with pairwise distinct colors. Here, the length of a path is defined by the number of vertices in the path. We establish the complexity boundaries by proving that Locally Rainbow Path is NP-complete when \(r \ge 4\) and \(q \ge 5\) , while tractable for \(r \le 2\) or when \(r = 3\) and \(q \le 3\) . For the case where \(r = q\) , we provide an \(r^{O(r)}(n+m)\) -time algorithm, making it fixed-parameter tractable when parameterized by r. From a structural perspective, we prove the paraNP-completeness for pathwidth on cactus graphs of maximum degree 3, while showing fixed-parameter tractability when parameterized by treewidth plus the number of colors or by vertex cover number.