DAA October 2022
DAA October 2022
:
PA-3400 [Total No. of Pages : 4
[5919]-12
M.Sc.
COMPUTER SCIENCE
CSUT-112 : Design and Analysis of Algorithms
(2019 Pattern) (Semester - I)
Time : 3 Hours] [Max. Marks : 70
Instructions to the candidates:
1) All questions are compulsory.
2) Neat diagrams must be drawn wherever necessary.
b) List any four algorithms that use divide and conquer strategy.
c) Define minimum spanning tree.
d) What do you mean by longest common subsequence problem?
e) Define :-
i) Tree edge
ii) Back edge
f) Give implicit and explicit constraints of 8 Queen’s problem.
g) Write two bounding function associated with every node in LCBB.
Q2) Solve the following.
a) Rank the following functions in their increasing order of growth rate. [7]
en, nn, n!, loge(nn), n2
b) Find out the shortest paths from source ‘s’ to all other vertices. [5]
[5919]-12 1 P.T.O.
Q3) Solve the following.
a) Explain quick sort algorithm. Sort the following numbers using quick
sort. [7]
26, 5, 37, 1, 61, 11, 59, 15, 48, 19.
b) Find an optimal solution to the knapsack instance [5]
n = 3 m = 20 (p1, p2, p3) = (25, 24, 15)
(w1, w2, w3) = (18, 15, 10)
Using function method, from dynamic programming.
0 15 9 5
19 0 7 10
A=
∞ 10 0 10
6 ∞ 6 0
[5919]-12 2
b) Find the minimum spanning tree for the following graph using Kruskal’s
algorithm. [5]
5, 3, 1, 2, 1, 4, 1, 3, 2, 5.
i) Optimization problem
ii) NP Hard
[5919]-12 3