Q1. Graph-Representation and Traversal (25 marks). i. Adjacency list and adjacency matrix are two standard ways to repre
-
answerhappygod
- Site Admin
- Posts: 899604
- Joined: Mon Aug 02, 2021 8:13 am
Q1. Graph-Representation and Traversal (25 marks). i. Adjacency list and adjacency matrix are two standard ways to repre
Q1. Graph-Representation and Traversal (25 marks). i. Adjacency list and adjacency matrix are two standard ways to represent graphs. Show the space consumption, the cost to count the number of edges in the graph and the cost to check the existence of an edge with adjacency list and adjacency matrix respectively. ii. In Fig. 1 is an undirected graph G. Show the sequence of nodes in the breadth-first traversal starting from node vi, assuming that the neighbor nodes in the adjacency list of each node are in increasing order. Q2. Graph-Spanning Tree [25 marks). The edges of graph in Fig. 1 carry weights. Use Prim's Algorithm to generate the minimum cost of spanning tree step by step. (v1 V2 13! 11 V3 (V4 (v5 15 7 10 5 (V6 (V8 3 Fig. 1. A weighted graph G.
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!