next up previous
Next: Step 2: Define recursive Up: CSE 2320: Algorithms and Previous: Dynamic Programming Solution (4

Step 1: Characterize Structure of Optimal Solutioon



Parenthesization of two subchains A1 .. Ak and Ak+1 .. Anmust each be optimal for A1 .. An to be optimal.

Why? A lower cost solution to a subchain reduces the cost of A1 .. An. The total cost is calculated as cost( A1 .. Ak) + cost( Ak+1 .. An) + cost of multiplying two resultant matrices together. The last term is constant no matter what the subproblem solutions are.



We can show that if the subproblem does not have an optimal solution, a better subproblem solution cost yields a better total cost.

Thus, as is the case with ALL Dynamic Programming solutions, an optimal solution to the problem consists of optimal solutions to subproblems.

This is called .



Copyright © 1998 The University of Texas at Arlington