arXiv:2610.30430cs.DSOct 2026

Manuscript Offprint

arXiv:2610.30430

Tight Bounds for Paging with Time Windows and Joint Replenishment with Varying Opening Costs

Joseph Seffi Naor, Tomer Tsachor

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

Abstract

We study the paging with time windows problem, a natural generalization of classical paging, in which each request must be served within a specified time interval. This model allows the algorithm to delay service and batch service requests over time, but also introduces significant challenges due to overlapping requests. While the problem is well understood in the unweighted setting, where optimal O(log⁡k)O(\log k)-competitive algorithms are known, the weighted case remains more elusive. The best previously known algorithm, due to Gupta, Kumar, and Panigrahi [20], achieves an O(log⁡klog⁡n)O(\log k \log n)-competitive ratio, leaving a gap between weighted and unweighted settings.

We obtain an O(log⁡k)O(\log k)-competitive algorithm for weighted paging with time windows, matching the optimal competitive ratio. The core of our approach is a structural decomposition that separates the evolution of the cache from the scheduling of page loads. We show that, given a sequence of cache configurations, computing a near-optimal sequence of page loads reduces to a variant of the Joint Replenishment Problem with deadlines (JRP-D) with time-dependent opening costs. We design a constant-competitive online algorithm for this variant and prove that the reduction is tight. Combining this with an existing online construction of cache configurations yields the desired bound.

∗^{*}Supported in part by ISF grant 3001/24 and United States–Israel BSF grant 2022418.

1 Introduction

In the classical weighted paging problem there is a universe of n pages, where each page p has a weight wpw_{p}, and there is a cache that can hold up to k pages. At each time step, a page is requested, and if the requested page is already in the cache then no cost is incurred, otherwise, the page must be loaded into the cache, incurring a cost equal to its weight. The goal is to minimize the total cost incurred. In the unweighted version of the problem, all weights are equal (unit weights).

Paging is one of the earliest and most extensively studied problems in online computation and competitive analysis [26, 18, 27, 29, 25, 6, 5, 1, 2, 10, 9, 21, 22, 23], including works on non-standard caching models, e.g., elastic caches [19], caching with time windows [20], caching with dynamic weights [16], and caching with machine learning predictions [24]. In fact, online paging has become a focal point for many of the recent developments in competitive analysis, e.g., the online primal-dual method, projections, and mirror descent [14, 12, 11].

In their seminal paper, Sleator and Tarjan [26] showed that any deterministic online algorithm is at least k-competitive and that the LRU policy (Least Recently Used) is exactly k-competitive for unweighted paging. The k-competitive bound was later generalized to weighted paging as well [15, 28]. When randomization is allowed, Fiat et al. [18] gave the elegant randomized marking algorithm for unweighted paging, which is Θ(log⁡k)\Theta(\log k)-competitive against an oblivious adversary. Bansal et al. [6] gave a Θ(log⁡k)\Theta(\log k)-competitive randomized algorithm for weighted paging based on the online primal-dual framework [14].

We now elaborate on the two problems on which we focus in the paper.

Paging with time windows. A natural and well-studied generalization is paging with time windows, where each request must be served within a specified interval. Formally, a request rr is represented by a triple r=(p(r),s(r),e(r))r = (p(r), s(r), e(r)), where p(r)∈Pp(r) \in P is the requested page, s(r)s(r) is the release time, and e(r)≥s(r)e(r) \geq s(r) is the deadline for serving it. A request rr is satisfied if page p(r)p(r) is present in the cache at some time during the interval [s(r),e(r)][s(r), e(r)].

This model significantly increases the flexibility of any paging algorithm, allowing it to delay service, while batching together the service of several requests with overlapping time windows. At the same time, it introduces new challenges, as requests may overlap and interact in complex ways.

In the unweighted setting, Azar et al. [4] showed that paging with time windows admits an O(k)O(k)-competitive deterministic algorithm and an O(log⁡k)O(\log k)-competitive randomized algorithm. The latter matches the optimal randomized guarantee for classical paging up to constant factors. At a high level, the randomized algorithm delays loading a page until the deadline of one of its pending requests, thereby batching together overlapping requests for the same page.

