Matrix Chain Multiplication
原题:Suppose you have to evaluate an expression like ABCDE where A,B,C,D and E are matrices.Since matrix multiplication is associative, the order in which multiplications are performed is arbitrary. However, the number of elementary multiplications needed strongly depends on the evaluation order you choose.For example, let A be a 5010 matrix, B a 1020 matrix and C a 205 matrix.There are two different strategies to compute ABC, namely (AB)C and A(B*C).The first one takes 15000 elementary multiplica
...