Q1. Deduce a recursive definition for determining the minimum cost of Matrix-Chain multiplication problem. Find out an optimal parenthesisation of a matrix chain product whose sequence of dimension is as follows:
<5*10, 10*3, 3*12, 12*5, 5*50, 50*6>
Q2. prepare down the Floyd Warshall algorithm to resolve the all pairs shortest paths problem on a directed graph. Execute your algorithm on the given weighted directed graph and show the matrix Dk which result for each iteration of the outer loop.