Question

2. Recall the language: LONG-PATH-(〈G, k〉 | k is an integer; G is an undirected graph with a simple path of length k) Suppose there exists an efficient algorithm ALG that decides LONG-PATH. Devise an eli cient algorithm which, given an undirected graph G, finds the longest simple path in G

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

If there is an efficient algorithm ALG to find a simple
path more than or equal to k then we can use this alorithm
to find simple paths starting width k = 2 and continue till
we get a value of k for which we don't get a longest path
>= k. Then the path corresponding to k will be the longest path
in the undirected graoh.

Add a comment
Know the answer?
Add Answer to:
2. Recall the language: LONG-PATH-(〈G, k〉 | k is an integer; G is an undirected graph...
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