Re: A Math Problem (NP Complete?)
It is trivial to solve this problem by simply "checking" every allowable food subset (i.e. every set which contains exactly one item from each group), and choose the subset which provides the highest number of calories which satisfies the constraint.
Or are you looking for a solution more efficient than that? You aren't clear in your post.
|