Dynamic programming example: subset sum [00R9]

As a slightly more involved example of dynamic programming, consider the following problem.

Context

Dynamic Programming [00QG]