Question discussion

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…

1512Medium DSSSB TGT Computer Science 0 replies

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

Explanation

The best order is (A1 × A2) × (A3 × A4) = 150 + 180 + 75 = 405 multiplications, whereas multiplying strictly left to right costs 630.

Discussion 0

Nobody has replied yet. Start the discussion!