r ililifl ilt$i rii frffifra fiiflr s!!
t t$$l NP - 435
2Z
[\f $emester B.C.A. Exarnination, .luly/August 2024
(NEP Scheme)
COMPUTER SCIENICE
Paper - 4,2: Design and Analysis of Algorithrn
Time : 2lr'z Hours Max. Marks : 60
lnstruction : ,Answer all the Sections.
SECTION _ A
Answer any four questions. Each question carries two marks. (4x2=$)
1. What is an alEorithnn ? lVlention its characteristics.
2. Define space and tinne complexity.
3. Define divide and conquer teeltmique.
4. State Brute-force method.
5. What is dynamic programming ?
6. What are P and NP complete problems ?
SECTION - B
Answer any four questior{s. Each question carries five marks. (zlx5=20)
?. Explain fundarnentals of atgorithmic problern solving.
8. Trace the insertion sort algorithm for the following array.
35, 1 0, 1 5, 45,25, 20, 40
g" Explain depth first search with suitable example.
P.T.O.
NP - 435 -2.- I tiltilll ilfl tit ilfiI iltil ilil til
10. Differentiate between Dynamic programming and Greedy technique.
11. Apply Kruskal's algorithm to obtain the minimum cost spanning tree for the
following graph.
12. To find the sum of subsets using backtracking for S = {7, 1'1, 19, 24} M = 01.
SECTION -C
Answer any four questions. Each question carries eight marks. (4x8=32)
13. a) Discuss important problem types.
b) Explain mathematical analysis of recursive algorithm. g+4)
14. Explain different asymptotic notations in detail. I
15. a) Write an algorithnt,for merge sort.
b) Trace merge sort algorithm for the following arrays.
30, 10,40,20,50,45,60 (a+a)
16. Explain inorder, preorder and postorder tree traversal algorithm with an
example. 8
iilililililililrilffiifiltflitffiil NP - 435
17. Consider the following graph to apply Floyd's algorithm. 8
18. a) Exptain 4 Queens problem using backtracking.
b) Explain Knapsack problem. (a+a)