calculations let us assume n p first way multiply chain require calculations second way require calculations obviously second way faster multiply matrices using arrangement parenthesis therefore conclusion order parenthesis matters task find optimal order parenthesis point several choices one design dynamic programming algorithm split
Applied science Transportation Operations research Dynamic programming