Jump to content

Matrix chain multiplication: Difference between revisions

m
no edit summary
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.
1,336

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.