Source code of Matrix Chain Order
7 30 35 15 5 10 20 25
- 7 is number of array[30 35 15 5 10 20 25]
m
0 0 0 0 0 0 0
0 0 15750 7875 9375 11875 15125
0 0 0 2625 4375 7125 10500
0 0 0 0 750 2500 5375
0 0 0 0 0 1000 3500
0 0 0 0 0 0 5000
0 0 0 0 0 0 0
s
0 0 0 0 0 0 0
0 0 1 1 3 3 3
0 0 0 2 3 3 3
0 0 0 0 3 3 3
0 0 0 0 0 4 5
0 0 0 0 0 0 5
0 0 0 0 0 0 0
The number of required multiplications:15125
((A1(A2A3))((A4A5)A6))