# Hamiltonian path problem vs other NPC problems

If we can solve the Hamiltonian path in time $O(n^4)$ then you can solve any other NPC problem in $O(n^4)$ time. Is it true of false? I think it is false, even tho Hamiltonian path problem in NPC it doesnt mean that all NPC problems will be solved in the same time.

You are correct. There might be an $NP$-complete problem that can only be translated into Hamiltonian path problem in $\Omega(n^{10})$ time, for instance. In which case an $\Omega(n^{10})$ translation and an $O(n^4)$ solution gives a total time of $\Omega(n^{10})$. The only thing you can be certain of is that the final time is bounded by a polynomial.

• Small nitpick: the use of $O(\cdot)$ vs. $\Omega(\cdot)$. I guess you meant the reduction takes $\Omega(n^{10})$ time? – Clement C. Apr 28 '16 at 14:06
• @ClementC. Yes, of course. – Arthur Apr 28 '16 at 14:33
• @Arthur can you please edit your answer, I get confused now where are you talking about the reduction takes Ω(n^10) time? :( – Anastasia Netz Apr 28 '16 at 15:09
• @ClementC. I get confused now where are you talking about the reduction takes Ω(n^10) time? :( – Anastasia Netz Apr 28 '16 at 15:12
• Well, it is conceivable that any reduction from say 3SAT to Hamiltonian path "could have to take roughly $n^{10}$ time," which means that the reduction is $\Omega(n^{10})$. It is $\Omega$ and not $O$ since it'd be a lower bound on the time complexity of the reduction, not an upper bound. – Clement C. Apr 28 '16 at 15:18