I have to determine the Optimal Multiplication Order for above matrices using Dynamic Programming approach and also present that sequence (i.e. optimal order) in Binary Tree.
Consider the following five matrices A, B, C, D and E along with their dimensions;
A=(6×5) B=(5×1) C=(1×7) D=(7×4) E=(4×2)
After two hours, I have calculated the final cost matrix as
0 30 72 82 85
0 35 48 53
0 28 43
0 56
0
and the split k values that led to a minimum m[i, j] value
0 1 2 2 2
0 2 2 2
0 3 4
0 4
0
Now I don't know how to calculate optimal order for multiplication from the above table. And also don't know to draw optimal tree for that sequence. Kindly someone help me at this point.