Ada Imp Que All
Ada Imp Que All
MODULE 1
1. With neat diagram explain different steps in designing and analyzing an algorithm.
2. Explain the concept of asymptotic notations and basic efficiency classes, with examples.
Explain O, θ, and Ω, with examples.
3. Explain the general plan for analyzing the efficiency of a recursive algorithm. Develop
a recursive algorithm to find factorial of +ve number. Derive its efficiency in terms of order of
growth.
4. Explain the general plan for analyzing the efficiency of a non-recursive algorithm.
Suggest a non-recursive algorithm to find maximum element in the list of n numbers.
Derive its efficiency
5. Develop an algorithm to sort the array using bubble sort. Calculate best, worst & average case for
this algorithm.
6. Develop an algorithm to search an element in the array using sequential search. Calculate best,
worst & average case for this algorithm.
7. Define Algorithm? Explain the worst case, best case and average case efficiencies, with an
algorithm.
9. Order of Growth
MODULE 2
1. Explain the concept of divide and conquer. Design an algorithm for merge sort and
derive its time complexity
2. Define & Design an insertion sort algorithm and obtain its time complexity. Apply insertion sort
on these elements. 25,75,40,10,20,
4. Define & Design an algorithm for quick sort algorithm. Apply quick sort on these elements.
25,75,40,10,20,05,15
5. Apply a quick sort algorithm to sort the list E, X, A, M, P, L, E in alphabetical order. Draw the
tree of recursive calls made( Practice similar type questions/problems)
6. Explain in detail about the Travelling Salesman Problem using exhaustive search- 12m
7. Explain in detail about the knapsack problem and closest pair problem
8. Define & Design an algorithm for insertion sort algorithm. Explain with one example.
MODULE 3
2. Construct bottom up heap for the list 2,9,7,6,5,8. Obtain its time complexity
3. Define heap. Explain the properties of heap along with its representation.
4. Design Horspools algorithm for string matching. Apply Horspools algorithm to find
the pattern BARBER in the text: JIM_SAW_ME_IN_A_BARBERSHOP
5. Sort the list 62,31,84,96,19,47 using comparison counting sorting and Analyze the
efficiency.
6. Explain all the 4cases in horspool’s algorithm. write the algorithm for ShiftTable.
9. Define 2-3 tree. Give the worst case efficiency of operations on 2-3 tree. Build 2-3 tree for the list
of keys 9, 5, 8, 3, 2, 4, 7 by indicating each step of key insertion and node splits.
MODULE 4
2.
3.
4.
5.
6. Apply Dijkstra’s algorithm to find single source shortest path for the given graph by
considering S as the source vertex.
7.
8. Write the Floyd's Algorithm for computing the All Pairs Shortest Path in a Digraph. Apply the
same to find the All Pairs Shortest Path problem for the given Digraph.
10. Solve the following knapsack problem using memory function where n=4,w=5 w={ 2,1,5,2}
v={8,6,16,11}.
MODULE 5
2. What is backtracking? Apply backtracking to solve the below instance of sum of subset
problem S={5,10,12,13,15,18} d=30
4.
5. Differentiate between Branch and Bound technique and Backtracking. Apply backtracking to
solve the following instance of subset-sum problem S = \{3, 5, 6, 7\} and d = 15 Construct a state
space tree.