2. Consider the directed graph G = (V, E) defined as follows:
V = {1, 2, ..., 7, 8, 9} and E = {(x, y) | y = 2x} \cup {(7, 8), (4, 1)}.
Do the following:
(a) Draw the directed graph.
(b) List the in- and out-degrees of vertices 1, 4, 8 and 9.
(c) Write down an adjacency list representation of G.
(d) Let G' be the graph obtained from G by removing the directions on edges.
Write down all connected components of G'.