Algorithm question
Algorithm question
MODEL EXAMINATION
ii) (ii) Find the Minimum Spanning Tree of the following graph in fig. 12 (a)
(ii) using Kruskal's algorithm. Re CO2 7+6
OR
b) i) Given a graph and a source vertex in the graph, find the shortest paths from
the source vertex 0 to all vertices in the given graph 12 (b) (i)
Ap CO2 8+5
ii) Using Ford-Fulkerson algorithm finds the maximum possible flow in the
network given below Fig 12 (b) (ii)
13 a) i) Demonstrate divide and conquer approach by Performing quick sort on the
following values. 44, 3, 11, 55, 77, 90, 4o, 60, 99, 22, 88 Ap CO3 7+6
ii) Using Dynamic programming. Solve matrix chain multiplication
problem.
OR
b) i) Solve the following problem using Greedy algorithm. Given activities with
their start and finish times, select the maximum number of activities that can
be performed by a single person, assuming that a person can only work on a
single activity at a time.
Show the steps in constructing the final Huffman tree representing the optimal
prefix code.
ii)Illustrate the working of Miller-Rabin randomized primality test. (6) Re CO5 7+6
ii) With an example to show the best-case, worst-case and average case
analysis of heap sort.
OR
b) i) Run the Bellman-Ford algorithm on the directed graph of figure 16 (b) ()
below using vertex s as the source and show the results after each pass of an
algorithm.
Re CO1 7+8
______________________