Abstract 1 Introduction 2 Preliminaries 3 Algorithm Full-Or-Partial-Move 4 Analysis of Full-Or-Partial-Move 5 Final Remarks References

A 3.3904-Competitive Online Algorithm for List Update with Uniform Costs

Mateusz Basiak ORCID University of Wrocław, Poland Marcin Bienkowski ORCID University of Wrocław, Poland Martin Böhm ORCID University of Wrocław, Poland Marek Chrobak ORCID University of California, Riverside, CA, USA Łukasz Jeż ORCID University of Wrocław, Poland Jiří Sgall ORCID Charles University, Prague, Czech Republic Agnieszka Tatarczuk ORCID University of Wrocław, Poland
Abstract

We consider the List Update problem where the cost of each swap is assumed to be 1. This is in contrast to the “standard” model, in which an algorithm is allowed to swap the requested item with previous items for free. We construct an online algorithm Full-Or-Partial-Move (Fpm), whose competitive ratio is at most 3.3904, improving over the previous best known bound of 4.

Keywords and phrases:
List update, work functions, amortized analysis, online algorithms, competitive analysis
Copyright and License:
[Uncaptioned image] © Mateusz Basiak, Marcin Bienkowski, Martin Böhm, Marek Chrobak, Łukasz Jeż, Jiří Sgall, and Agnieszka Tatarczuk; licensed under Creative Commons License CC-BY 4.0
2012 ACM Subject Classification:
Theory of computation Online algorithms
Related Version:
Full Version: https://arxiv.org/abs/2503.17264 [14]
Funding:
Suppported by Polish National Science Centre grants 2022/45/B/ST6/00559,
2020/39/B/ST6/01679 and 2022/47/D/ST6/02864, National Science Foundation grant CCF-2153723, and by grant 24-10306S of GA ČR.
Editors:
Anne Benoit, Haim Kaplan, Sebastian Wild, and Grzegorz Herman

1 Introduction

The List Update problem.

In the online List Update problem [3, 20, 21], the objective is to maintain a set of items stored in a linear list in response to a sequence of access requests. The cost of accessing a requested item is equal to its distance from the front of the list. After each request, an algorithm is allowed to rearrange the list by performing an arbitrary number of swaps of adjacent items. In the model introduced by Sleator and Tarjan in their seminal 1985 paper on competitive analysis [25], an algorithm can repeatedly swap the requested item with its preceding item at no cost. These swaps are called free. All other swaps are called paid and have cost 1 each. As in other problems involving self-organizing data structures [7], the goal is to construct an online algorithm, i.e., operating without the knowledge of future requests. The cost of such an algorithm is compared to the cost of the optimal offline algorithm; the ratio of the two costs is called the competitive ratio and is subject to minimization.

Sleator and Tarjan proved that the algorithm Move-To-Front (Mtf), which after each request moves the requested item to the front of the list, is 2-competitive [25]. This ratio is known to be optimal if the number of items is unbounded. Their work was the culmination of previous extensive studies of list updating, including experimental results, probabilistic approaches, and earlier attempts at amortized analysis (see [15] and the references therein).

As shown in subsequent work, Mtf is not unique – there are other strategies that achieve ratio 2, such as TimeStamp [2] or algorithms based on work functions [9]. In fact, there are infinitely many algorithms that achieve ratio 2 [13, 21].

The uniform cost model.

Following [24], we will refer to the cost model of [25] as standard, and we will denote it here by LUPS. This model has been questioned in the literature for not accurately reflecting true costs in some implementations [24, 23, 22, 18], with the concept of free swaps being one of the main concerns.

A natural approach to address this concern, considered in some later studies (see, e.g., [24, 7, 21, 4, 12]), is simply to charge cost 1 for any swap. We will call it here the uniform cost model and denote it LUP1. A general lower bound of 3 on the competitive ratio of deterministic algorithms for LUP1 was given by Reingold et al.  [24]. Changing the cost of free swaps from 0 to 1 at most doubles the cost of any algorithm, so Mtf is no worse than 4-competitive for LUP1. Surprisingly, no algorithm is known to beat Mtf, i.e., achieve ratio lower than 4.111The authors of [21] claimed an upper bound of 3 for LUP1, but later discovered that their proof was not correct (personal communication with S. Kamali)..

Our main result.

To address this open problem, we develop an online algorithm Full-Or-Partial-Move (Fpm) for LUP1 with competitive ratio 18(23+17)3.3904, significantly improving the previous upper bound of 4.

Our algorithm Fpm remains 3.3904-competitive even for the partial cost function, where the cost of accessing location is 1, instead of the full cost of used in the original definition of List Update [25]. Both functions have been used in the literature, depending on context and convenience. For any online algorithm, its partial-cost competitive ratio is at least as large as its full-cost ratio, although the difference typically vanishes when the list size is unbounded. We present our analysis in terms of partial costs.

Fpm remains 3.3904-competitive also in the dynamic scenario of List Update that allows operations of insertions and deletions, as in the original definition in [25] (see the full version of the paper [14]).

Technical challenges and new ideas.

The question whether ratio 3 can be achieved remains open. We also do not know if there is a simple algorithm with ratio below 4. We have considered some natural adaptions of Mtf and other algorithms that are 2-competitive for LUPS, but for all we were able to show lower bounds higher than 3 for LUP1.

