Four matrices with dimensions 5 × 10, 10 × 3, 3 × 12 and 12 × 5 are to be multiplied. What is the minimum number of scalar multiplications needed?
- A450
- B405
- C540
- D630
Correct answer: B
Four matrices with dimensions 5 × 10, 10 × 3, 3 × 12 and 12 × 5 are to be multiplied. What is the minimum number of scalar multiplications needed?