Question

Note that a Hamilton cycle is a cycle which goes through every vertex exactly once. Show...

  1. Note that a Hamilton cycle is a cycle which goes through every vertex exactly once. Show that at least 3 of the 4 following problems are in NP
    1. Is G strongly connected?
    1. Is G not strongly connected?
    2. Given G1 and G2, does at least one of G1 and G2 have a Hamilton cycle?
    1. Given G1 and G2, does exactly one of G1 and G2 have a Hamilton cycle?

This question is arbitrary for any graph G that has a Hamilton cycle.

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

A. Is G a strongly connected component:

A strongly connected component is a graph in which there exists a path between any two pairs of vertices. To check whether a graph is strongly connected or not, we have to consider all the pairs of the graph and check whether a cycle exists between them or not. If yes, then G is a strongly connected component.

Time Complexity :

number of pairs = v(v-1)/2
time to check if a path exists between two vertices = O(v+e)

hence the total time complexity is O(V3)

Hence it is not NP-complete.

B. Is G not strongly connected :

The same algorithm above works for checking whether a graph is not strongly connected or not. The only thing that changes is that if there is at least one edge that doesn't have any path between them, then the graph is not strongly connected.

C. At least G1 or G2 has a hamiltonian cycle

Given a graph G and an integer k, construct a graph G' such that G has a vertex cover and a Hamiltonian cycle.

With the construction, any graph with a vertex cover can be used to make a graph with a Hamiltonian Cycle graph. Since creating such a graph can be done under polynomial time, simply replace edges with widgets and make proper connections, we have a reduction from Vertex Cover to Hamiltonian Cycle. This means that finding whether a graph has a Hamiltonian Cycle or not is NP-Hard. As we have seen earlier it’s also in NP, therefore, Hamiltonian Cycle is an NP-Complete Problem

Since this takes O(n.2n) time complexity where n is the number of vertices.

D. exactly one of G1 and G2 has a hamiltonian cycle:

We have to perform the same algorithm (as third one) for both the graphs. Hence the given problem is NP-Complete problem

Add a comment
Know the answer?
Add Answer to:
Note that a Hamilton cycle is a cycle which goes through every vertex exactly once. Show...
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