Matrix chain multiplication: Difference between revisions

Content added Content deleted
mNo edit summary
mNo edit summary
Line 22:
* [1000, 1, 500, 12, 1, 700, 2500, 3, 2, 5, 14, 10]
 
To solve the task, it's possible, but not required, to write a function that enumerates all possible ways to parenthesize the product. This is not optimal because of the many duplicated computations, and this task is a classic exampleapplication of [[:wp:Dynamic programming|dynamic programming]].
 
See also [[:wp:Matrix chain multiplication|Matrix chain multiplication]] on Wikipedia.