As earlier mentioned, Mtf is 4-competitive for LUP1. It is also easy to show that its ratio is not better than 4: repeatedly request the last item in the list. Ignoring additive constants, the algorithm pays twice the length of the list at each step, while any algorithm that just keeps the list in a fixed order, pays only half the length on the average.

The intuition why Mtf performs poorly is that it moves the requested items to front “too quickly”. For the aforementioned adversarial strategy against Mtf, ratio 3 can be obtained by moving the items to front only every other time they are requested. This algorithm, called Dbit, is a deterministic variant of algorithm Bit from [24] and a special case of algorithm Counter in [24], and it has been also considered in [21]. In the full version of the paper [14], we show that Dbit is not better than 4-competitive in the partial cost model, and not better than 3.302-competitive in the full cost model.

One can generalize these approaches by considering a more general class of algorithms that either leave the requested item at its current location or move it to the front. We show that such a strategy cannot achieve ratio better than 3.25, even for just three items. A naive fix would be, for example, to always move the requested item half-way towards front. This algorithm is even worse: its competitive ratio is at least 6 (both those proofs are in the full version of the paper [14]).

We also show (see Section 5) via a computer-aided argument that, for LUP1, the work function algorithm’s competitive ratio is larger than 3, even for lists of length 5. This is in contrast to the its performance for the standard model, where it achieves optimal ratio 2 [9].

Our algorithm Fpm overcomes the difficulties mentioned above by combining a few new ideas. The first idea is a more sophisticated choice of the target location for the requested item. That is, aside from full moves that move the requested items to the list front, Fpm sometimes performs a partial move to a suitably chosen target location in the list. This location roughly corresponds to the front of the list when this item was requested earlier.

The second idea is to keep track, for each pair of items, of the work function for the two-item subsequence consisting of these items. These work functions are used in two ways. First, they roughly indicate which relative order between the items in each pair is “more likely” in an optimal solution. The algorithm uses this information to decide whether to perform a full move or a partial move. Second, the simple sum of all these pair-based work functions is a lower bound on the optimal cost, which is useful in analyzing the competitive ratio of Fpm.

Related work.

Better bounds are known for randomized algorithms both in the standard model (LUPS) and the uniform cost model (LUP1). For LUPS, a long line of research culminated in a 1.6-competitive algorithm [19, 24, 2, 6], and a 1.5-lower bound [26]. The upper bound of 1.6 is tight in the class of so-called projective algorithms, whose computation is uniquely determined by their behavior on two-item instances [8]. For LUP1, the ratio is known to be between 1.5 [4] and 2.64 [24].

It is possible to generalize the uniform cost function by distinguishing between the cost of 1 for following a link during search and the cost of d1 for a swap [24, 4] This model is sometimes called the Pd model; in this terminology, our LUP1 corresponds to P1. While Mtf is 4-competitive for P1, it does not generalize in an obvious way to d>1. Other known algorithms for the Pd model (randomized and deterministic Counter, RandomReset and TimeStamp) have bounds on competitive ratios that monotonically decrease with growing d [24, 4]. In particular, deterministic Counter achieves ratio 4.56 when d tends to infinity [7] and for the same setting (d) a recent result by Albers and Janke [4] shows a randomized algorithm TimeStamp that is 2.24-competitive.

A variety of List Update variants have been investigated in the literature over the last forty years, including models with lookahead [1], locality of reference [10, 5], parameterized approach [17], algorithms with advice [16], prediction [11], or alternative cost models [18, 22, 23]. A particularly interesting model was proposed recently by Azar et al.  [12], where an online algorithm is allowed to postpone serving some requests, but is either required to serve them by a specified deadline or pay a delay penalty.

In summary, List Update is one of canonical problems in the area of competitive analysis, used to experiment with refined models of competitive analysis or to study the effects of additional features. This underscores the need to fully resolve the remaining open questions regarding its basic variants, including the question whether ratio 3 is attainable for LUP1.

2 Preliminaries

Model.

An algorithm has to maintain a list of items, while a sequence σ of access requests is presented in an online manner. In each step t1, the algorithm is presented an access request σt to an item in the list. If this item is in a location , the algorithm incurs cost 1 to access it. (The locations in the list are indexed 1,2,.) Afterwards, the algorithm may change the list configuration by performing an arbitrary number of swaps of neighboring items, each of cost 1.

For any algorithm A, we denote its cost for processing a sequence σ by A(σ). The optimal algorithm is denoted by Opt.

Notation.

Let 𝒫 be the set of all unordered pairs of items. For a pair {x,y}𝒫, we use the notation xy (xy) to denote that x is before (after) y in the list of an online algorithm. (The relative order of x,y may change over time, but it will be always clear from context what step of the computation we are referring to.) We use xy (xy) to denote that xy (xy) or x=y.

For an input σ and a pair {x,y}𝒫, σxy is the subsequence of σ restricted to requests to items x and y only. Whenever we say that an algorithm serves input σxy, we mean that it has to maintain a list of two items, x and y.

2.1 Work Functions

Work functions on item pairs.

For each prefix σ of the input sequence, an online algorithm may compute a so-called work function Wxy, where Wxy(xy) (or Wxy(yx)) is the optimal cost of the solution that serves σxy and ends with the list in configuration xy (or yx). (Function Wxy also has prefix σ as an argument. Its value will be always uniquely determined from context.) The values of W for each step can be computed iteratively using straightforward dynamic programming. Note that the values of W are non-negative integers and |Wxy(xy)Wxy(yx)|1.

