Bin Packing Problem Variation with Restricted Bins & Items

  • Thread starter Mentallic
  • Start date
  • Tags
    Bin
In summary, the problem described involves sorting a list of items with the goal of distributing them evenly among a limited number of bins. Each bin can hold a specific number of items and the number of bins is slightly greater than the number of items in the list divided by the maximum number of items per bin. The goal is to have each bin contain a similar sum of values from the items. The problem is similar to multi-way number partitioning, as described by Richard E. Korf.
  • #1
Mentallic
Homework Helper
3,802
95
I have a problem whereby I'm given an item list of size n with the value of each item being greater than zero, and need to sort them among a restricted amount of bins as evenly as possible. Additionally, each bin can hold at most k items and the number of bins is slightly greater than n/k (Giving some wiggle room to have k-1 items in some bins but k items in most).

Does this sort of problem have a name?
 
Mathematics news on Phys.org
  • #2
http://www.seas.upenn.edu/~cit596/notes/dave/p-and-np4.html
 
  • #3
Hi guys, no solution from me, just asking for clarification: in Buzz's reference the value of the items plays a role (the integer values in each bin have to add up to the same number). It looks as if that isn't a requirement in the post #1 case. So I thought I'd just ask: would it be Ok if I would just sort the list and place the first n/k from the sorted list in bin #1, the next n/k in bin #2 etc. ?

Probably not, because that would allow items with the same value to end up in adjacent bins -- but I can't find that restriction in the description.
On the other hand: what if the list has more than k entries for items with a particular value? Would a solution have to include assigning multiple bins to the same value in such a case ? (this time I suppose a "yes"...)

The described sort of problem reminds me of the list of addresses in the back of my appointment book: there are 10 tabs for 26 first letters. Some pages are too full, others almost empty.

With an initial sort of time complexity ##O(n \log n)## and some algorithm to assign value ranges to bins I don't suppose the problem described in post #1 is necessarily ##O(2^n)## , then.
 
  • #4
Buzz Bloom said:
http://www.seas.upenn.edu/~cit596/notes/dave/p-and-np4.html

Thanks, I'll look more into integer bin packing. At the moment, my problem is going to have a value of n in the hundreds so O(2n) is just too unreasonable, but I'm confident there exists a more efficient algorithm that provides an approximate solution.

BvU said:
Hi guys, no solution from me, just asking for clarification: in Buzz's reference the value of the items plays a role (the integer values in each bin have to add up to the same number). It looks as if that isn't a requirement in the post #1 case. So I thought I'd just ask: would it be Ok if I would just sort the list and place the first n/k from the sorted list in bin #1, the next n/k in bin #2 etc. ?
Well, if you sort the items and place the same amount of them into each bin sequentially, you'll definitely not have a similar sum in each bin. You'll actually end up with the worst possible solution!

example, given the list, (10,5,1,2,9,5) and 2 bins, if you sort the list you'll get (1,2,5,5,9,10) and placing the first 3 into bin 1 gives 1+2+5=8 while bin 2 has 5+9+10=24. These values are the furthest from being equal to the optimal average in each bin of (1+2+5+5+9+10)/2 = 16.
Finding the optimal solution for this list can be easily done by hand since you know what the optimal solution should be, and the list is small with nice numbers that can be chosen to sum to 16.

BvU said:
Probably not, because that would allow items with the same value to end up in adjacent bins -- but I can't find that restriction in the description.
On the other hand: what if the list has more than k entries for items with a particular value? Would a solution have to include assigning multiple bins to the same value in such a case ? (this time I suppose a "yes"...)
In my problem, there's no issue with having many equal values. In fact, the more equal that the entire list is, the easier the problem becomes because you can choose any k values and end up with approximately the average (optimal) solution.

BvU said:
The described sort of problem reminds me of the list of addresses in the back of my appointment book: there are 10 tabs for 26 first letters. Some pages are too full, others almost empty.
Yes, it's very similar to that too!
 
  • #5
Mentallic said:
Well, if you sort the items and place the same amount of them into each bin sequentially, you'll definitely not have a similar sum in each bin. You'll actually end up with the worst possible solution!
That is what I missed in the problem statement: apparently you want similar sums in each bin when you say "evenly" ?
 
  • #6
BvU said:
That is what I missed in the problem statement: apparently you want similar sums in each bin when you say "evenly" ?
Yes.
 
  • Like
Likes BvU
  • #7
  • Like
Likes BvU

Related to Bin Packing Problem Variation with Restricted Bins & Items

1. What is the Bin Packing Problem Variation with Restricted Bins & Items?

The Bin Packing Problem Variation with Restricted Bins & Items is a mathematical optimization problem in which a set of items with different sizes and values must be packed into a set of bins with limited capacity, while minimizing the number of bins used and maximizing the value of the packed items.

2. What makes this problem different from the original Bin Packing Problem?

The original Bin Packing Problem assumes that items can be split into smaller pieces to fit into bins, while this variation restricts that option. Additionally, this variation also has limitations on the number of bins and items that can be used, making it a more complex and challenging problem to solve.

3. What real-world applications does the Bin Packing Problem Variation have?

The Bin Packing Problem Variation has many practical applications, such as optimizing space in shipping containers, maximizing efficiency in warehouse storage, and minimizing waste in production processes.

4. How is the Bin Packing Problem Variation solved?

There are various approaches to solving the Bin Packing Problem Variation, including heuristics, approximation algorithms, and exact algorithms. These methods use mathematical techniques and algorithms to find the optimal solution or a near-optimal solution in a reasonable amount of time.

5. What are the main challenges in solving the Bin Packing Problem Variation?

The main challenges in solving the Bin Packing Problem Variation include finding an efficient algorithm to handle the restrictions on bins and items, dealing with the high computational complexity of the problem, and balancing between minimizing the number of bins used and maximizing the value of the packed items.

Similar threads

  • Programming and Computer Science
Replies
5
Views
878
  • Set Theory, Logic, Probability, Statistics
2
Replies
37
Views
4K
  • Programming and Computer Science
Replies
3
Views
705
  • Set Theory, Logic, Probability, Statistics
Replies
18
Views
3K
  • General Math
Replies
1
Views
2K
Replies
4
Views
4K
  • Programming and Computer Science
Replies
5
Views
2K
  • General Math
Replies
2
Views
978
Replies
6
Views
1K
  • General Math
Replies
21
Views
3K
Back
Top