# Almost Global Problems in the LOCAL Model

The landscape of the distributed time complexity is nowadays well-understood for subpolynomial complexities. When we look at deterministic algorithms in the LOCAL model and locally checkable problems (LCLs) in bounded-degree graphs, the following picture emerges: - There are lots of problems with time complexities Θ(^* n) or Θ( n). - It is not possible to have a problem with complexity between ω(^* n) and o( n). - In general graphs, we can construct LCL problems with infinitely many complexities between ω( n) and n^o(1). - In trees, problems with such complexities do not exist. However, the high end of the complexity spectrum was left open by prior work. In general graphs there are problems with complexities of the form Θ(n^α) for any rational 0 < α< 1/2, while for trees only complexities of the form Θ(n^1/k) are known. No LCL problem with complexity between ω(√(n)) and o(n) is known, and neither are there results that would show that such problems do not exist. We show that: - In general graphs, we can construct LCL problems with infinitely many complexities between ω(√(n)) and o(n). - In trees, problems with such complexities do not exist. Put otherwise, we show that any LCL with a complexity o(n) can be solved in time O(√(n)) in trees, while the same is not true in general graphs.

• 20 publications
• 26 publications
• 21 publications
• 22 publications
05/12/2021

### Locally Checkable Labelings with Small Messages

A rich line of work has been addressing the computational complexity of ...
11/06/2017

### New Classes of Distributed Time Complexity

A number of recent papers -- e.g. Brandt et al. (STOC 2016), Chang et al...
01/30/2020

### The Lagrangian remainder of Taylor's series, distinguishes O(f(x)) time complexities to polynomials or not

The purpose of this letter is to investigate the time complexity consequ...
02/09/2022

### The Landscape of Distributed Complexities on Trees and Beyond

