Daa Pyq
Daa Pyq
:
P561 [Total No. of Pages : 3
[5840]-102
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) Define
i) Cross edge
[5840]-102 1 P.T.O.
Q3) Explain strassen’s multiplication algorithm. Solve the.
a) Following by using strassen’s multiplication to find matrix Product.
3 1 3 −4
A= −4 2 = B [7]
2 4
b) What is Longest common subsequence. Find LCS of X & Y where
X =< 1,0,0,1,0,1,1,1,0 >
[5]
Y =< 1,1,0,1,0 >
∞ 20 30 10
15 ∞ 16 4
3 5 ∞ 2.
19 6 18 ∞
c) Define 4 queen’s problem. Draw state space tree to Find solution for 4
queen’s problem using backtracking.
ooo
[5840]-102 3
Total No. of Questions : 7] SEAT No. :
P2643 [Total No. of Pages : 3
[6073]-112
M.Sc.-I (Computer Science)
CSUT-112 : DESIGN AND ANALYSIS OF ALGORITHM.
(2019 Pattern) (Semester - I)
Time : 3 Hours] [Max. Marks : 70
Instructions to the candidates:
1) Question 1 is compulsory.
2) Solve any five questions from Q.2 to Q.7.
3) Q.2 to Q.7 carry equal marks.
c) Find optimal MRT for storing 4 programs on a tape with lengths 12,18,8,10
respectively.
a) Write an algorithm for insertion sorting method. and obtain its best and
worst case time complerity. [7]
[6073]-112 1 P.T.O.
Q3) Attempt all questions; [12]
a) Explain merge sort algorithm and apply it on the following elements.
19, 7, 14, 12, 6, 2, 16, 13, 8 [7]
b) A string X can be strnasformed into string Y by applying a sequence of
edit operations such as insert, delete and interchange with associated
costs of 1, 1 and 2 respectively. For X=ACCTA and Y=CATA find cost
of transforming X to y. [5]
0 10 15 20
5 0 9 10
A=
6 13 0 12
8 7 9 0
[6073]-112 2
Q6) Attempt all questions: [12]
a) Define articulation point. Find all articution points from the following
graph [Start vertese is 1] [7]
b) Sort the following elements using bubble sort: 10, 8, 19, 4, 7, 3 [5]
∞ 10 12 9
7 ∞ 4 3
9 4 ∞ 3
11 10 5 ∞
[6073]-112 3
Total No. of Questions : 7] SEAT No. :
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
b) Draw the portion of state space tree generated by LCBB for the following
instance n = 5 m= 12.
w = (4, 6, 3, 4, 2)
p = (10, 15, 6, 8, 4)
c) What is Hamiltonian cycle? Find out all possible Hamiltonian cycle for
the following graph.
[5919]-12 4
Total No. of Questions : 7] SEAT No. :
P8573 [Total No. of Pages : 4
[6173] - 12
M.Sc. - I
COMPUTER SCIENCE
CSUT-112 : Design and Analysis of Algorithms
(CBCS 2019 Pattern) (Semester - I)
P.T.O.
Q3) Attempt the following.
a) Write algorithm to find maximum from an array of N integers using
Divide and Conquer Strategy. Show how it works on the following input
numbers. [7]
24, 2, 34, 18, 45, 23, 58
0 10 9 4
20 0 7
A
7 10 0 6
5 5 2 0
[6173] - 12 2
b) Find the shortest distance from source vertex ‘S’ to all other vertices
Using Dijkstra’s Method. [5]
b) Write an algorithm for insertion sort and state its time complexity for best
case and average case. [5]
a) Define Hamiltonian cycle. Find all possible Hamiltonian cycles that starts
with vertex 1.
[6173] - 12 3
b) What do you mean by Branch and Bound strategy? Obtain the reduced
cost matrix for the TSP instance given by the cost matrix.
10 8 4
16 6 7
A
15 4 4
15 6 12
i) P Class
ii) NP Class
[6173] - 12 4