Data Structures, Algorithms, & Applications in C++
Chapter 15, Exercise 5

The graph has no cycles.