arXiv:2611.09611cs.DSNov 2026

Manuscript Offprint

arXiv:2611.09611

Online Timely Bin Packing Revisited: A Simpler Algorithm with Optimality in Special Cases

Pei-Lin Chiang, Wing-Kai Hon, Ying-Chia Huang, Li-Tzu Yang

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

Online TIMELY BIN PACKING is a variant of classical online bin packing in which items arrive over time with sizes and deadlines. Packing an item may be deferred until its deadline, but once a collection of items is packed into a bin, the bin is closed and cannot be used again. The objective is to minimize the total number of bins used. The problem was introduced by Khattar in 2023. In 2025, Aminian proposed Discrete-Greedy, a deterministic online algorithm with a competitive ratio of exactly 2, which remains the best-known upper bound. Its analysis is particularly simple; however, the algorithm requires maintaining a fractional simulation internally and may leave usable space in some bins unfilled.

We propose Thrifty-Greedy, a simple deterministic online algorithm that does not require a fractional simulation. We prove that its competitive ratio is exactly 2, matching the best-known upper bound. At the same time, the algorithm automatically achieves the optimal competitive ratio on two natural classes of inputs: it is 1-competitive when all items have the same size, and 1.5-competitive when every item has size in {1/3,2/3}\{1/3, 2/3\}. In contrast, Discrete-Greedy has a competitive ratio of at least 2 on both classes.

1 Introduction

In classical online BIN PACKING, items arrive one by one, with each item pip_i having a size si∈(0,1]s_i \in (0,1]. Upon arrival, each item must be assigned immediately and irrevocably to a unit-capacity bin, and the objective is to minimize the total number of bins used. Note that the model has no explicit notion of time beyond the order of arrivals.

A classical way to introduce explicit time constraints is DYNAMIC BIN PACKING, introduced by Coffman et al. in 1983 [3]. In this model, each item has an arrival time and a departure time. An arriving item must be assigned immediately to a bin; when the item later departs, the space it occupied becomes available again, while the bin itself remains in the system. This models persistent resources whose capacity can be reused over time, such as cloud servers that remain available while jobs arrive and depart.

In this paper, we study another way to introduce time constraints: online TIMELY BIN PACKING. This problem is introduced by Khattar in 2023 [4]. Here, an arriving item has a deadline, and the algorithm may defer packing it until any time no later than that deadline. When several items are packed together, the entire bin is closed at that time and cannot be used again. Thus, unlike in DYNAMIC BIN PACKING, items do not depart individually and leave reusable space; instead, the bin itself leaves the system.

A motivating example comes from logistics. Items arrive at a warehouse over time and may be stored temporarily before dispatch. Each item has a deadline by which it must be loaded onto a truck or container, and each truck has a fixed capacity. Several items can be dispatched

*Department of Computer Science, National Tsing Hua University, Taiwan. ivylingchiang@gmail.com †Department of Computer Science, National Tsing Hua University, Taiwan. wkhon@cs.nthu.edu.tw ‡Department of Computer Science, National Tsing Hua University, Taiwan. ereal3478@gmail.com §Department of Computer Science, National Tsing Hua University, Taiwan. breton0429@gmail.com together only if they all fit in the truck and are present at the warehouse when the truck departs. Because trucks are costly, the objective is to minimize the number of dispatched trucks. For simplicity, the model assumes that pending items can be stored at the warehouse without limit and at no cost; only the number of dispatched trucks is counted.

Let us now formally define online TIMELY BIN PACKING.