Locally checkable problems in rooted trees

Consider any locally checkable labeling problem Π\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\Pi $$\end{document} in rooted regular trees: there is a finite set of labels Σ\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\Sigma $$\end{document}, and for each label x∈Σ\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$x \in \Sigma $$\end{document} we specify what are permitted label combinations of the children for an internal node of label x (the leaf nodes are unconstrained). This formalism is expressive enough to capture many classic problems studied in distributed computing, including vertex coloring, edge coloring, and maximal independent set. We show that the distributed computational complexity of any such problem Π\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\Pi $$\end{document} falls in one of the following classes: it is O(1), Θ(log∗n)\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\Theta (\log ^* n)$$\end{document}, Θ(logn)\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\Theta (\log n)$$\end{document}, or nΘ(1)\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$n^{\Theta (1)}$$\end{document} rounds in trees with n nodes (and all of these classes are nonempty). We show that the complexity of any given problem is the same in all four standard models of distributed graph algorithms: deterministic LOCAL\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\mathsf {LOCAL}$$\end{document}, randomized LOCAL\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\mathsf {LOCAL}$$\end{document}, deterministic CONGEST\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\mathsf {CONGEST}$$\end{document}, and randomized CONGEST\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\mathsf {CONGEST}$$\end{document} model. In particular, we show that randomness does not help in this setting, and the complexity class Θ(loglogn)\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\Theta (\log \log n)$$\end{document} does not exist (while it does exist in the broader setting of general trees). We also show how to systematically determine the complexity class of any such problem Π\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\Pi $$\end{document}, i.e., whether Π\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\Pi $$\end{document} takes O(1), Θ(log∗n)\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\Theta (\log ^* n)$$\end{document}, Θ(logn)\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\Theta (\log n)$$\end{document}, or nΘ(1)\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$n^{\Theta (1)}$$\end{document} rounds. While the algorithm may take exponential time in the size of the description of Π\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\Pi $$\end{document}, it is nevertheless practical: we provide a freely available implementation of the classifier algorithm, and it is fast enough to classify many problems of interest.


INTRODUCTION
We aim at systematizing and automating the study of computational complexity in the field of distributed graph algorithms.Many key problems of interest in the field are locally checkable.While it is known that questions related to the distributed computational complexity of locally checkable problems are undecidable in general graphs [13,24], there is no known obstacle that would prevent one from completely automating the study of locally checkable problems in trees.Achieving this is one of the major open problems in the field: currently only parts of the complexity landscape are known to be decidable [16], and the general decidability results are primarily of theoretical interest; practical automatic techniques are only known for specific families of problems [2,13,17].
In this work we show that the study of locally checkable graph problems can be completely automated in regular rooted trees.We not only give a full classification of the distributed complexity of any such problem (in all the usual models of distributed computing: deterministic and randomized LOCAL and CONGEST), but we also present an algorithm that can automatically determine the complexity class of any given problem (with one caveat: our algorithm determines if the complexity is  Θ (1) , but not the precise exponent in this case).Even though the algorithm takes in the worst case exponential time in the size of the problem description, it is nevertheless practical: we have implemented it for the case of binary trees, and it is in practice very fast, classifying e.g. the sample problems that we present here in a matter of milliseconds [27].

Setting
In this work we study locally checkable problems defined in regular, unlabeled, not necessarily balanced, rooted trees of bounded degree.For our purposes, such a problem Π is specified as a triple (, Σ, ), where  ∈ N is the number of children for the internal nodes, Σ is a finite set of labels, and  is the set of permitted configurations.Each configuration looks like  :  1  2 • • •   , indicating that if the label of an internal node is , then one of the possible labelings for its  children is  1 ,  2 , . . .,   , in some order (that is, the order of the children does not matter).The leaf nodes are unconstrained.
The reason why we choose this specific setting is the following.As soon as we consider inputs, it is known that decidability questions become much harder [1,14], and since even the case with no inputs is still not understood, we try to understand this setting first.Moreover, it is possible to use non-regular trees to encode trees with inputs, and for this reason we constrain only nodes with exactly  children.

Example: 3-coloring
Consider the problem of 3-coloring binary trees, i.e., trees in which internal nodes have  = 2 children.The possible labels of the nodes are Σ = {1, 2, 3}.The color of a node has to be different from the colors of any of its children; hence we can write down the set of configurations e.g. as follows:  = 1 : 22, 1 : 23, 1 : 33, 2 : 11, 2 : 13, 2 : 33, 3 : 11, 3 : 12, 3 : 22 . (1) We emphasize that the ordering of the children is irrelevant here; hence 1 : 23 and 1 : 32 are the same configuration.It is easy to verify that this is a straightforward correct encoding of the 3-coloring problem in binary trees.
It is well-known that this problem can be solved in the LOCAL model of distributed computing in  (log * ) rounds in rooted trees [9,Section 3.4], using the technique by Cole and Vishkin [19], and this is also known to be tight, both for deterministic and randomized algorithms [21,23].
One can also in a similar way define the problem of 2-coloring binary trees; it is easy to check that this is a global problem, with complexity Θ() rounds:  = 1 : 22, 2 : 11 . (2)

Example: maximal independent set
Let us now look at a bit more interesting problem: maximal independent sets (MIS).Let us again stick to binary trees, i.e.,  = 2 children.The first natural idea for encoding MIS as a locally checkable problem would be to try to use only two labels, 0 and 1, with 1 indicating that a node is in the independent set, but this is not sufficient to express both the notion of independence and the notion of maximality.However, three labels will be sufficient to correctly capture the problem.We set Σ = {1, , }, with 1 indicating that a node is in the independent set, and choose the following configurations: = 1 : , 1 : , 1 : ,  : ,  : 1,  : 11 .
Now it takes a bit more effort to convince oneself that this indeed correctly captures the idea of maximal independent sets.The key observations are these: a node with label 1 cannot be adjacent to another node with label 1, a node with label  has to have 1 above it, and a node with label  has to have 1 below it, so nodes with label 1 clearly form a maximal independent set.Conversely, given any maximal independent set  we can find a corresponding label assignment if we first assign labels 1 to nodes in  , then assign labels  to the parents of the nodes in  , and finally label the remaining nodes with label .The only minor technicality is that this labeling corresponds to an MIS only for internal nodes of the tree, but as is often the case, once the internal parts are solved correctly, one can locally fix the labels near the root and the leaves.
Maximal independent set is a well-known symmetry-breaking problem, and e.g. in the case of a directed path ( = 1) it is known to be as hard as e.g.3-coloring.Hence one might expect that MIS on rooted regular binary trees also has got the complexity of Θ(log * ) rounds in the LOCAL model.This is not the case-maximal independent set in rooted binary trees can be solved in constant time!Indeed, this is a good example of a non-trivial constant-time-solvable problem.It can be solved in exactly 4 rounds, using the following idea (again, omitting some minor details related to what happens e.g.near the root).
First, we need to pick some consistent way of referring to your "left" child and the "right" child (for this reason, we can assume that a port numbering is available, that is, a node can send a message to a specific child, by indexing it with a number from 1 to , or we can assume that nodes have unique identifiers, and then we can order the children by their unique identifiers).Label all nodes first with an empty string.Then we repeat the following step for 4 times: add 0 to your string and send it to your left child, and add 1 to your string and send it to your right child.Your new label is the label that you received from your parent.This way all nodes get labeled with a 4-bit string (see Figure 1a).A key property is this: if my string is , the string of my parent is 0 or 1.Finally, interpret the binary string as a number between 0 and 15, and output the corresponding element of the following string (using 0-based indexing; see Figure 1b): One can verify the correctness of the algorithm by checking all 2 3 possible cases: for example, if a node is labeled with 010, it will output either symbol 2 of (4), which is , or symbol 10, which is 1.Its two children will have labels 0100 and 0101, so they will output symbols 4 and 5 of (4), which are  and .This results in a configuration  :  or 1 : , both of which are valid in (3).
The key point of the example is this: even though the algorithm is somewhat involved, we can use the computer program accompanying in this work to automatically discover this algorithm and to determine that this problem is indeed constant-time solvable!Also, this problem demonstrates that there are  (1)-round-solvable locally checkable problems in rooted regular trees that require strictly more than zero rounds, while e.g. in the previously-studied family of binary labeling problems [2] all  (1)-round-solvable problems are known to be zero-round solvable.

Example: branch 2-coloring
As the final example, let us consider the following problem, with  = 2 and Σ = {1, 2}: This problem is, in essence, 2-coloring with a choice: starting with a node of label 1 and going downwards, there is always a monochromatic path labeled with 1, 1, 1, 1, . . ., and a properly colored path labeled with 1, 2, 1, 2, . . . .It turns out that the choice makes enough of a difference: the complexity of this problem is Θ(log ) rounds.We encourage the reader to come up with an algorithm and a matching lower bound-with our techniques we get a tight result immediately.Table 1.An overview of the landscape and decidability of the round complexity of LCL problems in the LOCAL model.The case studied in the present work (unlabeled, rooted, regular trees) is highlighted with shading, and the darker shade indicates the key new results.The decidability is given assuming P ≠ PSPACE ≠ EXPTIME.We have listed a few key references for each column, focusing on decidability aspects; the overall picture of the complexity landscape is the result of a long sequence of papers, including [4,5,7,12,15,19,21,23].

Setting
Paths and cycles Trees General

Contributions
As we have seen, the family of locally checkable problems in regular rooted trees is rich and expressive.Using auxiliary labels similar to what we saw in the MIS example in Section 1.3, we can encode, in essence, any locally checkable labeling problem (LCL problem) [24] in the classic sense, as long as the problem is such that the interesting part is related to what happens in the internal parts of regular trees.We have already seen that there are problems with at least four distinct complexity classes:  (1), Θ(log * ), Θ(log ), and Θ().In section 8 we also show how to generate problems of complexity Θ( 1/ ) for any  = 1, 2, 3, . . .We prove in this work that this list is exhaustive: any problem that can be represented in our formalism has complexity  (1), Θ(log * ), Θ(log ), or Θ( 1/ ) in rooted regular trees with  nodes.This is a robust result that does not depend on the specific choice of the model of computing: the complexity of a given problem is the same, regardless of whether we are looking at the LOCAL model or the CONGEST model, and regardless of whether we are using deterministic or randomized algorithms.
One of the surprising consequences is that randomness does not help in rooted regular trees.In unrooted regular trees there are problems (the canonical example being the sinkless orientation problem) that can be solved with the help of randomness in Θ(log log ) rounds, while the deterministic complexity is Θ(log ) [13].This class of problems disappears in rooted trees.
Our main contribution is that the complexity of any given problem in this formalism is decidable: there is an algorithm that, given the description of a problem Π as a list of permitted configurations, outputs the computational complexity of problem Π, putting it in one of the four possible classes, i.e., determines whether the complexity is  (1), Θ(log * ), Θ(log ), or Θ( 1/ ) for some ; in the fourth case our algorithm does not determine the exponent , but then one could (at least in principle) use the more general decision procedure by Chang [14] to determine the value of .
While our algorithm takes in the worst case exponential time in the size of the description of Π, the approach is nevertheless practical.We have implemented the algorithm for the case of  = 2, and made it freely available online [27].
Even though it is not at all optimized for performance, it classifies for example all of our sample problems above in a matter of milliseconds.
We summarize our key results and compare them with prior work in Table 1.

RELATED WORK
2.1 Landscape of LCL problems in the LOCAL model 2.1.1Paths and cycles.We know that, on graph families such as paths and cycles, there are LCLs with complexities (both deterministic and randomized) of  (1) (e.g., trivial problems), Θ(log * ) [19,21,23] (e.g., 3-coloring), and Θ() (e.g., global problems such as properly orienting a path/cycle).Moreover, there are complexity gaps, that is, in these families of graphs, there are no LCLs with round complexity between  (1) and  (log * ) [24], and between  (log * ) and  () [15].These works show that the only possible complexities for LCL problems on paths and cycles are  (1), Θ(log * ), and Θ(), and randomness does not help in solving problems faster.

