AKTU - QP20E290QP: Time: 3 Hours Total Marks: 100
AKTU - QP20E290QP: Time: 3 Hours Total Marks: 100
AKTU - QP20E290QP: Time: 3 Hours Total Marks: 100
P
0Q
j. Explain how algorithms performance is analyzed? 2
1
SECTION B
13
29
2.
2. Attempt any three of the following:
0E
24
Qno. Question Marks CO
P2
5.
a. Write an algorithm for counting sort? Illustrate the operation of counting 10
_Q
.5
sort on the following array: A={4, 0, 2, 0, 1, 3, 5, 4, 1, 3, 2, 3} 17
b. Show the results of inserting the keys F, S, Q, K, C, L, H, T, V, W, M, 10
TU
S = {A1, A2, A3, A4, A5, A6, A7, A8, A9, A10}
:3
d. What is sum of subset problem? Draw a state space tree for Sum of 10
subset problem using backtracking? Let n=6, m=30 and w [1:6] = {5, 10,
1
e. Write KMP algorithm for string matching? Perform the KMP algorithm 10
2
abbabaabaabab.
Fe
SECTION C
7-
1 | P a g e
AKTU_QP20E290QP | 27-Feb-2021 09:38:47 | 117.55.242.131
Printed Page: 2 of 2
Subject Code: KCS503
0Roll No: 0 0 0 0 0 0 0 0 0 0 0 0 0
4. Attempt any one part of the following:
Qno. Question Marks CO
a. Write an algorithm for insertion of key in the Red-Black Tree. Discuss 10
the various cases for insertion of key in red-black tree for given sequence
of key in an empty red-black tree- 5, 16, 22, 25, 2, 10, 18, 30, 50, 12, 1.
b. Explain and write an algorithm for union of two binomial heaps and also 10
write its time complexity?
P
0Q
1
13
29
2.
0E
24
with suitable example.
P2
5.
_Q
.5
6. Attempt any one part of the following: 17
TU
0 1 15 6
8:
2 0 7 3
:3
9 6 0 12
09
10 4 8 0
1
02
2 | P a g e
AKTU_QP20E290QP | 27-Feb-2021 09:38:47 | 117.55.242.131