multiplication of matrix chains 26344