Does the addition of a new vertex always guarantee a Hamiltonian path or cycle?

In summary, the lecture discusses using the HC algorithm to determine whether an input graph has a Hamiltonian path. The goal is to find out if the original graph G has a HP by adding a new vertex u connected to all vertices of G and using the theorem "G has a HP iff G' has a HC". If HC says yes, then G has an HP. If HC says no, then G has no HP.
  • #1
atrus_ovis
101
0
Watching this lecture from nptel about NP completeness:
http://www.youtube.com/watch?v=76n4BjlL1cs&feature=player_embedded

-We have an algorithm, HC , which given a graph tells us whether or not it has a hamiltonian cycle.
-We want to use it in order to create an algorithm that determines whether an input graph has a hamiltonian path.


If the input has a HC, then it has a HP as well.Okay.

But around 29:00, it is stated:

If the input doesn't have a HC (the output of HC algorithm is a "no"), we add a vertex to it that connects to all other vertices in the graph.If that new gragh G' has a HC, then the original graph G has a HP.
But thinking about this, how bout this example?

edit:in the pic, i meant to say that "graph G doesn't have a HP"
 

Attachments

  • ham.JPG
    ham.JPG
    9.4 KB · Views: 464
Last edited:
Technology news on Phys.org
  • #2
You've misunderstood what the goal is. The goal is to find out whether G has a HP.
See: http://www.youtube.com/watch?v=76n4BjlL1cs&feature=youtu.be#t=21m08s"

The input is the Graph G' which consists of the original Graph G and the additional vertex u connected to all vertices of G.

We want to find out if G has a HP by using the following theorem:
G has a HP iff G' has a HC

In your example, let us pretend that we do not know whether G has a HP.
So, we form G' and use it as an input for HC. Now, there are two possible outcomes:
(i) HC says: yes, G' has a HC. It then follows that G has an HP.
(ii) HC says: no, G' has no HC. It then follows that G has no HP.
 
Last edited by a moderator:

Related to Does the addition of a new vertex always guarantee a Hamiltonian path or cycle?

What is a Hamiltonian path?

A Hamiltonian path is a path in a graph that visits every vertex exactly once. It is named after mathematician William Rowan Hamilton.

What is a Hamiltonian cycle?

A Hamiltonian cycle is a cycle in a graph that visits every vertex exactly once. It is also known as a Hamiltonian circuit.

What is the significance of Hamiltonian paths and cycles?

Hamiltonian paths and cycles are important in graph theory and computer science. They have applications in optimization problems, such as finding the shortest route between cities, and in the design of computer networks.

How do you determine if a graph has a Hamiltonian path or cycle?

There is no known efficient algorithm to determine if a graph has a Hamiltonian path or cycle. However, there are some necessary conditions that can be checked, such as the degree of each vertex and the connectivity of the graph.

Can a graph have both a Hamiltonian path and a Hamiltonian cycle?

Yes, it is possible for a graph to have both a Hamiltonian path and a Hamiltonian cycle. In fact, if a graph has a Hamiltonian cycle, it also has a Hamiltonian path. However, the reverse is not necessarily true.

Similar threads

  • Calculus and Beyond Homework Help
Replies
4
Views
3K
  • Engineering and Comp Sci Homework Help
Replies
1
Views
2K
  • Engineering and Comp Sci Homework Help
Replies
1
Views
1K
  • Beyond the Standard Models
Replies
2
Views
2K
Back
Top