Question: Suppose you are given a directed graph G = ( V , E ) with V = { 1 , 2 , 3 , 4

Suppose you are given a directed graph G =(V, E) with V ={1,2,3,4,5,6,7,8}
and the depth first intervals ([pre, post]) of each vertex are as follows. {1 : [4,5],
2 : [7,8],3 : [12,13],4 :[14,15],5 : [3,6],6 : [2,9],7 : [1,10],8 : [11,16]}.
(a) Draw this directed graph using networkx package in Python and include the image.
(b) What are the descendent and ancestor vertices of vertex 6?
(c) How many connected components does the graph have?
(d)Identify three pairs of vertices that form a cross edge (i.e., one is neither a descendent nor
an ancestor of the other).

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!