Vous êtes sur la page 1sur 1

1

7. 8. Compare the stabilities and the time complexities of quicksort and mergesort algorithms. (16) Find the MST in the given graph using Kruskals algorithm and using Prims algorithm. (8)

Profession al Group of In stitutions


School of Computer Applications

Internal Test II Master of Computer Applications


MC9223-Design and Analysis of Algorithms Date : Year/Sem: 1 Year / II Sem Duration: 1 hour 30 mins

Max.Marks: 50

PART - A (5*2=10 MARKS) Answer All Questions


1. 2. 3. What is the largest number of key comparisons made by binary search in searching for a key in an array of 11 elements? Give at least 2 applications of Dijkstras Shortest Path algorithm True or false: a. A partial solution in Prims Algorithm is always a Tree. b. A Partial solution in Kruskals Algorithm is always a Tree. 9. a. Explain Dijkstras Algorithm for a single source shortest path problem. (5) b. Solve the following instance of single source shortest path problem with vertex 1 as the source. (11)

4.
5.

Define Optimisation problem with an example. Compare strategies Divide & conquer and Dynamic Programming.

PART- B (40 MARKS) Answer Any Three Questions

10.

Apply Dynamic Programming technique to find the Transitive Closure of the digraph defined by the following adj. matrix. (8) A B C D A 0 0 0 1 B 1 0 0 0 C 0 0 0 1 D 0 1 0 0

6.

a. Trace the steps involved in merge sort using an example (10) b. Present the Recurrence relation of Mergesort & solve using Masters Theorem. (6)

Prof. M. Kumaresan

Vous aimerez peut-être aussi