# Pieces in Parentheses

$A_1 : 5 \times 10 \\ A_2 : 10 \times 3 \\ A_3 : 3 \times 12 \\ A_4 : 12 \times 5$

Consider the following matrices, along with their dimensions as described above.

What would be the best way of arranging the parentheses for multiplying $$A_1 .. A_4$$ such that it needs a minimal number of scalar multiplications?

×