[Graph Theory] Euler Path and Hamilton Path

This article is a summary of the study of graph theory, explaining the Euler pathway and the Hamiltonian pathway.

Euler circuit and Euler circuit

Figure GGTheEuler circuitin G is asimple circuit including every edge in the graph,and theEuler circuitis a simplepathincluding every edge in the graph.

A connected multigraph with at least 2 vertices has Euler cycles and only when the degree of each vertex is even.

A connected multigraph has Euler paths but no Euler circuits if and only if it has exactly 2 vertices with odd degrees.

Fleury algorithm

This algorithm is used to construct Euler circuits . Starting from any vertex of the connected multigraph, consecutively select edges to form a loop. After selecting, delete the edge so that each edge starts from the end of the previous edge and is not a cut edge unless there is no other choice.

Hamiltonian circuit and Hamiltonian circuit

A simple path that passes through each vertex exactly once in the graph is called a Hamiltonian path , and a simple path that passes through each vertex exactly once is called a Hamiltonian cycle .

Hamiltonian Circuit Existence Conditions

Hamiltonian circuits cannot contain smaller circuits.

This n ≥ 3 n \ ge 3n3 o'clock,K n K_nKnThere is a Hamiltonian circuit. The more edges a graph has, the more likely it is to have Hamiltonian cycles.

Dirac's Theorem

The degree of each vertex is at least n/2 n/2n / 2 , there is a Hamiltonian circuit.

Ohr Theorem

For each pair of non-adjacent vertices u, vu, vu ,v, 都有deg ⁡ (u) + deg ⁡ (v) ≥ n \ deg (u) + \ deg (v) \ ge nde g ( u )+the g ( v )n , there is a Hamiltonian circuit.

application

The Traveling Salesman Problem (TSP) requires a traveling salesman to minimise the shortest route that should be chosen to visit a group of cities. In essence, it is to find the Hamiltonian loop in a graph to minimize the sum of the edges of the loop.

The most straightforward way to solve the TSP problem is to check all Hamiltonian cycles and choose the one with the smallest total weight.

If it works for you, please like and follow

Guess you like

Origin blog.csdn.net/weixin_44413191/article/details/108195534