Question 1
Write an algorithm for insertion sort. Calculate the best, average and worst case complexity of it.
Write an algorithm for insertion sort. Calculate the best, average and worst case complexity of it.
Sort the following elements using counting sort. 2, 5, 3, 0, 2, 3, 0,
Sort the following elements using bucket sort. 10, 21, 29, 41, 52
Write binary search algorithm using recursion. Derive its recurrence relation. Calculate its complexity using master theorem.
Write an algorithm for Max-Min problem using divide and conquer approach. Calculate its complexity.
The matrices A(5X10), B(10X15), C(15X20), and D(20X25) are given. Solve the matrix chain multiplication problem using dynamic programming.
Write an algorithm for matrix multiplication using divide and conquer approach. Calculate its complexity.
For the given set of items and knapsack capacity = 5 kg, find the optimal solution for the 0/1 knapsack problem using dynamic programming.
| Item | Weight | Value |
|---|---|---|
| I1 | 2 | 3 |
| I2 | 3 | 4 |
| I3 | 4 | 5 |
| I4 | 5 | 6 |
Define minimum spanning tree. Explain Prim’s algorithm with suitable example.
Define principal of optimality. Explain its use in Dynamic Programming Method.
"A greedy strategy will work for fractional Knapsack problem but not for 0/1", is this true or false? Explain with suitable example.
Explain Backtracking Method. Give solutions for 4-queens problem using backtracking method.
Circulate this solved paper with KaTeX formulas and 1-click AI step solvers to your batchmates on WhatsApp or Telegram.
Official Gujarat Technological University (GTU) examination paper and step-by-step solutions for Analysis and Design of Algorithms (ADA) (Winter 2024, B.E. · Computer Engineering, Sem 5). Features complete 70-mark regular & remedial examination pattern, official marking distribution across all 5 questions, and direct 1-click official PDF download.
Transcribed for student exam preparation from Gujarat Technological University official examination archives. Questions, syllabus guidelines, and curriculum marking schemes remain the intellectual property of Gujarat Technological University.