Added theorem and proof for optimal substructure and overlapping subproblems.