Classification of Local Optimization Problems in Directed Cycles
Abstract
We present a complete classification of the distributed computational complexity of local optimization problems in directed cycles for both the deterministic and the randomized LOCAL model. We show that for any local optimization problem (that can be of the form min-sum, max-sum, min-max, or max-min, for any local cost or utility function over some finite alphabet), and for any constant approximation ratio , the task of finding an -approximation of in directed cycles has one of the following complexities:
-
1.
rounds in deterministic LOCAL, rounds in randomized LOCAL,
-
2.
rounds in deterministic LOCAL, rounds in randomized LOCAL,
-
3.
rounds in deterministic LOCAL, rounds in randomized LOCAL,
-
4.
rounds in deterministic LOCAL, rounds in randomized LOCAL.
Moreover, for any given and , we can determine the complexity class automatically, with an efficient (centralized, sequential) meta-algorithm, and we can also efficiently synthesize an asymptotically optimal distributed algorithm.
Before this work, similar results were only known for local search problems (e.g., locally checkable labeling problems). The family of local optimization problems is a strict generalization of local search problems, and it contains numerous commonly studied distributed tasks, such as the problems of finding approximations of the maximum independent set, minimum vertex cover, minimum dominating set, and minimum vertex coloring.
Keywords and phrases:
LOCAL model, optimization, cycles, meta-algorithmsCategory:
Track A: Algorithms, Complexity and GamesCopyright and License:
Jukka Suomela; licensed under Creative Commons License CC-BY 4.0
2012 ACM Subject Classification:
Theory of computation Distributed algorithmsAcknowledgements:
This project was initiated at the Research Workshop on Distributed Algorithms (RW-DIST 2025) in Freiburg, Germany; we would like to thank all workshop participants and organizers for inspiring discussions, and the anonymous reviewers for their helpful feedback on this paper. Most of this work was done while A.M. was affiliated with Aalto University.Funding:
This work was supported in part by the Research Council of Finland, Grant 359104, and by the Quantum Doctoral Education Pilot, the Ministry of Education and Culture, decision VN/3137/2024-OKM-4.Editors:
Sayan Bhattacharya, Danupon Nanongkai, Michael Benedikt, and Gabriele PuppisSeries and Publisher:
Leibniz International Proceedings in Informatics, Schloss Dagstuhl – Leibniz-Zentrum für Informatik
1 Introduction
In this work we study distributed algorithms for local optimization problems – these include a wide range of familiar graph optimization problems such as maximum independent set, minimum vertex cover, minimum dominating set, and minimum vertex coloring. We show that in directed cycles, essentially all questions about the existence of distributed algorithms for local optimization problems can be answered in a mechanical and efficient manner. We give a meta-algorithm that answers the following questions, for any given local optimization problem and any given constant approximation factor :
-
1.
How fast can we find an -approximation of in the deterministic model?
-
2.
How fast can we find an -approximation of in the randomized model?
1.1 Broader Context
There is a long line of prior work that has studied local search problems, and in particular locally checkable labeling problems or LCLs; these are problems where the task is merely to satisfy all local constraints, i.e., the task is to find a feasible solution that does not need to be optimal in any sense. Familiar examples include the problems of finding a maximal independent set, or a valid coloring with colors in a graph of maximum degree .
While a lot of early work focused on specific concrete examples of such tasks, e.g., exactly what is the distributed complexity of finding a -coloring of a cycle [10, 20], Naor and Stockmeyer [22] initiated the study of meta-computational questions in this context: for any given local search problem , can we systematically determine what the distributed computational complexity of is?
It turns out that such questions are in general undecidable, already in the case of seemingly simple graph classes such as 2-dimensional grids [22, 7]. However, in graph families such as cycles, paths, and trees many such questions are decidable [9, 3, 4, 2]. Furthermore, while such questions are computationally hard if we have input labels [2], many of these questions can be solved efficiently (in time that is polynomial in the size of the description of problem ) in the case of unlabeled graphs [9, 3].
In particular, if we look at LCL problems on unlabeled directed cycles, they are very well understood: the round complexity of any such problem is , , or in all of our usual models of distributed computing (deterministic , randomized , deterministic , and randomized ), and there is a computer program that automatically finds out the complexity class for any given problem [24].
However, many problems that have been studied in the field of distributed graph algorithms are local optimization problems, e.g., [18, 11, 14, 13, 19, 17, 16], and much less is currently known about them. There is a large collection of isolated examples that apply to specific problems, but there is no complete classification of possible distributed round complexities of local optimization problems, and there is no meta-algorithm that is able to automatically determine the complexity of a given problem.
Furthermore, what makes the question particularly intriguing is that it is known that the complexity landscape has to be fundamentally different, already in the simplest case of unlabeled directed cycles. To see this, consider the problem of finding a -approximation of a minimum dominating set in cycles. Thanks to [11], it is known that in the deterministic model, the complexity of this problem is rounds, while in the randomized model, the complexity is rounds. The same never happens with any LCL problem: for them, rounds in randomized always implies rounds in deterministic [8, 22].
Hence we have three questions that we aim to answer in this work:
-
1.
What is the right framework for formalizing and representing local optimization problems (analogous to LCL problems in the context of search problems)?
-
2.
What does the complexity landscape look like for local optimization, especially when we compare deterministic with randomized ?
-
3.
Can we design a meta-algorithm that automatically determines the complexity class for any given local optimization problem and any given approximation ratio?
1.2 Formalism
In this work, we look at the simplest nontrivial case: local optimization problems in directed cycles. Let us first recall how we can specify LCL problems in this setting: There is some finite set of output labels and verification distance , and we specify which -tuples of output labels are valid. For example, for the task of -coloring, we have , and we can select , and the set of valid tuples of output labels is . A feasible solution is a labeling that is everywhere locally valid: for each node , the sequence of output labels formed by and its successors is a valid tuple.
Remark.
In cycles, it does not really matter whether we look at and its successors, or and its predecessors, or and its radius- symmetric neighborhood. In this work we follow the convention that a problem is defined in terms of successors.
In local optimization problems we keep the same basic setup, but now we associate a value with each valid -tuple . This way, each labeling associates a local value with each node (we will use the terms cost or utility as appropriate to refer to the value, depending on the problem). The optimization task is one of the following, combining an objective function and an aggregation function :
-
1.
: maximize the minimum of local values,
-
2.
: maximize the sum of local values,
-
3.
: minimize the maximum of local values,
-
4.
: minimize the sum of local values.
We will use the value to indicate forbidden label combinations (which can also be interpreted as e.g. infinite cost). We are interested in approximations, and we follow the convention that approximation ratio is always at least , so e.g. a -approximation for a minimization problem is a feasible solution with total cost at most twice the optimum, and a -approximation for a maximization problem is a feasible solution with total utility at least half the optimum.
1.3 Examples of Problems
The following examples will hopefully clarify the formalism, and also demonstrate that it is broadly applicable. We will start with familiar, classic graph optimization problems.
Example 1.1 (maximum independent set).
The maximum independent set problem can be encoded as follows, with indicating nodes that form the independent set:
-
, , , ,
-
, , , .
Here any valid independent set has a nonnegative total value, and the value is equal to the size of the independent set.
Example 1.2 (minimum dominating set).
The minimum dominating set problem can be encoded as follows:
-
, , , ,
-
, , , ,
, , , .
Example 1.3 (minimum vertex coloring).
To encode the minimum vertex coloring problem, we can use e.g. the following formulation:
-
, , , ,
-
if , .
Here for example a valid -coloring (using only colors and ) has total cost , and a valid -coloring has total cost .
Example 1.4 (maximum domatic partition).
Let us now look at a slightly more interesting example: domatic partition. In this problem, the task is to partition the set of nodes into as many disjoint dominating sets as possible; in a cycle we can have at most such sets. While more clever ad-hoc encodings are possible, we will use the following approach that generalizes to a wide range of similar problems. We use labels of the form , where indicates that we claim to have a solution with exactly dominating sets, and indicates that this node claims to be in a dominating set with label . We then need to ensure that nodes also agree on the number of dominating sets, and each dominating set is also valid. This will suffice:
-
, , , ,
-
,
-
,
-
,
-
otherwise.
1.4 A Classification Example
So far we have seen examples of natural , , , and problems. We will introduce a somewhat artificial problem, which is engineered to illustrate many key phenomena in a single, concise package.
Example 1.5 (sloppy coloring).
In this problem, we can produce a proper -coloring with colors , a proper -coloring with colors , or a somewhat sloppy -coloring with colors . The problem is defined as follows:
-
, , , ,
-
,
-
,
-
,
-
,
-
otherwise.
Let us try to gain a bit more intuition on the problem first. If we manage to produce a proper -coloring, the total cost in an -cycle is , and if we manage to produce a proper -coloring using labels , the total cost is . If we resort to labels and produce a proper -coloring, the total cost is . If a sublinear number of edges uses the color pair , the total cost will be , and if we produce a trivial solution with all nodes colored , the total cost will be .
Now the key question is this: given some constant , what is the distributed round complexity of finding an -approximation of a sloppy coloring? It turns out that the complete answer in this case looks like this:
-
For , the complexity is in both the deterministic and randomized models. The optimal algorithm is a trivial brute-force algorithm that finds a -coloring if it exists, and otherwise produces a -coloring. There is no -round algorithm for finding a -approximation or better.
-
For , the complexity is in both the deterministic and randomized models. We can always produce a -coloring, using the Cole–Vishkin algorithm [10], and this is always a -approximation. There is no -round deterministic or randomized algorithm for finding a -approximation or better.
-
For , the complexity is in the deterministic model but in the randomized model. The randomized algorithm essentially finds a random ruling set to divide the cycle in segments. The algorithm uses color at the segment boundaries and fills in all sufficiently short segments with . Super-constant-length segments are rare, and there we can use the more costly solution . By adjusting the parameters, we can achieve approximation ratio for any constant with high probability (the worst case being that the input is an even cycle that could be -colored). There is no -round deterministic algorithm for finding a -approximation or better.
-
For , the complexity is in both the deterministic and randomized models. The algorithm simply outputs everywhere.
As we will see, this turns out to be a well-representative problem: for any local optimization problem in our problem family, there are at most these four complexity classes, and the optimal algorithms are also essentially generalizations of the above four algorithms. We can automatically deduce all relevant thresholds between the classes.
1.5 Contributions
We show that for any local optimization problem (in the formalism of Section 1.2), and for any constant , the task of finding an -approximation of in directed cycles has one of these complexities:
-
1.
rounds in deterministic , rounds in randomized ,
-
2.
rounds in deterministic , rounds in randomized ,
-
3.
rounds in deterministic , rounds in randomized ,
-
4.
rounds in deterministic , rounds in randomized .
Moreover, for any given and , we can determine the complexity class automatically, with an efficient (centralized, sequential) meta-algorithm, and we can also efficiently synthesize an asymptotically optimal distributed algorithm. In particular, all local optimization problems similar to those in Sections 1.3 and 1.4 are now fully understood in the case of directed cycles.
One key consequence of our work is that increasing the running time from to, say, or does not give any constant advantage in the approximation ratio, for any local optimization problem in directed cycles. If we are interested in finding a -approximation, for example, then the situation is more complex, and indeed we might still obtain some sub-constant advantage by doing so. However, as we show, we will never be able to improve our approximation ratio from, say, to by such means. You will need to jump from rounds all the way to rounds for such an improvement.
We emphasize that the case of max-min and min-max problems can be handled by known techniques, as each fixed essentially defines a sub-problem that is an LCL. The main novel part is and problems, which require genuinely new techniques and ideas. However, we wanted to give a unified formalization of all of these problems, and show that the same definitions and concepts indeed largely apply to both problem families.
1.6 Techniques
We take a three-step approach:
Step 1: Defining the problem parameters (Section 3).
We first define seven parameters , , , , , , and that capture essentially everything that we need to know about a given optimization problem .
To do this, we define a node-weighted de Bruijn graph that captures the entire structure of , including the values. The intuition is that for any input cycle , a feasible solution of in corresponds to a closed walk in , with the same value. Then we proceed to define four subgraphs of :
-
1.
We let . We define based on the cheapest closed walk in .
-
2.
We zoom into flexible components , in the spirit of [9]. In brief, a node of is -flexible if there are self-returning walks from back to of all possible lengths . A node is flexible if it is -flexible for some . It follows that in each strongly connected component either all or none of the nodes are flexible, and we say that a component is flexible if the nodes are flexible. We define parameters and based on the cheapest closed walks in .
-
3.
We zoom into flexible components with self-loops ; we simply take those flexible components that also contain nodes with a self-loop. We define parameters and based on the cheapest closed walks in .
-
4.
We form the subgraph that consists only of self-loops . We define parameter based on the cheapest closed walks (that is, cheapest self-loops) in .
The above six parameters suffice for and problems. For max-min and min-max problems we also need to introduce a parameter that, in brief, captures the cheapest pair of closed walks that have coprime lengths.
| Example | |||||||
|---|---|---|---|---|---|---|---|
| Example 1.1: max. independent set | true | – | true | ||||
| Example 1.2: min. dominating set | true | – | true | ||||
| Example 1.3: min. vertex coloring | – | false | false | ||||
| Example 1.4: max. domatic partition | – | false | false | ||||
| Example 1.5: sloppy coloring | false | – | true |
Table 1 shows concrete examples of these parameter values for the examples from Section 1.3. We emphasize that these parameters have a purely graph-theoretic definition; their definitions do not make any references to e.g. a particular model of distributed computing. However, in step 3 we will see how these parameters connect with the task at hand.
Step 2: The problem parameters are efficiently computable (Section 4).
We show that given a description of any local optimization problem , we can efficiently compute all necessary parameters out of , , , , , , and . In each case, we first construct the de Bruijn graph , which has size polynomial in the size of the problem description. Then we show that we can efficiently construct the relevant subgraph (). Finally, we show that we can design an efficient graph algorithm for determining the corresponding parameter values based on the structure of the subgraph.
For example, to determine the value of for a problem, it is sufficient to find a cycle in that minimizes the average cost; we show that all of this can indeed be done efficiently, largely relying on standard graph algorithms.
Determining e.g. and is more interesting, and there we will build on and extend prior work related to flexibility [9]. In brief, it is no longer sufficient to find a single cheap cycle, but we also need to find a pair of low-average-cost cycles with coprime lengths. We refer to Section 4 for the details of how all seven parameters can be determined efficiently.
Step 3: The problem parameters determine distributed complexity (Section 5).
Finally, we show that the complexity of any given problem for any approximation ratio can be determined using parameters , , , , , , and . Furthermore, we can also automatically construct an asymptotically-fastest algorithm for any given .
The intuition here is that provides a baseline against which we can compare. For example, for problems, for infinitely many values of , there exists a solution of total cost , and for no value of we have cheaper solutions. So an average cost of per node represents the best-case scenario for the optimal solution. In particular, if we can find a solution of cost at most for all , it will clearly be an -approximation.
For a full classification, we will now need both upper bounds and matching lower bounds. Let us first consider upper bounds. It is perhaps easier to consider what we can do with a given time budget, using problems as an example:
-
1.
If we can use rounds, we can brute-force an optimal solution, and hence trivially find a -approximation, regardless of the input size.
-
2.
If we can use only rounds, we can use the following idea: find a sufficiently-sparse ruling set that divides the cycle into segments, so that the length of each segment is at least and at most for some appropriately-chosen constants and . Then we resort to the notion of flexibility: we put some fixed “flexible output sequence” at segment boundaries. Then we can follow a cheap closed walk from to in the de Bruijn graph to fill the gap between two such markers. There are two cases:
-
(a)
There are two closed walks from to in that have coprime lengths and that have average cost exactly . Then by using a combination of such walks we can fill in gaps so that the total cost of the solution is exactly , and hence we can achieve an approximation ratio of .
-
(b)
Otherwise we will occasionally use slightly more expensive fragments, but we can still achieve a total cost of , and hence approximation ratio for any constant .
-
(a)
-
3.
If we further restrict the running time to rounds, but allow the use of randomness, we can use a faster but sloppier approach for dividing the cycle into segments by choosing a random ruling set. The key difference is that now we can no longer guarantee that all segments have length at most some constant , yet we need to be able to solve the problem in constant time. This is where we resort to self-loops in : in those (rare) segments that are too long, we simply fill in the middle part of the segment by following a self-loop, that is, we produce in those areas a constant solution. For example, in the maximum independent set problem this means that we may occasionally have long stretches of s in our output. By choosing the parameters appropriately, we can achieve a total cost of , and hence an approximation ratio of .
-
4.
Finally, if we must use an -round deterministic algorithm, we will produce a constant output that corresponds to following the cheapest self-loop of repeatedly, achieving a total cost of and hence approximation ratio of .
Then we need to show that the above strategy is optimal: there are no other complexity classes, and for each class the above approximation ratios are the best possible. To give some spirit of the lower bounds, we for example reason as follows. Assume that we have an algorithm that runs in rounds. Then if the algorithm succeeds in producing a valid solution for every instance, it cannot use output values outside . Hence the output of the algorithm forms a closed walk in . But such walks have an average cost at least , while the optimum might have an average cost of , and it follows that the algorithm cannot find an approximation better than .
1.7 Full Classification
Tables 2 and 3 summarize how we can determine the exact complexity class for any given problem and any given approximation ratio . The classification is complete; there are matching upper and lower bounds for each case. Table 4 shows what is obtained from applying our method to the previous examples from Section 1.3.
| Complexity | Sufficient condition | ||
|---|---|---|---|
| det. | rand. | ||
| and is false | and is false | ||
| and is true | and is true | ||
| and is false | and is false | ||
| and is true | and is true | ||
| unsolvable | unsolvable | ||
| Complexity | Sufficient condition | ||
|---|---|---|---|
| det. | rand. | ||
| unsolvable | unsolvable | ||
| Complexity | ||||
| Example | Range of | Strategy | det. | rand. |
| Example 1.1: | Optimal | |||
| max independent set | Constant fragment | |||
| Example 1.2: | Optimal | |||
| min. dominating set | Constant fragment | |||
| Constant solution | ||||
| Example 1.3: | Optimal | |||
| min. vertex coloring | Flexible | |||
| Example 1.4: | Optimal | |||
| max. domatic partition | Flexible | |||
| Constant solution | ||||
| Example 1.5: | Optimal | |||
| sloppy coloring | Flexible | |||
| Constant fragment | ||||
| Constant solution | ||||
1.8 Future Directions and Open Questions
Our results are easy to adapt to weaker models: the results generalize essentially verbatim also to the model [23], and they are easy to adapt to the port-numbering model, where we essentially lose the deterministic class. However, generalizing the results to stronger classes leads to interesting open questions. One obvious candidate is the quantum- model; however, whether symmetry-breaking problems require rounds in quantum- is a major open question [1], and until this is resolved, we cannot fully characterize local optimization problems in the quantum- model, either.
An orthogonal direction is generalizations of our questions to more diverse families of inputs. The first steps would be to generalize our results from directed cycles to undirected cycles, directed paths, and rooted trees. Already the case of undirected cycles leads to new technical challenges: constant-round deterministic algorithms for optimization problems in undirected cycles may achieve non-trivial approximations (consider e.g. the task of orienting the edges, and assigning a higher cost to sink nodes). We believe that by introducing notions analogous to mirror-flexibility from [9] to our setting, it is also possible to eventually classify all these cases.
We have not considered inputs, and as soon as we have inputs, the classification will be -hard [2]. Whether it is nevertheless decidable for local optimization problems with inputs is yet another open question for future work.
2 Preliminaries
We denote the set of positive integers by and by . Similarly, is the set of non-negative reals. We also write for the set of the first elements in .
Our input graph is always a directed cycle . Without restriction, let us name the nodes of a directed cycle of length such that and for . The (one-way) neighborhood of radius of a node is a function such that
Hence the neighborhood of a node extends itself along a single direction of the cycle, namely following the orientation of the edges. We will use the one-way neighborhood to define the local costs incurred by every node; our computational model, however, allows communication in either direction (i.e., disregarding the orientation of the edges).
2.1 Locally Checkable Optimization Problems
A locally checkable optimization problem (opt-LCL) on directed cycles is a tuple where:
-
is a finite alphabet,
-
is the (constant) radius,
-
assigns every neighborhood a certain cost,
-
is an aggregation function,
-
is an objective function.
The label is used to indicate neighborhoods that are not valid. In the following, such neighborhoods and their cost can be immediately disregarded. In order to distinguish different types of opt-LCLs we use shorthand such as --LCL (e.g., --LCL for an opt-LCL where and ), and we write -LCL for any opt-LCL where .
A solution on a directed cycle is a function . For the neighborhood of a node , we define
We let be the solution space containing all solutions for a problem on a cycle with nodes. A solution to an opt-LCL on a directed cycle is said to be valid if and only if holds for every .
The optimal cost of a problem on a directed cycle of length is a function
Note that depends only on , since a directed cycle is determined by its length. A solution is said to be optimal for some if and only if
For an opt-LCL with , a solution of value in an -cycle is an -approximation if . For , the condition is that . An algorithm is said to find an -approximation for if it finds an -approximation for any .
2.2 The Model
We assume the usual distributed model of computation due to Linial [20]. The input graph is perceived as defining a distributed network where nodes are computers and edges are communication links. The orientation of an edge is interpreted as input information and does not constrain communication in any way (i.e., it is allowed to send messages in the opposite direction of an edge). Each node is assigned a unique identifier from the set , where is some constant of our choosing. Computation proceeds in rounds, where in each round a computer exchanges messages of unbounded size with its neighbors and executes a procedure where it decides whether to commit to an output or not and what to send on the next round of communication. We disregard time and space complexity of local computation and care only about the number of communication rounds required to solve the problem at hand. In this paper, our upper bounds give computable local procedures at every node whereas for the lower bounds we may as well assume an arbitrary procedure.
Whenever we address the randomized model, we say that an algorithm produces an -approximation if, with high probability, the output is valid for the problem and additionally approximates the optimal solution within a factor of . That is, with probability at most , the result is a labeling that is either invalid or does not satisfy the allowed approximation ratio.
3 Defining Problem Parameters
In this section, we define the seven parameters , , , , , , and that fully capture the complexity of producing approximations of an opt-LCL . Before we can do this in Definitions 3.5, 3.6, and 3.7, we first introduce some technical tools which we also require later in Section 4.
The main technical tool that we employ to analyze an opt-LCL is the de Bruijn graph associated with it. The values of the problem parameters for all come from characteristics of certain walks in the de Bruijn graph associated with it.
Definition 3.1 (De Bruijn Graph).
Given an opt-LCL , its de Bruijn graph is the digraph where:
-
The nodes in are all -tuples fulfilling the condition .
-
We have an edge from to if holds for every .
Moreover we equip this graph with the cost function , where is the range of . The function attributes to a particular neighborhood its cost . We denote by the number of nodes in .
Figures 1(a), 1(b), 1(c), 1(d), and 2 show the de Bruijn graphs associated with the problems from Section 1.3.
Next we look at walks in the de Bruijn graph associated with as well as the total cost incurred by following such walks.
Definition 3.2 (-walk).
A sequence of nodes with is a -walk if , and is an arc of . When , we refer to as a closed walk, or, in particular, as a closed -walk.
Definition 3.3 (Cost of a walk).
Let be a walk with . If , then . Otherwise, .
Note that we ignore the value of systematically to avoid counting some element twice when is a closed walk.
Finally, we define flexible nodes and components, which are relevant for flexible strategies.
Definition 3.4 (Flexible nodes and components).
A node of is flexible if there exists such that , there exists a closed -walk of length exactly . We say in particular that is -flexible.
A strongly connected component of is a flexible component if there is a node such that is flexible.
We are now ready to define the seven parameters , , , , , , and that capture the key properties of an opt-LCL . Recall denotes the value of an optimal solution for a cycle of nodes. Basically, we relate each of the values to the optimal solution in a certain subclass of the solution space. These subclasses are implicitly defined by taking appropriate subgraphs of the de Bruijn graph associated with . Meanwhile, and are Boolean values that depend on certain specific properties of .
Definition 3.5 (, , , ).
Let be the de Bruijn graph associated with an opt-LCL. We define a set of (possibly empty) subgraphs for as follows:
-
1.
.
-
2.
containing only the flexible components of , excluding all edges between different components.
-
3.
containing only components of that contain a self-loop.
-
4.
containing only nodes of that have a self-loop and their self-loops.
Definition 3.6 (, , , , , ).
Let be an opt-LCL. For each , we define as the set of cycles (including self-loops) in and the real-valued parameter
If is empty, then . The parameters and are defined as follows:
-
1.
is false if there are two closed walks in of coprime lengths, sharing a node, so that ; otherwise, we set to true.
-
2.
is false if , and true otherwise.
As an example, for --LCLs we can connect with concrete solutions to as follows:
-
1.
is the best possible relative value that can be achieved infinitely often (i.e., asymptotically) by the optimum over all cycle lengths;
-
2.
is the (again, asymptotically) worst such value;
-
3.
is the best possible value for solutions that admit constant neighborhoods, that is, where a single, fixed label appears;
-
4.
is the best possible (relative) value for constant solutions, that is, where the same fixed label is used everywhere.
Figure 2 shows how to obtain the relevant and values for Example 1.5. Note that for -LCLs, if is the length of the cycle providing , then implies . In addition, for large , we have . It is possible that is false and .
Definition 3.7 ().
To define , we let and Let and be the subgraphs of the de Bruijn graph induced by and , respectively. We then define for --LCLs and --LCLs as follows:
-
For --LCLs, is the smallest for which the graph contains two closed walks of coprime lengths that have a node in common.
-
For --LCLs, is the largest for which the graph contains two closed walks of coprime lengths that have a node in common.
4 Problem Parameters Are Computable Efficiently
In this section, denote by the de Bruijn graph of the given opt-LCL. Recall that is its number of nodes. Next we present the necessary result to prove that all seven problem parameters can be computed efficiently. Note that , and are only relevant to -LCLs, so we do not need to compute them otherwise.
Let be the set of closed walks that are optimal regarding the objective function. In the event that , it is impossible to form a closed walk in , and hence it is impossible to solve . Hence we may assume .
Lemma 4.1.
If , there exists a closed walk in of length at most .
Proof.
Let be a closed -walk of length at least . We prove that we can find a walk such that . We repeat this argument on until we eventually find a walk of length at most .
As , by the pigeonhole principle, either is visited three times or there exists some visited twice. In the first case, we split into two closed -walks at , and . Observe that both and have lengths in , and both have their cost equal to , as otherwise : If (resp., in the case of maximization), is no longer optimal. Moreover, if (resp., for maximization), then for the other subwalk must have better cost than , while for this contradicts the definition of as the aggregate over . Hence, both of them belong to .
If there is some visited twice, the proof is quite similar. Split into three walks at : , and . Now consider the two closed walks and . Their lengths are in and they both must have the same cost as ; hence they belong to .
The definition of suggests that the optimal elements of the de Bruijn graph are closed walks and not only simple cycles. In the next lemma we prove that we can actually think only about cycles:
Lemma 4.2.
If there is a closed walk of length at most with cost in the de Bruijn graph then there is a cycle of length at most with cost at least as good as in terms of the optimization function.
Proof.
If is a cycle, the proof is trivial. Otherwise, choose two occurrences of the same node in that split into two shorter closed walks and . One of and has cost at least as good as with respect to the objective function: for this follows from the fact that is the weighted average of and , while for it follows directly from the aggregate over the concatenation. Continue with such a shorter closed walk until the remaining closed walk is a cycle.
In order to compute and it is crucial to identify flexible nodes of the graph. To figure out if a given node is flexible we prove the following lemma:
Lemma 4.3.
Node is flexible if and only if belongs to two closed walks of coprime lengths.
Proof.
Let and be two closed -walks with and being coprime. By the Frobenius coin theorem, all integers at least can be obtained by a nonnegative integer combination of and . Concatenating the corresponding copies of and therefore gives closed -walks of all sufficiently large lengths, hence is flexible.
Now let be a flexible node. Hence there exists such that for all , there exists a closed -walk of length exactly . Pick any and such that and are coprime. The corresponding closed -walks have coprime lengths.
Figuring out the value of is in principle easy: for each connected component, we can compute the cost of the optimum cycle in that component, and test which components are flexible. Testing the flexibility of a component can be achieved by considering walks of length [9]. We then set accordingly.
The hard part of our work is to decide whether is false or not. Parameter would be false only if there are two closed walks of coprime lengths, sharing a vertex and of cost . We adapt the procedure for testing flexibility from [9] to take into account the cost function of the de Bruijn graph in the next two lemmas.
Definition 4.4.
If is an --LCL, then , where
It would be reasonable to think that having very long walks might be good in order to optimize the cost of a solution. We prove in our next lemma that this is not the case: all the walks of have cost exactly , and hence the length of the walk does not matter. This lemma, coupled with the fact that testing flexibility can be done by considering walks of limited length will allow us to efficiently test whether is false or not. As is a parameter defined only for --LCLs, there is no analogous definition of for --LCLs and --LCLs.
Lemma 4.5.
Let be an --LCL. Any closed walk in the graph has cost exactly .
Proof.
Define the shifted cost function by . Call the cost of a walk computed using instead of the shifted cost of . It is clear that a walk of cost has shifted cost zero (as if and only if for --LCLs). Moreover, by definition of , all closed walks must have shifted cost at least if (resp. at most if ). For simplicity, we can imagine that is constructed by adding one by one a finite number of simple closed walks of shifted cost zero. (Note that we do not actually need to design an algorithm to build this sequence.)
We now prove the lemma by induction. Let be a closed walk of . Assume that exists solely on the graph spanned by . It is clear that being a simple closed walk, consists of one or multiple instances of and hence .
Suppose now that for some , any closed walk on the graph spanned by has shifted cost exactly zero. We want to prove that any closed walk on has shifted cost exactly . We use the following notation to represent :
where , and are nodes of , and are other nodes. The reader can refer to Figure 3 as a visual aid for the rest of the proof.
Consider a walk defined in the following way: it is built following but each time we reach a frontier node , we add a first segment going from to through nodes in then a second segment going from to through nodes of . Then, resumes its visit of . Note that it is possible to reorient the way in which is travelled so that it can be seen as a visit of , then when it reaches a frontier node , it may go through entirely, then resume its visit of . Then it is clear that as it consists of multiple travels through and a walk on . Also, we have . If we had (resp., ), then in some way would be compensating in some part of . However, consists of a collection of cycles of the form plus some segments going from to in . If (resp., ), then one of those cycles would be negative (resp., positive) shifted cost, which is a contradiction with the definition of . Hence it follows that all closed walks on have cost exactly .
For testing if a digraph has flexible nodes it is sufficient to look at closed walks of lengths at most , as shown in [9]. We give a version of this result tailored to our needs in the full version of this paper [6]:
Lemma 4.6.
Let be a strongly connected digraph of vertices. If has flexible vertices, then there exists a node and two closed walks containing such that and are coprime and both have length .
We can directly use this result to prove that in (resp. ) there are two closed walks of coprime lengths that share a vertex, have length at most , and have cost at most (resp. at least) as all walks of (resp. ) must have cost at most (resp. at least) . Thanks to Lemma 4.5, we know that all the walks of have cost exactly , so we can also apply the same result. Then we can test if there are two closed walks of coprime lengths sharing a vertex and having cost by only looking at walks of length at most ; hence deducing efficiently whether is false or not.
Lemma 4.7.
Let be the de Bruijn graph of a -LCL. If there are two closed walks of coprime lengths sharing a vertex and having cost in , then there are two such walks of length at most .
Proof.
Apply Lemma 4.6 to any strongly connected component of containing such a shared vertex, where is defined in Lemma 4.5, and note that those walks exist in if and only if they exist in .
Lemma 4.8.
For any opt-LCL, if they exist, we can compute the values of , , , , , , and in time polynomial in .
Proof.
First observe that for any opt-LCL we have and hence any algorithm running in time polynomial in runs in time polynomial in .
Let us start by addressing the more complex case of -LCLs. We will use the following subroutine: For , let be the following process: if it exists, denote by an optimal -walk of length exactly . Initialize as non-existing for and . For all and we can compute using the formula
where represents the predecessors of . Repeat this process until . Then output the list of tuples for each value of for which exists. Algorithm computes an optimal closed walk containing of length , for each for which such a walk exists. It can return multiple elements (at most tuples).
When is polynomial in , algorithm is clearly also polynomial in . We can then use it to obtain all the desired values:
-
: Run for all and then figure for which we have an optimal . Correctness is ensured by Lemma 4.1. Naturally, this procedure will also detect cycles among the closed walks. Lemma 4.2 ensures that the value we find will belong to at least one cycle, meeting the definition of . The procedure takes polynomial time in as we call only times.
-
and : First, determine the set of strongly connected components of . For each component, flexibility can be determined by observing the output of for all : if is flexible, then it must belong to two closed walks of coprime lengths (Lemma 4.3), and there must be two such walks of lengths at most (Lemma 4.6). Now, for nodes in flexible components, we can determine the value of by running for each in a flexible component and picking the component that has the best cycle. As for , it suffices to look at the output of in the good component and check if there are two closed walks containing , of coprime lengths and cost . In short, all we have to do is to run once for all nodes and all the information we need is in that output. Calling for all is clearly polynomial in and all further analysis of the output is also polynomial.
-
and : Identify flexible components as explained above, but limit the considered components further by requiring them to contain one node with a self-loop. This procedure is clearly polynomial in and obtains . Let be the set of all nodes with a self-loop. Then, is false if and only if contains a node with a self-loop of cost .
-
: Run for every . If is non-empty, take the walk of optimal value (depending on ).
As for --LCLs and --LCLs, the procedure is much easier. Start by listing in all costs for all nodes and sort in ascending order if (resp. descending order if ). Then, for all , we can construct the graphs and in time polynomial in . Now, do the following: For all in ascending order (resp. descending order), do the same procedure as for -LCLs to determine . If the procedure fails (meaning we could not find a closed walk of length at most ), continue through . The first time the procedure succeeds, we have found . When is found we can do a similar procedure to find : build (resp. ) and run for all . As for --LCLs, this fully determines which components are flexible. The first time a flexible component is found, we have . We repeat the same idea to find . Regarding the complexity, we can notice that all the procedures that were polynomial in for -LCLs are called at most times, hence the whole algorithm runs in time polynomial in .
5 Problem Parameters Determine Distributed Complexity
In this final section, we show that the complexity of any given opt-LCL for any approximation ratio can be determined using the parameters from Section 3. We do this by showing a series of lower and upper bounds in both deterministic and randomized based on these parameters. The result of all these observations is that every opt-LCL falls into one of five different classes based on its optimal complexity. An overview of these classes, which we label from A down to E, is provided in Table 5.
Throughout the previous sections we had to take into account that minimization and maximization problems behave in distinct ways, for example when referring to costs. However, the results we describe in this section can be readily ported from one case to the other by simple methods such as flipping signs or inverting fractions in the relevant inequalities. For example, an inequality in the minimization case becomes in the maximization one (since we are interested in as a factor instead of ). Then we can simply recast the quantities and , respectively, as, say, and and proceed with the same argument. For this reason, in the text below we handle only the case of minimization problems and skip any mention of maximization problems altogether.
| Complexity | ||
| Class | deterministic | randomized |
| A | ||
| B | ||
| C | ||
| D | ||
| E | unsolvable | unsolvable |
5.1 Lower Bounds
First we address lower bound results that show that Table 5 is complete, that is, that there is no opt-LCL whose optimal complexity lies in-between any of the classes A–E. For the full proofs of these results, please refer to the full version of this paper [6].
Lemma 5.1.
Assume there is a randomized algorithm that finds an -approximation of some -LCL in rounds. Then holds, where the inequality is strict if and only if is true.
Since randomized is stronger than deterministic , this directly implies a lower bound of for deterministic as well.
Lemma 5.2.
If there is a randomized algorithm that finds an -approximation of some --LCL in rounds, then .
Lemma 5.3.
If an opt-LCL can be -approximated in rounds in the randomized model, then . Additionally, if is true, then this inequality is strict.
The proof follows more or less directly from well-known results on symmetry breaking and, in particular, the classical lower bound for -coloring [21]. Note that this lower bound holds even when we are allowed to err, for instance, with probability (instead of as usual).
Lemma 5.4.
If an opt-LCL can be -approximated in rounds in the deterministic model, then .
Our proof follows a similar idea to that of [11] based on an application of Ramsey’s theorem. For a set and , let us write for the subsets of of size exactly . For where , we let denote the size of the smallest such that every -coloring of subsets of size of admits a subset for which is monochromatic on . Such a number always exists by (the finite version of) Ramsey’s theorem (see, e.g., [15]) and can be asymptotically upper-bounded [12] by a power tower of height . The core of the argument is that, in the regime, we can use Ramsey’s theorem to pick identifiers that force the output of the deterministic algorithm to be constant almost everywhere (i.e., on all but nodes).
5.2 Upper Bounds
Finally we show upper bound results, that is, how each of the classes of Table 5 corresponds to obtaining an approximation to a desired factor .
Lemma 5.5.
If holds for some opt-LCL with , then the complexity class of an algorithm that finds an -approximation of is A.
Proof.
implies there exists a constant solution that approximates the best possible solution sufficiently well for any , as there is a self-loop in the de Bruijn graph. An algorithm finding an -approximation of can output a constant solution in rounds in deterministic and randomized . Together with Lemma 5.4 this concludes the proof.
Lemma 5.6.
Suppose for some --LCL and additionally one of the following two conditions holds:
-
1.
and is false.
-
2.
and is true.
Then the complexity class of any algorithm finding an -approximation of is B.
Proof.
As the definitions of and are simply more extensive than and , for deterministic we can proceed as in Lemma 5.8. For randomized it is known that we can find a ruling set in with high probability [5]. With a ruling set and , as in Lemma 5.8, constant sequences can be labeled. Any superconstant-length sequences can be labeled with the self-loop included in the definition of . With high probability the cycle will use the cost of the self-loop only rarely even if it is higher than , so it is negligible on sufficiently large instances. Together with Lemma 5.3 this concludes the proof.
The connection between the definition of and a solution of an opt-LCL in a directed cycle is comparatively easy to make. It is less obvious how the cheapest cycle in a flexible component is the deciding cost for finding labelings in complexity class C. Therefore we make a connection to Section 3 with Lemma 5.7 leading up to Lemma 5.8.
Lemma 5.7.
If holds for a --LCL , then there exists such that, for every , the de Bruijn graph of admits a closed walk of length for which .
Proof.
Since , there exists at least one cycle of through which can be obtained. Let be one of these cycles. Because is in a flexible component , there exists a such that for all we can find a closed walk of length starting and ending in a node belonging to . This is achieved by connecting two closed walks of coprime lengths in to . Now we compose a walk of length by finding a so that is a multiple of . The number of different walks we have to find to achieve this is clearly upper bounded by . For large , the cost contribution of is negligible compared to the cost contribution of the copies of , whose average cost is . Choosing large enough handles the worst of the finitely many possible walks , as their potential additional cost impact is compared to the length .
Lemma 5.8.
Suppose one of the following two conditions holds for some --LCL :
-
1.
and is false.
-
2.
and is true.
Then the complexity class of any algorithm finding an -approximation of is C, assuming does not belong to either class A or B.
Proof.
If the first condition holds, then is false, so there are two closed walks of coprime lengths sharing a node and having cost exactly . By the same Frobenius argument as in Lemma 4.3, concatenating these walks gives closed walks of cost exactly for all sufficiently large lengths. If the second condition holds, Lemma 5.7 lets us choose large enough so that the term is small enough. In either case, there exists a constant for which any path of length can be labeled so that the resulting solution approximates the best possible solution sufficiently well for any . A -coloring can be found in [10, 20]. Then this coloring can be used to find sequences of length at least which can then be labeled to produce a sufficient approximation in each sequence of the graph and therefore also in the whole graph. Together with Lemma 5.1 this concludes the proof.
Lemma 5.9.
If for some --LCL , the complexity class of any algorithm finding an -approximation of is C, assuming does not belong to class A.
Proof.
The proof is almost the same as the proof concerning the first condition in Lemma 5.8. The existence of the constant for which any path of length can be labeled according to requirements is here directly rooted in the definition of . Together with Lemma 5.2 this concludes the proof.
Lemma 5.10.
If for a --LCL or for a --LCL , then the opt-LCL has no general solution and its complexity class is E. If the -approximation algorithm is not in any of the classes A, B, C or E, then it is in the class D.
Proof.
If the relevant parameter is , then the problem does not have a valid solution on all instances. Otherwise, we know that () holds for infinitely many , so on certain instances the whole graph must be known to all nodes in order to obtain an -approximation.
6 Putting Things Together
To recap, given an opt-LCL , Section 4 allows us to calculate the values of all parameters and in polynomial time, and given these parameters, Section 5 lets us find out what is the round complexity of finding an -approximation of in the deterministic and randomized models. We have:
Theorem 6.1.
Given an opt-LCL on directed cycles and a constant , we can in polynomial time determine the asymptotic round complexity of finding an -approximation of in the deterministic and randomized models.
References
- [1] Amirreza Akbari, Xavier Coiteux-Roy, Francesco D’Amore, François Le Gall, Henrik Lievonen, Darya Melnyk, Augusto Modanese, Shreyas Pai, Marc-Olivier Renou, Václav Rozhon, and Jukka Suomela. Online locality meets distributed quantum computing. In Michal Koucký and Nikhil Bansal, editors, Proceedings of the 57th Annual ACM Symposium on Theory of Computing, STOC 2025, Prague, Czechia, June 23-27, 2025, pages 1295–1306. ACM, 2025. doi:10.1145/3717823.3718211.
- [2] Alkida Balliu, Sebastian Brandt, Yi-Jun Chang, Dennis Olivetti, Mikaël Rabie, and Jukka Suomela. The distributed complexity of locally checkable problems on paths is decidable. In Peter Robinson and Faith Ellen, editors, Proceedings of the 2019 ACM Symposium on Principles of Distributed Computing, PODC 2019, Toronto, ON, Canada, July 29 - August 2, 2019, pages 262–271. ACM, 2019. doi:10.1145/3293611.3331606.
- [3] Alkida Balliu, Sebastian Brandt, Yi-Jun Chang, Dennis Olivetti, Jan Studený, and Jukka Suomela. Efficient classification of locally checkable problems in regular trees. In Christian Scheideler, editor, 36th International Symposium on Distributed Computing, DISC 2022, October 25-27, 2022, Augusta, Georgia, USA, volume 246 of LIPIcs, pages 8:1–8:19. Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2022. doi:10.4230/LIPIcs.DISC.2022.8.
- [4] Alkida Balliu, Sebastian Brandt, Yi-Jun Chang, Dennis Olivetti, Jan Studený, Jukka Suomela, and Aleksandr Tereshchenko. Locally checkable problems in rooted trees. Distributed Computing, 36(3):277–311, 2023. doi:10.1007/S00446-022-00435-9.
- [5] Alkida Balliu, Mohsen Ghaffari, Fabian Kuhn, and Dennis Olivetti. Node and edge averaged complexities of local graph problems. In Alessia Milani and Philipp Woelfel, editors, PODC ’22: ACM Symposium on Principles of Distributed Computing, Salerno, Italy, July 25 - 29, 2022, pages 4–14. ACM, 2022. doi:10.1145/3519270.3538419.
- [6] Thomas Boudier, Fabian Kuhn, Augusto Modanese, Ronja Stimpert, and Jukka Suomela. Classification of local optimization problems in directed cycles. CoRR, abs/2602.13046, 2026. doi:10.48550/arXiv.2602.13046.
- [7] Sebastian Brandt, Juho Hirvonen, Janne H. Korhonen, Tuomo Lempiäinen, Patric R. J. Östergård, Christopher Purcell, Joel Rybicki, Jukka Suomela, and Przemyslaw Uznanski. LCL problems on grids. In Elad Michael Schiller and Alexander A. Schwarzmann, editors, Proceedings of the ACM Symposium on Principles of Distributed Computing, PODC 2017, Washington, DC, USA, July 25-27, 2017, pages 101–110. ACM, 2017. doi:10.1145/3087801.3087833.
- [8] Yi-Jun Chang, Tsvi Kopelowitz, and Seth Pettie. An exponential separation between randomized and deterministic complexity in the LOCAL model. SIAM Journal on Computing, 48(1):122–143, 2019. doi:10.1137/17M1117537.
- [9] Yi-Jun Chang, Jan Studený, and Jukka Suomela. Distributed graph problems through an automata-theoretic lens. Theoretical Computer Science, 951:113710, 2023. doi:10.1016/J.TCS.2023.113710.
- [10] Richard Cole and Uzi Vishkin. Deterministic coin tossing with applications to optimal parallel list ranking. Information and Control, 70(1):32–53, 1986. doi:10.1016/S0019-9958(86)80023-7.
- [11] Andrzej Czygrinow, Michal Hanckowiak, and Wojciech Wawrzyniak. Fast distributed approximations in planar graphs. In Gadi Taubenfeld, editor, Distributed Computing, 22nd International Symposium, DISC 2008, Arcachon, France, September 22-24, 2008. Proceedings, volume 5218 of Lecture Notes in Computer Science, pages 78–92. Springer, 2008. doi:10.1007/978-3-540-87779-0_6.
- [12] P. Erdős and R. Rado. Combinatorial theorems on classifications of subsets of a given set. Proceedings of the London Mathematical Society, s3-2(1):417–439, 1952. doi:10.1112/plms/s3-2.1.417.
- [13] Mika Göös, Juho Hirvonen, and Jukka Suomela. Lower bounds for local approximation. Journal of the ACM, 60(5):39:1–39:23, 2013. doi:10.1145/2528405.
- [14] Mika Göös and Jukka Suomela. No sublogarithmic-time approximation scheme for bipartite vertex cover. Distributed Computing, 27(6):435–443, 2014. doi:10.1007/S00446-013-0194-Z.
- [15] Ronald L. Graham, Bruce L. Rothschild, and Joel H. Spencer. Ramsey Theory. Wiley Series in Discrete Mathematics and Optimization. Wiley, second edition, 1991.
- [16] David G. Harris. Distributed local approximation algorithms for maximum matching in graphs and hypergraphs. SIAM Journal on Computing, 49(4):711–746, 2020. doi:10.1137/19M1279241.
- [17] Ozan Heydt, Simeon Kublenz, Patrice Ossona de Mendez, Sebastian Siebertz, and Alexandre Vigny. Distributed domination on sparse graph classes. European Journal of Combinatorics, 123:103773, 2025. doi:10.1016/J.EJC.2023.103773.
- [18] Fabian Kuhn, Thomas Moscibroda, and Roger Wattenhofer. Local computation: Lower and upper bounds. Journal of the ACM, 63(2):17:1–17:44, 2016. doi:10.1145/2742012.
- [19] Christoph Lenzen and Roger Wattenhofer. Leveraging Linial’s locality limit. In Gadi Taubenfeld, editor, Distributed Computing, 22nd International Symposium, DISC 2008, Arcachon, France, September 22-24, 2008. Proceedings, volume 5218 of Lecture Notes in Computer Science, pages 394–407. Springer, 2008. doi:10.1007/978-3-540-87779-0_27.
- [20] Nathan Linial. Locality in distributed graph algorithms. SIAM Journal on Computing, 21(1):193–201, 1992. doi:10.1137/0221015.
- [21] Moni Naor. A lower bound on probabilistic algorithms for distributive ring coloring. SIAM Journal on Discrete Mathematics, 4(3):409–412, 1991. doi:10.1137/0404036.
- [22] Moni Naor and Larry J. Stockmeyer. What can be computed locally? SIAM Journal on Computing, 24(6):1259–1277, 1995. doi:10.1137/S0097539793254571.
- [23] David Peleg. Distributed Computing: A Locality-Sensitive Approach. Society for Industrial and Applied Mathematics, 2000. doi:10.1137/1.9780898719772.
- [24] Aleksandr Tereshchenko and Jan Studený. LCL classifier, 2021. URL: https://lcl-classifier.cs.aalto.fi.
