Question: Answer all of the question. Marks for each question is indicated on the right side a . Construct an adjacency matrix for the following graph:

Answer all of the question. Marks for each question is indicated on the right side
a. Construct an adjacency matrix for the following graph:
2
b. Consider A graph G with vertices (1,2,3,4} and edges ,(4,1),(2,1),(2,4). For every vertex u, find its indegree in (u) and its outdegree out (u). What is the value of the following Sum for this graph?
uinv?in(u)+ out (u)=
3
c. In the following graphs, assume that if there is ever a choice amongst multiple nodes, both the BFS and DFS algorithms will choose the left-most node first.
A'B'C
2
Starting from the node S at the top, which algorithm will visit the least number of nodes before visiting the goal node G? Breadth First Search, Depth First Search, or both Algorithm will encounter the same number of nodes? Explain.
2. a. Apply DFS and show the discovery and finishing time of each node considering the source node is B
 Answer all of the question. Marks for each question is indicated

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!