ADA - Question - Bank 2020
ADA - Question - Bank 2020
CE & IT Department
Question Bank
Year: 2020-2021
CE Department Mission:
1) To provide healthy Learning Environment based on current and future Industrial demands.
2) To promote curricular, co-curricular and extra-curricular activities for overall personality development
of the students.
3) To groom technically powerful and ethically dominant engineers having real life problem solving
capabilities.
IT Department Mission:
2) To generate groomed and efficient problem solvers as per Industrial needs by adopting innovative
teaching learning methods.
3) To emphasis on overall development of the students through various curricular, co-curricular and extra-
curricular activities.
UNIT 1 & 2
8 Write an algorithm of Selection Sort Method. Give its best case, 21-5-2016 5
worst case and average case complexity.complexity.
01/05/2017 (7)
Prepared by: Prof. Heena Panjwani & Prof. Neha Prajapati ADA 3150703 1
19-11-2016
1-5-2017
10 Define :Big Oh, Big Omega and Big Theta Notation. 16/11/2017 3
12 Write the best and worst running time of Insertion sort 06/06/2019 3
algorithm. Why it differ?
14 Analyze Selection sort algorithm in best case and worst case. 27/11/2018 7
15 Write the Master theorem. Solve following recurrence using it. 06/06/2019 7
19 Let f(n) and g(n) be asymptotically nonnegative functions. Using the 16/11/2017 7
basic definition of Θ-notation, prove that max(f(n), g(n)) = Θ (f(n) +
g(n)).
20 Find out the Θ -notation for the function: f(n)=27n2 +16n. 06/06/2019 7
21 Solve the following recurrence relation using iteration method. T(n) = 16/11/2017 7
8T(n/2)+ n 2 . Here T(1) = 1.
OR
Solve the following recurrence relation using substitution method.
T(n) =2T(n/2) + n. Here T(1) = 1.
Prepared by: Prof. Heena Panjwani & Prof. Neha Prajapati ADA 3150703 2
22 Prove or disprove that f(n) = 1 + 2 + 3 + .... + n ∈ Θ(n^2). 16/11/2017 4
4-5-2018
23 Which are the basic steps of counting sort? Write counting sort 16/11/2017 7
algorithm. Derive its time complexity in worst case.
4-5-2018
27 Explain Tower of Hanoi Problem, Derive its recursion equation and 27/11/2018 3
computer it’s time complexity.
30 Write sequential search algorithm and analyze it for worst case time 25/11/2019 7
complexity. Represent its time complexity using Big-oh (O) notation.
33 Solve following recurrence relation using suitable method and express 25/11/2019 7
your answer using Big-oh (O) notation.
T(n) = T(n/3) + T(2n/3) + Ө(n)
34 Solve following recurrence relation using suitable method and express 25/11/2019 7
your answer using Big-oh (O) notation.
T(n) = 2 T(n/2) + n2
Prepared by: Prof. Heena Panjwani & Prof. Neha Prajapati ADA 3150703 3
35 If T1(n) = O(f(n)) & T2(n) = O(g(n)) then prove that T1(n) + T2(n) = 25/11/2019 3
max(O(g(n)), O(f(n))).
36 Illustrate the working of the quick sort on input instance: 25, 29, 30, 25/11/2019 4
35, 42, 47, 50, 52, 60. Comment on the nature of input i.e. best case,
average case or worst case
Unit 3
2 Analyze quick sort algorithm for best case, average case and worst 16/11/2017 7
case with example.In which case it performs similar to selection sort?
21-5-2016
4-5-2018
5 Explain the use of Divide and Conquer Technique for Binary Search 21-5-2016 7
Method.What is the complexity of Binary Search Method? Explain it
19-11-2016
with example.
01/05/2017
8-11-2017
6 Demonstrate Binary Search method to search Key = 14, form the 27/11/2018 4
array
A=<2,4,7,8,10,13,14,60> .
Prepared by: Prof. Heena Panjwani & Prof. Neha Prajapati ADA 3150703 4
7 Write Merge sort algorithm and compute its worst case and best-case 27/11/2018 7
time complexity. Sort the List G,U,J,A,R,A,T in alphabetical order
using merge sort.
8 Write greedy algorithm for activity selection problem. Give its time 25/11/2019 7
complexity. For following intervals, select the activities according to
your algorithm. I1 (1-3), I2 (0-2), I3 (3-6), I4 (2-5), I5 (5-8), I6 (3-
10), I7
(7-9)
9 Illustrate the working of the merge sort algorithm on input instance: 25/11/2019 4
10, 27, 30, 88, 17, 98, 42, 54, 72, 95. Also write best case time
complexity of merge sort algorithm.
Unit 4
1 What are the differences between greedy approach and dynamic 19/11/2016 4
programming?
01/05/2017 7
27/11/2018 3
06/06/2019
2 What are the steps for dynamic programming? Explain principal of 06/06/2019 4
optimality.
5 Discuss and derive an equation for solving the 0/1 Knapsack problem 19-11-2016 7
using dynamic programming method. Design and analyze the
algorithm for the same.
Prepared by: Prof. Heena Panjwani & Prof. Neha Prajapati ADA 3150703 5
7 Solve Making change problem using dynamic technique. d1 = 1, 27/11/2018 7
d2=2,
d3=4, d4=6, Calculate for making change of Rs. 10.
9 Explain how to find out Longest Common Subsequence of two strings 1-5-2017 7
using Dynamic Programming method. Find any one Longest
Common Subsequence of given two strings using Dynamic
Programming. X=abbacdcba, Y=bcdbbcaac
12 Explain how to find out Longest Common Subsequence of two strings 8-11-2017 7
using dynamic programming method. Find the Longest Common
Subsequence of given two strings S1 = 10010101 and S2 =
010110110
14 For the following chain of matrices find the order of parenthesization 27/11/2018 7
for the optimal chain multiplication (13,5,89,3,34).
15 Using dynamic programming find out the optimal sequence for the 06/06/2019 7
matrix chain multiplication of A 4x10 , B 10x3 , C 3x12 , D 12x20
and E 20x7 matrices.
Prepared by: Prof. Heena Panjwani & Prof. Neha Prajapati ADA 3150703 6
Unit 5
10 Find an optimal Huffman code for the following set of frequency. a : 5-5-2017 7
Prepared by: Prof. Heena Panjwani & Prof. Neha Prajapati ADA 3150703 7
50, b: 20, c: 15, d: 30.
11 Generate minimum spanning tree using Kruskal's algorithm for the 8-11-2017 7
followin graph.
20 What is a minimum spanning tree? Draw the minimum spanning tree 25/11/2019 7
correspond to following graph using Prim’s algorithm.
Prepared by: Prof. Heena Panjwani & Prof. Neha Prajapati ADA 3150703 8
21 Consider the instance of the 0/1 (binary) knapsack problem as below 25/11/2019 4
with P depicting the value and W depicting the weight of each item
whereas M denotes the total weight carrying capacity of the knapsack.
Find optimal answer using greedy design technique. Also write the
time complexity of greedy approach for solving knapsack problem.
P = [40 10 50 30 60] W = [80 10 40 20 90] M = 110
22 Find the longest common subsequence for the following two 25/11/2019 7
sequences using dynamic programming. Show the complete process.
X = 100101001
Y = 101001
Unit 6
1 Explain Depth First Traversal Method for Graph with algorithm with 21-5-2016 3
example.
19/11/2016
25/11/2019
2 Explain Breath First Traversal Method for Graph with algorithm with 21-5-2016
example.
19/11/2016
5-5-2017
4 Find single source shortest path using Dijkstra’s algorithm form a to 27/11/2018 4
e.
Prepared by: Prof. Heena Panjwani & Prof. Neha Prajapati ADA 3150703 9
5 Solve all pair shortest path 4-5-2018 7
problem for the following graph
using Floyd's algorithm.
6 Find all pair of shortest path using Floyd’s Algorithm for given graph 27/11/2018 7
7 4-5-2018 4
8 Find out the Minimum Spanning Tree using Kruskal Algorithm for 27/11/2018 7
given Graph.
Prepared by: Prof. Heena Panjwani & Prof. Neha Prajapati ADA 3150703 10
06/06/2019
Unit 7
2 Explain use of Branch & Bound Technique for solving Assignment 1-5-2017 7
Problem.
4-5-2018
6 Draw the state space tree Diagram for 4 Queen problem. 27/11/2018 3
25/11/2019
Unit 8
1 What is finite automata? Explain with example how finite automaton 21-5-2016 7
is used for string matching?
19-11-2016
Prepared by: Prof. Heena Panjwani & Prof. Neha Prajapati ADA 3150703 11
2 Explain spurious hits in Rabin-Karp string matching algorithm with 19/11/2016 7
example.Working modulo q=13, how many spurious hits does the 21-5-2016
Rabin-Karp matcher encounter in the text T = 2359023141526739921
1-5-2017
when looking for the pattern P = 31415?
5-5-2017
8-11-2017
4-5-2018
3 What is Finite Automata? Explain use of finite automata for string 21-5-2016 7
matching with suitable example.
1-5-2017
5-5-2017
Unit 9
Prepared by: Prof. Heena Panjwani & Prof. Neha Prajapati ADA 3150703 12
2 Explain in Breif: 21-5-2016 7
P Problem, NP Problem, NP Hard Problem, NP Complete Problem 19-11-2016
01/05/2017
8-11-2017
25/11/2019
Prepared by: Prof. Heena Panjwani & Prof. Neha Prajapati ADA 3150703 13