Modes.

For a pair {x,y}𝒫, we define its mode depending on the value of the work function Wxy in the current step and the mutual relation of x and y in the list of an online algorithm. In the following definition we assume that yx.

  • Pair {x,y} is in mode α if Wxy(yx)+1=Wxy(xy).

  • Pair {x,y} is in mode β if Wxy(yx)=Wxy(xy).

  • Pair {x,y} is in mode γ if Wxy(yx)1=Wxy(xy).

For an illustration of work function evolution and associated modes, see Figure 1.

Figure 1: The evolution of the work function Wxy. Initially, Wxy has its minimum in the state yx and yx (in the list of an online algorithm). Thus, the mode of the pair {x,y} is α. Next, because of the two requests to x, the value of Wxy(yx) is incremented, while the value at xy remains intact. The mode is thus changed from α to β and then to γ. Finally, when an algorithm moves item x before y, the mode of the pair {x,y} changes to α. The value of wxy (the average of Wxy(xy) and Wxy(yx)) increases by 12 whenever the mode changes due to a request.

If a pair {x,y} is in mode α, then the minimum of the work function Wxy is at configuration yx, i.e., the one that has y before x. That is, an online algorithm keeps these items in a way that “agrees” with the work function. Note that α is the initial mode of all pairs. Conversely, if a pair {x,y} is in state γ, then the minimum of the work function Wxy is at configuration xy. In this case, an online algorithm keeps these items in a way that “disagrees” with the work function.

2.2 Lower Bound on OPT

Now we show how to use the changes in the work functions of item pairs to provide a useful lower bound on the cost of an optimal algorithm. The following lemma is a standard and straightforward result of the list partitioning technique [9].222There are known input sequences on which the relation of Lemma 1 is not tight [9].

Lemma 1.

For every input sequence σ, it holds that {x,y}𝒫Opt(σxy)Opt(σ).

Averaging work functions.

We define the function wxy as the average value of the work function Wxy, i.e.,

wxy12(Wxy(xy)+Wxy(yx)).

We use wtxy to denote the value of wxy after serving the first t requests of σ, and define Δtwxywtxywt1xy. The growth of wxy can be related to Opt(σ) in the following way.

Lemma 2.

For a sequence σ consisting of T requests, it holds that t=1T{x,y}𝒫ΔtwxyOpt(σ).

Proof.

We first fix a pair {x,y}𝒫. We have w0xy=12 and wTxyOpt(σxy)+12. Hence, t=1TΔtwxy=wTxyw0xyOpt(σxy). The proof follows by summing over all pairs {x,y}𝒫 and invoking Lemma 1.

Pair-based OPT.

Lemma 2 gives us a convenient tool to lower bound Opt(σ). We define the cost of pair-based Opt in step t as {x,y}𝒫Δtwxy. For a given request sequence σ, the sum of these costs over all steps is a lower bound on the actual value of Opt(σ).

On the other hand, we can express Δtwxy (and thus also the pair-based Opt) in terms of the changes of the modes of item pairs. See Figure 1 for an illustration.

Observation 3.

If a pair {x,y} changes its mode due to the request in step t then Δtwxy=12, otherwise Δtwxy=0.

3 Algorithm Full-Or-Partial-Move

For each item x, Fpm keeps track of an item denoted θx and called the target of x. At the beginning, Fpm sets θx=x for all x. Furthermore, at each time, Fpm ensures that θxx.

The rest of this section describes the overall strategy of algorithm Fpm. Our description is top-down, and proceeds in three steps:

  • First we describe, in broad terms, what actions are involved in serving a request, including the choice of a move and the principle behind updating target items.

  • Next, we define the concept of states associated with item pairs and their potentials.

  • Finally, we explain how algorithm Fpm uses these potential values to decide how to adjust the list after serving the request.

This description will fully specify how Fpm works, providing that the potential function on the states is given. Thus, for any choice of the potential function the competitive ratio of Fpm is well-defined. What remains is to choose these potential values to optimize the competitive ratio. This is accomplished by the analysis in Section 4 that follows.

Serving a request.

Whenever an item z is requested, Fpm performs the following three operations, in this order:

1. Target cleanup. If z was a target of another item y (i.e., θy=z for yz), then θy is updated to the successor of z. This happens for all items y with this property.

2. Movement of z. Fpm executes one of the two actions: a partial move or a full move. We will explain how to choose between them later.

  • In the partial move, item z is inserted right before θz. (If θz=z, this means that z does not change its position.)

  • In the full move, item z is moved to the front of the list.

3. Target reset. θz is set to the front item of the list.

It is illustrative to note a few properties and corner cases of the algorithm.

  • Target cleanup is executed only for items following z, and thus the successor of z exists then (i.e., Fpm is well defined).

  • If θz=z and a partial move is executed, then z is not moved, but the items that targeted z now target the successor of z.

  • For an item x, the items that precede θx in the list were requested (each at least once) after the last time x had been requested.

Modes, flavors and states.

Fix a pair {x,y} such that yx, and thus also θyyx. This pair is assigned one of four possible flavors, depending on the position of θx (cf. Figure 2):

  • flavor d (disjoint): if θyyθxx,

  • flavor o (overlapping): if θyθxyx,

  • flavor e (equal): if θy=θxyx,

  • flavor n (nested): if θxθyyx

