Unit 5: Dynamic Programming Problems - Subjective Questions

CSE330 — Competitive Coding Approaches-Techniques • Practice Questions with Detailed Answers

20 questions

1

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

2

Explain the dynamic programming approach for finding the length of the Longest Increasing Subsequence (LIS) of an array.

3

Describe how the LIS problem can be solved in time. Why does the auxiliary array not necessarily store an actual subsequence?

4

Define the Longest Common Subsequence (LCS) problem and derive its dynamic programming recurrence.

5

Explain how to reconstruct an actual Longest Common Subsequence from the completed LCS table.

6

Distinguish between a substring and a subsequence. Illustrate why this distinction matters in LIS and LCS problems.

7

Derive a dynamic programming solution for computing the binomial coefficient without using factorials.

8

Formulate the Box Stacking problem as a dynamic programming problem, including the treatment of box rotations.

9

Explain the role of strict dimension comparisons and orientation normalization in the Box Stacking problem.

10

Derive the dynamic programming recurrence for the 0/1 Integer Knapsack Problem, where duplicate items are forbidden.

11

Compare the 0/1 Knapsack and Unbounded Knapsack problems, with particular attention to their one-dimensional DP update orders.

12

Define edit distance and derive the dynamic programming recurrence when insertion, deletion, and replacement each cost one.

13

Using dynamic programming, determine the edit distance between "kitten" and "sitting", and describe one optimal sequence of operations.

14

Explain the Matrix Chain Multiplication problem and derive the recurrence for its minimum scalar multiplication cost.

15

Find the optimal parenthesization cost for matrices with dimensions , , and . Show the competing costs.

16

Define the Balanced Partition Problem and explain its reduction to a subset-sum dynamic programming problem.

17

Apply the Balanced Partition algorithm to the set and determine the minimum difference and a valid partition.

18

Compare memoization and tabulation as methods for implementing the dynamic programming algorithms in this unit.

19

Explain how space optimization is performed in LCS, Edit Distance, and 0/1 Knapsack. State when such optimization should not be used directly.

20

Discuss common correctness and implementation pitfalls across LIS, LCS, Knapsack, Matrix Chain Multiplication, and Balanced Partition.