Finding the shortest Hamiltonian cycle in a complete graph

In summary: I was looking for. For those who are wondering, the traveling salesman problem is a problem in graph theory that asks for a shortest path between a set of vertices. The shortest path is often found by brute force searching through all possible paths. However, there is an algorithm that can find the shortest path faster than brute force by using a certain type of graph called a Hamiltonian graph. A Hamiltonian graph is a graph that has a special property called a Hamiltonian cycle. A Hamiltonian cycle is a path that starts and ends at the same vertex and visits each vertex exactly once.
  • #1
Adhil
13
0
[SOLVED]

Okay so I have an assignment to do with only 1 question left incomplete because we have not covered this section yet, non the less it is due soon and I can't find any helpful resources on how to do this question. I know it has something to do with graphs but I'm still lost. So if anyone can give me some helpful resources to learn about this topic I'd really appreciate it, if you can answer it whilst explaining why, it'd be even more helpful. If you are going to answer it please only do 1.1 and nothing more https://uploads.tapatalk-cdn.com/20180427/321a0fea1a560f81f05517632eef038c.jpg
 
Last edited:
Physics news on Phys.org
  • #2
If I understand the terms "ring" and "full loop" correctly, they mean a Hamiltonian cycle in the terminology of graph theory, that is, a path that begins and ends at the same vertex and visits each each vertex exactly once. When edges have lengths, finding the shortest Hamiltonian cycle is known as the traveling salesman problem. This problem is computationally hard, and no solution is known that is more efficient than a brute-force search through all cycles. Maybe that's why the problem was assigned without giving you any specific method of solving it. Since the graph is complete (i.e., each pair of vertices is connected by an edge), each permutation of the five vertices gives a Hamiltonian cycle. Perhaps you can write a program that searches through all $5!=120$ such permutations and finds the shortest cycle. According to my calculations, the length of the shortest cycle is 23.3.
 
  • #3
Evgeny.Makarov said:
If I understand the terms "ring" and "full loop" correctly, they mean a Hamiltonian cycle in the terminology of graph theory, that is, a path that begins and ends at the same vertex and visits each each vertex exactly once. When edges have lengths, finding the shortest Hamiltonian cycle is known as the traveling salesman problem. This problem is computationally hard, and no solution is known that is more efficient than a brute-force search through all cycles. Maybe that's why the problem was assigned without giving you any specific method of solving it. Since the graph is complete (i.e., each pair of vertices is connected by an edge), each permutation of the five vertices gives a Hamiltonian cycle. Perhaps you can write a program that searches through all $5!=120$ such permutations and finds the shortest cycle. According to my calculations, the length of the shortest cycle is 23.3.
Thank you Evgeny after hours of research I've finally managed to do it. The Hamiltonian cycle was the key word
 

FAQ: Finding the shortest Hamiltonian cycle in a complete graph

1. What is a graph in science?

A graph in science is a visual representation of data or information that shows the relationship between two or more variables. It is often used to illustrate patterns, trends, or correlations in data.

2. Why are graphs important in scientific research?

Graphs are important in scientific research because they allow scientists to easily visualize and interpret complex data. They also help to identify patterns and relationships that may not be apparent when looking at raw data.

3. What are the different types of graphs commonly used in science?

There are several types of graphs commonly used in science, including line graphs, bar graphs, scatter plots, and pie charts. Each type of graph has its own purpose and is used to represent different types of data.

4. How do you choose the appropriate type of graph for your data?

The type of graph chosen depends on the type of data being presented and the objective of the study. For example, a line graph is best for showing changes over time, while a bar graph is useful for comparing data between categories. It is important to choose a graph that clearly and accurately represents the data.

5. What are some common mistakes to avoid when creating graphs?

Some common mistakes to avoid when creating graphs include using inconsistent or misleading scales, not labeling the axes clearly, and using inappropriate types of graphs for the data being presented. It is important to ensure that the graph accurately represents the data and is easy to interpret for the intended audience.

Similar threads

Back
Top