Figure 2: The flavor of a pair {x,y} (where yx) depends on the position of target θx with respect to items θyyx. In the figure for flavor e, we write θxy for the item θx=θy.

For a pair {x,y} that is in a mode ξ{α,β,γ} and has a flavor ω{d,o,e,n}, we say that the state of {x,y} is ξω. Recall that all pairs are initially in mode α, and note that their initial flavor is d. That is, the initial state of all pairs is αd.

We will sometimes combine the flavors o with e, stating that the pair is in state ξoe if its mode is ξ and its flavor is o or e. Similarly, we will also combine flavors n and e.

Pair potential.

To each pair {x,y} of items, we assign a non-negative pair potential Φxy. We abuse the notation and use ξω not only to denote the pair state, but also the corresponding values of the pair potential. That is, we assign the potential Φxy=ξω if pair {x,y} is in state ξω. We pick the actual values of these potentials only later in Subsection 4.5.

We emphasize that the states of each item pair depend on work functions for this pair that are easily computable in online manner. Thus, Fpm may compute the current values of Φxy, and also compute how their values would change for particular choice of a move.

Choosing the cheaper move.

For a step t, let ΔtFpm be the cost of Fpm in this step, and for a pair {x,y}𝒫, let ΔtΦxy be the change of the potential of pair {x,y} in step t. Let z denote the requested item. Fpm chooses the move (full or partial) with the smaller value of

ΔtFpm+yzΔtΦzy,

breaking ties arbitrarily. Importantly, note that the value that Fpm minimizes involves only pairs including the requested item z and items currently preceding it.

4 Analysis of Full-Or-Partial-Move

In this section, we show that for a suitable choice of pair potentials, Fpm is 3.3904-competitive.

To this end, we first make a few observations concerning how the modes, flavors (and thus states) of item pairs change due to the particular actions of Fpm. These are summarized in Table 1, Table 2, and Table 3, and proved in Subsection 4.2 and Subsection 4.3.

Next, in Subsection 4.4 and Subsection 4.5, we show how these changes influence the amortized cost of Fpm pertaining to particular pairs. We show that for a suitable choice of pair potentials, we can directly compare the amortized cost of Fpm with the cost of Opt.

4.1 Structural Properties

Note that requests to items other than x and y do not affect the mutual relation between x and y. Moreover, to some extent, they preserve the relation between targets θx and θy, as stated in the following lemma.

Lemma 4.

Fix a pair {x,y}𝒫 and assume that θyθx (resp. θy=θx). If Fpm serves a request to an item z different than x and y, then these relations are preserved. The relation θyθx changes into θy=θx only when θy and θx are adjacent and z=θy.

Proof.

By the definition of Fpm, the targets of non-requested items are updated (during the target cleanup) only if they are equal to z. In such a case, they are updated to the successor of z. We consider several cases.

  • If z{θx,θy}, the targets θx and θy are not updated.

  • If z=θy=θx, both targets are updated to the successor of z, and thus they remain equal.

  • If z=θyθx, target θy is updated. If θy and θx were adjacent (θy was an immediate predecessor of θx), they become equal. In either case, θyθx.

  • If θyθx=z, target θx is updated, in which case the relation θyθx is preserved.

4.2 Mode Transitions

Now, we focus on the changes of modes. It is convenient to look first at how they are affected by the request itself (which induces an update of the work function), and subsequently due to the actions of Fpm (when some items are swapped). The changes are summarized in the following observation.

Observation 5.

Let z be the requested item.

  • Fix an item yz. The mode transitions of the pair {z,y} due to request are αα, βα, and γβ. Subsequent movement of z does not further change the mode.

  • Fix an item yz. Due to the request, pair {z,y} changes first its mode due to the request in the following way: αβ, βγ, and γγ. Afterwards, if Fpm moves z before y, the subsequent mode transitions for pair {z,y} are ββ and γα.

4.3 State Transitions

Throughout this section, we fix a step and let z be the requested item.

We analyze the potential changes for both types of movements. We split our considerations into three cases corresponding to three types of item pairs. The first two types involve z as one pair item, where the second item either initially precedes z (cf. Lemma 7) or follows z (cf. Lemma 8). The third type involves pairs that do not contain z at all (cf. Lemma 9).

While we defined 12 possible states (3 modes × 4 flavors), we will show that αn, γd, and γo never occur. This clearly holds at the very beginning as all pairs are then in state αd.

For succinctness, we also combine some of the remaining states, reducing the number of states to the following six: αd, βd, αoe, βo, βne and γne. (For example, a pair is in state αoe if it is in state αo or αe.) In the following we analyze the transitions between them. We start with a simple observation.

Lemma 6.

Fix an item yz. If Fpm performs a full move, then the resulting flavor of the pair {z,y} is d.

Proof.

Item z is moved to the front of the list, and its target θz is reset to this item, i.e., z=θz. After the movement, we have zθy. This relation follows trivially if z is indeed moved. However, it holds also if z was already on the first position: even if θy=z before the move, θy would be updated to the successor of z during the target cleanup. The resulting ordering is thus θz=zθyy, i.e., the flavor of the pair becomes d.

Lemma 7.

Fix yz. The state transitions for pair {z,y} are given in Table 1.

