Shortest odd paths in undirected graphs with conservative weight functions
Alpár Jüttner, Csaba Király, Lydia Mirabel Mendoza-Cadena, Gyula Pap, Ildikó Schlotter, Yutaro Yamaguchi
Highlights
The problem with conservative weights and negative edges forming a tree is in P.
FPT algorithm with parameter the number of negative edges (conservativeness assumed).
FPT algorithm with parameter treewidth.
Abstract
We consider the Shortest Odd Path problem, where given an undirected graph 𝐺, a weight function on its edges, and two vertices 𝑠 and 𝑡 in 𝐺, the aim is to find an (𝑠,𝑡)-path with odd length and, among all such paths, of minimum weight. For the case when the weight function is conservative, i.e., when every cycle has non-negative total weight, the complexity of the Shortest Odd Path problem had been open for 20 years, and was recently shown to be NP-hard.
We give a polynomial-time algorithm for the special case when the weight function is conservative and the set 𝐸− of negative-weight edges forms a single tree. Our algorithm exploits the strong connection between Shortest Odd Path and the problem of finding two internally vertex-disjoint paths between two terminals in an undirected edge-weighted graph. It also relies on solving an intermediary problem variant called Shortest Parity-Constrained Odd Path where for certain edges we have parity constraints on their position along the path.
Also, we exhibit two FPT algorithms for solving Shortest Odd Path. The first FPT algorithm is parameterized by |𝐸−|, the number of negative edges, or more generally, by the maximum size of a matching in the subgraph of 𝐺 spanned by 𝐸−, when the weight function is conservative. Our second FPT algorithm is parameterized by the treewidth of 𝐺, and the algorithm does not rely on conservativeness.