Parenthisization: Dynamic Programming Problem

Here a chain of matrices is given such that
they conform to the matrices multiplication
rules. Our task is to determine the minimum
number of operations required to do so.

Here both bottom up and top down approach is
utilized for the same.