Proof.

First, suppose Fpm performs a full move. The pair {z,y} is swapped, which changes its mode according to Observation 5 (αβ, βα, γα). By Lemma 6, the flavor of the pair becomes d. This proves the correctness of the transitions in row three of Table 1.

In the rest of the proof, we analyze the case when Fpm performs a partial move. We consider three sub-cases depending on the initial flavor of the pair {z,y}. For the analysis of mode changes we will apply Observation 5.

  • Before the movement, the flavor of the pair was d, i.e., θyyθzz.

    The movement of z does not swap the pair, i.e., its mode transitions are αβ and βγ. As θz is set to the list front, after the movement θzθyyz, i.e., the flavor of the pair becomes either e or n. This explains the state transitions αdβne and βdγne.

  • Before the movement, the flavor of the pair was o, i.e., θyθzyz.

    Due to the movement, the pair is swapped, and its mode transitions are αβ and βα. As θz is set to the list front, we have θzθy. After the movement, θyzy, i.e., the flavor of the pair becomes either o or e. This explains the state transitions αoe(βo or βne) and βoαoe.

  • Before the movement, the flavor of the pair was e or n, i.e., θzθyyz.

    The movement swaps the pair, and its mode transitions are αβ, βα and γα. After the movement zθy, and target θz is set to the list front, which results in θzzθyy, i.e., the pair flavor becomes d. This explains the state transitions αoeβd, βneαd, and γneαd

Table 1: State transitions for pairs {z,y} where yz right before the request to z.
State before move αd βd αoe βo βne γne
State after partial move βne γne βd or βo or βne αoe αd αd
State after full move βd αd βd αd αd αd
Lemma 8.

Fix yz. The state transitions for pair {z,y} are given in Table 2.

Table 2: State transitions for pairs {z,y} where zy right before the request to z.
State before move αd βd αoe βo βne γne
State after move αd αd αd αd αd or αoe βd or βo or βne
Proof.

The pair {z,y} is not swapped due to the request, and thus, by Observation 5, its mode transition is αα, βα, γβ.

If Fpm performs a full move, the flavor of the pair becomes d by Lemma 6. This explains the state transitions αdαd, βdαd, αoeαd, βoαd, βneαd, and γneβd.

In the following, we assume that Fpm performs a partial move, and we will identify cases where the resulting pair flavor is different than d. We consider two cases.

  • The initial flavor is d, o or e. That is θzzy and θzθyy. During the target cleanup, θy may be updated to its successor, but it does not affect these relations, and in particular we still have θzθy. Thus, when z is moved, it gets placed before θy. This results in the ordering θzzθyy, i.e., the resulting flavor is d.

  • The initial flavor is n, i.e., θyθzzy. As θyz, the target θy is not updated during the target cleanup. As z is moved right before original position of θz, it is placed after θy, and the resulting ordering is θzθyzy. That is, the flavor becomes o or e, which explains the state transitions βneαoe and γne(βo or βne).

Table 3: State transitions for pairs {x,y} where xz and yz right before the request to z.
State before move αd βd αoe βo βne γne
State after move αd βd αoe βo or βne βne γne
Lemma 9.

Fix yx, such that xz and yz. State transitions for pair {x,y} are given in Table 3.

Proof.

The mode of the pair {x,y} is not affected by the request to z.

The flavor of the pair {x,y} depends on mutual relations between x, y, θx and θy. By Lemma 4, the only possible change is that θx and θy were different but may become equal: this happens when they were adjacent and the earlier of them is equal to z. We consider four cases depending on the initial flavor of the pair.

  • The initial flavor was e (θy=θxyx). As θy and θx are not adjacent, the flavor remains e.

  • The initial flavor was d (θyyθxx). Suppose θy=z. As yz, we have θy=zyθx. That is, θx and θy are not adjacent, and thus the flavor remains d.

  • The initial flavor was o (θyθxyx). In this case it is possible that θy and θx are adjacent and z=θy. The flavor may thus change to e or remain o.

  • The initial flavor was n (θxθyyx). Similarly to the previous case, it is possible that θx and θy are adjacent and z=θx. The flavor may thus change to e or remain n.

4.4 Amortized Analysis

We set R=18(23+17)3.3904 as our desired competitive ratio.

In the following, we fix a step t in which item z is requested. We partition 𝒫 into three sets corresponding to the three types of pairs:

  • 𝒫1t{{y,z}:yz} (pairs where z is the second item, analyzed in Table 1),

  • 𝒫2t{{y,z}:zy} (pairs where z is the first item, analyzed in Table 2),

  • 𝒫3t{{x,y}:xzyz} (pairs where z is not involved, analyzed in Table 3).

For succinctness, wherever it does not lead to ambiguity, we omit subscripts t, i.e., write ΔΦxy and Δwxy instead of ΔtΦxy and Δtwxy. We also omit superscripts t in 𝒫1t, 𝒫2t, and 𝒫3t.

Our goal is to show the following three bounds:

  • ΔFpm+{x,y}𝒫1ΔΦxyR{x,y}𝒫1Δwxy,

  • {x,y}𝒫2ΔΦxyR{x,y}𝒫2Δwxy,

  • {x,y}𝒫3ΔΦxyR{x,y}𝒫3Δwxy.

