Use the dynamic programming technique to find an optimal parenthesization of a matrix-chain product whose sequence of dimensions is <5, 8, 40, 10, 20, 6>.
Matrix Dimension
A1 5 * 8
A2 8*40
A3 40*10
A4 10*20
A5 20*6
[A1(A2A3)(A4A5)]=5100
explanation
A2*A3=8*40*10=3200
A1(A2*A3)=5*8*10=400
(A4*A5)=10*20*6=1200
[A1(A2*A3)(A4*A5)]=5*10*6=300
therefore total=3200+400+1200+300
Use the dynamic programming technique to find an optimal parenthesization of a matrix-chain product whose sequence...
Use the dynamic programming technique to find an optimal parenthesization of a matrix-chain product whose sequence of dimensions is <5, 8, 4, 10, 7, 50, 6>. Matrix Dimension A1 5*8 A2 8*4 A3 4*10 A4 10*7 A5 7*50 A6 50*6 You may do this either by implementing the MATRIX-CHAIN-ORDER algorithm in the text or by simulating the algorithm by hand. In either case, show the dynamic programming tables at the end of the computation. Using Floyd’s algorithm (See Dynamic Programming...
15.2-1 -- Find an optimal parenthesization of a matrix-chain product whose sequence of dimensions is (5, 10, 3, 12, 5, 50, 6). 5. -- Implement Matrix-ChainMultiply(A,s,i,j) using algorithm Matrix-Chain-Order and Matrix-Multiply, where Matrix-Multiply(X,Y, p,q,r) multiplies matrices X and Y, X and Y have pxq and qxr demension, respectively. Given a chain of 6 matrices whose dimensions are given in 15.2-1, and elements are random real numbers from -10 to 10, use Matrix-Chian-ultiply to calculate the product of these matrices.
Find an optimal parameterization of a matrix-chain product whose sequence of dimensions is p= <6, 10, 3, 15, 8>. Show the m and s tables and the printing of an optimal parameterization. Use the algorithm learned in class. Upload a file with your solution.
Find an optimal parenthesizing to multiply the following matrices. Apply dynamic programming and show your work: A1 x A2 x A3 x A4 x A5 x A6 Size of A1 : 30 x 80 Size of A2 : 80 x 100 Size of A3 : 100 x 5 Size of A4 : 5 x 200 Size of A5 :200 x 7 Size of A6: 7 x 7
READ CAREFULLY AND CODE IN C++ Dynamic Programming: Matrix Chain Multiplication Description In this assignment you are asked to implement a dynamic programming algorithm: matrix chain multiplication (chapter 15.2), where the goal is to find the most computationally efficient matrix order when multiplying an arbitrary number of matrices in a row. You can assume that the entire input will be given as integers that can be stored using the standard C++ int type and that matrix sizes will be at...
Consider the following matrices for the matrix-chain multiplication problem: A1: 30 × 5 A2: 5 × 40 A3: 40 × 10 A4: 10 × 25 A5: 25 × 20 Compute the values of M[i, j], 1 ≤ i ≤ j ≤ 5 and s[i, j], 1 ≤ i < j ≤ 5. Show the optimal factorization found.
10×8,8×6,6×15,15×12 4. [15] Dynamic Programming. We are given a set of matrices Ap.A1, A2. .. .An-1. which we must multiply in this order. We let (d, dira) be the dimension of matrix A. The minimal number Nij of operations required to multiply matrices (A, Ati .. A) is defined by: a. Explain this formula. Apply this formula to compute the optimal parenthetization of the product of matrices Ao-A1,Az,A3, where the dimensions of these matrices are, respectively: 6x15, and 15x12. b....
Suppose that 4 3 -225 3 3 -3 2 6 -2 -2 2-1 5 In the following questions you may use the fact that the matrix B is row-equivalent to A, where 1 0 1 0 1 0 1 -2 0 5 0 0 01 3 (a) Find: the rank of A the dimension of the nullspace of A (b) Find a basis for the nullspace of A. Enter each vector in the form [x1, x2, ...]; and enter your...
Find an optimal parenthesisation of a matrix chain product whose sequene of dimensions given by {4,6,30,8,9}
10×8,8×6,6×15,15×12 4. [15] Dynamic Programming. We are given a set of matrices Ap.A1, A2. .. .An-1. which we must multiply in this order. We let (d, dira) be the dimension of matrix A. The minimal number Nij of operations required to multiply matrices (A, Ati .. A) is defined by: a. Explain this formula. Apply this formula to compute the optimal parenthetization of the product of matrices Ao-A1,Az,A3, where the dimensions of these matrices are, respectively: 6x15, and 15x12. b....