Question: Graph Representations and Traversals (a) Write pseudo-code for an algorithm that performs depth-first search of a directed graph: G -(V, E) and prints out all

Graph Representations and Traversals

Graph Representations and Traversals (a) Write pseudo-code for an algorithm that performs

(a) Write pseudo-code for an algorithm that performs depth-first search of a directed graph: G -(V, E) and prints out all of the edges as they are checked. Note: an edge is checked when it is inspected by the algorithm (not necessarily traversed). 9 marks] (b) State the storage requirements of a graph with n nodes and m edges using: 1. an adjacency list, and 2. an adjacency matrix briefly justify each answer. [4 marks]

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!