Question: Problem #3: (35 pts-5 pts + 8 pts + 8 pts + 14 pts) (a) Either draw a graph with the following specified properties, or

Problem #3: (35 pts-5 pts + 8 pts + 8 pts + 14 pts) (a) Either draw a graph with the following specified properties, or explain why no such graph exists: A simple graph with five vertices with degrees 2, 3, 3, 3, and 5. (b) Consider the following graph. If there is ever a decision between multiple neighbor nodes in the BFS (Breadth First Search) or DFS (Depth First Search) algorithms, assume we always choose the letter closest to the beginning of the alphabet first. (b.1) In what order will the nodes be visited using a Breadth First Search starting from vertex A and using a queue ADT? (b.2) In what order will the nodes be visited using a Depth First Search starting from vertex A and using a stack ADT? (c) Show the ordering of vertices produced by the topological sort algorithm given in class starting from vertex Vi when it is run on the following DAG (represented by its adjacency list, in-degree form). Justify your solution. V. V. Vs V
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
