next up previous
Next: Brute Force Solution: Try Up: CSE 2320: Algorithms and Previous: Matrix Multiplication

Matrix Multiplication Parenthesization

For example, A1 A2 A3 can be rewritten as
(A1 A2) A3 or A1 (A2 A3).



Example

Suppose A1 is 10x100, A2 is 100x5, and A3 is 5x50.

Then A1 (A2 A3) $\longrightarrow$ 100*5*50 + 10*100*50 = 25,000 + 50,000 = scalar multiplications (A2 A3 is a 100x50 matrix).

(A1 A2) A3 $\longrightarrow$ 10*100*5 + 10*5*50 = 5,000 + 2,500 = scalar multiplications (A1 A2 is a 10x5 matrix).



Copyright © 1998 The University of Texas at Arlington