Trees.
For the case of the graph family of trees almost everything is understood nowadays.As in the case of paths and cycles, we have LCLs with time complexities (both deterministic and randomized)  (1), Θ(log * ), and Θ().
On trees, we know that there is more: there are LCL problems with both deterministic and randomized complexity of Θ(log ) (e.g., problems of the form "copy the input of the nearest leaf"), and Θ( 1/ ) for any  ≥ 2 [16].Moreover, there are cases where randomness helps, in fact there are problems that have Θ(log ) deterministic and Θ(log log ) randomized complexity [12].As far as gaps are concerned, let us first consider the spectrum of time complexities of  (log * ), and then the one of  (log * ).Chang et al. [15] showed that the deterministic complexity of any LCL problem on bounded-degree trees is either  (log * ) or Ω(log ), while its randomized complexity is either  (log * ) or Ω(log log ).Moreover, Chang and Pettie [16] showed that any algorithm that takes   (1) rounds can be sped up to run in  (log ) rounds.Balliu et al. [4] showed that there is a gap between  ( √ ) and  () for deterministic algorithms, and Chang [14] extended these results and showed that there is a gap between  ( 1/ ) and  ( 1/(−1) ), for any  ≥ 2, for both deterministic and randomized algorithms.The spectrum of time complexities of  (log * ) is still not entirely understood.Chang and Pettie [16] showed that ideas similar to Naor and Stockmeyer [24] can be used to prove that there are no LCLs on bounded-degree trees with time complexity between  (1) and  (log log * ).Also, in the same paper, the authors conjectured that it should be possible to extend this gap up to  (log * ).While this still remains an open question, Balliu et al. [8] showed that such a gap exists for a special subclass of LCLs, called homogeneous LCLs.
Observe that all the mentioned results hold for the setting of unrooted trees, and in this setting there are still many open questions related to decidability.In this work, we prove decidability results for a restriction of this setting, that is, for rooted trees.

General graphs.
In general bounded-degree graphs there are LCLs with the same time complexity as in trees, so the question is if there are also the same gaps, or if in the case of general graphs we have a denser spectrum of complexities.First of all, the gaps of the lower spectrum on trees hold also on general graphs: we still have the  (1) - (log log * ) gap for both deterministic and randomized algorithms, the  (log * ) - (log ) for deterministic algorithms, and the  (log * ) - (log log ) gap for randomized algorithms.Also, Chang and Pettie [16] showed that any  (log )-round randomized algorithm can be sped up to run in  ( LLL ) rounds, where  LLL is the time required for solving with randomized algorithms the distributed constructive Lovász Local Lemma problem (LLL) [18] under a polynomial criterion.By combining this result with the results on the complexity of LLL by Fischer and Ghaffari [20] and the network decomposition one by Rozhoň and Ghaffari [26], we get a gap for randomized algorithms between  (poly(log log )) and  (log ).Balliu et al. [7] showed that, differently from the case of trees, the regions between  (log log * ) and  (log * ) and between  (log ) and  () are dense.In fact, for any complexity  in these regions, it is possible to define an LCL with a time complexity that is arbitrary close to  .Also, in the case of trees, randomness either helps exponentially or not at all, while in the case of general graphs this is not the case anymore.In fact, Balliu et al. [5] showed that there are LCL problems on general graphs where randomness helps only polynomially by defining LCLs with deterministic complexity Θ(log  ) and randomized complexity Θ(log −1  log log ), for any integer  ≥ 1.
2.1.4Special settings.Over the years, researchers have investigated the complexity of interesting subclasses of LCLs.
We already mentioned homogeneous LCLs on trees [8], that, on a high level, are LCLs for which the hard instances are Δ-regular trees.For this subclass of LCL problems, the spectrum of deterministic complexities consists of  (1), Θ(log * ), and Θ(log ).Also, as in the case of trees, there are cases where randomness helps: there are homogeneous LCLs with Θ(log ) deterministic and Θ(log log ) randomized complexity.These are the only possible complexities for homogeneous LCLs.Brandt et al. [13] studied LCLs on -dimensional torus grids, and showed that there are LCLs with complexity (both deterministic and randomized)  (1), Θ(log * ), and Θ( 1/ ).The authors showed that these are the only possible complexities, implying that randomness does not help.Balliu et al. [2] studied binary labeling problems, that are LCLs that can be expressed with no more than two labels in the edge labeling formalism [3,25] (such LCLs include, for example, sinkless orientation).The authors showed that, in trees, there are no such LCLs with deterministic round complexity between  (1) and  (log ), and between  (log ) and  (), proving that the spectrum of deterministic complexities of binary labeling problems in bounded-degree trees consists of  (1), Θ(log ) and Θ().
The authors also studied the randomized complexity of binary labeling problems that have deterministic complexity Θ(log ), showing that for some of them randomness does not help, while for some others it does help (note that from previous work we know that, in this case, randomness either helps exponentially or not at all).Determining the tight randomized complexity of all binary labeling problems is still an open question.

Decidability of LCL problems
As we have seen, there are often gaps in the spectrum of distributed complexities of LCLs.Hence, a natural question that arises is the following: given a specific LCL, can we decide on which side of the gap it falls?In other words, are these classifications of LCL problems decidable?We can push this question further and ask whether it is possible to automate the design of distributed algorithms for optimally solving LCLs.There is a long line of research that has investigated these kind of questions.
For graph families that consist of unlabeled paths and cycles (that is, nodes do not have any label in input), the complexity of a given LCL is decidable [13,17,24].The next natural question is whether we have decidability in the case of trees (rooted or not).Because the structure of a tree can be used to encode input labels, researchers had to first understand the role of input labels in decidability.For this purpose, Balliu et al. [1] studied the decidability of labeled paths and cycles, showing that the complexity of LCLs in this setting is decidable, but it is PSPACE-hard to decide it, and this PSPACE-hardness result extends also for the case of bounded-degree unlabeled trees (since the structure of the tree may encode input labels).The authors also show how to automate the design of asymptotically optimal distributed algorithms for solving LCLs in this context.Later, Chang [14] improved these results showing that, in this setting, it is EXPTIME-hard to decide the complexity of LCLs.While the decidability on bounded degree trees is still an open question, there are some positive partial results in this direction.In fact, Chang and Pettie [16] along with the  (log ) -  (1) gap, showed also that we can decide on which side of the gap the complexity of an LCL lies.Moreover, Balliu et al. [2] showed that, the deterministic complexity of binary labeling problems on trees is decidable and we can automatically find optimal algorithms that solve such LCLs.The works of Brandt [10] and Olivetti [25] played a fundamental role in further understanding to which extent we can automate the design of algorithms that optimally solve LCLs.
Unfortunately, in general, the complexity of an LCL is not decidable.In fact, Naor and Stockmeyer showed that, even on unlabeled non-toroidal grid graphs, it is undecidable whether the complexity of a given LCL is  (1) [24].For unlabeled toroidal grids, Brandt et al. [13] showed that, given an LCL, it is decidable whether its complexity is  (1), but it is undecidable whether its complexity is Θ(log * ) or Θ().On the positive side, the authors showed that, given an LCL with round complexity  (log * ), one can automatically find an  (log * ) rounds algorithm that solves it.

ROAD MAP
We will start by providing some useful definitions in Section 4.Then, in Section 5 we will consider the spectrum of complexities in the Ω(log ) region (that is, Θ(log ) and above).We will define an object called certificate for  (log ) solvability, for which we will prove, in Theorem 5.3, that we can decide the existence in polynomial time.We will prove in Theorem 5.1 that, if such a certificate for a problem exists, then the problem can be solved in  (log ) time with a deterministic algorithm, even in the CONGEST model, while if such a certificate does not exist then we will prove in Theorem 5.2 that the problem requires  Ω (1) rounds, even in the LOCAL model and even for randomized algorithms.
By combining these results, we will essentially obtain a decidable gap between  (log ) and   (1) that is robust on the choice of the model.
We will then consider, in Section 6, the spectrum of complexities in the  (log ) region.We will define the notion of certificate for  (log * ) solvability, and we will prove, in Theorem 6.10, that we can decide in exponential time if such a certificate exists.We will also prove, in Theorem 6.3, that the existence of such a certificate implies a deterministic  (log * ) algorithm for the CONGEST model, while we will prove in Lemma 6.7 that the non-existence of such a certificate implies an Ω(log ) randomized lower bound for the LOCAL model.Hence, also in this case we obtain a decidable gap that is robust on the choice of the model.
In Section 7, we consider the spectrum of complexities in the  (log * ) region.We will define the notion of certificate for  (1) solvability, that will be nothing else than a certificate for  (log * ) solvability that has some special property.
We will show, in Theorem 7.8, that also in this case, we can decide its existence in exponential time, and we will show in Theorem 7.2 that its existence implies a constant-time deterministic algorithm for the CONGEST model, while we will show in Theorem 7.7 that the non-existence implies an Ω(log * ) lower bound for the LOCAL model.Hence, we will obtain that there are only four possible complexities,  (1), Θ(log * ), Θ(log ), and  Ω (1) , and that for all problems we can decide which of these four complexities is the right one.
For the fine-grained structure inside the  Ω (1) class we refer to the prior work [6,14,16]; while these papers study the case of unrooted trees, we note that the orientation can be encoded as a locally checkable input, and the results are also applicable here.It follows that there are only classes  (1), Θ(log * ), Θ(log ), and Θ( 1/ ) for  = 1, 2, . . ., and the exact class (including the value of ) is decidable.Although the existence of the gap  ( 1/(+1) ) - ( 1/ ) [14] applies to regular rooted trees, the problems with complexity Θ( 1/ ) that have been shown to exist in [16] are not defined on regular rooted trees (e.g., nodes of different degrees may have different constraints).In section 8, we define problems with complexity Θ( 1/ ) in regular rooted trees, showing that the complexity class Θ( 1/ ) is non-empty for regular rooted trees.

DEFINITIONS
In this section we define some notions that will be used in the following sections.

Input graphs
We assume that all input graphs will be unlabeled rooted trees where each node has either exactly  or 0 children for some positive integer .That is, input graphs are full -ary trees.For convenience, when not specified otherwise, a tree  is assumed to be a full -ary tree.

Models of computing
The models that we consider in this work are the classical LOCAL and CONGEST model of distributed computing.
Let  be any graph with  nodes and maximum degree Δ.In the LOCAL model, each node of  is equipped with an identifier in {1, 2, . . ., poly()}, and the initial knowledge of a node consists of its own identifier, its degree (i.e., the number of incident edges), the total number  of nodes, and Δ (in the case of rooted trees, each node knows also which of its incident edges connects it to its parent).Nodes try to learn more about the input instance by communicating with the neighbors.The computation proceeds in synchronous rounds, and at each round nodes send messages to neighbors, receive messages from them, and perform local computation.Messages can be arbitrarily large and the local computational can be of arbitrary complexity.Each node must terminate its computation at some point and decide on its local output.The running time of a distributed algorithm running at each node in the LOCAL model is determined by the number of rounds needed such that all nodes have produced their local output.In the randomized version of the LOCAL model, each node has access to its own stream of random bits.The randomized algorithms considered in this paper are Monte Carlo ones, that is, a randomized algorithm of complexity  that solves a problem  must terminate at all nodes upon  rounds and this should result in a global solution for  that is correct with probability at least 1 − 1/.
There is only one difference between the CONGEST and the LOCAL model, and it lies in the size of the messages.
While in the LOCAL model messages can be arbitrarily large, in the CONGEST model the size of the messages is bounded by  (log ) bits.

