GATE Computer ScienceHardGATE CSE

Six matrices have dimensions 30×35, 35×15, 15×5, 5×10, 10×20 and 20×25 in a chain. What is the minimum number of scalar multiplications to compute the product?

  1. A. 13625
  2. B. 16125
  3. C. 18125
  4. D. 15125

Correct answer: D. 15125

The matrix-chain DP gives 15125 scalar multiplications.

More Algorithms questions

Exams that ask this topic