The document discusses dynamic programming techniques for finding the optimal number of scalar multiplications in matrix multiplication. It provides an example of calculating the optimal parenthesization of matrix multiplications using a 6x6 matrix. The complexity of the algorithm is O(n^3). Dynamic programming is more efficient than brute force or divide and conquer approaches for this problem. Optimal substructure and overlapping subproblems are elements that allow dynamic programming to be applied. Proofs are given that the unweighted shortest path problem has optimal substructure but the unweighted longest path problem may not.