Consider the matrix chain A2A3A4 where A2 has dimensions 50
Consider the matrix chain A2A3A4, where A2 has dimensions 50 x 10, A3 has dimensions 10 x 100 and A4 had dimensions 100 x 2. Which of the following parenthesizations require the minimum number of scalar multiplications.
Solution
Option 2
Explanation:
We have many ways to do matrix chain multiplication because matrix multiplication is associative. In other words, no matter how we parenthesize the product, the result of the matrix chain multiplication obtained will remain the same. Here we have three matrices , A2, A3, and A4, we would have
((A2A3)A4)=(A2(A3A4))
However, the order in which we parenthesize the product affects the number of simple arithmetic operations needed to compute the product, or the efficiency.A2 has dimensions 50 x 10, A3 has dimensions 10 x 100 and A4 had dimensions 100 x 2
If we multiply two matrices A and B of order l x m and m x n respectively,then the number of scalar multiplications in the multiplication of A and B will be lxmxn.
So , All parenthesizations have the same no of scalar multiplications.
