AOA MUMBAI UNI QUESTION BANK, Exercises of Design and Analysis of Algorithms

Start your learning and practice

Typology: Exercises

2024/2025

Uploaded on 11/28/2025

hasan-khan-11
hasan-khan-11 🇮🇳

3 documents

1 / 4

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Q.1) Explain big Oh, Big Omega and Theta notation OR Explain Asymptotic notation
in detail.
Q.2) Explain Multistage graph with example.
Q.3) What is Knuth Morris Pratt method of pattern matching? Give examples. What
is the advantages of KMP algorithm over other string matching algorithms?
Q.4) Explain 8 queen problem using backtracking.
Q.5) Explain naïve string matching algorithm with example.
Q.6) Explain quick sort algorithm with an example also derive its complexity. (May
ask in numerical form also for example elements will be given and sort them using
quick sort).
Q.7) Explain best case, average case and worst case.
Q.8) What is the 15 puzzle problem? Explain with an example how this can be
solved using branch and bound.
Q.9) Explain with an example how travelling salesman problem can be solved using
branch and bound method.
Q.10) Explain 0/1 knapsack problem using dynamic programming.
Q.11) Explain backtracking with n queen problem.
Q.12) What s greedy algorithm.
Q.13) Explain graph coloring and explain how graph coloring problem can be solved
with backtracking using suitable example.
Q.14) Explain Floyd Warshall algorithm in dynamic programming.
Q.15) Explain Rabin Karp algorithm in detail.
Q.16) Explain Binary search algorithm.
Q.17) Differentiate between the following:
i) Divide and Conquer approaches in dynamic programming
ii) Kruskal and Prim’s algorithm
iii) Greedy knapsack and 0/1 knapsack
Algorithm and Numerical
Q.1) What is Longest common subsequence problem? Find LCS for the following
strings:
pf3
pf4

Partial preview of the text

Download AOA MUMBAI UNI QUESTION BANK and more Exercises Design and Analysis of Algorithms in PDF only on Docsity!

Q.1) Explain big Oh, Big Omega and Theta notation OR Explain Asymptotic notation in detail. Q.2) Explain Multistage graph with example. Q.3) What is Knuth Morris Pratt method of pattern matching? Give examples. What is the advantages of KMP algorithm over other string matching algorithms? Q.4) Explain 8 queen problem using backtracking. Q.5) Explain naïve string matching algorithm with example. Q.6) Explain quick sort algorithm with an example also derive its complexity. (May ask in numerical form also for example elements will be given and sort them using quick sort). Q.7) Explain best case, average case and worst case. Q.8) What is the 15 puzzle problem? Explain with an example how this can be solved using branch and bound. Q.9) Explain with an example how travelling salesman problem can be solved using branch and bound method. Q.10) Explain 0/1 knapsack problem using dynamic programming. Q.11) Explain backtracking with n queen problem. Q.12) What s greedy algorithm. Q.13) Explain graph coloring and explain how graph coloring problem can be solved with backtracking using suitable example. Q.14) Explain Floyd Warshall algorithm in dynamic programming. Q.15) Explain Rabin Karp algorithm in detail. Q.16) Explain Binary search algorithm. Q.17) Differentiate between the following: i) Divide and Conquer approaches in dynamic programming ii) Kruskal and Prim’s algorithm iii) Greedy knapsack and 0/1 knapsack Algorithm and Numerical Q.1) What is Longest common subsequence problem? Find LCS for the following strings:

i) String 1 = ACBAED & String 2 = ABCABE ii) String 1 = AGGTAB & String 2 = GXTXAYB iii) String 1 = xyzytxy & String 2 = ytzxyx iv) String 1 = AMERICA & String 2 = ARMENIA Q.2) Write and explain sum of subset algorithm for the following: i) Solve the sum of subset for n = 4, m= 17, w = {2, 7, 8, 15} ii) Solve the sum of subset for n = 5, m = 17, w = {2, 7, 8, 9, 15} iii) Solve the sum of subset for n = 4, m = 9, w = {1, 3, 4, 5} iv) Solve the sum of subset for n = 7, m = 35, w = {5, 7, 20, 5, 18, 10, 12} v) Solve the sum of subset for n = 4, m = 9, w = {4, 5, 8, 9} vi) Solve the sum of subset for n = 6, m = 30, w = {5, 10, 12, 12, 15, 18} Q.3) Write the algorithm for 0/1 knapsack using dynamic programming. Also solve the following instance where: i) n = 4, Knapsack capacity M = 5, weights (W1, W2, W3, W4) = (2, 3, 4, 5) and profit (P1,P2, P3, P4) = (3, 4, 5, 6) ii) n= 4, M = 21, (P1, P2, P3, P4) = (2, 5, 8, 1), (W1, W2, W3, W4) = (10, 15, 6, 9) iii) n = 3, m = 6, (W1, W2, W3) = (2, 3, 4), (P1, P2, P3) = (1, 2, 5) iv) n = 3, m = 10, (W1, W2, W3) = (4, 6, 8), (P1, P2, P3) = (10, 12, 15) Q.4) Obtain the solution to the following knapsack using greedy method; i) n = 7, m = 15, P = (10, 5, 15, 7, 6, 18, 3), W = (2, 3, 5, 7, 1, 4, 1) ii) n = 5, m = 100, P = (10, 20, 30, 40, 50), W = (20, 30, 66, 40, 60) iii) n = 6, m = 13, P = (18, 5, 9, 10, 12, 7), W = (7, 2, 3, 5, 3, 2) iv) n = 4, m = 50, P = (60, 100, 120, 80), W = (10, 20, 30, 40)

Q.7) Write and explain merge sort algorithm and derive its complexity. Sort the following elements with using merge sort: i) 10, 5, 7, 6, 1, 4, 8, 3, 2, 9 ii) 25, 11, 8, 39, 13, 12 iii) 38, 27, 43, 3, 9, 82, 10 Q.8) Explain Master theorem and solve the recurrence using master method: i) T(n) = 8T (𝑛/2) + 𝑛𝑑. ii) T(n) = 4T(n/2) +n^2. iii) T(n) = 2T(n/2) +n^3. Q.8) Write an algorithm for insertion sort and selection sort. (May ask in numerical form also for example elements will be given and sort them using quick sort).