0

There are N buckets B1, B2, B3 , ..., BN having their respective capacity C1, C2, C3, ..., CN

There are 2 colored balls of different sizes : Red & Blue balls

The buckets are filled with various different balls -> Some buckets can have mix of both balls, some of only one color. The buckets may be un-even filled to their capacity (Some filled upto 10% of their capacity, but others may be filled to 90% of their capacity as an example)

The task is to evenly fill the buckets with different color balls. ie. ratio of (total size occupied by red ball / total capacity of the bucket) is as even as possible across buckets. Similarly for blue colored ball.

asked Feb 21, 2024 at 19:26
2
  • @CarySwoveland : Fair point. I edited the question. Does that help clarify? Commented Feb 23, 2024 at 18:53
  • You say, "The task is to evenly fill the buckets with different color balls.", but the buckets are already filled. Do you mean to move balls from one bucket to another? If so, it would seem that you could simply count the total numbers of red and blue balls in all buckets, compute, say the percentage of red balls and then move balls one bin to the other until they all have that ratio of red balls, +- one red ball. That doesn't seem much different than all balls being in a bin and moving balls from the bin to buckets. Either way, that seems to easy, so it's probably not what you want to do. Commented Feb 23, 2024 at 19:57

0

Know someone who can answer? Share a link to this question via email, Twitter, or Facebook.

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.