Let’s assume the cost of multiplying a Matrix A(M*N) and Matrix B(N*Q) be M*N*Q.There are 4 matrices A(2*3) ,B(3*6), C(6*4) ,D(4*5).We should Multiply these 4 matrices in Such a way so that the total cost will be minimum.Find the Possible way to multiply these matrices to get minimum cost.a.A*((B*C)*D)b.(A*B)*(C*D)c.((A*B)*C)*Dd.All the above
Question
Let’s assume the cost of multiplying a Matrix A(MN) and Matrix B(NQ) be MNQ.There are 4 matrices A(23) ,B(36), C(64) ,D(45).We should Multiply these 4 matrices in Such a way so that the total cost will be minimum.Find the Possible way to multiply these matrices to get minimum cost.a.A*((BC)D)b.(AB)(CD)c.((AB)*C)*Dd.All the above
Solution
The cost of multiplying matrices is determined by the number of scalar multiplications involved. The order in which the matrices are multiplied can significantly affect the cost.
Let's calculate the cost for each option:
a. A*((BC)D): First, multiply B(36) and C(64), which costs 364 = 72. Then, multiply the result, a (34) matrix, with D(45), which costs 345 = 60. Finally, multiply A(23) with the result, a (25) matrix, which costs 235 = 30. Total cost = 72 + 60 + 30 = 162.
b. (AB)(CD): First, multiply A(23) and B(36), which costs 236 = 36. Then, multiply C(64) and D(45), which costs 645 = 120. Finally, multiply the results, two (26) and (65) matrices, which costs 26*5 = 60. Total cost = 36 + 120 + 60 = 216.
c. ((AB)C)D: First, multiply A(23) and B(36), which costs 236 = 36. Then, multiply the result, a (26) matrix, with C(64), which costs 264 = 48. Finally, multiply the result, a (24) matrix, with D(45), which costs 24*5 = 40. Total cost = 36 + 48 + 40 = 124.
Therefore, the option with the minimum cost is c. ((A*B)*C)*D.
Similar Questions
Consider the matrices P, Q and R which are 10 x 20, 20 x 30 and 30 x 40 matrices respectively. What is the minimum number of multiplications required to multiply the three matrices?
Let A1, A2, A3, and A4 be four matrices of dimensions 10 x 5, 5 x 20, 20 x 10, and 10 x 5, respectively. The minimum number of scalar multiplications required to find the product A1A2A3A4 using the basic matrix multiplication method is
Consider the two matrices P and Q which are 10 x 20 and 20 x 30 matrices respectively. What is the number of multiplications required to multiply the two matrices?1 point10*2020*3010*3010*20*30
solve the matrix chain multiplication problem and achieve the optimal parenthesization.
A firm produces three products P_{v}, P_{2} and P_{1} requiring the mixup of four materials M_{D}, M_{D}, M and M_{d} The matrix below gives the amount of material needed for each product: MA A=P 1 [ [[2, 3, 1, 12], [7, 9, 5, 20], [P_{3}, 0, 0, 0]] [ matrix 8&12&6&15 matrix ]. Using matrix notations, find (i) the total requirement of each material if the firm produces 70 units of P,, 120 units of P_{2} and 50 units of P (ii) the per unit cost of production of each product if the per unit costs of materials M_{1}, M_{2}, M_{3} and M * are 10, 12, 15 and 20 respectively, and (iii) the total cost of production.
Upgrade your grade with Knowee
Get personalized homework help. Review tough concepts in more detail, or go deeper into your topic by exploring other relevant questions.