ObjectiveMcq
Print Protected
This page is protected for print. Use the website to view the content.
Which of the following is the recurrence relation for the matrix chain multiplication problem where mat[i-1] * mat[i] gives the dimension of the ith matrix?
Correct Answer: D — dp[i,j] = 0 if \(i=j dp[i,j] = min{dp[i,k] + dp[k+1,j]} + mat[i-1]*mat[k]*mat[j]\).
The recurrence relation is given by:
dp[i,j] = 0 if i=j
(dp[i,j] = min{dp[i,k] + dp[k+1,j]} + mat[i-1]*mat[k]*mat[j]).