tags:

views:

104

answers:

2

Hello, i have NP hard problem. Let imagine I have found some polynomial algorithm that find ONLY one of many existing solutions of that problem, but at least one solution (if present in the probem). Is that algorithm considered as solution of NP=P question (if that algorithm transformed to mathematical proof)?

Thanks for answers

+3  A: 

NP is a class of decision problems. Your algorithm should answer "yes" or "no" correctly to all possible instances (questions).

For example, the problem: "given graph G and number k, does G contain a clique of size >= k" is NP-hard. If you have a polynomial time algorithm that answers "yes" or "no" correctly each time, then it is a valid proof of P=NP. The algorithm doesn't need to explicitly show the clique - only answer if it exists for all possible G and k.

sdcvvc
thank you, this is what I need to know
joseph
*"The algorithm doesn't need to explicitly show the clique"* - a side note to that: if such a polynomial decision algorithm exists then it's also easy to find the actual clique.
Rafał Dowgird
This sounds wrong to me. I don't see how the traveling salesman problem, for example, can be expressed as a yes/no question.
Jason Orendorff
Given weighted graph G and number k, is there a path of cost <= k? Easily reducible from hamiltonian cycle.
sdcvvc
A: 

If you find a NP-hard problem and you can detect some cases that you can solve in polynomial time (leaving others for exponential time), then only if the fraction of cases remaining is on the order of log(N)/N will you change the order of the entire problem, and even then only if you can restrict your exponential case to examining only log(N) not all N possibilities.

Also, if you find a NP-hard problem where you think you can solve every case in polynomial time, you have probably made a mistake, either in posing a NP-hard problem correctly, or in finding the more troublesome examples. Try a larger test set before believing yourself!

Rex Kerr
I think I can detect all cases, but when I detect one of hem, it hides another ones. I mean the route to the point where I can say YES always find some solution (if exists), but thanks to this route is selected, another routes to another point that say YES are lost. But it is still in my research and I rather do not believe I solved it:)
joseph