Abstract 1 Introduction 2 Preliminaries 3 Relevant Notions from Chang et al. [4] 4 Lower Bound for Deterministic Online-𝗟𝗢𝗖𝗔𝗟 5 Lower Bound for Randomized Online-𝗟𝗢𝗖𝗔𝗟 References

Orientation Does Not Help with 3-Coloring a Grid in Online-LOCAL

Thomas Boudier ORCID Gran Sasso Science Institute, L’Aquila, Italy Filippo Casagrande ORCID Gran Sasso Science Institute, L’Aquila, Italy Avinandan Das Aalto University, Espoo, Finland Massimo Equi ORCID Aalto University, Espoo, Finland Henrik Lievonen ORCID Aalto University, Espoo, Finland Augusto Modanese ORCID Aalto University, Espoo, Finland Ronja Stimpert ORCID Aalto University, Espoo, Finland
Abstract

The online-LOCAL and SLOCAL models are extensions of the LOCAL model where nodes are processed in a sequential but potentially adversarial order. So far, the only problem we know of where the global memory of the online-LOCAL model has an advantage over SLOCAL is 3-coloring bipartite graphs. Recently, Chang et al. [PODC 2024] showed that even in grids, 3-coloring requires Ω(logn) locality in deterministic online-LOCAL. This result was subsequently extended by Akbari et al. [STOC 2025] to also hold in randomized online-LOCAL. However, both proofs heavily rely on the assumption that the algorithm does not have access to the orientation of the underlying grid. In this paper, we show how to lift this requirement and obtain the same lower bound (against either model) even when the algorithm is explicitly given a globally consistent orientation of the grid.

Keywords and phrases:
coloring, locally checkable labeling problems, online algorithms
Copyright and License:
[Uncaptioned image] © Thomas Boudier, Filippo Casagrande, Avinandan Das, Massimo Equi, Henrik Lievonen, Augusto Modanese, and Ronja Stimpert; licensed under Creative Commons License CC-BY 4.0
2012 ACM Subject Classification:
Theory of computation Distributed algorithms
Related Version:
ArXiv Version: https://arxiv.org/abs/2509.22233
Funding:
This work was supported in part by the Research Council of Finland, Grants 359104 and 363558, as well as the Quantum Doctoral Education Pilot, the Ministry of Education and Culture, decision VN/3137/2024-OKM-4.
Editors:
Andrei Arusoaie, Emanuel Onica, Michael Spear, and Sara Tucci-Piergiovanni

1 Introduction

The online-𝖫𝖮𝖢𝖠𝖫 model [2] bridges the fields of online and distributed algorithms. As in standard online algorithms, the model consists of a centralized computational instance that must solve a task on a graph presented as a (potentially adversarially constructed) stream. The twist is that the algorithm maintains a local view of the graph that grows as more nodes are revealed: With every node v that arrives, the view of the algorithm is augmented by all connections in the T-neighborhood of v (for some function T=T(n) where n is the final size of the graph). For every new node v that is revealed, the algorithm must immediately commit to a solution at v using the view that has been revealed thus far. Unlike standard questions in online algorithms, we disregard the space and time complexities required to produce the output and are interested only in its locality T.

A fundamental problem in the online-𝖫𝖮𝖢𝖠𝖫 model is 3-coloring grids. This problem is important because it gives a separation between online-𝖫𝖮𝖢𝖠𝖫 and the weaker but related 𝖲𝖫𝖮𝖢𝖠𝖫 model [5]. Namely, there is an O(logn) strategy for the problem in (deterministic) online-𝖫𝖮𝖢𝖠𝖫 (which works not only in grids but also in bipartite graphs), whereas in 𝖲𝖫𝖮𝖢𝖠𝖫 it has complexity nΩ(1) [2].

More recently, it was shown that Ω(logn) locality is necessary to solve this problem [4], even in the presence of randomness [1]. The approach for this lower bound, as given by Chang et al. [4], is based on the idea of a potential function that is defined in terms of the 3-coloring of the grid. The argument consists of two main steps:

  1. 1.

    Show there is an adversarial strategy for constructing rows that guarantees the following: Somewhere along the row, there exists a pair of nodes u and v whose potential difference (in absolute value) is Ω(logn).

  2. 2.

    Using this strategy, create one such row R1 and another (arbitrarily constructed) row R2 of the same size. (See Figure 1.) Consider the nodes u and v of R2 that correspond to u and v and position the nodes u, v, u, and v as corners of a square with minimal height. If necessary, rotate R2 by 180 degrees so that the potential differences in both horizontal sides of the square have the same sign. Since a full walk around the square has zero potential, Ω(logn) space between the rows is required in order to “build down” the difference between u and v. The distance between the rows immediately translates into a lower bound for the locality T.

    Figure 1: Illustration of the contradiction step in the proof of Chang et al. [4]. The first row R1 is created with a potential difference p(u,v)=10T between nodes u and v. Parallel to this, we create R2 and rotate it as necessary to ensure that we have nodes u and v parallel to u and v and such that p(v,u)0. Finally, the two rows are revealed to be at distance =2T+2 from one another. The walk W through u, v, v, and u has potential p(W)=p(u,v)+p(v,v)+p(v,u)+p(u,u)>5T, but the potential of any closed walk must be 0 if the walk is properly 3-colored.

Note that the second step in the proof requires a peculiar transformation, namely rotating rows by 180 degrees, which potentially destroys the orientation of the underlying grid. The proof for the randomized case [1] exhibits the same limitation. Hence both proofs break down if the input graph also contains the orientation of the final grid. Does this mean there is hope for an o(logn) strategy if we are given the orientation of the grid?

Our Contribution

In this paper, we answer this question in the negative for both the deterministic and randomized settings.

Theorem 1.

In both the deterministic and randomized online-𝖫𝖮𝖢𝖠𝖫 models, the complexity of 3-coloring grids is Θ(logn), even if the algorithm is given the orientation of the final grid.

With an orientation, we mean a globally consistent labeling of edges such that every node knows the cardinal direction of each of its neighbors (i.e., north, east, west, or south). Since our contribution consists of enhancing the previous proofs so that they also hold in this more general setting, it is necessary to present some key ideas of those proofs first, for which we take a short detour at this juncture before returning to the discussion of the actual proof.

