Question: 2. (30 marks) Consider the digraph G with nodes {0,1,2, 3, 4,5} and adjacency matrix 1 0 0 1 0 0 0 0 0 0

 2. (30 marks) Consider the digraph G with nodes {0,1,2, 3,

2. (30 marks) Consider the digraph G with nodes {0,1,2, 3, 4,5} and adjacency matrix 1 0 0 1 0 0 0 0 0 0 1 0 1 0 0 0 0 0 (a) (15 marks) Perform a breadth first traversal and a depth first traversal of G Where there is a choice of nodes to pick, pick the one with the smallest label Show your working and present the resulting search forests as two pred arrays (b) (5 marks) For each traversal, classify all arcs of G as tree, forward, back or cross c) (5 marks) Explain how to determine, at the time when an arc is first explored (d) (5 marks) Explain how to distinguish between a back and a cross arc while BFS arcs by DFS, whether it is a cross arc or a forward arc. is running on a digraph

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!