DAA Question Bank 2020
DAA Question Bank 2020
SCHEME CBCS
Module -1
Q. Bloom’s
Questions COs
No. LL
1 What is an algorithm? Explain the notion of an Algorithm. L1 CO1
Give an algorithm for selection sort. Derive its time efficiency for all
3 L1, L4 CO1
cases.
Page | 1
RNSIT – Department of CSE Subject Code: 15CS34 Question Bank
9 Prove the following using limits. i) n!∈Ω(2n). ii) ½n(n − 1) ∈Θ(n2) L4 CO1
Module -2
Q. Bloom’s
Questions COs
No. LL
1 Write the quick sort algorithm. Analyze its efficiency. Apply the
L2, L3 CO2
algorithm to sort the list 4, 1, 6, 3, 9, 2, 7, 5
2 Write the algorithm for binary search and find the average case
L2, L4 CO2
efficiency.
3 Discuss the merge sort algorithm with recursive tree and its efficiency.
L2, L3 CO2
Apply the same algorithm to sort the list {4,6,1,3,9,5}
4 Give the general divide and conquer recurrence and explain the same.
L2 CO2
Write and explain the Master’s theorem.
5 Explain the concept of divide and conquer methodology indicating three
L2 CO2
major variations.
6 Explain selection sort and bubble sort algorithm using brute force method
L2, L3 CO2
and analyze with examples.
7 Describe Sequential search and string matching algorithms using brute
L2 CO2
force method
8 Explain in detail quick sort. Provide a complete analysis of quick sort
L2, L4 CO2
with example.
9 Explain in detail merge sort. Illustrate the algorithm with a numerical L2, L4 CO2
Page | 2
RNSIT – Department of CSE Subject Code: 15CS34 Question Bank
L2, L4 CO2
Module -3
Q. Bloom’s
Questions COs
No. LL
1 What is greedy technique? L1 CO3
2 What is spanning tree? What is minimum spanning tree L1, L2 CO3
3 Justify the statement “prim’s algorithm always yields minimum cost
spanning tree”. Give the prim’s algorithm and discuss about its time L4 CO3
complexity.
4 Justify the statement “Kruskal’s algorithm always yields minimum cost L4 CO3
spanning tree”. Give the Kruskal’s algorithm and discuss about its time
Page | 3
RNSIT – Department of CSE Subject Code: 15CS34 Question Bank
complexity.
5 Explain the time complexity of Kruskal’s algorithm. L5 CO3
6 Give the Dijkstra’s algorithm. What is its complexity? Discuss with a
L2, L4 CO3
suitable example.
7 Solve the following instances of the single source shortest path problem
with
(i) vertex ‘5’ as the source.
L3 CO3
8 Obtain optimal solution for the job sequencing problem given the
following jobs, profits and deadlines. N=5, P(20,15,10,5,1) and L3 CO3
D(2,2,1,3,3)
9 Using prim’s algorithm, obtain the min cost spanning tree for the graph
given below.
L3 CO3
Page | 4
RNSIT – Department of CSE Subject Code: 15CS34 Question Bank
10 Using Kruskal’s algorithm, obtain the min cost spanning tree for the L3
CO3
graph given in Q.9.
Module -4
Q. Bloom’s
Questions COs
No. LL
1 What is dynamic programming? L1 CO4
2 Write an algorithm for all pair shortest path problem and derive its time
L2, L4 CO4
complexity
3 Write an algorithm for warshall’s problem. CO4
4 What are memory functions? Explain how they are used to solve the
knapsack problem. Solve the instance of the knapsack problem given
below. L2, L4 CO4
N=4, M=5, (W1, W2, W3, W4)=(2, 1, 3, 2), (P1, P2, P3, P4)=(12, 10,
120, 15)
5 State all-pairs shortest path algorithm. Solve the given problem using the
below figure
L1, L4 CO4
6 Using Warshall’s algorithm, obtain transitive closure for the given matrix:
L2, L4 CO4
L3, L4 CO4
Page | 5
RNSIT – Department of CSE Subject Code: 15CS34 Question Bank
10 Obtain the shortest path problem for the given graph using Bellmann Ford
algorithm.
L4 CO4
Module -5
Q. Bloom’s
Questions COs
No. LL
1 Explain how backtracking is used for solving 4- queen’s problem. Show
L2, L4 CO5
the state space tree.
2 Differentiate between back tracking and branch- and –bound algorithms. L4 CO5
3 State subset-sum problem. Using backtracking obtain a solution to the
L3 CO5
subset-sum problem by backtracking S={6,8,2,14} and d=16
4 Explain approximation algorithm for NP- hard problem in general. Also
L3 CO5
discuss the approximation algorithms for knapsack problem.
5 Define P, NP, and NP Complete problems. L2 CO5
6 Explain any two Approximation algorithms for Travelling Salesperson
L2 CO5
Problem
7 Define the following i) tractable problem ii) class p iii) class NP CO6
iv) Polynomial reduction v) NP complete problems. L1
8 Solve the instance of knapsack problem using branch and bound CO6
algorithm. The knapsack capacity W=10.
Item 1 2 3 4 L4
Weight 4 7 5 3
Profit 40 42 25 12
Knapsack Capacity W = 10
9 Solve the following instance of Assignment problem using Branch-Bound L4 CO6
technique
Page | 6
RNSIT – Department of CSE Subject Code: 15CS34 Question Bank
Person b 6 4 3 7
Person c 5 8 1 8
Person d 7 6 9 4
10 Write an algorithm to find Hamiltonian cycle in a given graph L2 CO6
Page | 7