To compute , try every split point from to . Splitting at means you first compute , then , then multiply the results.
Cost = . The last term is the cost of multiplying the two resulting matrices.
Take the minimum over all :
##### ###### ##### ### # # ### # # ###### ## ## ## ## ## ## ## # # # # # ## ##### #### ##### # # # # # # # #### ## # ## ## ## ## # # # # # ## ## # ###### ## ### # ### # ######
##### ###### ##### ### # # ### # # ###### ## ## ## ## ## ## ## # # # # # ## ##### #### ##### # # # # # # # #### ## # ## ## ## ## # # # # # ## ## # ###### ## ### # ### # ######
Try all split points
To compute , try every split point from to . Splitting at means you first compute , then , then multiply the results.
Cost = . The last term is the cost of multiplying the two resulting matrices.
Take the minimum over all :