DP Matrix-Chain Multiplication (MCM) :: Questions
DP Matrix-Chain Multiplication (MCM) :: Questions
Questions:
1. Find an optimal parenthesizing of a matrix-chain product whose sequence of dimensions
(5, 10, 3, 12, 5, 50, 6) . You have to show the value of both m and s tables.
2. Suppose that the matrix Ai has dimensions P i−1 ∗ Pi .What is the dimension of the matrix
product U = A ∗ A ∗ A . . . Ak?
i i+1 i+2
Questions:
1. What is the purpose of LCS?
Ans: The Longest Common Subsequence (LCS) algorithm is used to find the longest
subsequence common to two sequences (strings, arrays, etc.) without rearranging the
order of elements.
2.
Questions:
1. Determine the change that would incur the minimum number of coins for an amount of 47
cents. Use the standard coin denomination values used in the US i.e. 25, 10, 5, 1 cents
Questions:
1. Which key property is shared by both greedy algorithms and dynamic programming?