Not sure what the issue is. Just limit the dynamic method to n items in the proposed solution. If it's over n, you reject it as a failed solution.
Momerath
Nearly a Senior Poster
3,384 posts since Aug 2010
Reputation Points: 1,232
Solved Threads: 558
Still not getting the problem. Set up your dynamic solver. Have it run. If it ever gets to a solution that has more than n parts, reject that as a solution. If it ever gets to a point where there are no more choices and it is less than n, reject that as a solution.
You could just generate all the combinations for this as there are only 1680 to check, and it would be faster than doing a dynamic solution.
Momerath
Nearly a Senior Poster
3,384 posts since Aug 2010
Reputation Points: 1,232
Solved Threads: 558