Question

4. a) Define the concept of NP-completeness b) If A is NP-complete, and A has a polynomial time algorithm, then a polynomial
0 0
Add a comment Improve this question Transcribed image text
Answer #1

Answer:

1)

The theory of NP-completeness is a solution to the practical problem of applying complexity theory to individual problems. NP-complete problems are defined in a precise sense as the hardest problems in P. Even though we don't know whether there is any problem in NP that is not in P, we can point to an NP-complete problem and say that if there are any hard problems in NP, that problems is one of the hard ones.(Conversely if everything in NP is easy, those problems are easy. So NP-completeness can be thought of as a way of making the big P=NP question equivalent to smaller questions about the hardness of individual problems.)So if we believe that P and NP are unequal, and we prove that some problem is NP-complete, we should believe that it doesn't have a fast algorithm.

For unknown reasons, most problems we've looked at in NP turn out either to be in P or NP-complete. So the theory of NP-completeness turns out to be a good way of showing that a problem is likely to be hard, because it applies to a lot of problems. But there are problems that are in NP, not known to be in P, and not likely to be NP-complete.

A decision problem L is NP-Hard if

L' ≤p L for all L' ϵ NP.

Def : L is NP-complete if

  1. L ϵ NP and
  2. L' ≤ p L for some known NP-complete problem L.' Given this formal definition, the complexity classes are:

P : is the set of decision problems that are solvable in polynomial time.

NP : is the set of decision problems that can be verified in polynomial time.

NP-Hard : L is NP-hard if for all L' ϵ NP, L' ≤p L. Thus if we can solve L in polynomial time, we can solve all NP problems in polynomial time.

NP-Complete: L is NP-complete if

  1. L ϵ NP and
  2. L is NP-hard

If any NP-complete problem is solvable in polynomial time, then every NP-Complete problem is also solvable in polynomial time. Conversely, if we can prove that any NP-Complete problem cannot be solved in polynomial time, every NP-Complete problem cannot be solvable in polynomial time.

2)

1)  Initialize dist[] = {NINF, NINF, ….} and dist[s] = 0 where s is the source vertex. Here NINF means negative infinite.
2) Create a toplogical order of all vertices.
3) Do following for every vertex u in topological order.
Do following for every adjacent vertex v of u
if (dist[v] < dist[u] + weight(u, v))
dist[v] = dist[u] + weight(u, v)

Add a comment
Know the answer?
Add Answer to:
4. a) Define the concept of NP-completeness b) If A is NP-complete, and A has a...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT