DIRECTIONS
20 / 10 / 7 / 4 / 3 / 1 \ 2
e > \ / \ 3/ \4 / \ / > s ----> a ----> b ----> c ----> t \ 4 2 > 5 8 \ / \ / 3\ /2 \ / > / f
We formulate this as follows. We have n types of items, with an infinite supply of items of each type. Each item of the ith type has size s[i]. We wish to determine if there a subset of the items whose sizes sum to exactly K. (There can be an arbitrary number of items of any type in this subset.)