00:01
To find the minimum number of the matrix multiplication required to compute the product of a, b, c and d.
00:11
So, you we can use the dynamic programming as to create the keeping the track of the optimal order of the multiplication and the minimum number of the multiplication area.
00:22
So, here first we will define as here you can see first we will define the dimensions of the matrix as a is with respect to 10 cross 5 matrix and b is with respect to 5 cross 15 matrix, c is with respect to 15 cross 8 matrix and d is with respect to 8 cross 20 matrix.
00:46
So, now to create the m with the dimension of n plus 1 create the m with the dimension of n plus 1 into n plus 1 into n plus 1 where n is the number of the matrix in the chain where in this case n is equal to n is 4.
01:06
So, initializing the table with the 0 then we will define the function to fill the m tables with the m tables as you can see with the minimum number of the multiplication this function will iterate through the different combination of the matrix chains and find the optimal order.
01:25
So, using the nested loop so using the nested loop for that to iterate over the different chain state as chain length starting from the chain 2 up to the total number of the matrix 4.
01:37
So, for each chain length iterates through all the possible state position of the chain calculates the minimum number of the multiplication required for the each combination of splitting the chain into the two parts and the optimal split that minimizes the number of the multiplication...