DAA 2
DAA 2
:
PB3026 [Total No. of Pages : 3
[6255]-201
First Year M.Sc.
COMPUTER SCIENCE
CS-551 - MJ : Design and Analysis of Algorithms
(2023 Credit Pattern) (Semester - II)
Time : 3 Hours] [Max. Marks : 70
Instructions to the candidates:
1) All questions are compulsory.
2) Neat diagrams must be drawn wherever necessary.
3) Use of single memory non programmable scientific calculator is allowed.
Q1) Solve any five of the following. [5×2=10]
a) Define time complexity. List asymptotic notations.
b) Merge sort is in place algorithms. Justify.
c) Consider 4 programs with the length 14, 5, 20, 8, 3 respectively are to be
stored on a computer tape. Find MRT using greedy method.
d) What is negative weighted cycle? Does Flyod Warshall algorithm consider
the negative weighted cycle?
e) What do you mean by branch and bound? Where this technique might be
useful.
f) Define P & NP class problem.
P.T.O.
Q3) Attempt any two questions. [2×6=12]
a) Apply the Merge Sort to sort the following numbers. Derive its Time
complexity.
26, 5, 37, 1, 61, 11, 59, 15, 48, 19.
b) What is the best way to multiply a chain of matrices A1, A2, A3, A4 with
dimensions 15×5, 5×10, 10×20, 20×25 respectively using Dynamic
Programming?
c) Find shortest path for all vertices by using Dijkstra’s Algorithm.
[6255]-201 2
Q5) Attempt any two questions. [2×6=12]
a) What is m-colouring problem? Find all possible solutions when the
following graph is coloured with exactly 3 colours.
10 8 14
22 7 6
A=
9 10 4
5 6 2
c) Find the minimum spanning tree for the following graph using Kruskal’s
Algorithm.
[6255]-201 3