Refined first-fit bin packing
Refined-First-Fit (RFF) is an online algorithm for bin packing. Its input is a list of items of different sizes. Its output is a packing - a partition of the items into bins of fixed capacity, such that the sum of sizes of items in each bin is at most the capacity. Ideally, we would like to use as few bins as possible, but minimizing the number of bins is an NP-hard problem. The RFF algorithm uses a sophisticated heuristic that improves on the previously-developed first-fit bin packing algorithm. This algorithm was presented by Andrew Chi-Chih Yao.[1]
The algorithm
The items are categorized into four classes, according to their sizes:
- -piece - size in .
- -piece - size in .
- -piece - size in .
- -piece - size in .
Similarly, the bins are categorized into four classes: 1, 2, 3 and 4.
Let be a fixed integer. The next item is assigned into a bin in -
- Class 1, if is an -piece,
- Class 2, if is an -piece,
- Class 3, if is an -piece, but not the th -piece seen so far, for any integer .
- Class 1, if is the th -piece seen so far,
- Class 4, if is an -piece.
Once the class of the item is selected, it is placed inside items of that class using first-fit bin packing.
Note that RFF is not an Any-Fit algorithm since it may open a new bin despite the fact that the current item fits inside an open bin (from another class).
Approximation ratio
RFF has an approximation guarantee of . There exists a family of lists with for .[1]
References
- ↑ 1.0 1.1 Yao, Andrew Chi-Chih (April 1980). "New Algorithms for Bin Packing". Journal of the ACM. 27 (2): 207–227. doi:10.1145/322186.322187. Unknown parameter
|s2cid=ignored (help)
This article "Refined first-fit bin packing" is from Wikipedia. The list of its authors can be seen in its historical and/or the page Edithistory:Refined first-fit bin packing. Articles copied from Draft Namespace on Wikipedia could be seen on the Draft Namespace of Wikipedia and not main one.
