Question: Topic: Design and Analysis of Algorithm Q.1) The Breadth First Search algorithm, as given in the text book and studied in the class, assumes that

Topic: Design and Analysis of Algorithm

Q.1) The Breadth First Search algorithm, as given in the text book and studied in the class, assumes that the graph is represented as an Adjacency List. Write modified BFS pseudo-code as if the graph is represented as Adjacency Matrix. Also derive its Asymptotic Time Complexity.

Q.2) Modify the BFS pseudo-code, on the lines of DFS so that it covers the entire graph even if the graph is not connected.

Q.3) Write a program in pseudo-code to print all paths between two given vertices, u and v, of a directed, connected graph. Briefly explain your algorithm first and then write the program.

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!