10-26-2007, 01:57 PM
How can I do this in QM?
Given a sequence of positive integers, and another integer (goal)
find a subset of the items such that their sum is less or equal to
the goal, but as large as possible.
-- Possible uses:
-- Fill CD's, DVD's, diskettes to the brim.
-- Combine cheques to pay exact amount.
-- Equitably divide goods (for example between heirs).
-- Etc.
Given a sequence of positive integers, and another integer (goal)
find a subset of the items such that their sum is less or equal to
the goal, but as large as possible.
-- Possible uses:
-- Fill CD's, DVD's, diskettes to the brim.
-- Combine cheques to pay exact amount.
-- Equitably divide goods (for example between heirs).
-- Etc.