However, in the weighted setting, the authors of [4] showed that this structural approach no longer holds, although the Ω(k)\Omega(k) lower bound for deterministic algorithms continues to hold. Gupta et al. [20] subsequently introduced a novel LP formulation based on sophisticated covering constraints. They showed that paging with time windows is NP-hard and APX-hard even when k = 1 and all pages have unit weight. Nevertheless, their LP has a constant integrality gap, yielding an O(1)O(1)-approximation algorithm for the problem. In the online setting, they obtained an O(log⁡nlog⁡k)O(\log n \log k)-competitive algorithm for weighted paging with time windows, which remains the best known bound to date.

Gupta et al. [20] also considered the more general problem of paging with delays. Here, each request rr is represented by a triple r=(p(r),s(r),Fr)r = (p(r), s(r), F_r), where p(r)p(r) is the requested page, s(r)s(r) is the release time, and Fr:{s(r),s(r)+1,…}→R≥0F_r : \{s(r), s(r) + 1, \ldots\} \to \mathbb{R}_{\geq 0} is a non-decreasing delay-loss function associated with rr. If request rr is served at time t≥s(r)t \geq s(r), the algorithm incurs delay cost Fr(t)F_r(t). The objective is to minimize the total weight of the loaded pages plus the total delay costs incurred by all requests.

Figure

Figure 1: A depth-2 tree view of JRP. The root represents the warehouse, with opening cost 12, and each leaf represents an item together with its item cost. An order corresponds to selecting the root together with any subset of the leaves. For example, serving items {2,4}\{2, 4\} incurs total cost 12+6+1=1912 + 6 + 1 = 19, while serving only item 4 costs 12+1=1312 + 1 = 13.

This formulation strictly generalizes paging with time windows: a request with deadline d and release time s corresponds to the delay function that is 0 throughout the interval [s,d][s, d] and ∞\infty afterwards. Gupta et al. [20] showed how to extend their algorithmic framework from paging with time windows to paging with delays, while preserving the same asymptotic competitive guarantees.

We focus primarily on the time-window formulation in the paper in order to present the main ideas more cleanly, though our techniques naturally extend to the more general setting of paging with delays.

Joint Replenishment Problem. A well-studied problem that turns out to be closely related to paging with time windows is the Joint Replenishment Problem with deadlines (JRP-D). The problem can be viewed as a depth-2 tree (see Figure 1), consisting of a warehouse at the root and a single leaf for each item, with a bijection between items and leaves. Requests for items arrive over time and an item can be requested multiple times. At any time t, an order can be placed by opening the warehouse and selecting a subset of the leaves with pending requests for items. A request for an item is served at time t if its corresponding leaf is included in the order. Opening the warehouse incurs a fixed cost, while serving requests for item i incurs an additional item-specific cost wiw_i.

Requests for items must be served within prescribed time intervals. Equivalently, serving a request after its deadline incurs infinite cost. An algorithm may place an order at any time and use it to serve multiple pending requests simultaneously. Thus, the main trade-off is between serving requests immediately vs. delaying service to batch multiple requests together. While the opening cost may be smaller than the item costs in general, the most interesting regime is when the opening cost is large, making it advantageous to postpone service and aggregate requests belonging to different items into a single order. For this problem, Bienkowski et al. [8] gave a 2-competitive online algorithm, matching the optimal competitive ratio.

JRP-D is a special case of the more general Joint Replenishment Problem (JRP), in which requests incur arbitrary delay costs while awaiting service, rather than hard deadlines. JRP and its variants have been extensively studied in both offline [3, 7] and online settings. In particular, Buchbinder et al. [13] showed that JRP admits a 3-competitive online algorithm.

In this work, we study a variant of JRP-D with time-dependent warehouse opening costs. Unlike the classical setting, the algorithm must account not only for the possibility of batching requests, but also for changes in the cost of placing an order. Although time-dependent opening costs have previously been investigated experimentally [17], we examine this setting from the perspective of online competitive analysis. As we show, paging with time windows admits a natural reduction to this JRP-D variant.

Throughout the paper, when discussing randomized algorithms, all costs and competitive guarantees are in expectation, unless stated otherwise.

References (26)