Consider we need to solve the Matrix chain multiplication using dynamic programming for this problem :
The table for min. cost is shown below :
Edit : Reference https://www.radford.edu/~nokie/classes/360/dp-matrix-parens.html
The table for Optimal locations for parentheses:
I know how to construct these tables but I don't know how to extract the min. number of multiplications that will be achieved for multiplying these matrices from the min cost table and also I can't construct the overall places of the parenthesis that should be used to achieve this min. number of multiplications from the optimal location of parenthesis table ? So please someone mention the resultant min. number of multiplications for this solution of this problem with the final parenthesis locations that should be used to achieve this min. number. Many thanks.