LCL problems
We define LCL problems as follows.•  is the number of allowed children; • Σ is a finite set of (output) labels; • C is a set of tuples of size  + 1 from Σ +1 called allowed configurations.
Sometimes even the parenthesis will be omitted, obtaining  :  1 . . .  , that is the notation used in e.g.Section 1.3.As a shorthand notation, for an LCL problem Π, we will also denote the labels and configurations of Π by Σ(Π) and C(Π).
In other words, a solution is a labeling for the nodes that must satisfy some local constraints.Note that only nodes with  children are constrained, but that such LCL problems could be well-defined even on non-full -ary trees (nodes with a number of children different from  are unconstrained).Full -ary trees are the hardest instances for the problems as every node is constrained.See Figure 2b for an illustration of the path-form.

Automata and flexibility
Definition 4.7 (automaton associated with path-form of an LCL problem; [17]).Let Π be an LCL problem.The automaton M (Π) associated with the path-form of Π is a nondeterministic unary semiautomaton defined as follows: • The set of states is Σ(Π).
• There is a transition from state  to state  if there is a configuration ( : ) in the path-form Π path of Π.
See Figure 2c for an illustration of the automaton.Definition 4.8 (flexible state of an automaton; [17]).A state  from M (Π) is flexible if there is a natural number  such that for all  ≥  there is a walk   of length exactly  in M (Π).The smallest number  that satisfies this property is the flexibility of state , in notation flexibility().
As the set of states of the automaton is the set of labels, we can expand the notion of flexibility of a state to the notion of flexibility of a label.
Definition 4.9 (path-flexibility).Let Π be an LCL problem and is a flexible state in automaton M (Π), and path-inflexible otherwise.
Moreover, an LCL problem Π is path-flexible if all labels are path-flexible labels and its automaton M (Π) has one strongly connected component.

Graph-theoretic definitions
Definition 4.10 (root-to-leaf path).A root-to-leaf path in a tree is a path that starts at the root and ends at one of its leaves.
Definition 4.11 (hairy path).A full -ary tree  is called a hairy path if it can be obtained by attaching leaves to a directed path such that all nodes of the path have exactly  children.
Definition 4.12 (minimal absorbing subgraph).Let  be a directed graph.A subgraph  ′ ⊆ , is called a minimal absorbing subgraph if  ′ is a strongly connected component of  and  ′ does not have any outgoing edges.
We note that a minimal absorbing subgraph exists for any directed graph.
Definition 4.13 (ruling set).Let  be a graph.A (, )-ruling set is a subset  of nodes of  such that the distance between any two nodes in  is at least , and the distance between any node in  and the closest node in  is at most .

SUPER-LOGARITHMIC REGION
In this section we prove that there is no LCL problem Π with distributed time complexity between  (log ) and 1) .Also, we prove that, given a problem Π, we can decide if its complexity is  (log ) or  Ω (1) .In view of [14,16], randomness does not help for LCL problems with round complexity Ω(log ), so we focus on the deterministic setting.

High-level idea
The key idea is that we iteratively prune the description of problem Π by removing subsets of labels that we call path-inflexible-these are sets of labels that require long-distance coordination (cf.2-coloring).After each such step, we may arrive at a subproblem that contains a new path-inflexible set, but eventually the pruning process will terminate, as there is only a finite number of labels.▷ See Definition 4.7.Σ ′ ← the set of path-flexible states of Π.
▷ See Definition 4.3.return Π ′ Assume the pruning process terminates after  steps.Let  1 ,  2 , . . .,   be the sets of labels we removed during the process, and let  ′ be the set of labels that is left after no path-inflexible labels remain.We have two cases: (1) Set  ′ is empty.In this case we can show that the round complexity of the problem Π is at least Ω( 1/ ).To prove this, we make use of a -level construction that generalizes the one used for 2 1  2 -coloring in [16].We argue that, roughly speaking, for  ( 1/ )-round algorithms, no label from set   can be used for labeling the level- nodes, for each  ≥ , as this requires coordination over distance Θ( 1/ ).
(2) Set  ′ is non-empty.In this case, after removing the sets   , we are left with a non-empty path-flexible subproblem Π ′ ⊆ Π, and we can make use of the flexibility to solve Π ′ in  (log ) rounds.Hence the original problem Π is also solvable in  (log ) rounds.
We say that problem Π has a certificate for  (log ) solvability if and only if the set  ′ is non-empty.
Formally, we prove the following theorems.
Theorem 5.1.Let Π be a problem having a certificate for  (log ) solvability.Then Π is solvable in  (log ) rounds in the CONGEST model.
Theorem 5.2.Let Π be an LCL problem having no certificate for  (log ) solvability.Then both the randomized and the deterministic complexity of Π in the LOCAL model are Ω( 1/ ) for some  ≥ 1.
Theorem 5.3.Whether an LCL problem Π has round complexity  (log ) or  Ω (1) can be decided in polynomial time.

Certificate
We present an algorithm that decides whether the complexity of a given problem Π is  (log ) or  Ω (1) rounds.
We start by defining a procedure that, given a problem Π, creates its restriction Π ′ to path-flexible states of Π; see Algorithm 1.However, note that states that were path-flexible in Π may become path-inflexible in Π ′ ; hence problem Π ′ may still contain path-inflexible states.
Next we describe a new procedure findLogCertificate that uses Algorithm 1 to analyze the complexity of a given problem.This procedure either returns  to indicate that the problem requires  Ω (1) rounds, or it returns a new problem Π pf that is a restriction of Π, but that will be nevertheless solvable in  (log ) rounds (and therefore Π is also solvable in this time).
Informally, procedure findLogCertificate applies iteratively Algorithm 1 until one of the following happens: • We obtain an empty problem.In this case we return .We will show that this can only happen if Π requires  Ω (1) rounds.• We reach a non-empty fixed point Π  .In this case we further restrict Π  to the labels that induce a minimal absorbing subgraph in the automaton associated with its path-form.Let Π pf be the problem constructed this Fig. 2. Certifying that problem Π 0 is solvable in  (log ) rounds (see Algorithm 2).The sample problem Π 0 is a combination of the branch 2-coloring problem (5), using labels 1 and 2, and the normal 2-coloring problem (2), using labels  and .The grayed out states in the automaton denote inflexible states.Problem Π pf is the path-flexible form of problem Π 0 .
way.We return Π pf , and we say that Π pf is the certificate for  (log ) solvability.We will show that Π pf and hence also the original problem Π can be solved in  (log ) rounds.Note that a minimal absorbing subgraph has the property that any labeling of the two endpoints of a sufficiently long path with labels from the subgraph admits an extension of the solution to the entire path with labels from the subgraph.This provides the intuition why reducing the labels to those of a minimal absorbing subgraph allows for an  (log )-round algorithm using the rake-and-compress approach explained in Section 5.3.
The procedure is described more formally in Algorithm 2, and an example of execution for a concrete problem can be seen in Figure 2.
Algorithm 2: findLogCertificate(Π) Input: LCL problem Π Output: Certificate for  (log ) solvability if it exists, or  otherwise Now, let us prove some of the properties of Algorithm 2. First, we observe that this is indeed a polynomial-time algorithm.
Lemma 5.4.Algorithm 2 runs in polynomial time in the size of the description of Π.
Proof.When creating a successive restrictions of Π in Algorithm 2, we always remove at least one label.Hence we invoke Algorithm 1 at most |Σ(Π)|, and Algorithm 1 runs in polynomial time [17].□ Then we prove that the step where we restrict to a minimal absorbing subgraph behaves well; in particular, it will preserve flexibility.
Lemma 5.5.Let Π be a non-empty LCL problem, such that all of its states are path-flexible.Let Σ ′ be a set of labels that induces a minimal absorbing subgraph of automaton M (Π), and let Π pf be the restriction of Π to labels Σ ′ .Then all states of Π pf are flexible, there is a walk between any two states of M (Π pf ), and M (Π pf ) has at least one edge.
Proof.First, let us prove that the restriction will preserve the flexibility of the states that remain.Since for every state in a minimal absorbing subgraph all outgoing edges are connected to states in the same minimal absorbing subgraph by definition, then no configuration for these states will be removed, and all returning walks for a state will stay.Second, a walk between any two states of M (Π pf ) is implied by the fact that M (Π pf ) is strongly connected.Lastly, M (Π pf ) has at least one edge, as every node has returning walks, hence incoming and outgoing edges, and the minimal absorbing subgraph is non-empty.□ In the rest of the section, we will prove that our certificate for  (log ) solvability indeed characterizes  (log ) solvability in the following sense: if Π has a certificate for  (log ) solvability, then Π can be solved in  (log ) rounds, otherwise there is an  Ω (1) lower bound for Π.Hence Lemma 5.4 implies Theorem 5.3.

