Unit 3: Dynamic Programming - Subjective Questions

CSE408 — Design And Analysis Of Algorithms • Practice Questions with Detailed Answers

20 questions

1

Define dynamic programming. Explain the properties that make a problem suitable for a dynamic programming solution.

2

Distinguish between dynamic programming, divide-and-conquer, and greedy methods.

3

Explain the two main approaches to dynamic programming: top-down memoization and bottom-up tabulation. Compare their advantages.

4

Derive a dynamic programming recurrence for computing the binomial coefficient and analyze its complexity.

5

Compute using the dynamic programming method and explain how its space requirement can be optimized.

6

What is a memory function in dynamic programming? Explain its operation using a general recurrence.

7

Explain how a memory function improves the recursive computation of Fibonacci numbers. Analyze the time and space complexities.

8

Formulate the knapsack problem using dynamic programming and derive its recurrence relation.

9

Solve the knapsack instance with weights , values , and capacity .

10

Compare the knapsack problem with the fractional knapsack problem. Why does a greedy strategy not generally solve the version?

11

Define the matrix-chain multiplication problem and derive the dynamic programming recurrence used to solve it.

12

For matrices , , and with dimensions , , and , determine the optimal parenthesization.

13

Explain how the optimal parenthesization is reconstructed from the split table in matrix-chain multiplication.

14

Define the longest common subsequence problem and derive its dynamic programming recurrence.

15

Find the length of an LCS of and , and give one longest common subsequence.

16

Explain how an actual longest common subsequence can be reconstructed from the dynamic programming table. Also distinguish a subsequence from a substring.

17

What is an optimal binary search tree? Explain why an ordinary balanced binary search tree may not minimize the expected search cost.

18

Derive the dynamic programming recurrence for an optimal binary search tree when only successful-search frequencies are given.

19

Describe the complete optimal binary search tree formulation that includes successful and unsuccessful search probabilities.

20

Explain how an optimal binary search tree is reconstructed after computing its dynamic programming tables, and state the algorithm's complexity.