The Proof Strategy of Chang et al. [4]

We now describe the proof of Chang et al. [4] in enough detail for the unfamiliar reader to be able to follow the rest of the discussion in this introduction. Further technicalities needed for the proof in this paper are postponed to Section 3.

As already foreshadowed, proving a lower bound in online-𝖫𝖮𝖢𝖠𝖫 of f(n) for some function f generally entails devising an adversarial strategy that succeeds in “breaking” an algorithm with locality less than f(n). Hence, the proof of Chang et al. [4] (as well as that of Akbari et al. [1] and ours) is concerned with describing such a strategy.

The strategy of Chang et al. [4] bases on a potential function p defined on walks. The function p counts the (signed) number of transitions between colors 1 and 2. (See Section 3 for a precise definition.) It also has some nice properties (Lemma 3): For a closed walk W, we have p(W)=0, and the parity of p(P) on a path P is uniquely determined by the colors of its endpoints and (the parity of) its length.

As described above, the proof of Chang et al. [4] is structured into two stages. The first of these concerns devising a potential-boosting strategy to construct a row with (nearly) logarithmic potential increase k=10T (from left to right). Using this strategy, in the second stage, we obtain the contradiction proper by constructing one such path P1 as well as a parallel path P2 that can be transformed to have non-negative potential (again from left to right) assuming the relative orientation of P1 to P2 is not known by the algorithm. As already explained above, we can then position P1 and P2 adequately to deduce T=Ω(logn).

Technical Overview

To obtain our Theorem 1, we need to rework the strategy just outlined in several regards:

  1. 1.

    We argue that the potential-boosting strategy given by Chang et al. [4] can be used to obtain not only a logarithmic but quasilinear potential difference along a row (Section 4.1).

  2. 2.

    We demonstrate how the original logarithmic boosting strategy can be generalized so that we can construct not only rows but (approximately) lines in the plane of any desired slope θ[0,2π) (Section 4.2). (Although we could also obtain quasilinear potential boosting in this extended case, we refrain from pursuing this extension in the present paper since it is not needed for the result.)

  3. 3.

    Finally, we provide a completely novel approach to obtain the final contradiction that does not rely on transforming any object previously revealed in the construction (Section 4.3).

Overall, compared to the simpler proofs of Chang et al. [4, 1], we must exploit the full two-dimensional aspect of the problem.

Next, we present the three different aspects just outlined in more detail. Along the way, we discuss the main difficulties to be overcome while sketching an outline of the full argument. From here on, we assume we are given a deterministic online-𝖫𝖮𝖢𝖠𝖫 algorithm with locality T=o(logn) that we wish to prove to be incorrect for solving the 3-coloring problem.

Step 1: quasilinear potential boosting.

Let us inspect the potential-boosting strategy of Chang et al. [4] more closely. It consists of an iterative process that increases the guaranteed potential difference by at least one unit at every step while at the expense of (roughly) doubling the size of the construction. Since there are only n nodes at our disposal, it appears that the best we can hope for is a Ω(logn) potential difference; otherwise, we would exceed our “budget” of nodes.

However, as it turns out, there is a more clever argument that we can apply: Suppose we have constructed two distinct rows R1 and R2 (not necessarily using the aforementioned strategy) of roughly the same size whose relative location is yet to be revealed. Consider any two paths P1 and P2 of equal length on R1 and R2, respectively, where P1 and P2 have the same orientation (e.g., both P1 and P1 go from west to east). Let p(Pi) denote the potential difference between the nodes at the start and end of path Pi. Then, the quantity |p(P1)p(P2)| cannot be too large; otherwise we could reveal R1 and R2 to be close to each other so that the endpoints of the paths align and directly obtain a contradiction as in the second stage of the proof of Chang et al. To be precise, if we can reveal the respective endpoints of P1 and P2 to be at distance d from one another, then necessarily |p(P1)p(P2)|2d as the potential cannot drop by more than one unit at each node. (In fact, as already shown in Chang et al. [4], the potential drops by at most one unit every three nodes, so we even have a stricter upper bound of 2d/3.)

Imagine now that R1 was constructed according to the logarithmic boosting strategy and P1 is a path guaranteeing |p(P1)|10T (which is possible since T=o(logn)). Because we can certainly reveal two separate rows at distance d3T, we immediately get that any other path P2 of the same length as P1 in any other separately constructed row R2 has |p(P2)|4T. Assuming we needed roughly 210T nodes in R1 to construct such a P1, it follows that any row of length 210T has potential difference at least 4T.

Step 2: boosting along arbitrary slopes.

Although the logarithmic boosting strategy is defined to work on a row, it is conceivable to try and apply it to any line L on the plane having a slope θ[0,2π). Certainly, we cannot obtain a perfect match to any such line since we can only position points on the lattice ×, but it is nevertheless easy to see that we can pick a series of points in × that are at distance from L that is less than 1. Hence it seems plausible that one could just perform the construction using this set of points instead, thus obtaining a difference in potential also for points at marginal distance from L.

However, recall that the boosting strategy requires shifting a fragment of the construction relative to another so that the potential difference increases. Since L may avoid points on × entirely, it is simply not possible to port the original potential boosting argument to this case without substantial modifications. In particular, the resulting object containing a path with high potential difference necessarily is a (true) two-dimensional construct with a non-zero area.

This issue alone would not be very dramatic if we did not much care about the size of the resulting object. Unfortunately, the argument for the final contradiction (see further below) is very sensitive to the height of this object. In fact, we hope for an object guaranteeing a potential difference of k and having a height that does not exceed (roughly) 3k/2.

To cope with these issues, we provide a careful and systematic construction that minimizes the height of the resulting object. More precisely, the object we construct is a parallelogram where two of its sides are vertical and of height k+1 and the other two sides have the desired angle θ respective to the horizontal axis. Along the way, we also handle several other minor technicalities that require special care due to the two-dimensional nature of these objects.

Step 3: obtaining a contradiction.