Upper bound
We prove that, if Algorithm 2 does not return , then the original problem Π can be solved in  (log ) rounds.Note that Π pf , the result of Algorithm 2, is obtained by considering a subset of labels of Π and all constraints that use only those labels, hence a solution for Π pf is also a valid solution for Π.Hence, we prove our claim by providing an algorithm solving Π pf in  (log ) rounds.For this purpose, we start by providing a procedure that is a modified version of the rake and compress procedures of Miller and Reif [22], where, informally, we remove degree-2 nodes only if they are contained in long enough paths.We start with some definitions.Note that in a rooted tree we assume that each edge {,  } is oriented from  to  if  is the parent of .
Definition 5.6 (leaves).Let  = ( , ) be a graph.We define that leaves() ⊆  is the set of all nodes with indegree 0.
Definition 5.7 (long-paths).Let  = ( , ) be a graph and  be a constant.Let  ⊆  consist of all nodes of indegree 1.
We define that long-path-nodes(, ) ⊆  consists of the set of all nodes that belong to a connected component of size at least  in the subgraph of  induced by  .
We now define our variant of the rake-and-compress procedure.Note that a similar variant, for unrooted trees, appeared in [2].
Note that the graphs   can be disconnected.
We now prove an upper bound on the highest possible layer obtained by the procedure.In particular, we prove that there is some layer  =  (log ) such that  +1 is empty.For this purpose, we now prove that the number of nodes of ) factor smaller than the number of nodes of   , implying that after  (log ) steps we obtain an empty graph.Lemma 5.9.Let  be a constant and let  = ( , ) be a tree with  nodes.At least one of the following holds: or long-path-nodes(, ) ≥  3 .
This implies that the total number of nodes of indegree 1 nodes is Proof.We build a virtual graph where we iteratively remove nodes for  (log ) rounds.At each step, nodes can check in 1 round which neighbors have already been removed, and hence compute their indegree in the virtual graph.
Nodes mark themselves as removed if their indegree is 0, or if their indegree is 1 and they are in paths of length at least .The result of each node is the step in which they have been marked as removed.Notice that each step requires  () rounds, even in CONGEST, and since  is a constant, this procedure requires  (log ) rounds in total.□ We are now ready to prove that, if Algorithm 2 returns some problem Π pf , then Π pf (and hence Π) can be solved in  (log ) rounds, proving Theorem 5.1.
Proof of Theorem 5.1.Let Π be a problem having a certificate for  (log ) solvability.Then we will show that Π is  (log ) solvable in the CONGEST model.
Let Π pf be the path-flexible form from Algorithm 2. Let where flexibility() is the flexibility of a state  in M (Π pf ) as defined in Definition 4.8.
Given a tree  , we solve Π pf as follows.We start by running the procedure RCP() on  .After this process, each node  knows the set   , 1 ≤  ≤ , which it belongs to.Then, we compute a distance- coloring by using a palette of  (1) colors, which can be done in  (log * ) rounds, even in CONGEST, since  is constant (using, e.g., Linial's algorithm [21] on power graphs).
We then process the layers one by one, from layer  to 1.For each layer , we label all (unlabeled) nodes in   and all of their children.We need to deal with two cases, either we are labeling a long path or we are labeling a leaf node (both in  −1 ).
If a node   ∈   is a leaf node, then by definition its children were not processed yet so they are not labeled.Node   could be labeled with its parent, or it is unlabeled.But in both cases, we can complete this labeling (by labeling the descendants of   and possibly   itself) as every label has a continuation below.
If we need to label a long path , then by construction all inner nodes have no fixed labels so far.The topmost node can be labeled (as we may have already processed its parent) and the bottom-most node has indegree one, and thus it is connected to exactly one node from an upper layer, and hence it will have exactly one child already labeled.To label all nodes of , we proceed in several steps.First, we exploit the precomputed distance- coloring to compute a (, )-ruling set on each path in parallel in constant time, by iterating through the constantly many color classes and adding to the ruling set all nodes of the processed color for which no node in distance at most  − 1 is already contained in the ruling set.The ruling set nodes split the path into constant-length chunks.Next, for each endpoint of the path, we remove the closest ruling set node from the ruling set.This ensures that all chunks are of length at least .Then, we label all nodes that still remain in the ruling set with an arbitrarily chosen label from Σ(Π pf ).Finally, we label the nodes in the constant-length chunks (and their children) in a consistent manner.This is possible since each label used for the ruling set nodes is flexible and has a walk to any other label in M (Π pf ) (as proved by Lemma 5.5) and the ruling set nodes are far enough apart (more than the flexibility of any label in Π pf ).
As all of these steps can be performed in constant time (provided the precomputed distance- coloring), we can label the whole tree in  •  (1) +  (log * ) =  (log ) rounds.□

Lower bound
We prove that if Algorithm 2 returns , then the original problem Π = (, Σ, C) requires  Ω (1) rounds to solve.
The set of labels Σ  ⊆ Σ consists of the labels removed during the th iteration of Algorithm 2, as they are path- The goal of this section is to show that solving Π requires Ω( 1/ ) rounds.
Centered graphs.A radius- centered graph is a pair (, ) where  ∈  is a node in  = ( , ) so that all  ∈  are within distance  to , and each  ∈  whose distance to  is exactly  is permitted to have incident edges of the form  = {, ?}, indicating that  is an external edge that connects  to some unknown node outside of .As we only consider rooted trees, we assume that all edges are oriented towards the root, so that each node has outdegree at most 1.
Observe that the view of a node  after  rounds of communication in LOCAL can be described by a radius- centered graph.Therefore, a -round LOCAL algorithm on -node graphs is simply an assignment of a label  ∈ Σ to each radius- centered graph (, ) where each node in  has a distinct  (log )-bit identifier.
Terminology.In this section, we use the term radius- view of  to denote the corresponding radius- centered graph, and the term radius- neighborhood of  to denote the set of nodes that are within distance  to .Note that the radius- view of  contains more information than the subgraph induced by the radius- neighborhood of , as the radius- view of  includes information about the external edges.
Permissible labels.From now on, we fix  to be any LOCAL algorithm that solves Π = (, Σ, C) in  rounds on -node graphs.Given such an algorithm , we say that a label  ∈ Σ is permissible for (, ) if there exists some assignment of distinct  (log )-bit identifiers to the nodes in  such that the output of  is  when we run  on .
Using the notion of permissible labels, to show that Π = (, Σ, C) cannot be solved in  rounds on -node graphs, it suffices to find a graph  = ( , ) that has at most  nodes such that there exists a node  ∈  such that no label  ∈ Σ is permissible for the radius- centered graph (, ) corresponding to the radius- view of  in .The following lemma is useful for showing that some label  ∈ Σ is not permissible for some radius- centered graph (, ).
Lemma 5.11.Let  be a -round LOCAL algorithm that solves Π = (, Σ, C) for -node rooted trees.Let (, ) be a fixed radius- centered graph.Let Σ ⋄ ⊆ Σ be a subset of labels, and let Π ′ be the restriction of Π to Σ \ Σ ⋄ .Suppose there exists a number  such that for any  ≥ , we can construct a rooted tree  containing a directed path meeting the following conditions.
See Figure 3 for an illustration of Lemma 5.11.Before proving Lemma 5.11, let us give a brief, informal example of how we might apply it.We assume we have already established that algorithm  cannot output labels from Σ ⋄ in certain "tricky" radius- views.Tree  is then constructed so that nodes of  have tricky views, so algorithm  is forced to solve the restriction Π ′ of Π around path .Now if Π ′ contains some path-inflexible labels, we can apply Lemma 5.11 to rule out the possibility of using path-inflexible labels along path , so we learn that the view (, ) is super-tricky, as it rules out not only Σ ⋄ , but also all path-inflexible labels of Π ′ .We can repeat this argument to discover many super-tricky views, by constructing different trees  .
This way we can start with a problem Π 0 , and rule out the use of path-inflexible labels of Π 0 at least in some family of tricky views.Hence in those views we are, in essence, solving problem Π 1 , which is the restriction of Π 0 to path-flexible labels.We repeat the argument, and rule out the use of path-inflexible labels of Π 1 in at least some family of super-tricky views, etc.
If we eventually arrive at an empty problem, we have reached a contradiction: algorithm  cannot solve the original problem in some family of particularly tricky views.However, plenty of care will be needed to keep track of the specific family of views, as well as to make sure that we can still construct a suitable tree  using only such views.We will get back to these soon, but this informal introduction will hopefully help to see why we first seek to prove this somewhat technical statement.
Proof of Lemma 5.11.Fix a label  ∈ Σ \ Σ ⋄ such that  is path-inflexible in Π ′ .By the definition of path-flexibility, for any , there exists an integer  ≥  such that the following statement holds: , if the two end points  1 and  +1 are labeled with , then the labeling of , interpreted as 1-ary tree, is not a valid solution for the path-form of Π ′ .More precisely, there must exist 1 ≤  ≤  + 1 such that ((  ) : ( +1 )) is not an allowed configuration in the path-form of Π ′ .
For the rest of the proof, we pick  be a sufficiently large number such that the above statement holds.The precise choice of  is to be determined.We consider a rooted tree  that satisfies the lemma statement for this parameter .We assume that  is permissible for (, ), and then we will derive a contradiction.Now consider the path  in the lemma statement.Here all nodes in  have exactly  children, and all nodes of  and their children can only be assigned labels from Σ \ Σ ⋄ by .Again, if  1 and  +1 are labeled with , then there must exist 1 ≤  ≤  + 1 such that the node configuration of   and its  children is not an allowed configuration of Π ′ .
Furthermore, it cannot be an allowed configuration for Π, either, as Π ′ contains all configurations that consist of labels from Σ \ Σ ⋄ .
Consider any assignment of  (log )-bit identifiers to the nodes in (, ) that makes  output , and apply this assignment to the radius- neighborhoods of  1 and  +1 in  .Extend this identifier assignment to cover all nodes that are within distance  + 2 to some   such that the radius-( + 2) neighborhood of any   does not contain repeated identifiers.This is possible because we assume that  satisfies the property that the radius-( + 2) neighborhood of   contains at most  nodes, for each 1 ≤  ≤  + 1, and because that we may choose  ≫  to be sufficiently large so that the radius-( + 2) neighborhood of each  ∈  cannot simultaneously intersect the radius-( + 2) neighborhood of both  1 and  +1 .Although some identifiers may appear several times in  and the total number of nodes in  may exceed .
As we will later see, they are not problematic.
Consider the output labels of   and its children, for 1 ≤  ≤  + 1, resulting from simulating  on  .Note that  by definition cannot output labels that are not permissible, and hence all of these nodes receive labels from Σ \ Σ ⋄ .Our choice of  implies that there exists 1 ≤  ≤  + 1 such that the node configuration corresponding to   and its children is not in C. We take the subtree  ′ induced by the union of the radius-( + 1) neighborhood of   and its children.Since the radius-( + 2) neighborhood of   contains at most  nodes, the rooted tree  ′ also contains at most  nodes.The output labelings of   and its children due to simulating  are the same in both  and  ′ , as their radius- views are invariant of the underlying network being  or  ′ .This violates the correctness of , as  ′ contains at most  nodes.
Thus,  cannot be permissible for (, ).□ A hierarchical construction of rooted trees.We first consider the following natural recursive construction of rooted trees.A bipolar tree is a tree with two distinguished nodes  and , and it is also viewed as a rooted tree by setting  as the root.The unique path connecting  and  is called the core path of the bipolar tree.We consider the following operation  .
• Given a rooted tree  , define   as the result of the following construction.Start with an -node path ( 1 ,  2 , . . .,   ).Consider  ( − 1) copies of  , indexed by two numbers  and : For 1 ≤  ≤  and 1 ≤  ≤  − 1, make the root of  ′ , a child of   by adding an edge connecting them.Finally, set the two distinguished nodes of the resulting tree by  =  1 and  =   .
Based on this operation, we construct a sequence of bipolar trees   0 ,  1 , . . .,   , where the nodes in    are partitioned into layers 0, 1, . . ., ; see Figure 4: • For  = 0, define   0 as the trivial bipolar tree consisting of only one isolated node  with  =  and  = .We say that  is in layer 0.
We say that all nodes in the core path of    are in layer .
For any constant , it is straightforward to see that the number of nodes in    is  =  (  ), so  = Ω( 1/ ).For each 1 ≤  ≤ , the layer- nodes form paths consisting of exactly  nodes.We call such an -node path a layer- path.The tree    is analogous to the lower bound graph used in [16] for establishing the tight Ω( 1/ ) lower bound for some artificial LCL problem considered in [16].The Ω( 1/ ) lower bound proof in [16] involves an argument showing that to solve the given LCL problem it is necessary that the two endpoints of a layer- path communicate with each other, and this costs at least  = Ω( 1/ ) rounds.
When  ≥ 2 and 1 ≤  ≤ , there are three possible degrees in    : 1, Δ − 1 = , and Δ =  + 1.A node has degree 1 if and only if it is in layer zero.A node has degree  if and only if it is the root or it is the last node   in some layer- All the remaining nodes have degree exactly Δ =  + 1. Intuitively, the nodes with degree  are in the boundary of the graph.
High-level ideas.To prove the Ω( 1/ ) lower bound, we will construct a sequence  1 ⊇  2 ⊇ • • • ⊇   of non-empty sets of radius- centered graphs, where  = Ω( 1/ ).Each radius- centered graph used in our construction is isomorphic to the radius- view of some node  in some graph of at most  nodes.By applying Lemma 5.11 inductively with and  ∈ Σ  , we will show that for any given -round algorithm , the labels in Σ  are not permissible for the radius- centered graphs in   , for each 1 ≤  ≤ .Therefore, the given LCL problem Π = (, Σ, C) cannot be solved in  rounds.
The construction of  1 ⊇  2 ⊇ • • • ⊇   requires somewhat complicated definitions.To motivate these forthcoming definitions, we begin with describing a natural attempt to prove the Ω( 1/ ) lower bound directly using the trees    and see why it does not work.
Suppose that the given LCL problem Π = (, Σ, C) can be solved in  =  ( 1/ ) rounds on -node graphs by an algorithm .We pick  to be a sufficiently large number such that  = Θ() and the number of nodes in    is at most  (  ) < .Recall that Σ 1 is the set of path-inflexible labels for the original LCL problem Π = (, Σ, C).Let It is straightforward to see that for each 1 +  <  <  − , the radius- view of each   is identical.Let (, ) denote the corresponding radius- centered subgraph.By the path inflexibility of the labels in Σ 1 , all labels  ∈ Σ 1 are not permissible for (, ).Intuitively, this is because that we can find in    a path connecting two views isomorphic to (, ) with a flexible path length.Similarly, we can apply the same argument for layer-ℓ paths for each 1 ≤ ℓ ≤ , so we infer that the labels in Σ 1 cannot be used to label nodes in layer 1 or above.For the inductive step, suppose that we already know that Σ 1 , Σ 2 , . . .Σ −1 cannot be used to label nodes in layer  − 1 or above.We consider the LCL problem that is the restriction of Π to the set of labels The above argument still works if we replace Σ 1 by Σ  and only consider the layers  ≤ ℓ ≤ , as we recall that Σ  is the set of path-inflexible labels when we restrict to the set of labels It appears that this approach allows us to show that for each 1 ≤ ℓ ≤ , the layer-ℓ nodes cannot be labeled using Σ 1 , Σ 2 , . . ., Σ ℓ , so the given algorithm  cannot produce any output label for the layer- nodes, contradicting the correctness of .This approach, however, has one issue.Consider again the layer-ℓ path in the above discussion.We are only able to show that the labels in Σ 1 cannot be used to label the nodes   for each 1 +  <  <  − , as the radius- view of the remaining nodes in  are different.This is problematic because in the next level of induction, when we try to show that the labels in Σ 2 cannot be used to label some node  that is in layer 2 or above, the proof relies on the condition that the labels in Σ 1 cannot be used to label  and its children; see Lemma 5.11 and its proof.In particular, showing that Σ 1 cannot be used to label the middle nodes in  whose radius- views are identical is not enough.
To resolve this issue, we need to consider essentially all possible radius- centered graph (, ) corresponding to a radius- view of a layer- node, and we have to make sure that for any sufficiently large number , we can find a rooted tree  that contains a length- directed path  =  1 ←  2 ← • • • ←  +1 such that the radius- views of the two endpoints  1 and  +1 are isomorphic to (, ) and all the intermediate nodes  2 ,  3 , . . .,   are in layer  or above, so that Lemma 5.11 is applicable.
To deal with the views (, ) that do not belong to the central part of the long paths, we will need to concatenate two trees    and    for some 1 ≤  ≤  and 1 ≤  ≤  to obtain directed paths starting and ending with the same view (, ), so that we can apply Lemma 5.11.Such a concatenation will create new views that did not exist before in    .In order to capture all such views, we will consider the following definition   ← and build the argument around it; see Figure 5.
• For 1 ≤  ≤  and 1 ≤  ≤ , define   ← as the result of the following construction.We make the following two observations.For the special case of  = ,   ← is simply 2   −1 .For any number , the number of nodes in the radius- neighborhood of any node in   ← is  ( max{, } ) =  (  ), regardless of .
A sequence of sets of radius- centered graphs.Now, we are ready to define the set of radius- centered graphs   , for each 1 ≤  ≤ .In the definition of   , we let  be any integer such that  ≥ 2 + 2. It will be clear from the construction of   that the definition of   is invariant of the choice of , as long as  is sufficiently large comparing with .
The set   consists of all radius- centered graphs (, ) such that there exists a node  in the rooted tree   ← for some  and  meeting the following conditions.
• The radius- view of  is isomorphic to (, ).
• The radius- view of  contains at least one node in the middle edge  of   ← .
• The layer number of  is at least .
Note that the threshold  ≥ 2 + 2 is chosen to make sure that for each node  ′ in the radius- neighborhood of , if  ′ is not in layer zero, then its degree is exactly Δ =  + 1, that is,  ′ has one parent and  children.

It is clear from the above definition of 𝑆
Before we proceed, we prove a result showing that   includes essentially all radius- view for layer- nodes in    .Formally, for each 1 ≤  ≤ , we define  *  as the set of all radius- centered graphs (, ) meeting the following conditions.
• There exist  ≥ 1,  ≤  ≤ , and a layer- node  in    such that the radius- view of  in    is isomorphic to (, ).Furthermore, for each node  ′ in the radius- neighborhood of , if  ′ is not in layer zero, then its degree is exactly Δ =  + 1.

Intuitively, 𝑆 *
is the set of all possible radius- views for layer- nodes, excluding those near the boundary.We exclude the views involving boundary nodes because we want to focus on the interior part of the graph where all nodes have the same degree Δ =  + 1, except the layer-0 nodes whose degree is always one.Lemma 5.12.For each 1 ≤  ≤ , we have  *  ⊆   .
Proof.Consider the node  in the graph    in the definition of  *  .Since the radius- neighborhood of  does not include any non-leaf node whose degree smaller than Δ =  + 1, we may assume that  is an arbitrarily large number.
Let  * be any node in the radius- neighborhood of  that has the highest layer number.Let  * be the layer number of  * .We have  ≤  * ≤  ≤ .The radius- neighborhood of  is confined to some subgraph  The lower bound proof.For any given integer , we pick  to be the maximum number of nodes in the radius-( + 2) neighborhood of any node in   ← , over all choices of , , and  such that 1 ≤  ≤ , 1 ≤  ≤ , and  ≥ 1.It is clear that  =  (  ), or equivalently  = Ω( 1/ ).Therefore, to prove an Ω( 1/ ) lower bound for the given problem Π, it suffices to show the non-existence of a -round algorithm  that solves Π on -node graphs.
Suppose such an algorithm  exists.In Lemma 5.13, whose proof is deferred, we will prove by induction that all labels in Σ  are not permissible for all centered graphs in   , for each 1 ≤  ≤ .In particular, this means that all labels in Σ are not permissible for all centered graphs in   , as Lemma 5.13.For each 1 ≤  ≤ , all labels in Σ  are not permissible for all centered graphs in   .
We now prove the main result of this section assuming Lemma 5.13.Lemma 5.14.If Algorithm 2 returns  after  iterations, then Π requires Ω( 1/ ) rounds to solve.
Proof.In view of the above discussion, it suffices to show that the algorithm  considered above does not exist.
Recall that   ≠ ∅, and each (, ) ∈   is isomorphic to the radius- view of some node  in   ← with 1 ≤  ≤ , 1 ≤  ≤ , and  ≥ 2 + 2. Furthermore, the radius-( + 2) neighborhood of  contains at most  nodes.If we run  on the subgraph induced by the radius-( + 2) neighborhood of  in   ← , then according to Lemma 5.13 the algorithm  does not output any label for , violating the correctness of , so such an algorithm  does not exist.□ It is clear that Lemma 5.14 implies Theorem 5.2.
Constructing a rooted tree  for applying Lemma 5.11.For the rest of the section, we prove Lemma 5.13.We begin with describing the construction of the rooted tree  needed for applying Lemma 5.11 in the proof of Lemma 5.13; see Figure 6 for an illustration.
The construction of  is parameterized by any (, ) ∈   , for any 1 ≤  ≤ .Recall from the definition of   that (, ) is isomorphic to the radius- view of some layer- node  in   ← such that 1 ≤  ≤ , 1 ≤  ≤ , and  ≤  ≤ min{, }, and this radius- neighborhood contains at least one node in the middle edge  of   ← .From now on we fix  = 2 + 4. Then  = ( + 1) − 1 is an upper bound on the length of any root-to-leaf path in   ← , for any 1 ≤  ≤  and 1 ≤  ≤ .We define  = 2 +  + 1.
The construction of  is also parameterized by a distance parameter  such that  ≥ .In the rooted tree  that we construct, there will be a length- directed path  =  1 ←  2 ← • • • ←  +1 satisfying some good properties to make Lemma 5.11 applicable.
Intuitively,  will be the result of concatenating two copies   and   of   ← via a middle tree   =    −1 , and then  will be the unique directed path in  connecting the two copies of  in   and   .Note that   =    −1 is simply a variant of    =    −1 such that the length of the core path is  instead of .We select  to make the length of  equals .The points of concatenation will be selected to ensure that all nodes in  are in layer  or above.Formally, the construction of the rooted tree  and its length- path  is as follows.
The two trees   and   .Recall that  is a layer- node in   ← whose radius- neighborhood contains at least one node in the middle edge.We consider two copies of   ← , called   and   .The two copies of  in   and   are called   and   .Similarly, we write (  ,   ) and (  ,   ) to denote the two distinguished nodes of   and   .The path   .If   is on the core path of   , then we define   to be the unique directed path Otherwise, then consider the unique layer- path  1 ← • • • ←   that contains   , and then we define   to be the unique directed path   ← • • •   .Observe that all nodes in   are in layer  or above.The path   .We define   to be the unique directed path   ← • • • ←   in   .Observe that all nodes in   are in layer  or above.The middle tree   and its path   .Let   and   denote the lengths of   and   .Note that   ≤  and Here (, ) was isomorphic to the view of some node  in layer 1 of   2←1 .Therefore we construct two copies of   2←1 , one of them is called   and the other one is   , and we identify the nodes   and   that have views isomorphic to (, ).We identify the unique path   from   to the root of   and the unique layer-1 path   that takes us to   (dark arrows).Finally, we connect   through the middle tree to   .Note that the resulting path  =   ←   ←   does not use layer-0 nodes.that we must have  ≥ , due to the assumption  ≥  and our choice of  = 2 +  + 1.Clearly, all nodes in   are in layer .
Concatenation.Now, we are ready to define the rooted tree  and its associated length- directed path .We construct the directed path  by adding two edges to concatenate the three paths   ,   , and   together: The length of  is exactly  due to our choice of  =  −   −   − 1.The rooted tree  is the result of this concatenation of   ,   , and   .
The radius- views of   is isomorphic to (, ), regardless of the underlying graph being  or   .Similarly, the radius- views of   is isomorphic to (, ), regardless of the underlying graph being  or   .Hence the radius- neighborhoods of the two endpoints of  in  are isomorphic to the given radius- centered graph (, ).We also note that all nodes in  are in layer  or above, so all children of nodes in  are in layer  − 1 or above.
Next, we will prove some additional properties of  and .We begin with Lemma 5.15 and Lemma 5.16.Informally, in these lemmas we show that the local view seen from an edge connecting   ,   , and   is isomorphic to the local view seen from the middle edge  of    ′ ← ′ , for some choices of  ≤  ′ ≤  and  ≤  ′ ≤ .
Lemma 5.15.Let   =  ′ ←  ′ be the edge connecting   and   .Let   be the union of the radius-( − 1) neighborhood of  ′ and  ′ in  .There is a subgraph  ′  of  isomorphic to    ′ ← ′ for some  ≤  ′ ≤  and  ′ =  such that  ′  contains all nodes in   .In the isomorphism, the edge   is mapped to the middle edge  of    ′ ← ′ .
Proof.Let  ′ be the layer number of  ′ .Note that we have either , where   is defined in Lemma 5.15.Note that the fact that  = 2 + 4 is used to show that  ⊆   .Therefore, the lemma holds with the tree    ′ ← ′ considered in Lemma 5.15.Finally, the remaining case is that  contains the edge   connecting   and   .Similar to the previous case, using Lemma 5.16 we obtain that  ⊆   , so the lemma holds with the tree    ′ ← ′ considered in Lemma 5. 16. □ Same as the notation used in Lemma 5.11, for the rest of the section, we write  to denote the set of the nodes in  and their children.Using Lemma 5.12, Lemma 5.15, and Lemma 5.16, we prove Lemma 5.18, which shows that the radius- view of each node in  belongs to  −1 .
Lemma 5.18.If  > 1, then the radius- view of each node in  belongs to  −1 .
Proof.Let ∈ .Let  ′ be the layer number of .From the construction of  we already know that all nodes on the path  has layer number at least , so their children have layer number at least  − 1, and so  ′ ≥  − 1.
We first consider the case where the radius- neighborhood of  contains a node in the edge   connecting   and   .Then  has the same radius- view in both  and the graph    ′ ← ′ considered in Lemma 5.15.Since and  is within distance  to a node in the middle edge of    ′ ← ′ , this radius- view belongs to  −1 by its definition.The case of where the radius- neighborhood of  contains a node in the edge   connecting   and   can be handled using Lemma 5.16 similarly.
From now on, we assume that the radius- neighborhood of  does not contain any node in   and   .There are three cases depending on whether the radius- neighborhood of  is confined to   ,   , or   .
Consider the case where the radius- neighborhood of  is confined to   .Since  is sufficiently large, the radius- neighborhood of  does not contain any non-leaf node whose degree is not Δ =  + 1. Observe that   =    −1 is a subgraph of    as  ≥ , so the radius- view of  is the same in  ,   , and    , and so this radius- view belongs to  *  ′ .By Lemma 5.12, we have  *  ′ ⊆   ′ .We also have   ′ ⊆  −1 because  ′ ≥  − 1. Hence we conclude that this radius- view belongs to  −1 , as desired.
For the rest of the proof, we consider the case where the radius- neighborhood of  is confined to   , as the case of   is similar.Recall that   =   ← is constructed by concatenating    and    by a middle edge .If the radius- neighborhood of  contains a node of , then we know that this radius- view belongs to  −1 , as we have  ≥  >  − 1,  ≥  >  − 1, and  ′ ≥  − 1.Otherwise, the radius- neighborhood of  is confined to either    or    .Similarly, we may use Lemma 5.12 to show that the radius- view of  is in  −1 .□ Using Lemma 5.17 and Lemma 5.18, we are now ready to prove Lemma 5.13.
Proof of Lemma 5.13.By induction hypothesis, suppose that the lemma statement holds for smaller -values.
Fix any (, ) ∈   .Then (, ) is isomorphic to the radius- neighborhood of a layer- node  in   ← such that  ≤  ≤ min{, } and this radius- neighborhood contains at least one node in the middle edge  of   ← .Given   ← and , construct the rooted tree  and its directed path  as we discuss above.Remember in our construction there is a number  such that for each  ≥ , we are able to make  the length of .
Recall that Σ  is the set of path-inflexible labels for the restriction of Π to Σ \ Σ ⋄ .To prove the lemma, it suffices to show that  is not permissible for (, ).We will see that a problem Π can be solved in  (log * ) rounds if and only if a certificate of  (log * ) solvability for Π exists.We will later show that we can decide if such a certificate exists.We will now give an alternative definition of certificate, that we will later prove to be equivalent.Definition 6.2 (coprime certificate for  (log * ) solvability).Let Π be an LCL problem.A coprime certificate of  (log * ) solvability for Π with labels Σ T = { 0 , . . .,   } ⊆ Σ(Π) and depth pair ( 1 ,  2 ) is a pair of sequences T 1 and T 2 of  labeled trees (denoted by T 1  and T 2  ) such that: (1) The depths  1 and  2 are coprime.
(3) Each tree is labeled with labels from Σ(Π) and correct w.r.t.configurations C(Π). ( ) be the tree obtained by starting from T 1  (resp.T 2  ) and removing the labels of all non-leaf nodes.It must hold that all trees T 1  (resp.T 2  ) are isomorphic, preserving the labeling.(5) The root of the tree T 1  (resp.T 2  ) is labeled with label   .
Note that the difference between a uniform certificate and a coprime certificate is that a coprime certificate requires two uniform certificates of coprime depth, but it allows internal nodes of the trees to be labeled from labels of Σ(Π) that are not in Σ T .In the following, we will sometimes omit the type of the certificate, and we will just talk about certificate for  (log * ) solvability.In this case, we will refer to a uniform certificate.
The round complexity of the described algorithm is  (log * ) for computing the subtrees, and  (1) for everything else, hence we have an algorithm that has a round complexity of  (log * ).□

Lower bound
We now prove that, if there is no certificate for  (log * ) solvability, then the problem requires Ω(log ), even for randomized algorithms.
We start by considering deterministic algorithms.We will prove that if there is a deterministic  (log ) algorithm for Π, then we can construct an  (log * ) certificate for it.In the following lemma we will prove something stronger, that will be useful later when considering constant-time algorithms.This lemma essentially says that, if there exists a fast enough algorithm that uses some set of labels far enough from the root and the leaves, then we can construct a certificate that uses the same set of labels.Moreover, we can force a leaf of the certificate to contain some specific label (this specific part will be used when considering constant-time algorithms).
Lemma 6.4.Assume that there exists a deterministic algorithm  solving Π in  () ∈  (log ) rounds on instances of size .Let  0 be any integer satisfying  0 > (1 + ) 10 ( 0 ) .Let  be the maximal set of labels satisfying that for each  ∈  there exists an instance of Π of size  0 in which  outputs  on at least one node at distance strictly larger than  ( 0 ) from the root and from any leaf.Let s be an arbitrary label in .Then there exists a certificate of  (log * ) solvability that contains all labels in , and where at least one leaf is labeled s.
Proof.For all  ∈ , let   be an instance of size  0 in which there exists a node   having distance strictly larger than  =  ( 0 ) from the root and any leaf, where  outputs .Let () be the radius- neighborhood of a node .
We now consider a -ary tree  of  0 nodes that is "as balanced as possible".Note that the height of  is at least 10 .
Let  be an arbitrary node at distance  + 1 from the root of .Let  be the set of descendants of  that are at distance exactly 5 from  .Since the tree is balanced and has height at least 10 , then  and all nodes of  do not see the root of  or any leaf of .Also, ( ) and (ℓ) are disjoint, for all ℓ ∈ .Moreover, note that for all nodes  that are on paths that connect  with nodes of , it holds that either () is disjoint with  or () is disjoint with (ℓ), for all ℓ ∈ .
We now pick an arbitrary node ℓ ∈  and fix the identifiers in its neighborhood to make (ℓ) = ( s ) (that is the subgraph of   in which node  s outputs s).Then, for each label  ∈  we make a copy of  (copying the partial ID assignment as well), and we call it   .In each copy   , we additionally fix the neighborhood of   , that is the copy of  , to make it equal to (  ).Then, we fix the identifiers of all other nodes by using unique identifiers not in (  ) ∪ ( s ).
Crucially, we assign the same identifier to all the nodes that are copies of the same node of .
We argue that, by running  on the obtained trees, we must obtain a valid solution, even if some identifiers may not be unique.In fact, assume that there is a node in which the output does not satisfy the constraints of Π.The radius- neighborhood of this node must contain unique identifiers by construction, and we can hence construct a different instance of  0 nodes where all identifiers are unique and the same bad neighborhood is contained.This would imply that  fails in a valid instance, that is a contradiction.
Hence, we obtain that each tree   is properly labeled, and since  is by definition maximal, then also nodes that are between   and nodes in   , that are the copy of labels in , must be labeled with only labels in .
Consider now the | | trees obtained by taking from each tree   the subtree induced by node   , nodes in   , and all nodes between them.We obtain | | trees that have the same labeling for the leaves (that is, leaves that are copies of the same node of  have the same labeling), at least one leaf is labeled s, each tree has a different label of  assigned to the root, and all nodes are only labeled with labels in .Hence we obtained a certificate for  (log * ) solvability that contains all labels in , and where at least one leaf is labeled s. □ In particular, since for any algorithm running in  (log ) rounds there exists some  0 satisfying  0 > (1 + ) 10 ( 0 ) , and since in -ary trees of size  0 there exist nodes at distance strictly larger than  from the root and any leaf, implying that  is non-empty, then Lemma 6.4 shows that if there is a deterministic  (log ) algorithm for Π, then we can construct an  (log * ) certificate for it.Hence, we obtain the following corollary.
We can now prove that uniform and coprime certificates are in some sense equivalent.
Lemma 6.6.A uniform certificate for  (log * ) solvability exists if and only if a coprime certificate of  (log * ) solvability exists.
Proof.We first show that, given a uniform certificate T , we can construct a coprime certificate.Let  be the depth of the uniform certificate, we show how to construct a different certificate of depth  + 1.Since each leaf is also a root of some tree in T , then each leaf has a continuation below.We can construct a certificate of depth  + 1 by starting from the trees in T and extending them to depth  + 1 in a consistent manner by using the continuation below that is guaranteed to exist.
We now prove that if there exists a coprime certificate then there exists a uniform certificate.By Theorem 6.3 a coprime certificate implies a deterministic  (log * ) algorithm, and by Corollary 6.5 this implies the existence of a uniform certificate.□ We are now ready to extend Corollary 6.5 to randomized algorithms.Lemma 6.7.Let Π be an LCL problem for which no certificate for  (log * ) solvability exists.Then, the randomized and deterministic complexity of Π in the LOCAL model is Ω(log ).
Proof.We start by proving the lemma in the case where randomization is allowed and nodes have no identifiers assigned to them, and we prove the lemma by showing the contrapositive.To this end, let Π be an LCL problem with randomized complexity  () ∈  (log ).We will show that there exists a certificate for  (log * ) solvability for Π.
Let A denote an optimal randomized algorithm for Π; in particular the worst-case runtime of A on -node trees is  ().Let Σ(Π) be the output label set of Π and set  = |Σ(Π)|.Since  () ∈  (log ), there exists an integer  0 ≥ 5 2 such that 1 ≤  ( 0 ) ≤ 1/10 • log  ( 0 ).Let  be a rooted tree with  0 nodes that is "as balanced as possible"; in particular the ⌊log  ( 0 )⌋-hop neighborhood of the root  is a perfectly balanced tree.Moreover, for any node , denote the set of descendants of  that are at distance precisely 2 ( 0 ) + 1 from  by  1 (), and those at distance 2 ( 0 ) + 2 from  by  2 ().Since  ( 0 ) ≤ 1/10 • log  ( 0 ), there exists a node  ∈  () such that the distance between  and  is at least  ( 0 ) + 1, and the distance between any node  ∈  1 () ∪  2 () and the leaf closest to  is also at least  ( 0 ) + 1.In particular, for any node  ∈  1 () ∪  2 () the views of  and  during an  ( 0 )-round algorithm are disjoint, and both  and any node in  1 () ∪  2 () do not see any leaf or the root during an  ( 0 )-round algorithm.
Let  ⊆ Σ(Π) be the set of all labels that A outputs with probability at least 1/( . Let us assume for a contradiction that there is no certificate for  (log * ) solvability for Π.By Lemma 6.6 this implies that there is no coprime certificate as well.In particular, then there is no such certificate with labels from  and depth pair 2 ( 0 ) + 1 and 2 ( 0 ) + 2. This implies that there exists a  () ∈ { 1 (),  2 ()} such that for any labeling ℓ :  () →  of the nodes in  () with labels from , there exists some label  ∈  such that ℓ is incompatible with , i.e., such that there is no correct solution for Π where  is labeled with  and  () is labeled according to ℓ.
Since we have | | ≤ , and the view of  during A and the union of the views of the nodes in  () during A are disjoint, it follows that the probability that the labeling ℓ of  () that A outputs is incompatible with the label  that A outputs at  is at least 1 2 Hence, A fails with probability larger than 1/ 0 , yielding a contradiction, and proving the lemma for the case in which identifiers are not provided to the nodes, but randomization is allowed.
We now prove that the same result holds even if we provide identifiers to the nodes.Assume that there exists a  (log ) randomized algorithm for the case in which identifiers are provided.We can run it in the case in which identifiers are not provided in the same asymptotic running time by first generating unique random identifiers in {1, . . .,  3 }, that can be done with a randomized algorithm with high probability of success.But this would imply a  (log ) randomized algorithm for the case in which identifiers are not provided, contradicting the lemma.Finally, since the existence of a deterministic algorithm implies the existence of a randomized algorithm, then the lemma follows.□

Decidability
We now prove that we can decide if a certificate for  (log * ) solvability exists.Algorithm 4 describes a procedure that returns a certificate builder if and only if a certificate exists.A certificate builder is an object that can be used to easily construct a certificate, and in Lemma 6.9 we will show that, given a certificate builder, we can indeed construct a certificate.This procedure uses another subroutine, Algorithm 3, to try to find a certificate builder that uses a specific subset of labels, for all possible subsets of labels.On a high level, Algorithm 3 works as follows.We start with singleton sets, one for each label.Then, we repeatedly try to build new sets.Each new set is obtained as follows.We consider all tuples of size  of existing sets, and we see which configurations exist where the label of each leaf ℓ  is contained in the th sets of the tuple.The set of roots of such configurations defines a new set.We repeat this process until we obtain a fixed point.The algorithm that we describe is also able to find a certificate builder that contains a leaf with some specific label, if required and if it exists; we will need this in the next section.
We now prove that Algorithm 4 outputs a certificate builder if and only if a certificate of  (log * ) solvability exists.Theorem 6.8.Given an LCL problem Π, Algorithm 4 outputs a certificate builder if and only Π has an  (log * ) certificate satisfying the leaf requirement.
Proof.We will later show, in Lemma 6.9, that if Algorithm 4 outputs a certificate builder then a certificate exists, so we now prove the reverse implication, that is, if the problem has a certificate of  (log * ) solvability (satisfying the leaf requirement), then Algorithm 4 will find a certificate builder.Let T = (T 1 , T 2 , . . ., T  ) be a certificate with labels Σ T that satisfies the leaf requirement (that is, if  ≠  then at least one leaf is labeled ).Let |T | = .Let  be the labeling function of the certificate (that is, a function mapping each node of each tree of the certificate to its assigned label), and let  ,, be the th node on level  of the th tree.
First, we define  , as the set of all labels of the th nodes on level , that is,  , = | T | =1 ( ,, ). 0,0 is by definition equal to Σ T , and for all nodes on level ,  ,0 ,  ,1 , . . .,  ,  are singletons, by definition of certificate (recall that each T  has depth ).
We will prove by induction on the depth of T that, for all  and , there exists a pair ( ′ , , ) in the set  of Algorithm 3, where  ′ , ⊇  , , and  is true if and only if  ,, is an ancestor of leaves labeled .This would imply that (Σ T , ) is also in , where  is true if and only if  ≠ , and that Algorithm 3 outputs certificate builder which is what we want to prove.
In the base case, sets  , are just singletons { } ⊆ Σ T and we add ( , ,  = ) in the initialization of the set .
For the induction hypothesis, let us assume that all ( ′ +1, , ) for level  + 1 are in , where  ′ +1, ⊇  +1, , and  is true if and only if  +1,, are ancestors of a leaf labeled .We prove the statement for .In the algorithm we loop over all −tuples of elements from  to enlarge , and hence also over the tuple (( ′ +1, ,  1 ), ( ′ +1,+1 ,  2 ), . . ., ( ′ +1,+−1 ,   )), where  = , that is, a tuple containing supersets of the sets assigned to nodes that are children of nodes in position (, ).Since certificate trees are labeled correctly, this implies that, starting from this tuple, we compute  , or a superset of it.Also, the Boolean that we put in the pair that we add to  is also correct, since we compute it as the or of the ones of the children.□ Lemma 6.9.Let CB be a non-empty certificate builder obtained from Algorithm 3 for LCL problem Π and a label .
Then there exists a certificate of  (log * ) solvability T with at least one leaf labeled with  (for  ≠ ) and without such restriction for  = .
Proof.Before dealing with the general case, if Σ(Π) consists of only one label  and we have a non-empty certificate builder CB, then we also know that C(Π) is non-empty (see last part of Algorithm 3).Hence a certificate will be just a single tree of depth one labeled with .Hence for the rest of the proof, we assume that Σ(Π) has size at least two.
To convert a certificate builder to a certificate for  (log * ) solvability, we proceed in four phases.The first phase consists of creating a verbose temporary tree T vt which will be labeled with pairs with first element being sets of labels and second element being an indicator for where to find label  (that is, each node of T vt is labeled with an element of   ).Tree T vt is created recursively as follows: (1) root of T vt is labeled with (Σ(Π),  ≠ ) (2) each node labeled with (, ), where  contains at least two labels, will have  children labeled with (  ,   ) according to the (unique) pair ((, ), (( 1 ,  1 ), . . ., (  ,   )) in CB which contains pair (, ) as its first element.
(3) each node labeled with (, ), where  is a singleton set, is a leaf.
The recursive definition is legal as the labels for children will always be placed in the certificate builder earlier, so we cannot have any loop (see Algorithm 3).In the case when  ≠ , by following the indicators (second pair of label) from root of T vt which will be labeled with (Σ(Π), ), we must be able to reach a leaf that is labeled ({  } , ).This implies that we have a singleton  as one of the leaves.
As we don't need the second element of each label anymore, let us simplify the further analysis by creating a simplified temporary tree T st as a simplification of T vt where each node is labeled only by the first element from the pair.
Examples of such trees are depicted in Figure 7b and Figure 8b.
The second phase considers the case when label  is not .In this phase we want to "push down" a leaf node labeled with the singleton label  so it is a deepest node of the tree T st .We will do it as follows.Let   be a node in T st that is labeled with the singleton label .Let   be its depth.Since the root of T st is labeled with Σ(Π), we know that there exists a hairy path of length   labeled with Σ(Π) that has both of its endpoints labeled .For convenience, let  aa denote such a hairy path and replace all labels by their singleton labels (label  will become {  }).We will use  aa and replace node   with the path  aa .We have now essentially "pushed down" a leaf node labeled with the singleton label  by   steps.We will repeat such "pushing down" until we have that   is the deepest node of the tree T st .To summarize, now we have a tree T st that has its deepest leaf labeled with the singleton .
In the third phase, we want to make all leaves to be on the same level.We do it as follows.Again, observe that since Σ(Π) is the root of T st , we have a continuation below for every label from Σ(Π).We can use such continuation to "push down" every leaf node of T st that is not the deepest by one step in the same manner as in the previous phase.We replace a leaf node   labeled with a singleton  with a -ary tree of depth one, labeled with singletons corresponding to a continuation below for .To summarize, now we have a tree T st that has all leaves at the same level.Examples of such trees are again depicted in Figure 7b and Figure 8b.
Finally, in the last phase, we use T st to build |Σ(Π)| individual labeled trees T st that would form a certificate.At the beginning, let each T  be labeled exactly as T st .Then, for each T st , we fix its root label to a distinct label   .Then, we recursively fix the labels of the children such that the resulting configuration is in C(Π).Such a configuration will always exist as it is how we have constructed the certificate builder (see Algorithm 3).Examples of the obtained trees are depicted in Figure 7c

SUB-LOG-STAR REGION
In this section we prove that there is no LCL problem Π with distributed time complexity between  (1) and  (log * ).
Also, we prove that, given a problem Π, we can decide if its complexity is  (1) or Ω(log * ).Moreover, we prove that randomness cannot help: if a problem has randomized complexity  (1), then it has the same deterministic complexity.

High-level idea
We prove that deciding if a problem Π can be solved in constant time is surprisingly simple: a problem is  (1) rounds solvable if and only if it can be solved in  (log * ) rounds and Π contains an allowed configuration of a specific form (this configuration will be called special).This configuration must allow a node to use the same label ℓ that one of its children uses, the labels used by this configuration should be contained in the ones used by some certificate for  (log * ) solvability, and ℓ should be used by at least one leaf of the certificate.If we consider the definition of the MIS problem given in Section 1.3, we can see that it allows the configuration ( : 1), and informally this configuration is what makes the problem constant-time solvable.Note that, however, the algorithm that we can obtain by using this certificate, while still being constant time, may have a worse complexity compared to the one described in Section 1.3.On the other For each node , let  () ∈ {1, . . .,  } be the index of  in the sorted sequence containing the identifier of  and all its siblings (that is,  (•) emulates port numbers).We start by assigning a (possibly non-proper) coloring  () to each node , as follows.Consider the sequence (  ,  ≥ 0) of nodes obtained by starting from  0 =  and following edges going up.The color  () is defined as ( ( 0 ),  ( 1 ), . . .,  ( 10−1 )).If  (  ) is undefined because   does not exist, that is, while going up we found the root, then we complete the sequence with 1s (this is equivalent to imagine the rooted We show that the ruling set extension problem can be solved in  (1) rounds on directed paths by using a one-sided algorithm, provided that we are given a distance- coloring with  (1) colors for a sufficiently large .A one-sided algorithm is an algorithm in which nodes only send messages to their predecessors (or equivalently, nodes only receive information from their successors).One-sided algorithms are convenient, as they are directly applicable in rooted trees [17]: if we have a one-sided algorithm that finds a ruling set extension in directed paths, we can apply the same algorithm in rooted trees and it will produce an output in which all root-to-leaf paths satisfy the constraints of the ruling set extension problem.Our one-sided algorithm works as follows (see Figure 9b): (i) Compute  ′ by using a (2, 2)-ruling set algorithm (ignoring  entirely).
(ii) Nodes in  ′ that have a successor in  within distance 2 are removed from  ′ .
We obtain that nodes in  have no predecessors in  ∪  ′ within distance 2, nodes in  ′ are at distance at least 2 from each other, and nodes not in  ∪  ′ have at least a node in  ∪  ′ within distance 4, and hence a solution for the ruling set extension problem.Here step (ii) is easy to implement with a one-sided algorithm.There is also a simple two-sided algorithm  for solving step (i): process the nodes by color classes; whenever we consider a particular node, check if there is already another node within distance 2 that we have selected, and if not, select the node.Finally, we use the standard trick of "shifting the output" [17] to turn  into a one-sided algorithm  ′ that solves the same problem, as follows: Let  =  (1) be the running time of algorithm , and let us label the nodes by  1 ,  2 , . . .along the path.In algorithm  ′ node   will output whatever node  + outputs in algorithm .The output of node  + in algorithm  only depends on the input colors of nodes   ,  +1 , . . .,  +2 , and hence one-sided information is sufficient for  ′ to simulate .We have simply shifted the ruling set by  steps.
Let us now get back to the task of splitting trees.We proceed as follows.We add all nodes whose label is fixed to a set .Then, we run the one-sided algorithm for the ruling set extension problem on the subgraph induced by unlabeled nodes and their neighbors.Let  ′ be the output of the algorithm.As discussed, in any root-to-leaf path we obtain a solution for the problem described above, and observe that this implies that, in any root-to-leaf path, nodes in  ∪  ′ have at least one successor and one predecessor in  ∪  ′ at distance at most 8 + 1 < 10.What we obtained almost satisfies the requirements of the splitting, except that some nodes of  ′ may be too near to the nodes that were already in the set, since the minimum distance is guaranteed only while following successors (that is, by going up), and we now fix this issue.
Let  ⊆  ′ be the set of nodes that have an already labeled (that is, nodes in ) node as one of its descendants at distance less than .For each such node  p from  we do the following.Let   denote the distance from node  p to its closest labeled node  c below.We remove  p from  ′ and add all nodes that are descendants of  p at distance exactly  c to the set  ′ .Note that, as the connected components of labeled nodes are strictly more than 20 steps apart (by definition of ), all nodes  u just added to  ′ (except node  c ) will not have any node of  below it that is closer than 20 − distance( u ,  c ) ≥ 18 steps.The nodes added to  ′ will be closer to the nodes of  ′ below, but still at least 2 −  =  far away, as distance between two nodes of  ′ on any root-to-leaf path was originally always at least 2.Similarly, they will be further away from a node in  ′ that is above them, but again at most distance 8 + 1 +  = 9 + 1 ≤ 10 far away.Now, observe that the nodes in  ∪  ′ partition the input tree in subtrees with the required properties.
We now describe the second phase.For that, we use the certificate T , and for each subtree in parallel, we do the following.First, we check whether it has one of its leaves already fixed.If not, we directly fix labels at depth  exactly as a leaf layer of any tree from the certificate (they are by definition the same).Otherwise, more care is needed.Observe that each subtree can have at most one fixed leaf (labeled with ).In fact, in any tree whose depth is upper bounded by 10, any two nodes are at most distance 20 apart (the distance is upper bounded by the length of a walk that starts from a node, goes to the root, and then goes to other node); but as fixed nodes are strictly more than 20 apart (by the definition of ), having one fixed leaf means that all other leaves are unlabeled.Let such fixed leaf be denoted by  f and also denote by  d the node that is on a the path connecting  f to the root at distance  from the root.We fix labels at depth  exactly as a leaf layer of any tree from the certificate such that node  d will be labeled with label .This is possible as we can freely choose the ordering of the children.Then, we use the configuration ( :  1 , . . ., , . . .,   ) to label the nodes of the hairy path connecting  d to  f .Now, we have fixed layer  of all subtrees, and also some of the nodes below layer .We proceed from layer  and towards lower layers and label all of its children arbitrarily as every label has a continuation below.This procedure will stop after constant time as our trees have constant depth.
The only remaining part is to fix labels for nodes that are between the roots and the nodes at layer .For that, we use the certificate trees and for every subtree with root fixed to label   , we use tree T  to label the upper layers.□ We now prove that if marked nodes are at distance at most , then they must lie in the same vertical path.Intuitively, if two nodes  1 and  2 are siblings, then  ( 1 ) ≠  ( 2 ), implying that they cannot both have a periodic color, and that the same must hold for the descendants of  1 and  2 , up to some distance.Hence, we can find nodes with a periodic color only by following vertical paths.Proof.We will prove the statement by contradiction.Suppose that  1 and  2 are two marked nodes from different connected components that are at distance  ≤  and the prefix of length 9 of their colors has period at most .Let  1 and  2 be, respectively, the period of the colors of  1 and  2 .Since they are at distance  ≤  from each other, then their lowest common ancestor  3 is at distance at most  from both.Let  1 and  2 be, respectively, the distance of  1 and  2 from  3 .Since a prefix of length at least 8 of  ( 3 ) is equal to suffixes of length at least 8 of  ( 1 ) and  ( 2 ), then the prefix of length 8 of  ( 3 ) has also period  3 that is at most , and that satisfies  3 =  1 =  2 =  ′ .We now prove that either  1 =  3 or  2 =  3 .Assume it is not the case, then there must be two children  1 and  2 of  3 that lie in the two paths connecting  3 to  1 and  2 .Since  3 is the lowest common ancestor,  1 ≠  2 , and since  1 and  2 are siblings, then  ( 1 ) ≠  ( 2 ).Since  ( 1 ) =  ( 1 ) [ 1 − 1], and  ( 2 ) =  ( 2 ) [ 2 − 1], then by the period assumption which is a contradiction since by going up from  1 for  1 − 1 +  ′ steps we reach the same node that we reach by going up from  2 for  2 − 1 +  ′ steps.Hence,  1 and  2 lie in the same vertical path.
Also, note that all nodes in the vertical path between  1 and  2 will be marked as well, since the prefix of length 9 of their color is contained in the union of the prefixes of  1 and  2 , which have period at most  in their 9-length prefixes.□ This lemma implies the following corollaries.
Corollary 7.4 (Marked regions are far apart).For all marked nodes  1 and  2 from different regions, their distance is strictly larger than .
Corollary 7.5 (Marked region is a vertical path).Every marked region forms a vertical path.

POLYNOMIAL REGION
In this section, we describe an infinite sequence of LCL problems Π 1 , Π 2 , . . .with  = 2 such that the complexity of Π  = (2, Σ  , C  ) is Θ( Whenever a node  is labeled  1 , it must have at least one child  such that the entire subtree rooted at  is properly 2-colored by { 1 ,  1 }.For general , Π  can be seen as a combination of  proper 2-coloring problems.See Figure 10 for an illustration. Lemma 8.1.For each positive integer , the round complexity of Π  is  ( 1/ ) in the CONGEST model.
Proof.Let  be the node set for a given -node rooted tree  .We show that in  ( 1/ ) rounds, we can partition the set of nodes  into 2 − 1 parts satisfying the following properties.Suppose we are at the beginning of iteration .Consider the subtree   induced by the remaining nodes   .For each  ∈   , we write   to denote the number of nodes in the subtree of   rooted at .We compute the two parts   and   as follows.It is clear that the computation takes  ( 1/ ) rounds.
• If 1 ≤  < , then   is the set of nodes  ∈   with   >  1/ that satisfy at least one of the following.
-  ≤  1/ for at least one child  of .
- has exactly one child in   .
It is straightforward to verify that the properties (P1), (P2), and (P3) are satisfied for   and   . •
possible  > 1  = 2, 3, . . .D = class exists for deterministic algorithms R = class exists for randomized algorithms () = the current construction assumes the knowledge of ; unknown without this information () = does not determine the value of  for the class Θ( 1/ ) (D) = known only for deterministic complexities, unknown for randomized (H) = known only for classes between Ω(log ) and  ()

𝐷Fig. 6 .
Fig.6.Constructing a rooted tree  for applying Lemma 5.11.Here (, ) was isomorphic to the view of some node  in layer 1 of   2←1 .Therefore we construct two copies of   2←1 , one of them is called   and the other one is   , and we identify the nodes   and   that have views isomorphic to (, ).We identify the unique path   from   to the root of   and the unique layer-1 path   that takes us to   (dark arrows).Finally, we connect   through the middle tree to   .Note that the resulting path  =   ←   ←   does not use layer-0 nodes.

Theorem 6 . 11 .
and Figure 8c.□ We now prove an upper bound on the running time of Algorithm 4. Theorem 6.10.The running time of Algorithm 4 is at most exponential in the size of the LCL problem.Proof.Observe that every iteration of the for loop in Algorithm 3 either adds an element to   or finishes the algorithm.Hence, we can upper bound the number of iterations by the maximum size of each set   , that is 2 |Σ |+1 .Also, each iteration requires at most exponential time in Σ and .Hence, the total running time of Algorithm 3 is exponential in Σ and .Since Algorithm 4 just calls Algorithm 3 for every choice over Σ, then we get one more exponential slowdown, hence the claim follows.□ Hence we conclude the following theorem.Whether an LCL problem Π has round complexity  (log * ) or Ω(log ) can be decided in time at most exponential in the size of the LCL problem.

Lemma 7 . 3 .
If two marked nodes are at distance at most , then they are in the same connected component of marked nodes, and each connected component forms a vertical path.
Let  ′ 1 =    (distinguished nodes are  1 and  1 ) and  ′ 2 =    (distinguished nodes are  2 and  2 ).Concatenate these two bipolar trees into a new bipolar tree by adding an edge { 1 ,  2 } and setting  =  1 and  =  2 .We call  = { 1 ,  2 } the middle edge.The layer numbers of the nodes are kept when    and    are linked together into   ← .
* of    where  * lies on the core path of    * .The graph    * can be viewed as a subgraph of    * ← * such that  * is a node in the middle edge of    * ← * .As  is within distance  to  * and the radius- view of  in    * ← * ,    * , and the original graph    are identical, we conclude that the radius- view of  is isomorphic to some member in   by considering the graph * ← * .□ are the first  nodes in the -node core path of   = We choose  ′  to be the union of these two subgraphs    ′ and    ′ , together with the edge  =  ′ ←  ′ .It is clear that  ′ is isomorphic to    ′ ← ′ and contains all nodes in   .□Lemma5.16.Let   =  ′ ←  ′ be the edge connecting   and   .Let   be the union of the radius-( − 1) neighborhood of  ′ and  ′ in  .There is a subgraph  ′  of  isomorphic to    ′ ← ′ for  ′ =  and  ′ =  such that  ′  contains all nodes in   .In the isomorphism, the edge   is mapped to the middle edge  of    ′ ← ′ .and the descendants of the nodes in this subpath.The edge   =  ′ ←  ′ connects the two trees  ′ =    and    , as  ′ is the distinguished node  of  ′ =    and  ′ is the distinguished node  of    .Therefore, we may take  ′  to be the union of  ′ =    and    , together with the edge   =  ′ ←  ′ .The tree  ′  is isomorphic to   ← and contains all nodes in   .□CombiningLemma 5.15 and Lemma 5.16, in Lemma 5.17 we show that the local neighborhood of any node in  is isomorphic to the local neighborhood of some node in   ′  ′ ← ′ , for some choices of 1 ≤  ′ ≤ , 1 ≤  ′ ≤  and  ′ ≥ 1.In the proof of Lemma 5.17 we utilizes the fact that  = 2 + 4.Lemma 5.17.For each node  in  , the subgraph induced by its radius-( + 2) neighborhood is isomorphic to the subgraph induced by the radius-( + 2) neighborhood of some node  ′ in   ′  ′ ← ′ for some 1 ≤  ′ ≤ , 1 ≤  ′ ≤  and  ′ ≥ 1.Proof.The proof is done by a case analysis.We write  to denote the set of nodes within the radius-( + 2) neighborhood of  in  .If  is completely confined in one of   or   , then the lemma holds with   ′  ′ ← ′ =   ← , as both   and   are isomorphic to   ← .If  is completely confined in   , then the lemma holds with   ′  ′ ← ′ =  , as we recall that  ≥ .If  contains the edge   connecting   and   , then  ⊆ the path formed by the first  nodes in   .We consider the subgraph    ′ induced by the nodes ′ 1 ← • • • ←  ′  and their descendants in   .As  ′ 1 ← • • • ←  ′ ′ with  ′ =.   −1 with  ≥  and   =   ← is formed by connecting    and    .We write  ′ 1 ← • • • ←  ′  to denote the core path of   , and we let  ′ =    −1 =    be a subtree of   induced by the -node subpath  ′ −+1 ← • • • ←  ′ does not see a leaf or the root (note that the view of all nodes that do not see a leaf or the root is the same, since nodes have no ids).By the definition of  1 () and  2 (), we know that  1 () ∪  2 () ≤ and hence the probability that at least one node in  1 () ∪  2 () outputs a label not in  is at most| 1 () ∪  2 ()|/ √  0 ,by a union bound.Thus, the probability that all nodes in  1 () ∪  2 () output a label from  is at least Algorithm 3: findUnrestrictedCertificate(Π, )Input: LCL problem Π, label  ∈ Σ(Π) or  =  Output:  if no certificate exists or a certificate builder ← 0  0 ← { ({  } ,  = ) |  ∈ Σ(Π) } ▷   isa set of pairs.The first element of each pair is a set of possible labels of certificate roots.The second element is a Boolean that indicates whether such set of root labels can have label  as one of its leaves.For  0 , the Boolean is true if and only if  is equal to .CB ← ∅ ▷ Certificate builder which will describe how we constructed individual elements in sets   .repeat  ←  + 1   ←  −1 for every -tuple of sets of root labels and indicators ( 1 ,  1 ), ( 2 ,  2 ), . . ., (  ,   ) from  −1 do   ← {  | ( :  1 ,  2 , . . .,   ) ∈ C(Π),  1 ∈  1 ,  2 ∈  2 , . . .,   ∈   }   ←  1 or  2 or . . .or   ▷ Indicates whether   will have a leaf layer containing label .if   ≠ ∅ and (  ,   ) ∉   then CB ← CB ∪ ((  ,   ), (( 1 ,  1 ), ( 2 ,  2 ), . . ., (  ,   )))   ←   ∪ (  ,   ) end end until   =  −1 ▷ Until we do not enlarge the set   .
1/) in the LOCAL model.Proof.Observe that, given the LCL problem Π  , Algorithm 2 takes exactly  iterations to output .For the first iteration, the labels { 1 ,  1 } are path-inflexible in Π  .For iteration 1<  ≤ , { −1 ,   ,   } are path-inflexible in Π  restricted to the labels Σ  \ { 1 ,  1 ,  1 ,  2 ,  2 ,  2 , . ..,  −1 ,  −1 }.Therefore, the round complexity of Π  is Ω(1/ ) by Lemma 5.14.□ Combining Lemma 8.1 and Lemma 8.2, we conclude the following theorem.Theorem 8.3.For each positive integer , the round complexity of Π  is Θ( 1/ ) in both LOCAL and CONGEST.While we completely characterize all complexities for LCLs in rooted trees in both LOCAL and CONGEST, for both deterministic and randomized algorithms, and we show that we can decide what is the complexity of a given problem, there are many questions that are left open.