Data Structures, Algorithms, & Applications in C++
Chapter 16, Exercise 9

(a)
The in-degrees of the vertices of graph (a) are [0,3,1,1,1].
The in-degrees of the vertices of graph (b) are [2,1,2,0,2].
The in-degrees of the vertices of graph (c) are [1,1,1,3,1].

(b)
The out-degrees of the vertices of graph (a) are [2,0,2,1,1].
The out-degrees of the vertices of graph (b) are [0,2,1,3,1].
The out-degrees of the vertices of graph (c) are [2,2,1,0,2].

(c)
There are no vertices adjacent from vertex 2 in graph (a).
Vertices 1 and 3 are adjacent from vertex 2 in graph (b).
Vertices 3 and 5 are adjacent from vertex 2 in graph (c).

(d)
There are no vertices adjacent to vertex 1 in graph (a).
Vertices 2 and 4 are adjacent to vertex 1 in graph (b).
Vertex 5 is the only vertex adjacent to vertex 1 in graph (c).

(e)
(3,5) and (3,2) are the only edges incident from vertex 3 in graph (a).
(3,5) is the only edge incident from vertex 3 in graph (b).
(3,4) is the only edge incident from vertex 3 in graph (c).

(f)
(1,4) is the only edge incident to vertex 4 in graph (a).
Graph (b) has no edges incident to vertex 4.
(1,4), (5,4), and (3,4) are only edges incident to vertex 4 in graph (c).

(g)
Graph (a) has no directed cycles.
2,3,5,2 is the only directed cycle in graph (b). Its length is 3.
1,2,5,1 is the only directed cycle in graph (c). Its length is 3.