We consider the Shortest Odd Path problem, where given an undirected graph $G$, a weight function on its edges, and two vertices $s$ and $t$ in $G$, the aim is to find an $(s,t)$-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 $E^-$ 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 in graphs with conservative weight functions. The first FPT algorithm is parameterized by $|E^-|$, the number of negative edges, or more generally, by the maximum size of a matching in the subgraph of $G$ spanned by $E^-$. Our second FPT algorithm is parameterized by the treewidth of $G$.
翻译:我们考虑最短奇路径问题:给定无向图 $G$、其边上的权函数以及两个顶点 $s$ 和 $t$,目标是找到一条长度为奇数且在所有此类路径中权重最小的 $(s,t)$-路径。当权函数为保守时(即每个环的总权重非负),最短奇路径问题的复杂度已悬而未决20年,近期已被证明为NP-难问题。我们针对权函数保守且负权边集 $E^-$ 构成单一树形的特例,给出一个多项式时间算法。该算法利用了最短奇路径与在无向边加权图中寻找两个内部顶点不相交路径问题之间的紧密联系,同时依赖于求解一种称为“最短奇偶约束奇路径”的中间问题变体,其中对某些边在其路径中的位置施加奇偶约束。此外,我们提出了两种用于求解保守权函数图中最短奇路径问题的FPT算法:第一种算法以 $|E^-|$(负边数量)为参数,更一般地,以 $E^-$ 所张成的 $G$ 的子图中最大匹配规模为参数;第二种算法以 $G$ 的树宽为参数。