Note that the left hand sides of these inequalities correspond to the portions of amortized cost of Fpm corresponding to sets 𝒫1,𝒫2,𝒫3, while the right hand sides are equal to R times the corresponding portion of the cost of pair-based Opt. Hence, if we can show the above inequalities for every step t, the competitive ratio of R will follow by simply adding them up.

As we show in the sections that follow, these bounds reduce to some constraints involving state potentials αd, βd, αoe, βo, βne and γne. The bounds for 𝒫2 and 𝒫3, while they involve summations over pairs, can be justified by considering individual pairs and the needed constraints are simple inequalities between state potentials, summarized in the following assumption:

Assumption 10.

We assume that

  • αd=0,

  • all constants βd, αoe, βo, βne and γne are non-negative,

  • αoeβne+12Rβo+12R,

  • max{βd,βo}γne+12R.

The bound for 𝒫1 is most critical (not surprisingly, as it corresponds to requesting the second item of a pair). To analyze this bound, the needed constraints, besides the state potentials also need to involve the numbers of pairs that are in these states. This gives rise to a non-linear optimization problem that we need to solve.

4.4.1 Analyzing pairs from set 𝓟𝟏

The proof of the following lemma is deferred to Subsection 4.5.

Lemma 11.

There exist parameters αd, βd, αoe, βo, βne and γne, satisfying Assumption 10, such that for any step t, it holds that ΔFpm+{x,y}𝒫1ΔΦxyR{x,y}𝒫1Δwxy.

4.4.2 Analyzing pairs from set 𝓟𝟐

Lemma 12.

For any step t, it holds that {x,y}𝒫2ΔΦxyR{x,y}𝒫2Δwxy.

Proof.

Recall that 𝒫2 contains all pairs {z,y}, such that zy. Thus, it is sufficient to show that ΔΦzyRΔwzy holds for any such pair {z,y}. The lemma will then follow by summing over all pairs from 𝒫2.

By Assumption 10, we have

αdαoe 0, (1)
max{αd,αoe}βne =αoeβne12R, (2)
max{βd,βo,βne}γne =max{βd,βo}γne12R. (3)

We consider two cases depending on the initial mode of the pair {z,y}. In each case, we upper-bound the potential change on the basis of possible state changes of this pair (cf. Table 2).

  • The initial mode of {z,y} is α. By Table 2, this mode remains α, and thus by Observation 3, Δwzy=0. Then,

    ΔΦzy max{αdαd,αdαoe} (by Table 2)
    =0=RΔwzy. (by (1))
  • The initial mode of {z,y} is β or γ. By Table 2, its mode changes due to the request to z, and hence, by Observation 3, Δwzy=12. Then,

    ΔΦzy max{αdαd,αdβd,αdαoe,αdβo,
    max{αd,αoe}βne,
    max{βd,βo,βne}γne} (by Table 2)
    max{βd,βo,12R,12R} (by αd=0, (1), (2) and (3))
    =12R=RΔwzy.

4.4.3 Analyzing pairs from set 𝓟𝟑

Lemma 13.

For any step t, it holds that {x,y}𝒫3ΔΦxyR{x,y}𝒫3Δwxy.

Proof.

As in the previous lemma, we show that the inequality ΔΦxyRΔwxy holds for any pair {x,y}𝒫3, i.e., for a pair {x,y}, such that xz and yz. The lemma will then follow by summing over all pairs {x,y}𝒫3.

Possible state transitions of such a pair {x,y} are given in Table 3. Hence, such a pair either does not change its state (and then ΔΦxy=0) or it changes it from βo to βne (and then ΔΦxy=βneβo0 by Assumption 10). In either case, ΔΦxy0RΔwxy.

4.4.4 Proof of 𝑹-competitiveness

We now show that the three lemmas above imply that Fpm is R-competitive.

Theorem 14.

For an appropriate choice of parameters, the competitive ratio of Fpm is at most R=18(23+17)3.3904.

Proof.

Fix any sequence σ consisting of T requests. By summing the guarantees of Lemma 11, Lemma 12, and Lemma 13, we obtain that for any step t, it holds that

ΔtFpm+{x,y}𝒫ΔtΦxyR{x,y}𝒫Δtwxy.

By summing over all steps, observing that the potentials are non-negative and the initial potential is zero (cf. Assumption 10), we immediately obtain that Fpm(σ)Rt=1T{x,y}𝒫ΔwxyROpt(σ). The second inequality follows by Lemma 2.

4.5 Proof of Lemma 11

Again, we focus on a single step t, in which the requested item is denoted z. We let Ad, Bd, Aoe, Bo, Bne, Cne be the number of items y preceding z such that pairs {z,y} have states αd, βd, αoe, βo, βne and γne, respectively. Let

V[Ad,Bd,Aoe,Bo,Bne,Cne].

Note that V1 is the number of items preceding z, and thus also the access cost Fpm pays for the request. Moreover, Ad+Bd is the number of items that precede θz. We use to denote scalar product (point-wise multiplication) of two vectors.

We define three row vectors GOPT, GPM, and GFM, such that

(GPMGFMGOPT) =(11222222222212121212120)
+(βne(γneβd)(max{βd,βo}αoe)(αoeβo)βneγneβdβd(βdαoe)βoβneγne000000)
Expressing costs as vector products.

