Daapyq
Daapyq
B. TECH.
(SEM-V) THEORY EXAMINATION 2020-21
DESIGN AND ANALYSIS OF ALGORITHM
Time: 3 Hours Total Marks: 100
Note: 1. Attempt all Sections. If require any missing data; then choose suitably.
SECTION A
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|Page
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
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|Page
AKTU_QP20E290QP | 27-Feb-2021 09:38:47 | 117.55.242.131
Printed Page: 1 of 2
Subject Code: KCS503
0Roll No: 0 0 0 0 0 0 0 0 0 0 0 0 0
B. TECH.
(SEM V) THEORY EXAMINATION 2021-22
DESIGN AND ANALYSIS OF ALGORITHM
Time: 3 Hours Total Marks: 100
Note: 1. Attempt all Sections. If require any missing data; then choose suitably.
2. Any special paper specific instruction.
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
B.TECH.
(SEM V) THEORY EXAMINATION 2022-23
DESIGN & ANALYSIS OF ALGORITHM
Time: 3 Hours Total Marks: 100
Note: Attempt all Sections. If you require any missing data, then choose suitably.
SECTION A
2
(j) Explain Randomized algorithms.
90
13
_2
2.
SECTION B
P1
24
2. Attempt any three of the following: 10x3 = 30
5.
3D
(a) Explain Merge sort algorithm and sort the following sequence {23, 11,
.5
P2
|1
Explain.
(c) Prove that if the weights on the edge of the connected undirected graph
1
in detail.
(d) Discuss LCS algorithm to compute Longest Common Subsequence of
:
13
SECTION C
0-
|1
2
90
13
_2
2.
P1
24
5.
3D
.5
P2
17
Q
|1
1
:5
: 20
13
3
02
-2
01
0-
|1