Notice: Due to an ongoing migration of our storage and publishing system, material requested since last month will not be uploaded for the time being, and new requests are paused. All existing notes remain available.

Unit 3 MCQs Dynamic Programming

CSE408 — Design And Analysis Of Algorithms 60 questions. Pick an option to check it.

Read the notes Subjective questions

0 of 60 answered 0 right 0 wrong , 60 left

  1. Question 1 of 60 Introduction to Dynamic Programming Easy

    Dynamic programming is especially useful when a problem has which property?

  2. Question 2 of 60 Introduction to Dynamic Programming Easy

    What are the two common approaches used to implement dynamic programming?

  3. Question 3 of 60 Introduction to Dynamic Programming Easy

    What does optimal substructure mean?

  4. Question 4 of 60 Computing a Binomial Coefficient Easy

    What is the value of for any nonnegative integer ?

  5. Question 5 of 60 Computing a Binomial Coefficient Easy

    Which recurrence is used to compute a binomial coefficient using dynamic programming?

  6. Question 6 of 60 Memory Functions Easy

    What is the main purpose of a memory function?

  7. Question 7 of 60 Memory Functions Easy

    A memory-function implementation of dynamic programming is commonly called what?

  8. Question 8 of 60 Knapsack Problem Easy

    In the knapsack problem, how many times may each item be selected?

  9. Question 9 of 60 Knapsack Problem Easy

    What is the objective of the knapsack problem?

  10. Question 10 of 60 Knapsack Problem Easy

    A knapsack has capacity . Which single item can fit in it?

  11. Question 11 of 60 Knapsack Problem Easy

    Which statement distinguishes fractional knapsack from knapsack?

  12. Question 12 of 60 Matrix-Chain Multiplication Easy

    What does the matrix-chain multiplication problem seek to minimize?

  13. Question 13 of 60 Matrix-Chain Multiplication Easy

    When can a matrix of size be multiplied by a matrix of size ?

  14. Question 14 of 60 Matrix-Chain Multiplication Easy

    How many scalar multiplications are needed to multiply a matrix by a matrix using the standard method?

  15. Question 15 of 60 Longest Common Subsequence Easy

    In a subsequence, must the selected characters be contiguous in the original sequence?

  16. Question 16 of 60 Longest Common Subsequence Easy

    What is the length of a longest common subsequence of the strings and ?

  17. Question 17 of 60 Longest Common Subsequence Easy

    If the current characters of two sequences match, how is the corresponding LCS table entry commonly computed?

  18. Question 18 of 60 Optimal Binary Search Trees Easy

    What does an optimal binary search tree minimize?

  19. Question 19 of 60 Optimal Binary Search Trees Easy

    Which information is commonly used to construct an optimal binary search tree?

  20. Question 20 of 60 Optimal Binary Search Trees Easy

    In an optimal binary search tree, frequently searched keys are generally placed where?

  21. Question 21 of 60 Introduction to Dynamic Programming Medium

    A recursive algorithm repeatedly solves the same smaller instances, and an optimal solution can be formed from optimal solutions to those instances. Which properties make dynamic programming appropriate?

  22. Question 22 of 60 Introduction to Dynamic Programming Medium

    A bottom-up Fibonacci algorithm stores only the two most recently computed values. What are its time and auxiliary space complexities for computing ?

  23. Question 23 of 60 Introduction to Dynamic Programming Medium

    In a shortest-path problem on a staged graph, why can choosing the minimum-weight outgoing edge at every vertex fail?

  24. Question 24 of 60 Computing a Binomial Coefficient Medium

    Using , what is the value of ?

  25. Question 25 of 60 Computing a Binomial Coefficient Medium

    A one-dimensional array is used to compute binomial coefficients. For each row , why should entries be updated from larger to smaller ?

  26. Question 26 of 60 Memory Functions Medium

    A memoized LCS algorithm is called for only one pair of string prefixes. When can it evaluate fewer states than a full bottom-up table?

  27. Question 27 of 60 Memory Functions Medium

    A memoized maximization algorithm uses to mean that a state has not been computed, but valid state values may also equal . What is the best correction?

  28. Question 28 of 60 Knapsack Problem Medium

    A knapsack has capacity . Items have pairs , , , and . What is the maximum obtainable value?

  29. Question 29 of 60 Knapsack Problem Medium

    Let be the maximum value using the first items with capacity . If item has weight and value , which recurrence represents the knapsack choice?

  30. Question 30 of 60 Knapsack Problem Medium

    During reconstruction of a knapsack solution, suppose . What action is justified?

  31. Question 31 of 60 Knapsack Problem Medium

    When implementing knapsack with a one-dimensional array, capacities are processed from down to for each item. What does this ordering prevent?

  32. Question 32 of 60 Matrix-Chain Multiplication Medium

    Matrices , , and have dimensions , , and . What is the minimum number of scalar multiplications?

  33. Question 33 of 60 Matrix-Chain Multiplication Medium

    A matrix chain has dimension array . What is the minimum number of scalar multiplications needed to multiply all four matrices?

  34. Question 34 of 60 Matrix-Chain Multiplication Medium

    For four matrices, the split table contains , , and . Which optimal parenthesization does this describe?

  35. Question 35 of 60 Longest Common Subsequence Medium

    What is the length of a longest common subsequence of and ?

  36. Question 36 of 60 Longest Common Subsequence Medium

    Let denote the LCS length of prefixes and . If , which recurrence should be used?

  37. Question 37 of 60 Longest Common Subsequence Medium

    The strings and have an LCS of length . Using only insertions and deletions, what is the minimum number of operations required to transform into ?

  38. Question 38 of 60 Optimal Binary Search Trees Medium

    Three ordered keys have successful-search probabilities , , and . Ignoring unsuccessful searches and counting the root at depth , which key should be the root of an optimal BST?

  39. Question 39 of 60 Optimal Binary Search Trees Medium

    In the optimal BST recurrence, why is the total probability weight added after selecting a root for keys through ?

  40. Question 40 of 60 Optimal Binary Search Trees Medium

    Why can an optimal binary search tree be structurally unbalanced even when a balanced BST is possible?

  41. Question 41 of 60 Introduction to Dynamic Programming Hard

    A table entry depends on , , and , with row and column initialized. Which traversal computes every dependency before it is used?

  42. Question 42 of 60 Introduction to Dynamic Programming Hard

    A graph problem asks for a maximum-reward path from a source to a target using at most edges. A proposed DP stores only the maximum reward obtained at each vertex. Why can this state definition violate the principle of optimality?

  43. Question 43 of 60 Computing a Binomial Coefficient Hard

    A one-dimensional Pascal-array implementation currently stores the row for as . It incorrectly updates indices from left to right using . What value will it store at index instead of ?

  44. Question 44 of 60 Computing a Binomial Coefficient Hard

    Consider a top-down memoized computation of with base cases and . It performs no symmetry reduction. How many distinct non-base states are evaluated when computing ?

  45. Question 45 of 60 Memory Functions Hard

    A top-down LCS implementation initializes every memo entry to and treats an entry as cached only when its value is nonzero. For two length- strings with no common character, what is the resulting asymptotic running time?

  46. Question 46 of 60 Memory Functions Hard

    A memoized recurrence is represented by a directed acyclic state graph. From the initial state, states and dependency edges are reachable. If each state scans all of its outgoing dependencies once when first evaluated, what are the tight time and memo-space bounds?

  47. Question 47 of 60 Knapsack Problem Hard

    For 0/1 knapsack with capacity , items and are processed using a one-dimensional array, but capacities are scanned increasingly for each item. What value is reported, and what is the true 0/1 optimum?

  48. Question 48 of 60 Knapsack Problem Hard

    An exact-fill 0/1 knapsack DP initializes every capacity state to rather than setting unreachable positive capacities to . With items and and target capacity , it returns . What has the implementation actually computed?

  49. Question 49 of 60 Knapsack Problem Hard

    A descending-capacity 1D DP correctly computes the optimal 0/1 knapsack value, but reconstruction using a single mutable predecessor pointer per capacity can repeat an item because earlier information is overwritten. Which method reliably reconstructs a valid optimal subset?

  50. Question 50 of 60 Knapsack Problem Hard

    When capacity is extremely large but the total item value is moderate, which exact 0/1 knapsack formulation gives a pseudo-polynomial bound independent of ?

  51. Question 51 of 60 Matrix-Chain Multiplication Hard

    Four matrices have dimensions , , , and . Which parenthesization minimizes scalar multiplications, and what is its cost?

  52. Question 52 of 60 Matrix-Chain Multiplication Hard

    The standard bottom-up matrix-chain algorithm tests every split for every interval . How many candidate splits are examined for a chain of matrices?

  53. Question 53 of 60 Matrix-Chain Multiplication Hard

    A chain contains six matrices, each of dimension . Assuming only scalar multiplication count matters, how many distinct parenthesizations are optimal?

  54. Question 54 of 60 Longest Common Subsequence Hard

    For and , the LCS length is . Which sequence is not an LCS of the two strings?

  55. Question 55 of 60 Longest Common Subsequence Hard

    For strings of lengths and , which statement correctly characterizes Hirschberg's algorithm for reconstructing an LCS?

  56. Question 56 of 60 Longest Common Subsequence Hard

    A top-down LCS memory function follows only the diagonal dependency when the current characters match. If and both have length , how many distinct states are evaluated from the initial call ?

  57. Question 57 of 60 Longest Common Subsequence Hard

    Two strings have lengths and , and their LCS length is . What is their minimum edit distance when the only permitted operations are insertion and deletion, each with unit cost?

  58. Question 58 of 60 Optimal Binary Search Trees Hard

    An optimal BST has successful-search probabilities , and unsuccessful-search probabilities , , . Using the standard recurrence with , which root is optimal and what is the expected cost?

  59. Question 59 of 60 Optimal Binary Search Trees Hard

    For an optimal BST recurrence satisfying Knuth's monotonicity condition, which interval contains an optimal root , and what time bound follows when only that interval is searched?

  60. Question 60 of 60 Optimal Binary Search Trees Hard

    Four ordered keys have successful-search probabilities , with unsuccessful-search probabilities omitted. Under the recurrence , what are the optimal root and cost?

That's unit 3

Answer a few questions and your score shows up here.