matrix chain order Algorithm

matrix chain multiplication (or matrix Chain order problem, MCOP) is an optimization problem that can be solved use dynamic programming. " check each possible parenthesization (brute force) would necessitate a run-time that is exponential in the number of matrix, which is very slow and impractical for large n. A quicker solution to this problem can be achieved by breaking up the problem into a set of related subproblems.

matrix chain order source code, pseudocode and analysis