Updated Question Bank
Updated Question Bank
Engineering
CAY: 2024-25
Question Bank
th
PROGRAMME: B.tech CSE (4 Sem)
COURSE Design & Analysis of algorithm SEMESTER: 4th
TITLE:
COURSE BTCS 403-18 CREDITS: 3
CODE:
SESSION: 2024-25 FACULTY-IN- Er. Sarabjit Kaur
CHARGE:
18. What are differences between Binary and linear search? CO5 2
SECTION 2
35. 1. Explain big-oh Computation for following CO2 5
structure :-
Sequencing
If-Else
For loop
While loop
Recursion
36. Solve following instance of Knapsack CO1 5
Problem using Branch and Bound Technique
(assume W=4)
Item w v
s
11 1 2
12 2 3
13 3 4
37. Apply Prims and Kruskal algorithm to the CO1 5
graph to obtain minimum spanning tree. Do
these algorithms generate same output?
Justify.
48. Explain the heap sort algorithm and its time CO2 5
complexity.
T(n)=T(n−1)+O(n)
T(n)=2T(2n)+O(n)
T(n)=7T(n/2)+18n^2
60. Write an algorithm for linear search and analyze the CO3 5
algorithm for its time complexity.
62. Write Pseudocode for BFS and DFS with suitable CO4 5
example.
63. Explain Bin packing problem with example. CO4 5
SECTION 3
69. 1. Solve Transitive closure. CO2 10
70. Give a set S=<1, 4, 5, 6, 7, 3> and W=12. Obtain the sum of subset CO3 10
using backtracking approach.
73. A) How the performance can be analyzed? Explain with the example. CO2 10
B) Give the algorithm for transpose of a matrix m x n and find the time
complexity of the algorithm using step count method.
74. Find the Big-Oh notations for the following functions: CO4 10
(і) (л)=78889
(ii) f(n)=6n²+135
(iii) f(n)=7n²+8n+56
(iv) f(n)=n+35n² +84
76. CO3 10
Why do we perform topological sorts only on DAGs? Explain
77. Using Dijkstra’s algorithm find the shortest path from A to D for the CO4 10
following graph.
80. Take the following list of functions and arrange them in ascending CO5 10
order of growth rate. That is, if function g(n) immediately follows
function f(n) in your list, then it should be the case that f(n) is O(g(n)).
f1(n) = n 2.5 , f2(n) = √(2)n , f3(n) = n + 10 , f4(n) = 10 n , f 5(n) =
100 n and f6(n) = n2 log(n)
81. Sort the list 415, 213, 700, 515, 712, 715 using Merge sort algorithm. CO5 10
Also explain the time complexity of merge sort algorithm.
82. Write an algorithm for merging two sorted arrays into one array. CO5 10
Explain with suitable examples.
85. CO3 10
86. What is Knapsack problem? Justify that "All optimal solutions will fill CO1 10
the knapsack exactly".
88. What are NP hard problems? Write short notes on the procedures of the CO4 10
following approximation algorithms to solve TSP using suitable
examples.
92. Define flow network and write an iterative Ford-Fulkerson's method for CO4 10
solving Max- Flow problem.
93. Explain the Big-Oh computation for each of the following control CO5 10
structures:
(i) Sequencing
(ii) If-then-else
(iii)“for” loop
(iv) “While” loop
(v) Recursion