Introduction to Bin Packing Algorithms
- Bin packing algorithms organise objects into as few containers as possible
- The containers are called bins
- In problems all bins will be of equal size
- Size may refer to length, width, capacity (volume), weight, etc
- In problems all bins will be of equal size
- 'Packing' is a loose term that could mean 'separating', 'cutting' or similar
- Examples of bin packing problems include
- loading pallets (objects) of varying weights into lorries (bins) without exceeding their weight capacity
- with the aim of minimising the number of lorries required
- cutting short strips of cable (objects) from large reels of cable (bins)
- with the aim of minimising wastage at the end of a reel
- loading pallets (objects) of varying weights into lorries (bins) without exceeding their weight capacity
- There are two bin packing algorithms covered
- the first-fit bin packing algorithm
- the first-fit decreasing bin packing algorithm
- Both are heuristic algorithms - they will provide a (good) solution
- but not necessarily an optimal solution
- and not necessarily the only solution
- The full-bin algorithm is also covered
How do I find the lower bound for the number of bins?
- The lower bound (LB) for the number of bins required in the first-fit bin packing problem is the smallest integer that satisfies
- As it is a number of bins, the lower bound will be an integer
- even if the calculation gave the value 3.01, say, more than 3 bins would be required, and so the lower bound will be 4
- i.e. always round up (unless the value happens to be an exact integer)
- Note that this is exactly the same for all bin-packing algorithms