Cheapest way to chain three products
You must compute the product where is , is , and is , using the standard algorithm (an times product costs scalar multiplications). Matrix multiplication is associative, so you may bracket it as or . What is the minimum total number of scalar multiplications?
Show hints (2)+
- Cost out both bracketings and separately.
- Each stage costs ; add the two stages, then take the smaller total.
Answer
Reveal answer →Final answer
36
Create a free account to see the full worked solution and track your progress.
Interview format: Numerical Reasoning Tests, Trading Aptitude Tests