Answer is 499. because when multiply n matrix n-1 pair of round brackets is required.
eg:
2 matrices (AB) = 1 pair
3 matrices ((AB)C) or (A(BC)) or ((AC)B) = 2 pair .
Suppose that we want to multiply 500 matrices and we use the optimal parenthesization computed by...