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:
(A) 248000
(B) 44000
(C) 19000
(D) 25000
Answer: (C)
Explanation: We get minimum number of multiplications using ((M1 X (M2 X M3)) X M4).
Total number of multiplications = 100x20x5 (for M2 x M3) + 10x100x5 + 10x5x80 = 19000.
Quiz of this Question
Recommended Posts:
- GATE | GATE CS 2011 | Question 1
- GATE | GATE CS 2011 | Question 2
- GATE | GATE CS 2011 | Question 3
- GATE | GATE CS 2011 | Question 4
- GATE | GATE CS 2011 | Question 65
- GATE | GATE CS 2011 | Question 6
- GATE | GATE CS 2011 | Question 7
- GATE | GATE CS 2011 | Question 8
- GATE | GATE CS 2011 | Question 9
- GATE | GATE CS 2011 | Question 10
- GATE | GATE CS 2011 | Question 11
- GATE | GATE CS 2011 | Question 65
- GATE | GATE CS 2011 | Question 13
- GATE | GATE CS 2011 | Question 14
- GATE | GATE CS 2011 | Question 15
- GATE | GATE CS 2011 | Question 16
- GATE | GATE CS 2011 | Question 17
- GATE | GATE CS 2011 | Question 18
- GATE | GATE CS 2011 | Question 19
- GATE | GATE CS 2011 | Question 65

