Matrix Chain Multiplication
Let's solve the Matrix Chain Multiplication problem using Dynamic Programming.
Statement
You are given a chain of matrices to be multiplied. You have to find the least number of primitive multiplications needed to evaluate the result.
Note: Given two matrices and of dimensions and , the resulting matrix we get is , whose dimensions are . Further, when multiplying these two matrices, the number of primitive multiplications is .
Access this course and 1400+ top-rated courses and projects.