Hamiltonian cycle

From Canonica AI

Definition

A Hamiltonian cycle, also known as a Hamiltonian circuit, is a concept in graph theory that originates from the mathematical field of combinatorics. Named after the Irish mathematician Sir William Rowan Hamilton, it refers to a closed loop on a graph where every node (vertex) is visited exactly once and the first node is also the last, forming a continuous, non-intersecting path.

A simple, non-directed graph with a clearly marked Hamiltonian cycle.
A simple, non-directed graph with a clearly marked Hamiltonian cycle.

Mathematical Background

The Hamiltonian cycle is a special type of cycle in a graph that includes each vertex exactly once. It is a solution to the Hamiltonian cycle problem, which is a decision problem in computational complexity theory. The problem is to determine whether a given graph contains a Hamiltonian cycle or not. This problem is NP-complete, meaning that it is computationally challenging to solve, but the solutions are easy to verify.

Properties

The Hamiltonian cycle has several interesting properties. For instance, a graph that contains a Hamiltonian cycle is known as a Hamiltonian graph. However, not all graphs are Hamiltonian. The smallest graph that contains a Hamiltonian cycle is the cycle graph C3, which has three vertices and three edges.

Algorithms

There are several algorithms that can be used to find a Hamiltonian cycle in a graph, if one exists. These include the backtracking algorithm, the greedy algorithm, and the Hamiltonian cycle algorithm. Each of these algorithms has its own strengths and weaknesses, and the choice of algorithm can depend on the specific characteristics of the graph.

Applications

Hamiltonian cycles have numerous applications in various fields. In computer science, they are used in the design of computer networks. In operations research, they are used in the solution of the traveling salesman problem, a classic optimization problem. In chemistry, they are used in the study of molecular structures.

See Also