Question

Write the proof that the given problems are in NP (not NP-complete yet) Longest Path INSTANCE:...

Write the proof that the given problems are in NP (not NP-complete yet)

Longest Path
INSTANCE: Graph G = (V, E), positive integer K <= |V|.
QUESTION: Does G contain a simple path (that is, a path encountering no vertex more than once) with K or more edges?

0 0
Add a comment Improve this question Transcribed image text
Answer #1

For the correctness of Dijkstra, it is sufficient to show that d[v] = δ(s, v) for every v ∈ V when v is added to s. Given the shortest s ❀ v path and given that vertex u precedes v on that path, we need to verify that u is in S. If u = s, then certainly u is in S. For all other vertices, we have defined v to be the vertex not in S that is closest to s. Since d[v] = d[u] + w(u, v) and w(u, v) > 0 for all edges except possibly those leaving the source, u must be in S since it is closer to s than v. It was not sufficient to state that this works because there are no negative weight cycles. Negative weight edges in DAGs can break Dijkstra’s in general, so more justification was needed on why in this case Dijkstra’s works.

Add a comment
Know the answer?
Add Answer to:
Write the proof that the given problems are in NP (not NP-complete yet) Longest Path INSTANCE:...
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