2
$\begingroup$

A $k$-Hamiltonian Path is an Hamiltonian Path where each node (but the last $k$ nodes on the path) is connected to his $k$ successors, and the last $k$ nodes are connected to all of their successors.

This is an Hamiltonian Path: enter image description here

This is a 3-Hamiltonian Path: enter image description here

How would you prove that searching for a k-Hamiltonian Path is also NP-hard (if it is)?

$\endgroup$
  • $\begingroup$ Hmm. That's a nice exercise, but it sounds like you're looking for someone to solve the exercise for you. We're happy to help you understand the concepts but just solving exercises for you is unlikely to achieve that. Can you share anything about your thought process that might help us understand what you already understand, where you are stuck, and what concepts you're unsure on? You might find this page helpful in improving your question. See also cs.stackexchange.com/q/11209/755, which explains techniques you can use for this. $\endgroup$ – D.W. Feb 28 '17 at 17:13
  • $\begingroup$ This question is related to this other question. Actually I mistyped the question, what I wanted to ask was if we can prove something general about an algoritmh that solves the k-Hamiltonian path problem... but with k as a constant (I got the answer in comment below). In short: this isn't an exercise, is a question that come up triyng to find a subgraph with maximal diameter, where each node is connected to his 3 successors. Sorry for the poor question! $\endgroup$ – Luca Feb 28 '17 at 17:23
3
$\begingroup$

Any problem in NP that contains an NP-complete problem as a special case is NP-complete.

Any algorithm that can solve the $k$-Hamiltonian path problem must, in particular, be able to solve the case $k=1$, which is just an ordinary Hamiltonian path. We can obviously verify a claimed $k$-Hamiltonian path in polynomial time, so the problem remains in NP. Therefore, $k$-Hamiltonian path is NP-complete.

$\endgroup$
  • $\begingroup$ Where can I find some information about the statement: "Any problem in NP that contains an NP-complete problem as a special case is NP-complete."? I thought there were problems where the general case is simpler than one specific case. $\endgroup$ – Luca Feb 28 '17 at 11:17
  • $\begingroup$ The general case is always at least as hard as any specific case, since being able to solve the general case means you must be able to solve every specific case. There's not really anything more to say than the sentence you quoted: if problem $X$ has an NP-complete problem as a special case, then there's a near-trivial reduction from that NP-complete problem to $X$ so, if $X$ is in NP (i.e., it's not so general that its complexity is higher) then it's NP-complete by definition. $\endgroup$ – David Richerby Feb 28 '17 at 11:30
  • $\begingroup$ I see, thanks! Mmmh... so, if we have an algoritmh that solves, as example, only the $3$-Hamiltonian path problem, we can only say that it is in a class lower than NP-complete. We can't deduce anything more, right? $\endgroup$ – Luca Feb 28 '17 at 11:41
  • $\begingroup$ @Nopaste We can only say that it's in a class no higher than NP-complete. I would guess that it still is NP-complete, but one would need to demonstrate a reduction to actually prove that. $\endgroup$ – David Richerby Feb 28 '17 at 11:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.