Last Updated : 20 Nov, 2018

Consider the following matrices A30×40, B40×50, C50×60 and D60×20:
Which sequence of chain multiplication will result into minimum number of multiplication?

(A) (A(B(CD)))
(B) (AB)(CD)
(C) ((A(BC))D)
(D) (A(BC)D)


Answer: (A)

Explanation: Given Matrix chain multiplication can be solved as follows:
1 – (A(B(CD))) will result into 124000 multiplication.
C50×60 and D60×20 = 60000 and resulting matrix = CD50×20
Now B40×50 and CD50×20 = 40000 and resulting matrix = BCD40×20
Now A30×40 and BCD40×20 = 24000 and resulting matrix = ABCD30×20
Total multiplication = 124000.
2 – (A((BC)D)) will result into 192000 multiplication.
B40×50 and C50×60 = 120000 and resulting matrix = BC40×60
Now BC40×60 and D60×20 = 48000 and resulting matrix = BCD40×20
Now A30×40 and BCD40×20 = 24000 and resulting matrix = ABCD30×20
Total multiplication = 192000
3- (AB)(CD) will result into 150000 multiplication
A30×40 and B40×50 = 60000 and resulting matrix = AB30×50
Now C50×60 and D60×20 = 60000 and resulting matrix = CD50×20
Now AB3×5 and CD5×2 = 30000 resulting matrix = ABCD30×20
Total multiplication = 150000.
4 – ((A(BC))D) will result into 228000 multiplication
B40×50 and C50×60 = 120000 and resulting matrix = BC40×60
Now A30×40 and BC40×60 = 72000 and resulting matrix = ABC30×60
Now ABC30×60 and D60×20 = 36000 and resulting matrix = ABCD30×20
Total multiplication = 228000
5 – (((AB)C)D) will result into 186000 multiplication
A30×40 and B40×50 = 60000 and resulting matrix = AB30×50
Now AB30×50 and C50×60 = 90000 and resulting matrix = ABC30×60
Now ABC30×60 and D60×20 = 36000 and resulting matrix = ABCD30×20
Total multiplication = 186000
Minimuim multiplication = 124000 which will be resulted by (A(B(CD)))
So, option (A) is correct.

Quiz of this Question


Share your thoughts in the comments