Algorithm for finding out the cheapst combination
-
22-07-2019 - |
Question
I have a few sets which are like
SET A(1,2,3,11,10) - $30
SET B(2,5,8) - $20
SET C(6) -$25
SET D(6,8) -$30
SET E(7,5) -$20
SET F(5,6,7,8,9,10) -$60
.
.
.
and so on... All are random, Now consider sets D,E and F I want to buy the cheapest combination for a set, SET Q(7,8,6,5) the answer should be SET D + SET E, not the SET F
Please link... thanks
Solution
This problem is called Weighted Set Covering.
You'll get lots of results searching for that term on Google.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow