A) Draw the adjacency matrix representation. B) Draw the adjacency list representation. C) If a pointer requires four by
Posted: Fri May 20, 2022 4:43 pm
A) Draw the adjacency matrix representation.
B) Draw the adjacency list representation.
C) If a pointer requires four bytes, a vertex label requires two bytes, and
an edge weight requires two bytes, which representation requires more
space for this graph? Why?
D) Please use Dijkstra’s shortest path algorithm to show how to find the shortest path tree for starting node A.
Question 4: BFS, DFS, and MST (20 pts). For below graph, starting from node D a) Please show how to use a stack to do a DFS and draw the final DFS tree.
B) Draw the adjacency list representation.
C) If a pointer requires four bytes, a vertex label requires two bytes, and
an edge weight requires two bytes, which representation requires more
space for this graph? Why?
D) Please use Dijkstra’s shortest path algorithm to show how to find the shortest path tree for starting node A.
Question 4: BFS, DFS, and MST (20 pts). For below graph, starting from node D a) Please show how to use a stack to do a DFS and draw the final DFS tree.