Finally, we describe the idea for arriving at a contradiction. The most intuitive way to grasp it is to imagine what kind of strategy an algorithm would need to follow in order to not immediately fail against the quasilinear boosting of Step 1. For the sake of exposition, let us assume that we can achieve not only quasilinear boosting but actually linear boosting. This means that, along a row, the algorithm must be doing at least one transition from color 1 to color 2 every r steps for some constant r (that is not nullified by a subsequent transition back from 2 to 1). Again, for the sake of simplicity, suppose that the algorithm does not perform 2 to 1 transitions at all. Hence, the potential is monotonically increasing (with a slope of nearly 1/r) along the row.

Suppose we continue this reasoning until we have a row R from u to v with n1/10 nodes (and thus Ω(n1/10) potential difference). Here, we select the node v at the far right and start revealing nodes along its column C. By a similar argument as in Step 1, the algorithm also has to ensure a linear potential difference along C and, since C has two directions, one of these must be decreasing in potential. If we continue revealing nodes in this direction, then eventually we reach a node w that has a potential difference of zero to u. This means we have found a diagonal D going from u to w that has zero potential (see Figure 2).

Figure 2: Illustration of constructing a diagonal D with p(D)=0. The blue arrows indicate the direction in which the potential is increasing. The potential increases (near) linearly from u to v along R, and so along C we can find a node w that has potential difference zero to u, thus defining D, which forms an angle of θ with R.

With further observations, we can argue that D must contain a path P0 that is not too long, say 210T nodes in total, that itself has potential zero. Letting θ be the angle between R and D, we use the construction of Step 2 to obtain a parallel path P1 with potential k=10T. Finally, we reveal P1 to be at distance 2T+2 from P0. Having done so, we can argue as in the original contradiction proof of Chang et al. [4] that the closed walk around P0 and P1 must itself have potential zero, thus obtaining the desired contradiction.

As a final technicality, recall that in Step 2 it was mentioned that we desire P1 to be inside an object that has moderate height. We can now observe where exactly this is needed: Since the objects in Step 2 have some height h, the distance between P0 and P1 is not only 2T+2 but actually this value plus potentially h (if P1 is, say, at the very top of the constructed object). Hence, since we can only control the potential along P0 and P1 and not over the segments that connect the two, we certainly need h=O(k) and, moreover, we care about the actual constant. Thankfully, it is a straightforward observation that the potential of a walk W cannot be larger than |W|/3+c (Lemma 4) for a constant c. This fact was not explicit in the work of Chang et al. [4] (and was not needed for the results there), and so we give a short proof of it in Section 3. Using this fact together with our Step 2 that guarantees h=k+1, we obtain that the segments connecting P0 and P1 have length at most h+2T+2 and thus contribute at most (roughly) (h+2T)/3+c4T in potential each, and hence we still have a remaining potential of k8T=2T>0 for the closed walk around P0 and P1.

The randomized lower bound.

The above strategy describes an adversary against deterministic online-𝖫𝖮𝖢𝖠𝖫, which is allowed to make adaptive choices during the lower bound construction. For the randomized case, we must instead design a strategy for an oblivious adversary. Following Akbari et. al [1], we describe how to transform all of the adaptive choices during the construction into non-adaptive ones by simply “guessing” and boost the success probability by repetition. In retrospect, this can be seen as a standard technique for porting lower bounds from deterministic online-𝖫𝖮𝖢𝖠𝖫 to the randomized model. Since this technique is very general and applies to all lower bounds for online-𝖫𝖮𝖢𝖠𝖫 that the authors are aware of, there is reason to believe a separation between the two models (which remains an interesting open problem) will be very challenging to obtain. In fact, in light of related results by Akbari et al. [1], it is plausible to believe one can obtain derandomization results for online-𝖫𝖮𝖢𝖠𝖫 in a very wide range of settings.

Outline

The rest of the paper is structured as follows: Section 2 introduces main notation and the models at hand. In Section 3 we review in full detail the core technical aspects of [4] that are needed for the proof. Following that, in Sections 4 and 5 we prove our result for deterministic and randomized online-𝖫𝖮𝖢𝖠𝖫, respectively.

2 Preliminaries

We write + for the set of positive integers, 0 for +{0}, and for the set of all integers. The set of the first n+ positive integers is denoted by [n].

An (n×n)-oriented grid G is a directed graph defined over the vertex set [n]×[n], where n+. The edge set of G consists of consistently oriented edges defined as follows:

  • For all 1in and 1j<n, there is a directed edge from (i,j) to (i,j+1).

  • For all 1i<n and 1jn, there is a directed edge from (i,j) to (i+1,j).

The orientations of the edges are uniform and not arbitrary. Any graph that is isomorphic to G via a bijection that preserves edge directions is also referred to as an oriented grid.

We emphasize that while G is defined as a directed graph, the edge orientations serve as auxiliary information. In particular, graph-theoretic notions such as distance are defined with respect to the underlying undirected graph (i.e., by ignoring the directions of the edges).

With this in place, we can formally state the 3-coloring problem considered in this paper:

Given an (n×n)-oriented grid G, output a proper 3-coloring of G.

Finally, let us define the two models in question. For a vertex vV(G) and T0, we write B(v,T) for the set of vertices within (undirected) distance at most T from v.

The online-𝗟𝗢𝗖𝗔𝗟 model.

The online-𝖫𝖮𝖢𝖠𝖫 model was introduced by [2]. In this setting, the nodes of an n-vertex input graph G are revealed one by one in an adversarial order v1,v2,,vn. When the ith vertex vi is revealed, an online-𝖫𝖮𝖢𝖠𝖫 algorithm with locality T must assign an output label to vi, based solely on the graph induced by the union of T-radius neighborhoods of the vertices revealed so far, that is, G[jiB(vj,T)], and on the sequence of previously revealed vertices v1,,vi (along with their assigned labels).

The randomized online-𝗟𝗢𝗖𝗔𝗟 model.

The Randomized Online-𝖫𝖮𝖢𝖠𝖫 model [1] is a randomized variant of the online-𝖫𝖮𝖢𝖠𝖫 model. In this setting, the algorithm is additionally given access to a string of random bits. However, the adversary is non-adaptive – the input graph G and the vertex reveal order v1,,vn are fixed independently of the algorithm’s random choices. As in the deterministic case, when vertex vi is revealed, the algorithm must assign it a label using the subgraph G[jiB(vj,T)], the order of revealed vertices so far, and its internal randomness.

