Last Updated : 20 Nov, 2018

Let A, B, C, and D be four matrices of dimensions 30 x 40, 40 x 50, 50 x 60, and 60 x 20, respectively. The order of matrix multiplication that has minimum number of scalar multiplications required to find the product ABCD using the basic matrix multiplication method is ?
(A) (A(B(CD)))
(B) (AB)(CD)
(C) ((A(BC))D)
(D) (A(BC)D)


Answer: (A)

Explanation: Using Matrix Chain Multiplication :

  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

Hence, 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