Recall that to prove Lemma 11, we need to relate the 𝒫1 portion of the amortized cost of Fpm, i.e., ΔFpm+{x,y}𝒫1ΔΦxy and the corresponding portion of the cost of pair-based Opt, i.e., {x,y}𝒫1Δwxy. In the following two lemmas, we show how to express both terms as vector products.

Lemma 15.

It holds that yzΔwzy=GOPTV.

Proof.

The right-hand side of the lemma relation is equal to 12(Ad+Bd+Aoe+Bo+Bne). By Observation 5, due to request to z:

  • Ad+Aoe pairs change mode from α to β, and

  • Bd+Bo+Bne pairs change mode from β to γ.

By Observation 3, each such mode change contributes 12 to the left hand side of the lemma equation. Note that Cne pairs of mode γ do not change their mode due to the request.

Lemma 16.

It holds that ΔFpm+yzΔΦzy=GV, where

  • G=GPM if Fpm performs a partial move, and

  • G=GFM if Fpm performs a full move.

Proof.

First, assume that Fpm performs a partial move. By the definitions of Ad, Bd, Aoe, Bo, Bne, and Cne, ΔFpm=[1,1,2,2,2,2]V. By Table 1,

yz ΔΦzy
[βneαd,γneβd,max{βd,βo,βne}αoe,αoeβo,αdβne,αdγne]V
=[βne,γneβd,max{βd,βo}αoe,αoeβo,βne,γne]V,

where the second equality follows as αd=0 and βoβne (by Assumption 10). Thus, the lemma holds for a partial move.

Next, assume Fpm performs a full move. Then, ΔFpm=[2,2,2,2,2,2]V. By Table 1,

yzΔΦzy =[βdαd,αdβd,βdαoe,αdβo,αdβne,αdγne]V
=[βd,βd,βdαoe,βo,βne,γne]V,

where in the second equality we used αd=0 (by Assumption 10). Thus, the lemma holds for a full move as well.

Recall that Fpm is defined to choose the move that minimizes ΔFpm+yzΔΦzy.

Corollary 17.

It holds that ΔFpm+yzΔΦzy=min{GPMV,GFMV}.

Finding Parameters.

We may now prove Lemma 11, restated below for convenience.

Lemma 11. [Restated, see original statement.]

There exist parameters αd, βd, αoe, βo, βne and γne, satisfying Assumption 10, such that for any step t, it holds that ΔFpm+{x,y}𝒫1ΔΦxyR{x,y}𝒫1Δwxy.

Proof.

We choose the following values of the parameters:

αd =0 βd =116(5+317)1.086 αoe =2
βo =116(1+717)1.866 βne =116(917)0.305 γne =2

It is straightforward to verify that these values satisfy the conditions of Assumption 10. We note that relation αoeβne+12R holds with equality.

By Corollary 17, ΔFpm+{x,y}𝒫1ΔΦxy=ΔFpm+yzΔΦzy=min{GPMV,GFMV}. On the other hand, by Lemma 15, {x,y}𝒫1Δwxy=yzΔwzy=GOPTV. Hence, it remains to show that min{GPMV,GFMV}RGOPTV.

We observe that

GPM =116[2517, 43317, 1+717, 63717, 23+17, 0],
GFM =116[37+317, 27317, 5+317, 31717, 23+17, 0].

Let c=14(171) and let GCOMB=cGPM+(1c)GFM. Then,

GCOMB=116[23+17, 23+17, 23+17, 23+17, 23+17, 0].

Now for any vector V,

min{GPMV,GFMV} cGPMV+(1c)GFMV
=(cGPM+(1c)GFM)V
=GCOMBV=RGOPTV,

completing the proof.

5 Final Remarks

The most intriguing question left open in our work is whether competitive ratio of 3 can be achieved. We have shown computationally (see the full version of the paper [14]) that 3-competitive algorithms exist for lists with up to 6 items.

However, even for short lists the definition of such 3-competitive algorithm remains elusive. For many online problems, the most natural candidate is the generic work function algorithm. This algorithm is 2-competitive in the LUPS model [9]. However, our computer-aided calculation of its performance shows that its ratio is larger than 3 already for 5 items (see the full version of the paper [14]). It is 3-competitive for lists of length up to 4, though.

We do not know whether the analysis of Fpm is tight. For the specific choice of parameters used in the paper, we verified that Fpm is 3-competitive for lists of length 3, but not better than 3.04-competitive for lists of length 5 (see the full version of the paper [14]).

The focus of this paper is on the LUP1 model (also known as P1); we believe that the setting of d=1 captures the essence and hardness of the deterministic variant. That said, extending the definition and analysis of Fpm to the Pd model (for arbitrary d) is an interesting open problem that deserves further investigation.

