Forgot to describe optimal substructure, this has been added.