At 10:09 2014-06-13, Malcolm Greene <[email protected]> wrote:
Looking for an algorthim for the following use case (highly
simplified):
1. I have <N> buckets (probably 3-5)
2. I have 1 million records with a quantity field containing values in
the range 1 to 1000
I would like to optimally shuffle my 1 million records across my <N>
buckets so that the total quantity (based on the sum of each record's
quantity field) in each bucket is balanced (as much as possible) across
buckets.
This sounds like the type of problem that has been solved before and
given a fancy algorithm name.
Does this ring a bell with anyone?
It is the bin packing problem:
https://en.wikipedia.org/wiki/Bin_packing_problem
No, it has not been solved as it is NP-Hard, but there are approximations.
Sincerely,
Gene Wirchenko
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/
** All postings, unless explicitly stated otherwise, are the opinions of the
author, and do not constitute legal or medical advice. This statement is added
to the messages for those lawyers who are too stupid to see the obvious.