mnemonic: Euler starts with E, so edges matter.
Euler tour
traverses each edge exactly once, start=end
A connected graph has Euler tour iff all vertices have even degrees
Fleury’s algorithm for Euler tour:
Let v be last vertex added to P
choose an edge <v,w> in (G-E(P)).
add it to P
Hierholzer’s algorithm for Euler tour
Euler trail
Chinese postman problem (also, Bridges of Konigsberg)
let G be connected, weighted graph
Let v1, …, v2k be odd degree vertices in G
Algorithm:
For each pair of distinct odd-degree vertices vi and vj, find minimum-weight path Pij
Construct weighted complete graph on 2k vertices in which vertex vi and vj are joined by an edge having weight w(Pij)
Find set E of k edges {e1, …, ek} such that:
For each edge e ∈ E, with e=<vi, vj>, duplicate edges of Pi,j in graph G
Find Euler tour in resulting graph