GATE CS 2011 · Question 38 · Algorithms · Multiple choice (MCQ) · 2 marks · −2/3 for a wrong answer
Four matrices M₁, M₂, M₃ and M₄ of dimensions p × q, q × r, r × s and s × t respectively can be multiplied in several ways with different number of total scalar multiplications. For example when multiplied as ((M₁ × M₂) × (M₃ × M₄)), the total number of scalar multiplications is pqr + rst + prt. When multiplied as (((M₁ × M₂) × M₃) × M₄), the total number of scalar multiplications is pqr + prs + pst.
If p = 10, q = 100, r = 20, s = 5, and t = 80, then the minimum number of scalar multiplications needed is
- (A) 248000
- (B) 44000
- (C) 19000
- (D) 25000
Answer
Answer (C)
Answer from the official GATE CS 2011 answer key.
The step-by-step solution, where available, is part of GATE CS Pro. See what Pro includes