What information do you need to make a decision about item ? You need to know which items you've already considered and how much capacity remains. Define as the maximum value using items to with capacity . Here ranges from to , and ranges from to .
This gives you states. Each state ( specific combination of and ) represents a smaller problem to solve: "What's the best I can do with these items and this capacity?"