References

  • [1] Susanne Albers. A competitive analysis of the list update problem with lookahead. Theoretical Computer Science, 197(1):95–109, 1998. doi:10.1016/S0304-3975(97)00026-1.
  • [2] Susanne Albers. Improved randomized on-line algorithms for the list update problem. SIAM Journal on Computing, 27(3):682–693, 1998. doi:10.1137/S0097539794277858.
  • [3] Susanne Albers. Online list update. In Encyclopedia of Algorithms, pages 598–601. Springer, 2008. doi:10.1007/978-0-387-30162-4_266.
  • [4] Susanne Albers and Maximilian Janke. New bounds for randomized list update in the paid exchange model. In 37th Int. Symposium on Theoretical Aspects of Computer Science (STACS), pages 12:1–12:17. Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2020. doi:10.4230/LIPICS.STACS.2020.12.
  • [5] Susanne Albers and Sonja Lauer. On list update with locality of reference. Journal of Computer and System Sciences, 82(5):627–653, 2016. doi:10.1016/J.JCSS.2015.11.005.
  • [6] Susanne Albers, Bernhard Von Stengel, and Ralph Werchner. A combined BIT and TIMESTAMP algorithm for the list update problem. Information Processing Letters, 56(3):135–139, 1995. doi:10.1016/0020-0190(95)00142-Y.
  • [7] Susanne Albers and Jeffery Westbrook. Self-organizing data structures. In Online Algorithms, The State of the Art, pages 13–51. Springer, 1996. doi:10.1007/BFb0029563.
  • [8] Christoph Ambühl, Bernd Gärtner, and Bernhard von Stengel. Optimal lower bounds for projective list update algorithms. ACM Transactions on Algorithms, 9(4):1–18, 2013. doi:10.1145/2500120.
  • [9] Eric J. Anderson, Kirsten Hildrum, Anna R. Karlin, April Rasala, and Michael E. Saks. On list update and work function algorithms. In Proc. 7th Annual European Symposium on Algorithms (ESA), pages 289–300. Springer, 1999. doi:10.1007/3-540-48481-7_26.
  • [10] Spyros Angelopoulos, Reza Dorrigiv, and Alejandro López-Ortiz. List update with locality of reference. In Proc. 8th Latin American Symposium on Theoretical Informatics (LATIN), pages 399–410. Springer, 2008. doi:10.1007/978-3-540-78773-0_35.
  • [11] Yossi Azar, Shahar Lewkowicz, and Varun Suriyanarayana. List update with prediction. In AAAI Conference on Artificial Intelligence (AAAI), pages 15436–15444. AAAI Press, 2025. doi:10.1609/AAAI.V39I15.33694.
  • [12] Yossi Azar, Shahar Lewkowicz, and Danny Vainstein. List update with delays or time windows. In Proc. 51st Int. Colloqium on Automata, Languages, and Programming (ICALP), pages 15:1–15:20. Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2024. doi:10.4230/LIPICS.ICALP.2024.15.
  • [13] Ran Bachrach, Ran El-Yaniv, and M. Reinstadtler. On the competitive theory and practice of online list accessing algorithms. Algorithmica, 32(2):201–245, 2002. doi:10.1007/S00453-001-0069-8.
  • [14] Mateusz Basiak, Marcin Bienkowski, Martin Böhm, Marek Chrobak, Łukasz Jeż, Jiří Sgall, and Agnieszka Tatarczuk. A 3.3904-competitive online algorithm for list update with uniform costs. arXiv:2503.17264. Full version.
  • [15] Jon L. Bentley and Catherine C. McGeoch. Amortized analyses of self-organizing sequential search heuristics. Communications of the ACM, 28(4):404–411, 1985. doi:10.1145/3341.3349.
  • [16] Joan Boyar, Shahin Kamali, Kim S. Larsen, and Alejandro López-Ortiz. On the list update problem with advice. Information and Computation, 253:411–423, 2017. doi:10.1016/J.IC.2016.06.007.
  • [17] Reza Dorrigiv, Martin R Ehmsen, and Alejandro López-Ortiz. Parameterized analysis of paging and list update algorithms. Algorithmica, 71(2):330–353, 2015. doi:10.1007/S00453-013-9800-5.
  • [18] Alexander Golynski and Alejandro López-Ortiz. Optimal strategies for the list update problem under the MRM alternative cost model. Information Processing Letters, 112(6):218–222, 2012. doi:10.1016/J.IPL.2011.12.001.
  • [19] Sandy Irani. Two results on the list update problem. Information Processing Letters, 38(6):301–306, 1991. doi:10.1016/0020-0190(91)90086-W.
  • [20] Shahin Kamali. Online list update. In Encyclopedia of Algorithms, pages 1448–1451. Springer, 2016. doi:10.1007/978-1-4939-2864-4_266.
  • [21] Shahin Kamali and Alejandro López-Ortiz. A Survey of Algorithms and Models for List Update, pages 251–266. Springer, 2013. doi:10.1007/978-3-642-40273-9_17.
  • [22] Conrado Martınez and Salvador Roura. On the competitiveness of the move-to-front rule. Theoretical Computer Science, 242(1-2):313–325, 2000. doi:10.1016/S0304-3975(98)00264-3.
  • [23] J. Ian Munro. On the competitiveness of linear search. In Proc. 8th Annual European Symposium on Algorithms (ESA), pages 338–345. Springer, 2000. doi:10.1007/3-540-45253-2_31.
  • [24] Nick Reingold, Jeffery Westbrook, and Daniel D Sleator. Randomized competitive algorithms for the list update problem. Algorithmica, 11(1):15–32, 1994. doi:10.1007/BF01294261.
  • [25] Daniel D. Sleator and Robert E. Tarjan. Amortized efficiency of list update and paging rules. Communications of the ACM, 28(2):202–208, 1985. doi:10.1145/2786.2793.
  • [26] Boris Teia. A lower bound for randomized list update algorithms. Information Processing Letters, 47(1):5–9, 1993. doi:10.1016/0020-0190(93)90150-8.