Average-Case Analysis of the Smart Next Fit Algorithm

In this paper, we present the Smart Next Fit algorithm for on-line bin packing, which is obtained by slightly modifying the Next Fit algorithm. For any list of items, this algorithm uses the smallest number of bins among all on-line algorithms that have only one active bin at any time. We analyze its average-case performance when the item sizes are uniformly distributed over [0,b],b ⩽ 1. For b⩽12, the Smart Next Fit algorithm behaves exactly like the Next Fit algorithm. For 12 <b ⩽ 1, its average-case performance is significantly better than that of Next Fit. For b = 1, its average-case performance rate is 1.2274113…, compared to 1.333… for Next Fit. Its average-case performance is better than that of any known constant-space algorithm.