Exercises marked with (*) require further reading/search beyond the suggested texts.
6. It is known that a graph has an Eulerian path if and only if it is connected (except for possible isolated vertices), and exactly two vertices have odd degree. Based on this observation, propose an algorithm that finds an Eulerian path in a graph if such a path exists.
Answer:
The sequence of traversed edges form the Eulerian path. If all vertices have even degree then the procedure above will yield an Eulerian cycle or tour.
References:
Wikipedia: Eulerian path
Cormen, Leiserson, Rivest, Stein. Introduction to Algorithms. 2nd edition. Problem 22-3.
© 2015 Joao Meidanis