Matrix chain multiplication: Difference between revisions

m
no edit summary
mNo edit summary
mNo edit summary
Line 15:
;Task
 
Write a function which, given a list of the successive dimensiondimensions of matrices A1, A2... An, of arbitrary length, returns the optimal way to compute the matrix product, and the total cost. The list does not duplicate shared dimensions: for the previous example of matrices A,B,C, one will only pass the list [5,6,3,1]. Hence, a product of n matrices is represented by a list of n+1 dimensions.
 
Try this function on the following two lists:
1,336

edits