We study the local complexity landscape of locally checkable labeling (L...
09/21/2020

### The Complexity Landscape of Distributed Locally Checkable Problems on Trees

Recent research revealed the existence of gaps in the complexity landsca...
10/06/2015

### Local Rademacher Complexity Bounds based on Covering Numbers

This paper provides a general result on controlling local Rademacher com...
01/28/2019

### Space and complexities of territorial systems

The spatial character of territorial systems plays a crucial role in the...

## 1 Introduction

Recently, in the study of distributed graph algorithms, there has been a lot of interest on structural complexity theory: instead of studying the distributed time complexity of specific graph problems, researchers have started to put more focus on the study of complexity classes in this context.

###### LCL problems.

A particularly fruitful research direction has been the study of distributed time complexity classes of so-called problems (locally checkable labellings). We will define s formally in Section 2.2, but the informal idea is that s are graph problems in which feasible solutions can be verified by checking all constant-radius neighbourhoods. Examples of such problems include vertex colouring with colours, edge colouring with colours, maximal independent sets, maximal matchings, and sinkless orientations.

s play a role similar to the class in the centralised complexity theory: these are problems that would be easy to solve with a nondeterministic distributed algorithm – guess a solution and verify it in rounds – but it is not at all obvious what the distributed time complexity of solving a given problem with deterministic distributed algorithms is.

###### Distributed structural complexity.

In the classical (centralised, sequential) complexity theory one of the cornerstones is the time hierarchy theorem [12]. In essence, it is known that giving more time always makes it possible to solve more problems. Distributed structural complexity is fundamentally different: there are various gap results that establish that there are no problems with complexities in a certain range. For example, it is known that there is no problem whose deterministic time complexity on bounded-degree graphs is between and [7].

Such gap results have also direct applications: we can speed up algorithms for which the current upper bound falls in one of the gaps. For example, it is known that -colouring in bounded-degree graphs can be solved in time [17]. Hence -colouring in 2-dimensional grids can be also solved in time. But we also know that in 2-dimensional grids there is a gap in distributed time complexities between and [5], and therefore we know we can solve -colouring in time.

The ultimate goal here is to identify all such gaps in the landscape of distributed time complexity, for each graph class of interest.

###### State of the art.

Some of the most interesting open problems at the moment are related to

polynomial complexities in trees. The key results from prior work are:

• In bounded-degree trees, for each positive integer there is an problem with time complexity [8].

• In bounded-degree graphs, for each rational number there is an problem with time complexity [1].

However, there is no separation between trees and general graphs in the polynomial region. Furthermore, we do not have any problems with time complexities for any .

###### Our contributions.

This work resolves both of the above questions. We show that:

• In bounded-degree graphs, for each rational number there is an problem with time complexity .

• In bounded-degree trees, there is no problem with time complexity between and .

Hence whenever we have a slightly sublinear algorithm, we can always speed it up to in trees, but this is not always possible in general graphs.

###### Key techniques.

We use ideas from the classical centralised complexity theory – e.g. Turing machines and regular languages – to prove results in distributed complexity theory.

In the positive result, the key idea is that we can take any linear bounded automaton (a Turing machine with a bounded tape), and construct an problem such that the distributed time complexity of is a function of the sequential running time of . Prior work [1] used a class of counter machines for a somewhat similar purpose, but the construction in the present work is much simpler, and Turing machines are more convenient to program than the counter machines used in the prior work.

To prove the gap result, we heavily rely on Chang and Pettie’s [8] ideas: they show that one can relate problems in trees to regular languages and this way generate equivalent subtrees by “pumping”. However, there is one fundamental difference:

• Chang and Pettie first construct certain universal collections of tree fragments (that do not depend on the input graph), use the existence of a fast algorithm to show that these fragments can be labelled in a convenient way, and finally use such a labelling to solve any given input efficiently.

• We work directly with the specific input graph, expand it by “pumping”, and apply a fast algorithm there directly.

Many speedup results make use of the following idea: given a graph with nodes, we pick a much smaller value and lie to the algorithm that we have a tiny graph with only nodes [7, 5]. Our approach essentially reverses this: given a graph with nodes and an algorithm , we pick a much larger value and lie to the algorithm that we have a huge graph with nodes.

###### Open problems.

Our work establishes a gap between and in trees. The next natural step would be to generalise the result and establish a gap between and for all positive integers .

## 2 Model and related work

As we study LCL problems, a family of problems defined on bounded-degree graphs, we assume that our input graphs are of degree at most , where is a known constant. Each input graph is simple, connected, and undirected; here is the set of nodes and is the set of edges, and we denote by the total number of nodes in the input graph.

### 2.1 Model of computation

The model considered in this paper is the well studied model [18, 14]. In the model, each node of the input graph runs the same deterministic algorithm. The nodes are labelled with unique -bit identifiers, and initially each node knows only its own identifier, its own degree, and the total number of nodes .

Computation proceeds in synchronous rounds. At each round, each node

• sends a message to its neighbours (it may be a different message for different neighbours),

• receives messages from its neighbours,

• performs some computation based on the received messages.

In the model, there is no restriction on the size of the messages or on the computational power of a node. Hence, after rounds in the model, each node has knowledge about the network up to distance from him. The time complexity of an algorithm running in the model is determined by this radius- that each node needs to explore in order to solve a given problem. It is easy to see that, in this setting, every problem can be solved in diameter time.

### 2.2 Locally checkable labellings

Locally checkable labelling problems (s) were introduced in the seminal work of Naor and Stockmeyer [15]. These problems are defined on bounded degree graphs, so let be the family of such graphs. Also, let and be respectively input and output label alphabets. Each node of a graph has an input , and must produce an output . The output that each node must produce depends on the constraints defined with the problem. Hence, let be the set of legal configurations. A problem is an problem if

• and are of constant size;

• there exists an algorithm able to check the validity of a solution in constant time in the model.

Hence, if the solution produced by the nodes is in the set of valid configurations, then, by just looking at its local neighbourhood, each node must output ‘accept’, otherwise, at least one node must output ‘reject’. An example of an problem is vertex colouring, where we have a constant size palette of colours; nodes can easily check in round whether the produced colouring is valid or not.

### 2.3 Related work

###### Cycles and paths.

problems are fully understood in the case of cycles and paths. In these graphs it is known that there are problems having complexities , e.g. trivial problems, , e.g.  vertex-colouring, and , e.g.  vertex-colouring [14, 9]. Chang, Kopelowitz, and Pettie [7] showed two automatic speedup results: any -time algorithm can be converted into an -time algorithm; any -time algorithm can be converted into an -time algorithm.

###### Oriented grids.

Brandt et al. [5] studied problems on oriented grids, showing that, as in the case of cycles and paths, the only possible complexities of s are , , and , on grids. However, while it is decidable whether a given on cycles can be solved in -rounds in the model [15, 5], it is not the case for oriented grids [5].

###### Trees.

Although well studied, s on trees are not fully understood yet. Chang and Pettie [8] show that any -time algorithm can be converted into an -time algorithm. In the same paper they show how to obtain problems on trees having deterministic and randomized complexity of , for any integer . However, it is not known if there are problems of complexities between and .

###### General graphs.

Another important direction of research is understanding s on general (bounded-degree) graphs. Using the techniques presented by Naor and Stockmeyer [15], it is possible to show that any -time algorithm can be sped up to rounds. It is known that there are problems with complexities  [2, 3, 16, 10] and  [4, 7, 11]. On the other hand, Chang et al. [7] showed that there are no problems with deterministic complexities between and . It is known that there are problems (for example, -colouring) that require rounds [4, 6], for which there are algorithms solving them in rounds [17]. Until very recently, it was thought that there would be many other gaps in the landscape of complexities of problems in general graphs. Unfortunately, it has been shown in [1] that this is not the case: it is possible to obtain s with numerous different deterministic time complexities, including and for any , , , and for any , and for any (where is a positive rational number).

## 3 Near-linear complexities in general graphs

In this section we show the existence of problems having complexities in the spectrum between and . We first give the definition of a standard model of computation, that is Linear Bounded Automata, and we then show that it is possible to encode the execution of an LBA as a locally checkable labelling. We then define an problem where interesting instances are those in which one encodes the execution of a specific LBA in a multidimensional grid. Depending on the number of dimensions of the grid, and on the running time of the LBA, we obtain different time complexities.

### 3.1 Linear bounded automata

A Linear Bounded Automaton (LBA) consists of a Turing machine with a tape of bounded size , able to recognize the boundaries of the tape [13, p. 225]. We consider a simplified version of LBAs, where the machine is initialized with an empty tape (no input is present). We describe this simplified version of LBAs as a -tuple , where:

• is a finite set of states;

• is the initial state;

• is the final state;

• is a finite set of tape alphabet symbols, containing a special symbol (blank), and two special symbols, and , called left and right markers;

• is the transition function.

The tape (of size ) is initialized in the following way:

• the first cell contains the symbol ;

• the last cell contains the symbol ;

• all the other cells contain the symbol .

The head is initially positioned on the cell containing the symbol . Then, depending on the current state and the symbol present on the current position of the tape head, the machine enters a new state, writes a symbol on the current position, and moves to some direction.

In particular, we describe the transition function by a finite set of -tuples , where:

1. The first elements specify the input:

• indicates the current state;

• indicates the tape content on the current head position.

2. The remaining elements specify the output:

• is the new state;

• is the new tape content on the current head position;

• specifies the new position of the head:

• ’ means that the head moves to the next cell;

• ’ indicates that the head moves to the previous cell;

• ’ means the head does not move.

If is not defined on the current state and tape content, the machine terminates. The growth of an LBA , denoted with , is defined as the running time of . For example, it is easy to design a machine that implements a binary counter, counting from all- to all-, and this gives a growth of .

Also, it is possible to define a unary -counter, that is, a list of unary counters (where each one counts from to and then overflows and starts counting from again) in which when a counter overflows, the next is incremented. It is possible to achieve a growth of by carefully implementing these counters (for example by using a single tape of length to encode all the counters at the cost of using more machine states and tape symbols).

### 3.2 Grid structure

Each problem we will construct in Section 3.4 is designed in a way that ensures that the hardest input graphs for the problem, i.e., the graphs providing the lower bound instances for the claimed time complexity, have a (multidimensional) grid structure. In this section, we introduce a class of graphs with this structure.

Let and be positive integers. The set of nodes of an -dimensional grid graph consists of all -tuples with for all . We call the coordinates of node and the sizes of the dimensions . Let and be two arbitrary nodes of . There is an edge between and if and only if , i.e., all coordinates of and are equal, except one that differs by . Figure 1 depicts grid graphs with and dimensions.

#### 3.2.1 Grid labels

In addition to the graph structure, we add constant-size labels to each grid graph. Each edge is assigned two labels and , one for each endpoint. Label is chosen as follows:

• if ;

• if .

Label is chosen analogously. If we want to focus on a specific label of some edge and it is clear from the context which of the two edge labels is considered, we may refer to it simply as the label of .

The labelling of the edges here is just a matter of convenience. We could equally well assign the labels to nodes instead of edges, satisfying the formal criteria of an problem (and, for that matter, combine all input labels, and later output labels, of a node into a single input, resp. output, label). Furthermore, we could also equally well encode the labels in the graph structure. Hence all new time complexities presented in Section 3.4 can also be achieved by problems without input labels.

#### 3.2.2 Local checkability

In order to make sure that (certain) grid graphs are the hardest instances for some constructed problem, we design our problems in a way that, roughly speaking, allows nodes to simply output some kind of error label if they can detect that the input graph is not a grid graph. As nodes potentially can see only a small part of the grid, we are interested in a local characterisation of grid graphs. Given such a characterisation, each node can check locally whether the input graph has a valid grid structure in its neighborhood. As it turns out, such a characterization is not possible, since there are non-grid graphs that look like grid graphs locally everywhere, but we can come sufficiently close for our purposes. In the following, we specify a set of local constraints that characterise a class of graphs that contains all grid graphs of dimension (and a few other graphs). All the constraints depend on the -radius neighbourhood of the nodes, so for each input graph not contained in the characterised graph class, at least one node can detect in rounds (in the model) that the graph is not a grid graph.

For any node and any sequence of edge labels, let denote the node reached by starting in and following the edges with labels . If at any point during traversing these edges there are or more than edges with the currently processed label, is not defined. Let . The full constraints are given below:

1. Basic properties of the labelling. For each node the following hold:

• Each edge incident to has exactly one (-sided) label , and we have or , for some .

• For any two edges incident to , we have .

• For any , there is at least one edge incident to with

2. Validity of the grid structure. For each node the following hold:

• For any incident edge , we have if , and if .

• Let , and let be edges with -sided labels and . Then has an incident edge with label , and has an incident edge with label . Moreover, the two other endpoints of and are the same node, i.e., .

It is clear that -dimensional grid graphs satisfy the given constraints. As observed above, the converse statement is not true, but we mention that it can be transformed into a correct (and slightly weaker) statement by adding the small (non-local) condition that the considered graph contains a node not having any incident edge labelled with some , for all dimensions .

#### 3.2.3 Unbalanced grid graphs

In Section 3.2.2, we saw the basic idea behind ensuring that non-grid graphs are not among the hardest instances for the problems we construct. In this section, we will study the ingredient of our construction that guarantees that grid graphs where the dimensions have “wrong” sizes are not worst-case instances. More precisely, we want that the hardest instances for our problems are grid graphs with the property that there is at least one dimension whose size is not larger than the size of dimension . In the following, we will show how to make sure that unbalanced grid graphs, i.e., grid graphs that do not have this property, allow nodes to find a valid output without having to see too far. In a sense, in any constructed , a locally checkable proof (of a certain well-specified kind) certifying that the input graph is an unbalanced grid graph constitutes a valid (global) output.

Consider a grid graph with dimensions of sizes . If for all , the following output labelling is regarded as correct in any constructed problem:

• For all , node satisfying is labelled .

• All other nodes are labelled .

This labelling is clearly locally checkable, i.e., it can be described as a collection of local constraints: Each node labelled checks that it has exactly two “diagonal neighbours” and that their positions relative to are consistent with the above output specification. Node also may have only one diagonal neighbour, but only if it has no incident edge labelled , or if it has an incident edge labelled for all , but no incident edge labelled . The latter condition ensures that the described diagonal chain of labels terminates at the end of dimension , but not at the end of any other dimension, thereby guaranteeing that grid graphs that are not unbalanced do not allow the output labelling specified above. Finally, the unique node without any incident edge labelled checks that it is labelled , in order to prevent the possibility that each node simply outputs . We refer to Figure 2 for an example of an unbalanced -dimensional grid and its labelling.

### 3.3 Machine encoding

After examining the cases of the input graph being a non-grid graph or an unbalanced grid graph, in this section, we turn our attention towards the last remaining case: that is the input graph is actually a grid graph for which there is a dimension with size smaller than or equal to the size of dimension . In this case, we require the nodes to work together to create a global output that is determined by some LBA. Essentially, the execution of the LBA has to be written (as node outputs) on a specific part of the grid graph. In order to formalise this relation between the desired output and the LBA, we introduce the notion of an LBA encoding graph in the following.

#### 3.3.1 Labels

Let be an LBA, where denotes the size of the tape. Let be the whole state of after step , where is the machine internal state, is the position of the head, and is the whole tape content. The content of the cell in position after step is denoted by . We denote by the node having , , and for all . An (output-labelled) grid graph of dimension is an LBA encoding graph if there exists a dimension satisfying the following.

• is equal to .

• For all and all , it holds that:

• Node is labelled with .

• Node is labelled with .

• Node is labelled with .

• Node is labelled with .

• All other nodes are labelled with .

Intuitively, the -dimensional surface expanding in dimensions and (having all the other coordinates equal to ), encodes the execution of the LBA.

#### 3.3.2 Local checkability

In order to force nodes to output labels that turn the input grid graph into an LBA encoding graph, we must be able to describe the above conditions in the form required by an problem, i.e., as locally checkable constraints. In the following, we provide such a description, showing that the nodes can check whether the graph correctly encodes the execution of an LBA.

1. Each node is labelled either or for exactly one . In the former case, node has no other labels, in the latter case, additionally has some and some label, and potentially the label , but no other labels.

2. The node that does not have any incident edge labelled has label , for some .

3. If a node labelled for some has an incident edge labelled with , then or . Moreover, for each node labelled , nodes , and (provided they are defined) are also labelled .

4. For each node labelled for some , the following hold:

1. If does not have an incident edge labelled , then

• if does not have an incident edge labelled , then it must have labels and ;

• if does not have an incident edge labelled , then it must have label ;

• if has an incident edge labelled and an incident edge labelled , then it has label ;

• has label ;

• if , then node (if defined) is labelled .

2. If has an incident edge labelled , has labels and , and has labels and , then

• ;

• if is labelled with , then and are derived from and according to the specifications of the LBA, and the new position of the head is either on itself, or on , or on , depending on the LBA;

• otherwise, and the nodes and (if defined) are labelled ;

• if , then node (if defined) is labelled .

###### Correctness.

It is clear that an LBA encoding graph satisfies the constraints specified above. Conversely, we want to show that any graph satisfying these constraints is an LBA encoding graph.

The claim follows straightforwardly from the assumptions:

• Constraints 13 ensure that there is a -dimensional surface on which the execution of the LBA is encoded.

• The first constraint of 4 ensures that the LBA is initialized correctly.

• The second constraint of 4 ensures a correct execution of each LBA step, and that nodes on output only after the termination state of LBA is reached.

### 3.4 construction

Fix an integer , and let be an LBA with growth . As we do not fix a specific size of the tape, can be seen as a function that maps the tape size to the running time of the LBA executed on a tape of size . We now construct an problem with complexity related to . Note that depends on the choice of . The general idea of the construction is that nodes can either:

• produce a valid LBA encoding, or

• prove that dimension is too short, or

• prove that there is an error in the (grid) graph structure.

We need to ensure that on balanced grid graphs it is not easy to claim that there is an error, while allowing an efficient solution on invalid graphs, i.e., graphs that contain a local error (some invalid label), or a global error (a grid structure that wraps, or dimension too short compared to the others).

#### 3.4.1 Problem ΠM

Denote by the set of output labels used for producing an LBA encoding graph. Formally, we specify the problem as follows. The input label set for is the set of labels used in the grid labelling. The possible output labels are the following:

1. the labels from ;

2. an unbalanced label, ;

3. an exempt label, ;

4. an error label ;

5. error pointers, i.e., all possible pairs , where is either or for some , and is a bit whose purpose it is to distinguish between two different types of error pointers, type 0 pointers and type 1 pointers.

Note that the separate mention of in this list is not strictly necessary since is contained in , but we want to recall the fact that can be used in both a proof of unbalance and an LBA encoding.

Intuitively, nodes that notice that there is/must be an error in the grid structure, but are not allowed to output because the grid structure is valid in their local neighborhood, can point in the direction of an error. However, the nodes have to make sure that the error pointers form a chain that actually ends in an error. In order to make the proofs in this section more accessible, we distinguish between the two types of error pointers mentioned above; roughly speaking, type 0 pointers will be used by nodes that (during the course of the algorithm) cannot see an error in the grid structure, but notice that the grid structure wraps around in some way, while type 1 pointers are for nodes that can actually see an error. If the grid structure wraps around, then there must be an error somewhere (and nodes that see that the grid structure wraps around know where to point their error pointer to), except in the case that the grid structure wraps around “nicely” (e.g., along one dimension). This exceptional case is the only scenario where, deviating from the above, an error pointer chain does not necessarily end in an error, but instead may form a cycle; however, since the constraints we put on error pointer chains are local constraints (as we want to define an problem), the global behaviour of the chain is irrelevant. We will not explicitly prove the global statements made in this informal overview; for our purposes it is sufficient to focus on the local views of nodes.

Note that if a chain of type 0 error pointers does not cycle, then at some point it will turn into a chain of type 1 error pointers, which in turn will end in an error. Chains of type 1 error pointers cannot cycle. We refer to Figure 3 for an example of an error pointer chain.

An output labelling for problem is correct if the following conditions are satisfied.

1. Each node produces at least one output label. If produces at least two output labels, then all of ’s output labels are contained in .

2. Each node at which the input labelling does not satisfy the local grid graph constraints given in Section 3.2.2 outputs . All other nodes do not output .

3. If a node outputs , then has at least one incident edge with input label .

4. If the output labels of a node are contained in , then either there is a node in ’s -radius neighbourhood that outputs an error pointer, or the output labels of all nodes in ’s -radius neighbourhood are contained in . Moreover, in the latter case ’s -radius neighbourhood has a valid grid structure and the local constraints of an LBA encoding graph, given in Section 3.3.2, are satisfied at .

5. If the output of a node is , then either there is a node in ’s -radius neighbourhood that outputs an error pointer, or the output labels of all nodes in ’s -radius neighbourhood are contained in . Moreover, in the latter case ’s -radius neighbourhood has a valid grid structure and the local constraints for a proof of unbalance, given in Section 3.2.3, are satisfied at .

6. Let be a node that outputs an error pointer . Then is defined, i.e., there is exactly one edge incident to with input label . Let be the neighbour reached by following this edge from , i.e., . Then outputs either or an error pointer , where in the latter case the following hold:

• , i.e., the type of the pointer cannot decrease when following a chain of error pointers;

• if , then , i.e., the pointers in a chain of error pointers of type 0 are consistently oriented;

• if and , , then , i.e., when following a chain of error pointers of type 1, the dimension of the pointer cannot decrease;

• if and for some , then , i.e., any two subsequent pointers in the same dimension have the same direction.

These conditions are clearly locally checkable, so is a valid problem.

#### 3.4.2 Time complexity

Let be the smallest positive integer satisfying . We will only consider LBAs with the property that and for any two tape sizes we have . In the following, we prove that has time complexity .

##### Upper bound

In order to show that can be solved in rounds, we provide an algorithm for . Subsequently, we prove its correctness and that its running time is indeed . Algorithm proceeds as follows.

First, each node gathers its constant-radius neighbourhood, and checks whether there is a local error in the grid structure at . In that case, outputs . Then, each node that did not output gathers its -radius neighbourhood, where for a large enough constant , and acts according to the following rules.

• If there is a node labelled in ’s -radius neighbourhood, then outputs an error pointer of type 1, where has the following property: among all shortest paths from to some node that outputs , there is one where the first edge on the path has input label , but, for any , there is none where the first edge has input label .

• Now consider the case that there is no node labelled in ’s -radius neighbourhood, but there is a path from to itself with the following property: Let be the sequence of labels read on the edges when traversing , where for each edge traversed from to we only read the label . Then there is some such that the number of occurrences of label in is not the same as the number of occurrences of label in . (In other words, the grid structure wraps around in some way.) Let be the smallest for which such a path exists. Then outputs an error pointer of type 0, where .

• If the previous two cases do not apply (i.e., the input graph has a valid grid structure and does not wrap around, as far as can see), then checks for each dimension whether in ’s -radius neighbourhood there is both a node that does not have an incident edge labelled and a node that does not have an incident edge labelled . For each dimension for which such two nodes exist, computes the size of the dimension by determining the distance between those two nodes w.r.t. dimension . Here, and in the following, assumes that the input graph also continues to be a grid graph outside of ’s -radius neighbourhood. Then, checks whether among these there is a dimension with that, in case actually computed the size of dimension , also satisfies . Now there are two cases:

• If such a exists, then chooses the smallest such (breaking ties in a consistent manner), denoted by , and computes its coordinate in dimension . Node also computes its coordinate in dimension or verifies that it is larger than . Since can determine whether it has coordinate in all the other dimensions, it has all the information required to compute its output labels in the LBA encoding graph where the LBA execution takes place on the surface that expands in dimensions and . Consequently, outputs these labels. Note further that, according to the definition of an LBA encoding graph, outputs if it verifies that its coordinate in dimension is larger than , even if it has coordinate in all dimensions except dimension and (possibly) . Note that if the input graph does not continue to be a grid graph outside of ’s -radius neighbourhood, then neighbours of might output error pointers, but this is still consistent with the local constraints of .

• If no such exists, then, by the definition of , node sees (nodes at) both borders of dimension . In this case, can compute the label it would output in a proof of unbalance, since for this, only has to determine whether its coordinates are the same in all dimensions (which is possible as all nodes with this property are in distance at most from the node without any incident edge labelled ). Consequently, outputs this label. Again, if the input graph does not continue to be a grid graph outside of ’s -radius neighbourhood, then, similarly to the previous case, the local constraints of are still satisfied.

theoremthmupperbound Algorithm solves problem in rounds.

###### Proof.

The complexity of is clearly . We need to prove that it produces a valid output labelling for . For this, first consider the case that the input graph is a grid graph. Let be the dimension with minimum size (apart, possibly, from the size of dimension ). If , then , by the definition of and the assumption that . In this case, according to algorithm , the nodes output labels that turn the input graph into an LBA encoding graph, thereby satisfying the local constraints of . If, on the other hand, , then according to algorithm , the nodes output labels that constitute a valid proof for unbalanced grids, again ensuring that the local constraints of are satisfied.

If the input graph looks like a grid graph from the perspective of some node (but might not be a grid graph from a global perspective), then there are two possibilities: either the input graph also looks like a grid graph from the perspective of all nodes in ’s -radius neighbourhood, in which case the above arguments ensure that the local constraints of (regarding LBA encoding labels, i.e., labels from ) are satisfied at , or some node in ’s -radius neighbourhood notices that the input graph is not a grid graph, in which case it outputs an error pointer and thereby ensures the local correctness of ’s output. The same argument holds for the local constraints of regarding labels for proving unbalance (instead of labels from ), with the only difference that in this case we have to consider ’s -radius neighbourhood (instead of ’s -radius neighbourhood).

What remains to show is that the constraints of are satisfied at nodes that output or an error pointer. If outputs according to , then the constraints of are clearly satisfied, hence assume that outputs an error pointer .

We first consider the case that , i.e., outputs an error pointer of type . In this case, according to the specifications of , there is no error in the grid structure in ’s -radius neighbourhood. Let be the neighbour of the error pointer points to, i.e., the node reached by following the edge with label from . Due to the valid grid structure around , node is well-defined. According to the specification of , we have to show that outputs an error pointer satisfying or . If there is a node in ’s -radius neighbourhood that outputs , then outputs an error pointer of type 1, i.e., . Thus, assume that there is no such node, which implies that the grid structure in ’s -radius neighbourhood is valid as well.

Consider a path from to itself inside ’s -radius neighbourhood, and let be the sequence of edge labels read when traversing this path, where for each edge , we only consider the input label that belongs to the node from which the traversal of the edge starts, i.e., if edge is traversed from to . Then, due to the grid structure of ’s -radius neighbourhood, there is such a path with the following property: for each , at most one of and is contained in the edge label sequence (as any two labels and “cancel out”), and the edge label sequence (and thus the directions of the edges) is ordered non-decreasingly w.r.t. dimension, i.e., if and for some , then . Also, we can assume that the edge label of the first edge on is of the kind for some as we can reverse the direction of path and subsequently transform it into a path with the above properties by reordering the edge labels. Due to the specification of regarding type 0 error pointer outputs and the above observations, we can assume that .

Consider the path obtained by starting at and following the edge label sequence . Since and , we have that . Since is contained in the -radius neighbourhood of (and has the nice structure outlined above), is contained in the -radius neighbourhood of , thereby ensuring that outputs a type 0 error pointer. Let and be the indices satisfying and , respectively. Again due to the specification of regarding type 0 error pointer outputs, we see that . However, using symmetric arguments to the ones provided above, it is also true that for each path from to itself of the kind specified above, there is a path from to itself that contains the same labels in the label sequence as (although not necessarily in the same order), which implies that . Hence, , and we obtain , as required.

Now consider the last remaining case, i.e., that outputs an error pointer of type . Again, let be the neighbour of the error pointer points to, i.e., the node reached by following the edge with label from . Let and be the lengths of the shortest paths from , resp.  to some node that outputs . By the specification of regarding type 1 error pointer outputs, we know that , which ensures that outputs or an error pointer of type 1. If outputs , then the local constraints of are clearly satisfied at . Thus, consider the case that outputs an error pointer of type 1. Let and be the indices satisfying and , respectively. We need to show that either and , or .

Suppose for a contradiction that either and , or . Note that the latter case also implies . Consider a path of length from to some node outputting with the property that the first edge on has input label . Such a path exists by the specifiation of . Let be the path from to obtained by appending to the path from to consisting of edge . Note that . Since did not output , the local grid graph constraints, given in Section 3.2.2, are satisfied at . Hence, if , we can obtain a path from to by exchanging the directions of the first two edges of , i.e., is obtained from by replacing the first two edges by the edges . Note that and . In this case, since has length and starts with an edge labelled , we obtain a contradiction to the specification of regarding error pointers of type 1, by the definitions of . Thus assume that and . In this case, which implies that , by the definitions of . This is a contradiction to the equation observed above. Hence, the local constraints of are satisfied at . ∎

##### Lower bound

theoremthmlowerbound Problem cannot be solved in rounds.

###### Proof.

Consider -dimensional grid graphs where the number of nodes satisfies . Clearly, there are infinitely many with this property, due to the definition of . More specifically, consider such a grid graph satisfying for all , and . By the local constraints of , the only valid global output is to produce an LBA encoding graph, on a surface expanding in dimensions and for some . In fact:

• If nodes try to prove that the grid graph is unbalanced, since , the diagonal proof must either be locally wrong, or it must terminate on a node that, for any , does not have an incident edge labelled , which also violates the local constraints of .

• If nodes try to produce an error pointer, since the specification of the validity of pointer outputs in the local constraints of ensures that on grid graphs a pointer chain cannot visit any node twice, any error pointer chain must terminate somewhere. Since no nodes can be labelled , this is not valid.

• The only remaining possibility for the node not having any edge labelled with , is to output a label from , which already implies that all the other nodes must produce outputs that turn the graph into an LBA encoding graph.

Thus, it remains to show that producing a valid LBA encoding labelling requires time . Consider the node having coordinate equal to and all other coordinates equal to . This node must be labelled , the nodes with coordinate strictly less than must not be labelled , and the nodes with coordinate strictly greater than must be labelled . Thus, a node needs to know if it is at distance from the boundary of coordinate , which requires time.

#### 3.4.3 Instantiating the construction

Our construction is quite general and allows to encode a wide variety of LBAs to obtain many different complexities. As a proof of concept, we show some complexities that can be obtained using some specific LBAs.

• By using a -unary counter, for constant , we obtain a growth of .

• By using a binary counter, we obtain a growth of .

For any rational number , there exists an problem with time complexity .

###### Proof.

Let be positive integers satisfying . Given an LBA with growth and using a -dimensional grid graph, we obtain an problem with complexity . We have that , which implies . Thus the time complexity of our problem is . ∎

There exist problems of complexities , for any positive integer .

###### Proof.

Given an LBA with growth and using an -dimensional grid graph, we obtain an problem with complexity . We have that , which implies . Thus the time complexity of our problem is . ∎

## 4 Complexity gap on trees

In this section we prove that, on trees, there are no s having complexity between and . We show that, given an algorithm that solves a problem in time , it is possible to speed up its running time to , by first constructing a virtual tree in which a ball of radius corresponds to a ball of radius of the original graph, and then find a valid output for the original graph, having outputs for the virtual graph .

### 4.1 Skeleton tree

We first describe how, starting from a tree , nodes can distributedly construct a virtual tree , called the skeleton of . Intuitively, is obtained by removing all subtrees of having a height that is less than some threshold .

More formally, let , for some constant that will be fixed later. Each node starts by gathering its -radius neighbourhood, . Also, let be the degree of node in . We partition , , in components (one for each neighbour of ), and let us denote these components with , where . Each component contains all nodes of present in the subtree rooted at the -th neighbour of , excluding .

Then, each node marks as all the components that have low depth and broadcasts this information. Informally, nodes build the skeleton tree by removing all the components that are marked as by at least one node. More precisely, each node , for each , if for all in , marks all edges in as , where is the -th neighbor of . Then, broadcasts and the edges marked as to all nodes at distance at most . Finally, when a node receives messages containing edges that have been marked with by some node, then also internally marks as those edges.

Now we have all the ingredients to formally describe how we construct the skeleton tree. The skeleton tree is defined in the following way. Intuitively, we keep only edges that have not been marked , and nodes with at least one remaining edge (i.e., nodes that have at least one incident edge not marked with ). In particular, , and . Also, we want to keep track of the mapping from a node of to its original node in ; let be such a mapping. Finally, we want to keep track of deleted subtrees, so let be the subtree of rooted at containing all nodes of , for all such that . See Figure 4 for an example.

### 4.2 Virtual tree

We now show how to distributedly construct a new virtual tree, starting from , that satisfies some useful properties. Informally, the new tree is obtained by pumping all paths contained in having length above some threshold. More precisely, by considering only degree- nodes of we obtain a set of paths. We split these paths in shorter paths of length () by computing a ruling set. Then, we pump these paths in order to obtain the final tree. Recall a -ruling set of a graph guarantees that nodes in have distance at least , while nodes outside have at least one node in at distance at most . It can be distributedly computed in rounds using standard colouring algorithms [14].

More formally, we start by splitting the tree in many paths of short length. Let be the forest obtained by removing from each node having . is a collection of disjoint paths. Let be the mapping from nodes of to their corresponding node of . See Figure 5 for an example.

We now want to split long paths of in shorter paths. In order to achieve this, nodes of the same path can efficiently find a ruling set in the path containing them. Nodes not in the ruling set form short paths of length , such that , except for some paths of that were already too short, or subpaths at the two ends of a longer path. Let be the subset of the resulting paths having length satisfying . See Figure 6 for an example.

In order to obtain the final tree, we use the following function, . Informally, given a graph and a subgraph connected to the other nodes of via a set of nodes called poles, and given another graph , it replaces with . This function is a simplified version of the function presented in [8] in Section 3.3. [] Let be a subgraph of . The poles of are those vertices in adjacent to some vertex in . Let