Last Updated : 19 Nov, 2018

Consider the following matrices A3×4, B4×5, C5×6 and D6×2:
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 124 multiplication.
C5×6 and D6×2 = 60 and resulting matrix = CD5×2
Now B4×5 and CD5×2 = 40 and resulting matrix = BCD4×2
Now A3×4 and BCD4×2 = 24 and resulting matrix = ABCD3×2
Total multiplication = 124.
2 – (A((BC)D)) will result into 192 multiplication.
B4×5 and C5×6 = 120 and resulting matrix = BC4×6
Now BC4×6 and D6×2 = 48 and resulting matrix = BCD4×2
Now A3×4 and BCD4×2 = 24 and resulting matrix = ABCD3×2
Total multiplication = 192
3- (AB)(CD) will result into 150 multiplication
A3×4 and B4×5 = 60 and resulting matrix = AB3×5
Now C5×6 and D6×2 = 60 and resulting matrix = CD5×2
Now AB3×5 and CD5×2 = 30 resulting matrix = ABCD3×2
Total multiplication = 150.
4 – ((A(BC))D) will result into
B4×5 and C5×6 = 120 and resulting matrix = BC4×6
Now A3×4 and BC4×6 = 72 and resulting matrix = ABC3×6
Now ABC3×6 and D6×2 = 36 and resulting matrix = ABCD3×2
Total multiplication = 228
5 – (((AB)C)D) will result into 186 multiplication
A3×4 and B4×5 = 60 and resulting matrix = AB3×5
Now AB3×5 and C5×6 = 90 and resulting matrix = ABC3×6
Now ABC3×6 and D6×2 = 36 and resulting matrix = ABCD3×2
Total multiplication = 186
Minimuim multiplication = 124 which will be resulted by (A(B(CD)))
So, option (A) is correct.

Quiz of this Question


Share your thoughts in the comments