Professional Documents
Culture Documents
QP22O1P - 290: Time: 3 Hours Total Marks: 100
QP22O1P - 290: Time: 3 Hours Total Marks: 100
QP22O1P - 290: Time: 3 Hours Total Marks: 100
SECTION A
1
90
13
SECTION B
_2
2.
2. Attempt any three of the following: 10 x 3 = 30
1P
24
a. Solve the recurrence
5.
2O
17
b. What is Binomial Heap? Write down the algorithm for Decrease key operation
Q
|1
d. What is N queens problem? Draw a state space tree for 4 queens problem using
backtracking.
:5
e. Write Rabin Karp string matching algorithm. Working modulo q=11, how
08
many spurious hits does the Rabin karp matcher in the text T=
21
SECTION C
-
ec
(a) Write Merge sort algorithm and sort the following sequence {23, 11, 5, 15, 68,
0-
(b) What do you understand by stable and unstable sorting? Sort the following
sequence {25, 57, 48, 36, 12, 91, 86, 32} using heap sort.
1
(b) Explain the method of finding Hamiltonian cycles in a graph using
90
13
backtracking method with suitable example.
_2
2.
1P
24
7. Attempt any one part of the following: 10 x 1 = 10
5.
2O
(a) Write and explain the algorithm to solve vertex cover problem using
.5
approximation algorithm.
P2
17
(b) Explain and Write the Knuth-Morris-Pratt algorithm for pattern matching also
write its time complexity.
Q
|1
17
9:
:5
08
21
- 20
ec
D
0-
|3