An
independent set
in a graph
\(G\)
is a set of pairwise non-adjacent vertices. A graph
\(G\)
is
bipartite
if its vertex set can be partitioned into two independent sets. In the
Odd Cycle Transversal
problem, the input is a graph
\(G\)
along with a weight function
w
associating a rational weight with each vertex, and the task is to find a minimum weight vertex subset
\(S\)
in
\(G\)
such that
\(G-S\)
is bipartite; the weight of
\(S\)
,
\(\text{w}(S)=\sum_{v\in S}\text{w}(v)\)
. We show that
Odd Cycle Transversal
is polynomial-time solvable on graphs excluding
\(P_{5}\)
(a path on five vertices) as an induced subgraph. The problem was previously known to be polynomial-time solvable on
\(P_{4}\)
-free graphs and
NP
-hard on
\(P_{6}\)
-free graphs [Dabrowski, Feghali, Johnson, Paesani, Paulusma and Rzążewski, Algorithmica 2020]. Bonamy, Dabrowski, Feghali, Johnson and Paulusma [Algorithmica 2019] posed the existence of a polynomial-time algorithm on
\(P_{5}\)
-free graphs as an open problem. This was later re-stated by Rzążewski [Dagstuhl Reports, 9(6): 2019], by Chudnovsky, King, Pilipczuk, Rzążewski, and Spirkl [SIDMA 2021] who gave an algorithm with running time
\(n^{O(\sqrt{n})}\)
for the problem, and by Agrawal, Lima, Lokshtanov, Saurabh, and Sharma [SODA 2024] who gave a quasi-polynomial time algorithm.