Math, asked by yanalotia1947, 1 year ago

Four matrices m1, m2, m3 and m4 of dimensions pxq, qxr, rxs and sxt respectively can be multiplied is several ways with different number of total scalar multiplications. For example, when multiplied as ((m1 x m2) x (m3 x m4)), the total number of multiplications is pqr + rst + prt. When multiplied as (((m1 x m2) x m3) x m4), the total number of scalar multiplications is pqr + prs + pst. If p = 10, q = 100, r = 20, s = 5 and t = 80, then the number of scalar multiplications needed is

Answers

Answered by abhi178
1
This question is based on \textbf{matrix chain multiplication} ,
we can find minimum number of multiplication by using (M_1\times(M_2\times M_3))\times M_4)

so, total number of scalar multiplication = qrs + pqs + pst

given, p = 10, q = 100, r = 20 , s = 5 and t = 80

so, total number of scalar multiplication = 100 × 20× 5 + 10 × 100 × 5 + 10 × 5 × 80

= 10000 + 5000 + 4000

= 19000

hence, answer is 19000
Similar questions