Explain the divide and conquer strategy for problem solving. Describe the worst-case linear time selection algorithm and analyze its complexity.
Write the dynamic programming algorithm for matrix chain multiplication. Find the optimal parenthesization for the matrix chain product ABCD with size of each is given as A₅ₓ₁₀, B₁₀ₓ₁₅, C₁₅ₓ₁₀, D₁₀ₓ₁₅.
What do you mean by Backtracking? Explain the backtracking algorithm for solving 0-1 knapsack problem and find the solution for the problem given below:
| Items → | 1 | 2 | 3 | 4 |
| Weight (wᵢ) → | 6 | 2 | 3 | 5 |
| Profit (Pᵢ) → | 4 | 5 | 10 | 7 |
and capacity of knapsack: 10 kg
Attempt any Eight questions
[8x5=40]Explain the iterative algorithm to find the GCD of given two numbers and analyze its complexity.
Trace the quick sort algorithm for array A[ ] = {15, 7, 6, 23, 18, 34, 25} and write it's best and worst complexity.
Generate the prefix code for "CYBER CRIME" using Huffman algorithm and find the total number of bits required.
Solve the following recurrence relations using masters method
a) T(n) = 2T(n/2) + kn², n > 1
= 1, n = 1.
b) T(n) = 5T(n/4) + kn, n > 1
= 1, n = 1.
Find the edit distance between the string "ARTIFICIAL" and "NATURAL" using dynamic programming.
Find the MST from following graph using Kruskal's algorithm.
Solve the following linear congruences using Chinese Remainder Theorem.
x ≡ 1 (MOD 2)
x ≡ 3 (MOD 5)
x ≡ 6 (MOD 7)
Define tractable and intractable problem. Illustrate vertex cover problem with an example.
Write short notes on:
a) Best, Worst and average case complexity
b) Greedy Strategy