0% found this document useful (0 votes)
601 views4 pages

Daa Question Bank Unit-3

This document contains 14 questions related to graph algorithms and shortest path problems. The questions cover topics like binary search trees, minimum spanning trees, Dijkstra's algorithm, Floyd-Warshall algorithm, Prim's algorithm, single-source shortest paths, all-pairs shortest paths, and their time complexities. Example graphs and adjacency matrices are provided with some questions to help explain and apply the algorithms.

Uploaded by

Lovely Chinna
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
601 views4 pages

Daa Question Bank Unit-3

This document contains 14 questions related to graph algorithms and shortest path problems. The questions cover topics like binary search trees, minimum spanning trees, Dijkstra's algorithm, Floyd-Warshall algorithm, Prim's algorithm, single-source shortest paths, all-pairs shortest paths, and their time complexities. Example graphs and adjacency matrices are provided with some questions to help explain and apply the algorithms.

Uploaded by

Lovely Chinna
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 4

1.

Apply dynamic programming to obtain optimal binary search tree


for the identifier set (a1,a2,a3,a4)=(cin,for,int,while) with
(p1,p2,p3,p4)=(1,4,2,1),(q0,q1,q2,q3,q4)=(4,2,4,1,1) and also write
algorithm for its construction.
2.What is minimum cost spanning tree? Explain an algorithm for
generating minimum cost spanning tree and list some applications of
it.
3. Consider the Graph as shown in Fig. 3. In what order Dijikstra’s
algorithm find the shortest path from node ‘a’ to each node? Explain
the whole procedure.
4.Apply Floyd-Warshall algorithm in the Graph in Fig. 5 and find the
cost matrix which calculates the cost of the shortest path among
each pair.

5. Discuss the single-source shortest paths algorithm with a suitable


example.
6. What is a Spanning tree? Explain Prim’s Minimum cost spanning
tree algorithm with suitable example.
7. Write and explain an algorithm to compute the all pairs shortest
path using dynamic programming and prove that it is optimal.
8. Discuss the Dijkstra’s single source shortest path algorithm and
derive its time complexity
9. Find the all pairs shortest path solution for the graph represented
by below adjacency matrix:

10. Write and explain Prism’s algorithm for finding minimum cost
spanning tree of a graph with an example.
11. Using Dijkstra’s algorithm find the shortest path from A to D for
the following graph.
12.write the Floyd algorithm to find all pairs shortest path and derive
its time complexity.
13.Solve the following using Floyd’s algorithm.

14.Solve the all-pairs shortest-path problem for the digraph with the
following matrix:

You might also like