Question: 10 Consider the above graph G = (V, E) representing a road network. Where V represents set of vertices of graph, each vertex represents a

 10 Consider the above graph G = (V, E) representing a

10 Consider the above graph G = (V, E) representing a road network. Where V represents set of vertices of graph, each vertex represents a city, and represents set of edges, edge represents connection between one city and another city and weight (number) on edge represents distance from one city to another city. a. Represent the given road network using adjacency matrix and adjacency list. b. Considering that following operations are allowed with road network: 1. II. Add a new city to the road network Add a new road between two cities Remove/close a road between two cities (for maintenance) Find a city which is most/least connected to other cities 111. IV. V. Find distance between any two cities Suggest a suitable representation (adjacency matrix or adjacency list) of above graph so that above operations can be easily performed. Discuss how each of the above operations can be easily performed using suggested representation (adjacency matrix or adjacency list). C. Traverse the given graph using breadth first traversal (BFS) and depth first traversal (DFS)

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!