0

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? i.e 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

Aakash Anuj
  • 3,773
  • 7
  • 35
  • 47

1 Answers1

2

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.

Patricia Shanahan
  • 25,849
  • 4
  • 38
  • 75
  • so if I put k=|v|-1 in that question, then I will be able to have a polynomial time decider for the hamiltonian path problem.Is that correct? But the question says to reduce from Ham cycle, not ham path. – Aakash Anuj Nov 18 '12 at 18:54
  • So you need to think up a reduction from Hamiltonian Cycle to Hamiltonian Path. – Patricia Shanahan Nov 18 '12 at 19:17