Dynamic programming

This is a stub.