Graphs and Trees This handout Eulerian Cycles Sufficiency

  • Slides: 7
Download presentation
Graphs and Trees This handout: • Eulerian Cycles: Sufficiency of the condition • Hamiltonian

Graphs and Trees This handout: • Eulerian Cycles: Sufficiency of the condition • Hamiltonian tour

More on Euler’s Theorem. An undirected graph has an eulerian cycle if and only

More on Euler’s Theorem. An undirected graph has an eulerian cycle if and only if (1) every node degree is even and (2) the graph is connected (that is, there is a path from each node to each other node). Sufficiency of the condition – Assume the result is true for all graphs with fewer than m arcs; show that it is true for a graph G=(V, A) with |A|=m. – Start at some node, and take a walk until a cycle C is found. 1 5 4 7 3

More on Euler’s Theorem • Sufficiency of the condition – Start at some node,

More on Euler’s Theorem • Sufficiency of the condition – Start at some node, and take a walk until a cycle C is found. – Consider G’ = (V, A-C) • the degree of each node is even • there are several connected components • So, G’ is a union of Eulerian cycles • Connect G’ into a single eulerian cycle by adding C. 5 4 7 3

Hamiltonian Cycles • A Hamiltonian cycle is a cycle that passes through each node

Hamiltonian Cycles • A Hamiltonian cycle is a cycle that passes through each node of the graph exactly once.

Hamilton’s Around the World Game In 1857, Irish mathematician William Rowan Hamilton invented a

Hamilton’s Around the World Game In 1857, Irish mathematician William Rowan Hamilton invented a puzzle that he hoped would be very popular. The objective was to make what we just called a hamiltonian cycle. The game was not a commercial success. But the mathematics of hamiltonian cycles is very popular today.

Hamilton’s Around the World Game

Hamilton’s Around the World Game

The knight’s tour problem Can a knight visit all squares of a chessboard exactly

The knight’s tour problem Can a knight visit all squares of a chessboard exactly once, starting at some square, and by making 63 legitimate moves? The knight’s tour problem is a special case of the hamiltonian tour problem. The answer is yes!