Find an optimal parenthesization for matrix-chain multiplications using any PYTHON/java/c++/c for the number {26, 9, 41,…

Find an optimal parenthesization for matrix-chain
multiplications using any PYTHON/java/c++/c for
the number {26, 9, 41, 18, 13, 22, 28, 32, 25, 26, 30, 37, 19, 47,
11, 24, 20} using a top-down memorized solution. The output must be
three lines:

Place Order

1) the first line contains the optimal number of
multiplication

2) the second line contains the optimal parenthesization and

3) the third line is the time required to compute the optimal
parenthesization