Have a personal or library account? Click to login
Algorithm NextFit for the Bin Packing Problem Cover

Algorithm NextFit for the Bin Packing Problem

Open Access
|Dec 2021

Abstract

Summary. The bin packing problem is a fundamental and important optimization problem in theoretical computer science [4], [6]. An instance is a sequence of items, each being of positive size at most one. The task is to place all the items into bins so that the total size of items in each bin is at most one and the number of bins that contain at least one item is minimum.

Approximation algorithms have been intensively studied. Algorithm NextFit would be the simplest one. The algorithm repeatedly does the following: If the first unprocessed item in the sequence can be placed, in terms of size, additionally to the bin into which the algorithm has placed an item the last time, place the item into that bin; otherwise place the item into an empty bin. Johnson [5] proved that the number of the resulting bins by algorithm NextFit is less than twice the number of the fewest bins that are needed to contain all items.

In this article, we formalize in Mizar [1], [2] the bin packing problem as follows: An instance is a sequence of positive real numbers that are each at most one. The task is to find a function that maps the indices of the sequence to positive integers such that the sum of the subsequence for each of the inverse images is at most one and the size of the image is minimum. We then formalize algorithm NextFit, its feasibility, its approximation guarantee, and the tightness of the approximation guarantee.

DOI: https://doi.org/10.2478/forma-2021-0014 | Journal eISSN: 1898-9934 | Journal ISSN: 1426-2630
Language: English
Page range: 141 - 151
Accepted on: Jun 30, 2021
|
Published on: Dec 30, 2021
In partnership with: Paradigm Publishing Services
Publication frequency: 1 issue per year
Keywords:

© 2021 Hiroshi Fujiwara, Ryota Adachi, Hiroaki Yamamoto, published by University of Białystok
This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 License.