Matrix Chain Multiplication

Back to Classic Problems (DP)

Find the most efficient way to multiply a chain of matrices by determining the optimal parenthesization. The order of multiplication does not affect the result but dramatically affects the number of scalar multiplications. Solved with DP in O(n^3) time.

algorithms dynamic-programming matrix-chain