Sunday 15 June 2014

algorithm - NP problems and need some detail? -


I look forward to the solution of one on the algorithm. Which of the following is NP?

  A) TSP decision version B) Arrays are sorted out? C) Searching the maximum flow network D) Decision version of the lid 0/1?  

My note, all this is in NP, can anyone add a little detail to everyone? And I confuse the piece of 0/1, is it NP? NP difficult?

All these are in NP, because:

  1. This polynomial is verified in time, looking at some route, we can easily check that its length is not greater than the given value.

  2. It is in P class (I think a polynomial time solution is clear), which automatically means it is in NP.

  3. Then, there is a polynomial time solution, which means that it is in P. Thus, it is in NP.

  4. We can verify it in a polynomial time, considering a suitable subset. Therefore, it is by definition in NP.

0/1 About the decision version of the lid problem: It is in NP, it also gets NP-complete (the evidence is too long to write here, Here is the link :) It also means that it is NP-hard (any NP-complete problem is hard by NP-definition)

PS I think "finding the maximum flow" here is a decision version .


No comments:

Post a Comment