Introduction
The online knapsack problem is a fundamental challenge in combinatorial optimization with significant applications in real-time resource allocation, such as cloud task scheduling and cargo loading. In this setting, items arrive sequentially, and an algorithm must immediately decide whether to accept or reject each item without knowledge of future arrivals. While the worst-case adversarial model yields poor performance guarantees, the Random Order Model (ROM)—where items arrive in a uniform random permutation—allows for more practical and efficient algorithms.
This paper introduces a novel "sequential approach" that significantly improves the competitive ratios for both the online knapsack problem and the Generalized Assignment Problem (GAP), establishing new state-of-the-art benchmarks.
The Sequential Approach
Traditional algorithms for online knapsack often rely on a "parallel" strategy, where a random choice is made at the start to focus either on large items or small items. This paper departs from that paradigm by proposing a three-phase sequential timeline:
- Sampling Phase ($0$ to $cn$): The algorithm observes the first fraction of items to estimate the overall quality and distribution of the input without making any selections.
- Large Item Phase ($cn$ to $dn$): The algorithm targets "large" items—those requiring more than one-third of the total capacity. This phase leverages insights from the 2-secretary problem, aiming to select the two most profitable items that can fit within the remaining capacity.
- Small Item Phase ($dn$ to $n$): The algorithm shifts focus to "small" items. It computes a greedy fractional solution based on all previously observed items and employs randomized rounding to decide whether to pack the current arrival.
By optimizing the time thresholds $c$ and $d$, the authors ensure that the sampling phase for the small-item algorithm serves as the decision phase for the large-item algorithm, maximizing the utility of the arrival sequence.
Key Insights: Secretary Problems and Capacity Management
A critical innovation is the reduction of the large-item knapsack problem to a variation of the $k$-secretary problem. Since at most two items of size $> 1/3$ can fit in a knapsack, the problem becomes selecting the best two candidates from a random sequence. The authors adapted the single-ref algorithm from secretary theory to fit these specific constraints.
Furthermore, the paper addresses a major technical hurdle: ensuring that packing large items in the second phase does not deplete the capacity needed for the small-item phase. The authors provide a rigorous proof that, with high probability, the large-item algorithm either secures high-value items or leaves sufficient capacity for the subsequent phase to succeed.
Results and Performance
The sequential approach yields a substantial improvement over previous theoretical bounds:
- Online Knapsack: The competitive ratio is improved to 1/6.65 ($\approx 0.150$), surpassing the previous best of 1/8.06.
- Online GAP: The competitive ratio is improved to 1/6.99 ($\approx 0.143$), also beating the 1/8.06 benchmark.
- 2-Knapsack Problem: As a secondary result, the authors developed a deterministic (1/3.08)-competitive algorithm for cases where all items are large.
Conclusion
By strategically partitioning the arrival sequence and integrating secretary-problem techniques with randomized rounding, this work provides a more robust framework for online resource allocation. While a gap remains between these results and the offline optimum, the sequential approach offers a clear path forward for designing more efficient online algorithms in random-order environments. Future research may explore more granular item classifications or adaptive thresholds to further narrow this gap.
Summary updated