3 Relevant Notions from Chang et al. [4]

In this section, we recall notions and results from Chang et al. [4] that are needed to establish our result. The concept of central importance is that of a potential function defined on paths of the grid, which itself is based on the 3-coloring assigned to the grid. Fix a 3-colorable graph G=(V,E) and a proper coloring c:V{1,2,3} of G. The potential function is defined as follows:

Definition 2 (Potential function).

The potential function p is defined as follows: For any edge {u,v}E, we let

p(u,v):={c(u)c(v)if c(u)3 and c(v)3,0otherwise.

Given any walk W, we then let

p(W):={u,v}Wp(u,v).

Note that the potential of any edge is in the set {1,0,1}. In other words, we can see the potential function as a storage of potential over a path. Crossing the path from color 2 to color 1 increases the potential by 1, and vice-versa. As proven by Chang et al. [4], the potential function satisfies certain important properties:

Lemma 3 (Properties of the potential function p).

The function p satisfies the following:

  1. 1.

    For any simple directed walk W in a grid, p(W)=0.

  2. 2.

    For any path P of length from u to v, we have p(P)i(u)+i(v)+(mod2), where i(v) (resp., i(u)) is 1 if c(v)=3 (resp., c(u)=3) or 0 otherwise.

In addition, we also use the following property, which is not stated explicitly in [4] but is simple to prove.

Lemma 4 (Upper bound on p.).

For any walk W, p(W)|W|/3+O(1).

Proof.

Recall that, for every edge in W, the value of p can only increase or decrease by one. We argue without restriction that, for any subpath W=(u1,u2,u3,u4) of length 3 where p(u1,u2)=1, |p(W)|1. This is easy to see: By definition of p, c(u1)=2 and c(u2)=1. Then, since c is a proper 3-coloring, either c(u3)=2, in which case |p(W)|=|p(u3,u4)|1, or c(u3)=3 and then p(W)=p(u1,u2)=1.

The main technical result of Chang et al. [4] that we build on is the potential boosting lemma, with which we can create a path with logarithmic potential difference.

Lemma 5 (Logarithmic potential boosting).

There is an adversarial strategy against o(logn)-locality deterministic online-𝖫𝖮𝖢𝖠𝖫 that, given any kO(logn) and any desired length N+ with N<n, constructs a row of length N containing a path P with |p(P)|=k.

Since we adapt the construction of Lemma 5 (Lemma 3.6 in [4]), we revise it in more detail. The idea is to proceed inductively on k, where for k=0 we start with a single point of the grid. It is useful to refer to the objects constructed to guarantee a path having potential difference k the as levels of the construction. Having built two rows R1 and R2 each at level k1, we align R2 to the right of R1 along the same horizontal axis, choose the distance to place it from R1, and then reveal all the nodes in between.

The relevant quantity here is the distance of the rightmost node of R1 to the leftmost one of R2, which we pick to be either 2T+2 or 2T+3. Since >2T+1, the views of R1 and R2 do not overlap (and hence it is justified to handle them as separate objects). To choose between the two values 2T+2 and 2T+3, consider the following: Suppose that in Ri, i{1,2}, we have a path Pi from ui to vi that has potential p(Pi)=k1. (Note the sign of p(Pi) is relevant here.) Pick so that the value p(P3) of the path P3 from v1 to u2 has different parity from k1. (Here, we use the second item of Lemma 3.) This implies either we already have |p(P3)|k or then |p(P3)|k2 (since |p(P3)|k1), from which a simple calculation reveals that the path from u1 to v2 has potential difference at least k.

4 Lower Bound for Deterministic Online-𝗟𝗢𝗖𝗔𝗟

First, we prove that, without loss of generality, the potential increases everywhere in the north to south and west to east directions. We achieve that in Lemma 7 by using the adversarial strategy of Lemma 5. Using this, we can deduce an adversarial strategy that creates a horizontal path (a,b) and a vertical path (c,b) meeting at node b, such that the potential of the walk (a,,b,,c) is 0. Using the first item of Lemma 3, we then deduce that a path following the slope A0 starting at a and ending at c must also have potential 0. Finally, we show in Lemma 8 that using a technique similar to [4], we can produce a slope A1 with an orientation similar to A0 but with too much potential increase to finish the parallelogram formed by A1 and A0 in accordance to Lemma 3.

Throughout this section, we assume the underlying graph G is a (n×n)-oriented grid and there is a deterministic online-𝖫𝖮𝖢𝖠𝖫 algorithm with locality T=o(logn) that purportedly 3-colors G.

4.1 Quasilinear Boosting on a Row

The first step is to reason about what occurs when two rows are brought next to each other.

Lemma 6.

Let L1, L2 be two rows a distance of at least 2T+2, such that they have not yet been revealed to be in the same component. Let W1 be a walk on L1 and W2 be a walk on L2, both of the same length. Then the potential difference |p(W1)p(W2)| is at most 4T+4.

Proof.

Suppose the algorithm discovered two walks of same length W1=(u1,v1), W2=(u2,v2) such that |p(W1)p(W2)|4T+5. Without loss of generality, let p(W1)=K and p(W2)=K+ε(4T+5) with ε{1,1}. The adversary then reveals that W1 and W2 are aligned at distance exactly 2T+2. By Lemma 3 the cycle C defined by (u1,v1,v2,u2,u1) must have potential 0:

p(W1)+p((v1,v2))p(W2)+p(u2,u1)=0,

and thus p((v1,v2))+p((u2,u1))=ε(4T+5). However, |p(u2,u1)|=|p(v1,v2)|=2T+2, so |p((v1,v2))| and |p((u2,u1))| are at most 2T+2, a contradiction.

With the above observation in place, we can improve the strategy of Lemma 5 to give us nearly linear potential difference along a row.

Lemma 7.

For T=o(logn), there exists an adversarial strategy that ensures the existence of a value c=1/2O(T) such that we can build rows with the following property: for any subpath W of the row with |W|210T, we have |p(W)|c|W|.

Proof.

Using the same adversarial strategy as in Lemma 5, build a path W with potential increase 9T and at most 210T length. This is possible for large enough values of T (and n). Because of Lemma 6, any parallel path W satisfying its conditions must have potential between 5T4 and 13T+4. Moreover, if we split a row into m consecutive segments of length |W|, the potential of the whole row is between m(5T4) and m(13T+4). Hence, we can force paths of length N=ω(210T) such that any of its subpaths W of length at least |W|210T has potential increase at least c|W| with c=4T/|W|4T/210T.

4.2 Boosting on Arbitrary Slopes

In this section, we show how one can apply the idea of Lemma 5 along arbitrary lines on the plane, not just horizontal and vertical rows and columns. The key insight here is that the general idea of potential boosting relies only on the fact that the parity of the potential is uniquely determined by the distance between the vertices and their colors, not the actual path taken. Hence we can make this path follow an arbitrary fixed slope that is determined by two grid points.

That being said, generally the path cannot follow the sloped line exactly as it must be aligned with the grid points. To account for this, we allow the path to deviate from the target slope by a small amount that we can control. In particular, we restrict the path to fully lie between two parallel lines whose vertical distance is bounded. One way to interpret this is to consider the smallest parallelogram enclosing the construction with two of its sides being vertical and two aligned with the target slope.

Lemma 8 (Slope boosting).

Given an oriented rectangular grid G on n nodes, a target slope θ[0,2π), and a target potential k=o(logn), there exists an adversarial strategy against any deterministic online-𝖫𝖮𝖢𝖠𝖫 algorithm with locality T=o(logn) such that the adversary constructs a path P in G with the following properties:

  1. 1.

    P contains two points u and v such that the potential between them is exactly k, and

  2. 2.

    P is fully contained in a parallelogram with two of its sides being vertical with length k+1, the other two sides having angle θ, and the total width being 2kO(T).

We start by introducing some helpful terminology. Consider the embedding G~ of G on the Euclidean plane that sends v to the origin and places nodes of G on the lattice × while identifying the orientation of G with the orientation of the plane and keeping edges at unit length. Recall that a line L in G~ is uniquely described by a point v and a slope θ. Here we only need to consider the case where vV(G), so we cater our definitions to it. Given i0, let d(v,i)=d(v,i;θ) be the unique (positive) real such that D(v,i)=(i,d(v,i))L. We write D(v,i)=D(v,i;θ) for the node vV(G) that has coordinates (i,d(v,i)) in G~. Meanwhile, we let D+(v,i)=D+(v,i;θ) denote the node v+V(G) having coordinates (i,d(v,i)) in G~ if d(v,i) is not an integer (i.e., d(v,i)d(v,i)), or (i,d(v,i)+1) otherwise. Note this means D(v,i),D+(v,i) are adjacent grid points along the same column. Intuitively, node D(v,i) is on or below the line L at horizontal distance i from v, and node D+(v,i) is above the line.

Proof.

Let T=(1/100)logn. Without restriction, we consider only the case where θ[0,π/4]. The construction for the general case is obtained by applying reflections along the horizontal and vertical axis or by swapping the two.

As in Lemma 5, our strategy is based on incrementally building self-similar objects while driving the potential difference up by at least one unit at every level. From one level to the next, the size of the construction should increase by only a multiplicative constant factor. Indeed, similar to Lemma 5, the construction at level j+1 is obtained by creating two copies of it at level j and adequately placing them relative to each other.

The construction at level 0 consists of a single node. Higher levels of the construction are shaped as the objects already mentioned in the statement of the lemma, namely parallelograms where two sides are vertical and of length equal to one plus the current level of the construction jk and the two other sides have angle θ relative to the horizontal axis.

To simplify the description, we use the term (j,θ)-parallelogram to refer to such parallelograms. Given such a parallelogram P, we call the node of P with minimal coordinates (in lexicographic order) the anchor node of P. (Note node here refers to nodes of G in the embedding G~, not points on the plane.) We guarantee through the construction that every (j,θ)-parallelogram has the same height j+1 and width wj and that these are both integral. These technical details are somewhat tedious but needed to ensure we reach the desired height for the construction.

Let us describe the construction inductively (see also Figure 3). To obtain a parallelogram at level j+1 from two (j,θ)-parallelograms P1 and P2 at level j, we proceed as follows:

  1. 1.

    Let u1 and u2 be the anchor nodes of P1 and P2, respectively.

  2. 2.

    Set i=wj+2T+2. Note that, since we assumed θ[0,π/4], this implies both D(u1,i) and D+(u1,i) are at distance greater than 2T+1 but still at most O(T) from P1.

  3. 3.

    Place P2 relative to P1 by placing u2 on top of D(u1,i) or D+(u1,i), whichever of the two choices guarantees that the maximal potential difference increases by at least one unit. (This choice is made using the same reasoning as in the setting of Lemma 5.)

  4. 4.

    Recall P1 and P2 both have height j+1. Hence, if we could place P2 on D(u1,i) (the ideal point to follow the slope θ), then we would be actually able to fit both P1 and P2 in a (j,θ)-parallelogram perfectly. Since both points D(u1,i) and D+(u1,i) are at most unit distance from D(u1,i), it follows that there is a (j+1,θ)-parallelogram P containing both P1 and both the placement choices for P2. (In particular, this implies the shape of the (j+1,θ)-parallelogram at the next level of the construction is uniquely defined.)

  5. 5.

    Once P is fixed, reveal all nodes inside it that have not been revealed previously, thus reaching the next level of the construction.

Note the choice of placement for P1 and P2 ensures the relative position of the two is kept hidden from the algorithm until both P1 and P2 have been completely labeled. The argument for the increase in potential difference is the same as in Lemma 5.

Figure 3: Illustration of the potential-boosting procedure along a slope θ. Here we are placing two parallelograms P1 and P2 of height k+1 relative to one another. The node u is the anchor node of P1. No matter which choice we make between placing the anchor node of P2 at D or D+, the resulting parallelogram has height k+2 (and in fact encompasses both choices).

Due to the relative placement of P1 and P2, it is evident that we can guarantee the height and width guarantees mentioned previously. One technical issue concerns the construction at level 1: There it is needed that the parallelograms have height 2 as otherwise it might be that there is no path of G~ that is fully contained within it. This is required so that the potential difference is defined between any two nodes in the same parallelogram (and also the sole reason why we only obtain height k+1 and not k in the statement).

Finally, we verify the size of the construction allows us to reach the desired level j=k: Clearly, we have wj+1=2(wj+T+1). Since w0=0, by solving the recursion, we obtain wk=2(2k1)(T+1). As the final parallelograms have height k+1, we need thus at most O(Tk)2k=no(1) nodes for the construction.

4.3 Obtaining a Contradiction

In this section, we conclude the lower bound proof for the deterministic case. We first sketch the main ideas intuitively. We begin by constructing a path W from some node u to some node v whose shape resembles the letter “L”, that is, a row followed by a column. Taking advantage of the techniques already employed in Lemmas 6 and 7, we can guarantee that the potential of this path is zero (see Lemma 11 below). At this point, the shortest path D from v to u proceeds in a diagonal manner. Consider the combination of the path W with D. Then its potential must be zero since it is a closed cycle that start from node u, reaches v, and comes back to u. Since the potential difference is unique, if we start from u and follow any path, then the potential reaches zero both at v and at u.

We can use this fact to our advantage to obtain a contradiction. The idea is to first observe that there must be two nodes v1 and u1 along the diagonal path D at which the potential assumes the same value up to a constant (Lemma 14). Then, we construct another diagonal path R where the absolute value of the potential increases by 10T (Lemma 15). Finally we reveal that R is close to v1 and u1.

Now consider a path that starts from v1, joins path R, follows it, and then returns to u1. The contradiction comes from the fact that the distance from the nodes v1 and u1 and path R is not enough to compensate for the growth of the potential that we enforced, and thus now there is a closed path starting and ending at v1 and passing through R that does not have zero potential.

Definition 9 (L-path).

A path W=(w1,w2,,wj) is an L-path if there exists a node wiW, where i<j, such that all nodes of subpath (w1,w2,,wi) belong to the same row, and all nodes of subpath (wi,wi+1,,wj) belong to the same column.

Definition 10 (diagonal-path; see also [3]).

Let u=(x0,y0) and v=(x1,y1) be two nodes of the grid with x0<x1, and let m=(y1y0)/(x1x0) be the slope111By slope, we interchangeably mean the ratio m or the angle θ=arctan(m). of the Euclidean line segment joining the nodes u and v. Without loss of generality, assume that |m|1. The diagonal-path from u to v is

P={(x,y)2:x0xx1 and y=y0+m(xx0)}.
Lemma 11 (L-path construction).

There exists an adversarial strategy to create an L-path W from node u to node v such that:

  • the row subpath of W has length at least 2100T,

  • the row subpath of W is longer than the column subpath of W,

  • |W|2O(T),

  • p(W)=0,

  • the revealed nodes are only the ones in W.

Proof.

Our argument is independent of the actual orientation of the edges of the grid and only cares about the direction in which the potential is increasing or decreasing. For this reason, we can assume that we are always forcing the algorithm to increase or decrease the potential in one specific direction. This is because, if this is not the case, we could go through the same construction by virtually flipping the orientation. For example, if we want the potential to increase from west to east but the algorithm is making it decrease, in our construction we can consider west to be east and west to be east. Thus, w.l.o.g. in the following argument, we consider the potential to be always increasing from west to east and decreasing from south to north.

Acting as the adversary, we start from a node w1 and we reveal nodes to the algorithm belonging to the same row of w1, going neighbor by neighbor always from west to east. Let the path revealed this way be W1=(w1,w2,,wi). Thanks to Lemma 7, the algorithm is forced to nearly linearly increase the potential along this row. Now consider the node wi. We reveal nodes to the algorithm that belong to the same column of wi, going neighbor by neighbor always from south to north. Let the path revealed this way be W2=(wi,wi+1,,wj). Applying the same reasoning as in the proofs of Lemma 6 and Lemma 7, the algorithm linearly decreases the potential along this column. Notice that we can choose W2 to be long enough so that p(W1)+p(W2)=0. Let |p(W1)|=c1(T)|U1| and |p(W2)|=c2(T)|W2|, where c1 and c2 are functions defined as in the statement of Lemma 7. Let c(T)=c1(T)c2(T) be such that |W2|=c(T)|W1|. From Lemma 4 we know that c1(T)13, and Lemma 7 guarantees that c2(T)12O(T), thus c(T)2O(T)3. This implies that, if we choose |W1|=O(2100T) so that we satisfy the lemma statement, we always have enough room to grow W2 so that we satisfy condition p(W1)+p(W2)=0, and this is because |W2|=c(T)|W1|2O(T)3|W1|. Moreover, we can always swap the roles of W1 and W2 after their construction, and thus also guarantee that |W1||W2|. Finally, we remark that |W1|+|W2|2O(T)2100T=2O(T). We conclude by observing that W=(w1,w2,,wi,wi+1,,wj) is an L-path that satisfies the statement of the lemma by taking u=w1 and v=wj.

The adversary reveals an L-path W from node u to node v following the strategy in Lemma 11 such that one of the arms of the L-path has length at least 2100T and forcing the algorithm to color it in such a way that p(W)=0. It then reveals to the algorithm a diagonal-path Du,v from node u to node v. In order to prove a certain property about Du,v, we need the following two simple analytical observations.

Lemma 12 (Discrete intermediate value theorem).

Let b,k+, and let f:[0,b] be a function satisfying |f(x+1)f(x)|k for all x[0,b1] with boundary conditions f(0)0 and f(b)0. Then there exists an integer x[0,b] such that |f(x)|k.

Proof.

We may assume that f(0)>k and f(b)<k as otherwise we could pick either x=0 or x=b. Let a<b be the largest integer such that f(a)>k. Now f(a+1) is either in range [k,k] or it is <k. In the former case we are done and can pick x=a+1. In the latter case |f(a+1)f(a)|2k, which contradicts our assumption.

Lemma 13 (Discrete mean value theorem).

Let b,k+, and let f:[0,b] be a function satisfying |f(x+1)f(x)|k for all x[0,b1], with boundary conditions f(0)=f(b)=0. Fix an integer with 0<<b, and define

g(x)=f(x+)f(x),x[0,b].

Then there exists some x[0,b] such that |g(x)|2k.

Proof.

If g(0)=0, we are done. W.l.o.g. assume g(0)>0 as otherwise we consider the function f. We show there exists x[0,b] such that g(x)0; by Lemma 12 this then implies the claim as g varies by at most 2k between consecutive indices.

Assume for contradiction that g(x)>0 for all x[0,b]. Indeed, we may even assume that g(x)>2k everywhere as otherwise we could pick x where this does not hold. Consider now the function f under this assumption. The first few values of f are f(0)=0, f()>2k, f(2)>4k, and so on since g(x)>2k everywhere, which forces f to increase. At the same time, f can decrease under the assumption that the difference between consecutive indices of f is at most k. Hence, we have f(2)>2kl, f(2+1)>2kk, f(2+2)>2k2k, and so on, until finally f(2+1)>2kk(1)>0 and f(2+)>2k2+2k. Thus, for every x2, the function f never reaches a non-positive value, contradicting f(b)=0.

With these technicalities in place, we now prove that we can find two nodes in Du,v with constant potential difference between them.

Lemma 14.

For every positive integer i<250T, there exist nodes u1=(a,b) and v1=(a,b) in the diagonal-path Du,v with |aa|=i such that the diagonal subpath from u1 to v1 has constant potential:

|p(Du,v[u1,v1])|2.
Proof.

Let u=(α,β) and v=(α,β) and let Wrow denote the row sub-path of W and set B|Wrow|. By the construction of the L-path ( Lemma 11), we have that the angle θ between the Euclidean line u,v through u and v and the x-axis lies in [0,π/4] and |Wrow|2100T.

For each x[0,B], let wx=(ax,bx) denote the unique node on Du,v such that |axα|=x, and define the function f:[0,B] such that f(x)=p(Du,v[u,wx]).

By construction, f(0)=0, and by Lemma 11, f(B)=p(Du,v[u,v])=p(Q[u,v])=0.

Next, consider two nodes wx=(ax,bx) and wx+1=(ax+1,bx+1) in Du,v. Observe that |ax+1ax|=1 and dist(wx,wx+1)2 (which follows from the construction of Du,v which closely follows u,v and the fact that θ[0,π/4]). Therefore, the value of f on the two nodes differs by at most 2. More specifically, |f(x+1)f(x)|2 for all x[0,B1].

Now fix i<250T and set i. Since B2100T, it follows that 0<<B. Define g(x)f(x+)f(x) for x[0,B]. Applying the discrete mean value theorem (Lemma 13) with k=2 yields an index x[0,B] such that |g(x)|2.

Finally, let u1wx=(ax,bx) and v1wx+=(ax+,bx+). Then |ax+ax|==i, and p(Du,v[u1,v1])=f(x+)f(x)=g(x), which implies |p(Du,v[u1,v1])|2.

Finally, we describe the adversarial strategy that concludes the proof.

Lemma 15.

There exists an adversarial strategy to reveal a path R starting from some node v2=(av2,bv2) and ending at some node u2=(au2,bu2) such that

  1. 1.

    p(R)=10T and the path R is enclosed in a (10T+1,θ)-parallelogram of width 210TO(T) where θ is the angle made by the line joining u and v with the x-axis.

  2. 2.

    There exists a diagonal-subpath Du,v[u1,v1] from node u1=(au1,bu1) to node v1=(av1,bv1) such that |au1av1|=|au2av2| and |p(Du,v[u1,v1])|2.

  3. 3.

    2T+2dist(Du,v[u1,v1],R)12T+7

Here, the distance between R and Du,v[u1,v1] is defined as

dist(R,Du,v[u1,v1])=min{dist(x,y)xV(R),yV(Du,v[u1,v1])}.
Proof.

By construction, the diagonal path Du,v can be enclosed in a (4,θ)-parallelogram. The adversary reveals a path R following the strategy in Lemma 8 with p(R)=10T and the path being enclosed in a (10T+1,θ)-parallelogram of horizontal span 210TO(T) such that the vertical distance between the two parallelograms is 2T+2 (The exact positioning of the revealed path will be fixed soon). Revealing such a path and forcing the quasilinear boosting on the path is possible as T=o(logn) and such a path is at a distance at least 2T+2 from the diagonal-path Du,v as well as the L-path W, hence ensuring that the relative positions of the revealed paths remain indistinguishable to the algorithm. This proves Item 1.

Since R is contained in a parallelogram of width 210TO(T), we obtain |au2av2|210TO(T). By Lemma 14, there exist nodes u1=(au1,bu1) and v1=(av1,bv1) with |au1av1|=|au2av2| such that the diagonal subpath Du,v[u1,v1] satisfies |p(Du,v[u1,v1])|2, establishing Item 2. The adversary positions the parallelogram of Du,v[u1,v1] keeping u1,v2 and v1,u2 aligned on common vertical axes while maintaining the vertical distance of 2T+2 between the two parallelograms. The dimensions of the parallelograms imply 2T+2dist(Du,v[u1,v1],R)12T+7, as required in Item 3.

We now have all the ingredients to conclude the deterministic lower bound. The adversary reveals the paths Pv2,u1 and Pv1,u2, which are the shortest paths connecting the endpoints of Du,v[u1,v1] and R. Each of these length at least 2T+2. Consider the closed walk

W=Du,v[u1,v1]Pv1,u2RPv2,u1.

By Lemma 4, the potential of each of the connecting paths is bounded, that is, both |p(Pv1,u2)| and |p(Pv2,u1)| are at most 12T+73+c for some constant c. Hence, if we choose n large enough, then |p(W)||10T212T+732c|>0, contradicting Lemma 3 and concluding the proof.

5 Lower Bound for Randomized Online-𝗟𝗢𝗖𝗔𝗟

In this section, we lift our lower bound against deterministic online-𝖫𝖮𝖢𝖠𝖫 to randomized online-𝖫𝖮𝖢𝖠𝖫. Recall that we must work with an oblivious instead of an adaptive adversary. The idea is similar to the proof in Akbari et al. [1]: Whenever our adversary makes an adaptive choice while executing the processes described throughout Section 4, we instead blindly guess one of the choices available. The probability of guessing all the correct choices needed to cause the algorithm to fail is indeed small, but if we have a reasonable number of choices and alternatives, then through repetition we can argue that our adversary succeeds with at least constant probability, thus “breaking” the randomized online-𝖫𝖮𝖢𝖠𝖫 algorithm.

During this process, the key quantity to keep in mind is how many nodes from our budget are consumed by each choice we make (since the entire construction entails revealing nodes to the algorithm) as well as what the number of repetitions implies about how large this budget needs to be. As an example, suppose that in every attempt to prove the algorithm wrong we need to make a many choices from b many equally good alternatives and consume c many nodes in the process. The success probability of one such attempt is 1/ba, and so we wish to repeat this process ba many times to obtain a success probability larger than 11/e>1/2. In turn, this means we must have bacn since otherwise we would have exceeded the total number n of nodes in the graph.

In what follows, we systematically consider all the choices and the number of alternatives for the choices made during the process of Section 4. We stress that this is the only adaptation that needs to be made and all of the other details are identical to the deterministic case.

Quasilinear potential boosting (Section 4.1).

This is the simplest part to argue since Akbari et al. already gave a generalization of the potential boosting strategy to the randomized case, where it succeeds with high probability and uses at most no(1) many nodes, in Lemma 8.6 from [1]. The only detail we need to consider is in Lemma 6 where we potentially reveal two of these paths; however, that certainly does not change the budget usage of no(1) since it is done only once.

Boosting on arbitrary slopes (Section 4.2).

When executing the procedure described in the proof of Lemma 8, once θ and k are fixed, the only choice to be made is in Item 3 (i.e., choosing the relative placement of the two parallelograms between two fixed options). Note that in Item 4 we already have taken care to ensure that the subsequent stages of the construction can be made oblivious to this choice (i.e., their shapes and positioning are the same however the placement is made).

An important detail is that we insist that our adversary succeeds in every single one of the k steps in the construction. This is because, as already discussed in the introduction, it is imperative that the height of the parallelograms is kept under control and, in particular, we wish to keep it at k+1. The naive approach would be to repeat the construction as-is multiple times – however, this is not feasible since there are in total roughly 2k choices in total to be made up to the k-th level of the construction. Since every choice fails with probability 1/2, this would require 22k repetitions, which potentially blows up our budget since we the best upper bound on k we have is k=o(logn).

Instead, we adopt the strategy used in Lemma 8.6 from [1]. Namely, we repeat the construction constantly many times at every level so that at every level our success probability is at least 1/2. Hence the overall construction at level k succeeds with 1/2 probability, its size remains 2O(k)=no(1), and we need only 2k=no(1) repetitions to ensure success with high probability. Moreover, we can do the repetitions at every level in a smart way that does not increase the height of the resulting object. To achieve this, we align the different copies of the construction at the previous level i so they all fit in the same (i+1,θ)-parallelogram. (Recall this is a detail that we guarantee in the proof of Lemma 8.) Hence we preserve the height k+1 for the k-th level of the construction after this modification.

Obtaining a contradiction (Section 4.3).

The construction of Section 4.3 requires multiple choices. The first of these is the orientation of the L-path in Lemma 11, though this is simple as there are only constantly many choices available. Since T is known, once this choice is fixed, then the lengths of the two paths W1 and W2 in the same lemma can be set non-adaptively, where the choice of the lengths here comes from a space of 2O(T)=no(1) alternatives. Having done so, we have nodes u and v defining a diagonal path Du,v and need to determine nodes u1 and v1 as in Lemma 14, for which again there are at most |Du,v|=2O(T)=no(1) choices each. Finally, we must construct the path R of Lemma 15, for which we invoke the reasoning already developed above. In total, we are compounding a constant number of choices over no(1) alternatives in this step, and hence can obtain a constant success probability for the adversary without exceeding the budget of n nodes.

References

  • [1] Amirreza Akbari, Xavier Coiteux-Roy, Francesco D’Amore, François Le Gall, Henrik Lievonen, Darya Melnyk, Augusto Modanese, Shreyas Pai, Marc-Olivier Renou, Václav Rozhon, and Jukka Suomela. Online Locality Meets Distributed Quantum Computing. In Michal Koucký and Nikhil Bansal, editors, Proceedings of the 57th Annual ACM Symposium on Theory of Computing, STOC 2025, Prague, Czechia, June 23-27, 2025, pages 1295–1306. ACM, 2025. doi:10.1145/3717823.3718211.
  • [2] Amirreza Akbari, Navid Eslami, Henrik Lievonen, Darya Melnyk, Joona Särkijärvi, and Jukka Suomela. Locality in Online, Dynamic, Sequential, and Distributed Graph Algorithms. In Kousha Etessami, Uriel Feige, and Gabriele Puppis, editors, 50th International Colloquium on Automata, Languages, and Programming, ICALP 2023, July 10-14, 2023, Paderborn, Germany, volume 261 of LIPIcs, pages 10:1–10:20. Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2023. doi:10.4230/LIPICS.ICALP.2023.10.
  • [3] Jack E. Bresenham. Algorithm for computer control of a digital plotter. IBM Systems Journal, 4(1):25–30, 1965. doi:10.1147/sj.41.0025.
  • [4] Yi-Jun Chang, Gopinath Mishra, Hung Thuan Nguyen, Mingyang Yang, and Yu-Cheng Yeh. A Tight Lower Bound for 3-Coloring Grids in the Online-LOCAL Model. In Ran Gelles, Dennis Olivetti, and Petr Kuznetsov, editors, Proceedings of the 43rd ACM Symposium on Principles of Distributed Computing, PODC 2024, Nantes, France, June 17-21, 2024, pages 106–116. ACM, 2024. doi:10.1145/3662158.3662794.
  • [5] Mohsen Ghaffari, Fabian Kuhn, and Yannic Maus. On the complexity of local distributed graph problems. In Hamed Hatami, Pierre McKenzie, and Valerie King, editors, Proceedings of the 49th Annual ACM SIGACT Symposium on Theory of Computing, STOC 2017, Montreal, QC, Canada, June 19-23, 2017, pages 784–797. ACM, 2017. doi:10.1145/3055399.3055471.