0

I am studying the longest path problem with the final objective to show that it is NP-complete. On wikipedia I read that the problem itself is NP-hard but the underlying decision problem is NP-complete.

I have some trouble understanding the difference between the two though. How are they not the same? I read in another post on CS that decision problems are conceptually easier to understand. But does this mean there are solutions to this problem with NP-hard complexity?

As I understood from my professor a graph problem is in NP if there are exponentially many paths to test in terms of the graph size. As you might notice, this definition does not talk about possible solutions/algorithms.

Also, all the references I found only talk about solutions to the problem, but don't give any formal definition. Quoting wikipedia as a source for my work looks kind of messy. So if anybody knows a paper that nicely describes the problem formally, any tips are welcome.

Anteino
  • 111
  • 1
  • 1
    A problem $H$ is NP hard if: for every $P$ in $NP$ then $P\leq_p H$. It is NP complete if, in addition to being NP hard, it is also in NP. In a picture, NP complete is right at the top of NP, with the other NP hard things further up. I also think you may have confused your professor's informal get-the-idea discussion of NP graph problems with the formally correct definition; try reading it again. (And, for a reference, why not your text?) – Jim Hefferon Dec 31 '20 at 19:24
  • Hi, thanks for responding. My question got closed since it had already been asked. However, in the other post, the question isn't really answered. Instead, the formal definitions are repeated. My question is if the longest path problem can actually be solved in NP-hard complexity. Or is the question itself wrong? – Anteino Jan 01 '21 at 11:52
  • 1
    Longest Path is NP-hard because the Hamiltonian Path problem reduces to it, $\text{HAMILTONIAN PATH}\leq_p\text{LONGEST PATH}$, since if a graph has a Hamiltonian Path then it is the longest path in that graph. If you are interested in the language decision problem variant then Longest Path is in NP (take the witness $\omega$ to be the long path), and so is NP complete. – Jim Hefferon Jan 01 '21 at 12:10
  • I have one more question. Do you know a paper that provides a proper definition of the problem? All I can find is the definition on wikipedia. The papers that I read all talk about the solution but don't give a proper definition. I need it for reference. I refuse to put wikipedia as a reference.. – Anteino Jan 01 '21 at 13:31
  • I find it in Garey and Johnson. – Jim Hefferon Jan 01 '21 at 14:16

0 Answers0