5
$\begingroup$

Finding the longest path in a graph is intractable problem. Th decision version is $NP$-complete. However, Given a graph, Is there an efficient algorithm to determine the parity of the longest path in a graph?

The algorithm should output YES if the length of the longest path is even otherwise the output is NO. Also, What is the complexity if we restrict the input to cubic graphs?

  • 0
    cross posted on TCS stack exchange. http://cstheory.stackexchange.com/questions/8216/is-there-an-efficient-algorithm-to-determine-the-parity-of-the-longest-path-in-a2011-09-13

1 Answers 1

13

Seems to me there's an easy reduction from the problem of hamiltonian path: Give a graph G you want to determine if it contains a hamiltonian path or not, simply add a disjoint path of length equal to the length of the expected hamiltonian path minus 1. Now check the parity and see if it equals that of the path you added or not.