简体   繁体   中英

Np completeness - Need some clarification in reduction

I wanted some clarification in a concept. For proving that a problem is NP complete, we use reductions.

Now suppose I have L<=L'. has the reduction to be from L to L' or can I do it it the reverse way also? ie Can I show that if L can be solved using L', then L' is NP-complete??

I am pretty confused regarding this.

For example. for a reduction from ham cycle to ham path, we so it the backward way.

Also, I am not able to solve the problem that I have to show that "is there a path from s to t in a graph with at least k edges" by reduction from ham cycle.

Please give me a clarification and guide me with the above problem. Thanks

To show that a language L is NP-complete you actually need to prove two things, L is in NP and L is NP-hard. Usually, proving L is in NP is easy, but don't forget to do it.

The normal way of showing L is NP-hard is to show, in effect, that a polynomial-time decider for L could be used to build a polynomial-time decider for a language L' that has been proved to be NP-complete.

It has to be that way round. There are many cases of a polynomial-time decidable language L for which a polynomial time decider could be built from a polynomial time decider for an NP-complete language. For example, consider the polynomial time decidable problem of coloring a graph with two colors, vs. the NP-complete general graph coloring problem.

I gave you a hint in a comment on your question about Hamiltonian Cycle. Have you read the hint and thought about it? If so, please respond in that question.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM