scispace - formally typeset
Open AccessProceedings ArticleDOI

What can be computed locally

Moni Naor, +1 more
- pp 184-193
Reads0
Chats0
TLDR
A study of computation that can be done locally in a distributed network, where \locally" means within time (or distance) independent of the size of the network, and results include Locally Checkable Labeling problems, where the legality of a labeling can be checked locally.
Abstract
The purpose of this paper is a study of computation that can be done locally in a distributed network, where "locally" means within time (or distance) independent of the size of the network. Locally checkable labeling (LCL) problems are considered, where the legality of a labeling can be checked locally (e.g., coloring). The results include the following: There are nontrivial LCL problems that have local algorithms. There is a variant of the dining philosophers problem that can be solved locally. Randomization cannot make an LCL problem local; i.e., if a problem has a local randomized algorithm then it has a local deterministic algorithm. It is undecidable, in general, whether a given LCL has a local algorithm. However, it is decidable whether a given LCL has an algorithm that operates in a given time $t$. Any LCL problem that has a local algorithm has one that is order-invariant (the algorithm depends only on the order of the processor IDs).

read more

Content maybe subject to copyright    Report

WHAT CAN BE COMPUTED LOCALLY?
MONI NAOR
y
AND
LARRY STOCKMEYER
z
Abstract.
The purpose of this pap er is a study of computation that can b e done locally in a
distributed network, where \lo cally" means within time (or distance) independent of the size of the
network.
Local ly Checkable Labeling
(
LCL
) problems are considered, where the legality of a labeling
can be checked locally (e.g., coloring). The results include the following:
There are non-trivial LCL problems that have local algorithms.
There is a variant of the dining philosophers problem that can be solved lo cally.
Randomization cannot make an LCL problem lo cal; i.e., if a problem has a lo cal randomized
algorithm then it has a local deterministic algorithm.
It is undecidable, in general, whether a given LCL has a local algorithm.
However, it is decidable whether a given LCL has an algorithm that op erates in a given
time
t
.
Any LCL problem that has a local algorithm has one that is order-invariant (the algorithm
depends only on the order of the processor id's).
Key words.
distributed computation, local computation, graph labeling problem, resource
allocation, dining philosophers problem, randomized algorithms
AMS sub ject classications.
68M10, 68Q20, 68Q22, 68R05, 68R10
1. Introduction.
A prop erty of distributed computational systems is
locality
.
Each pro cessor is directly connected to at most some xed number of others. Despite
the lo cality of connections, we may want to p erform some computation such that the
values computed at dierent nodes must t together in some global way. The purp ose
of this paper is to attempt to understand what can be computed when algorithms
must satisfy a strong requirement of lo cality, namely, that the algorithm must run in
constant time
independent of the size of the network. A pro cessor running in constant
time
t
must base its output solely on the information it can collect from processors
located within radius
t
from it in the network. Apart from the obvious advantage of
constant time (that constant time takes less time than non-constant time), another
advantage is improved fault-tolerance: if the algorithm runs in constant time, a failure
at a pro cessor
p
can only aect pro cessors in some b ounded region around
p
. Another
motivation for lo cality is in recent work on self-stabilizing distributed algorithms; for
example, Afek, Kutten and Yung [2] introduced the idea of detecting an illegal global
conguration by checking lo cal conditions.
Our work has three goals: rst, to lay some groundwork for studying the question
of what can and cannot be computed lo cally; second, to establish some basic, general
results; and third, to study particular examples.
A network is modeled as an undirected graph where each no de represents a pro-
cessor and edges represent direct connections b etween processors. We consider only
networks of bounded degree. Our main focus is on computational problems of pro-
ducing \labelings" of the network. Since our sub ject is constant time algorithms, it
Preliminary version app eared in Proceedings of the 25th ACM Symposium on Theory of Com-
puting, 1993, pp. 184{193.
y
Dept. of Applied Mathematics and Computer Science, Weizmann Institute of Science, Rehovot
76100, Israel. Partly supp orted by a grant from the Israel Science Foundation administered by the
Israeli Academy of Sciences. Work p erformed while at the IBM Almaden Research Center. E-mail:
naor@wisdom.weizmann.ac.il.
z
IBM Research Division, Almaden Research Center, 650 Harry Road, San Jose, CA 95120. E-
mail: sto ck@almaden.ibm.com.
1

2
M. NAOR AND L. STOCKMEYER
makes sense to restrict to labelings such that the validity of a lab eling can be checked
locally (i.e., by checking within some xed radius from the no de). We call these
local ly
checkable labelings
(
LCL
's). Familiar examples of LCL's are vertex coloring, edge col-
oring, and maximal indep endent set (MIS). In the case of MIS, for example, one local
constraint says that if vertex
v
is in the MIS then no neighbor of
v
is in the MIS;
another constraint says that if
v
is not in the MIS then
v
has at least one neighbor in
the MIS. In general, the output labeling might depend on some initial input labeling,
and most of our general results hold in this case. If all processors are identical, it is
already known (by familiar symmetry arguments) that the types of lab eling problems
that can b e solved deterministically are very limited. So we assume that processors
are given unique numerical id's. If an algorithm runs in time
t
then, for each vertex
v
,
the processor at
v
can collect information ab out the structure of the network, includ-
ing processor id's (and possibly input lab els), in the region of radius
t
around
v
. Then
the pro cessor must choose its output lab el based on this information. The algorithm
must be correct, that is, the entire output labeling must b e valid, regardless of how
the pro cessors are numbered with unique id's.
Several recent pap ers have given improved time algorithms for certain LCL's such
as MIS and vertex coloring, for example, Awerbuch, Goldb erg, Luby and Plotkin
[3], Goldb erg, Plotkin and Shannon [8], Linial [10], and Panconesi and Srinivasan
[15]. However, these papers do not consider constant time; the running time of the
algorithms grows with the size of the network. Indeed the time must grow. In the
rst paper to establish the limitations of locality in this context, Linial [10] proved
that, even on ring networks, an MIS or a 3-coloring of vertices cannot b e found in
constant time.
1
In light of previous work on lo cality, two questions come to mind:
Can any nontrivial LCL problem b e solved in constant time?
If the answer to the rst question is \yes", can we characterize the LCL's
that can be solved in constant time?
One of our results is that the answer to the rst question is \yes". Dene a
weak
c
-coloring
of a graph to b e a coloring of the vertices with
c
colors such that each
non-isolated vertex has at least one neighbor colored dierently. It is easy to see that
a weak 2-coloring exists for every graph. We show the following for every xed
d
.
Consider the class of graphs of maximum degree
d
where every vertex has
odd degree. There is a
c
=
c
(
d
) and an algorithm that nds a weak
c
-coloring
in time 2 for any graph in this class. Here
c
is exponential in
d
, but in an
additional time
O
(log
d
) the number of colors can be reduced to 2.
This result is the b est possible in three senses:
For
d
-regular graphs where
d
is even, for no constant
c
=
c
(
d
) is there a
constant time algorithm that nds a weak
c
-coloring.
The time b ound 2 cannot b e reduced to 1.
If we change the denition of a coloring so that every vertex
v
must have at
least two neighbors colored dierently than
v
, then even for
d
-regular graphs
with
d
odd, a coloring cannot b e found in constant time.
Although a weak coloring might seem a strange concept, we have used it as a
basis for a solution to a certain resource allo cation problem. A well-known paradigm
for resource allocation problems is Dijkstra's Dining Philosophers Problem, which was
later generalized from a ring to arbitrary graphs (see, e.g., [4, 11]). In the version of
1
Actually, Linial gives a lower b ound of (log
n
) on oriented rings of size
n
, which matches an
upper bound of Cole and Vishkin [6] to within a constant factor.

WHAT CAN BE COMPUTED LOCALLY?
3
the problem we consider, there is a given
conict graph
where each no de represents a
processor and each edge represents a resource (a \fork") which is shared by the two
endpoint pro cessors. It is assumed that if two pro cessors share a resource, then they
are also close in the communication network. At any time, a fork can be \owned" by
at most one of the processors that share it. Each pro cessor can b e in one of three
states: resting, hungry, or eating. The pro cessors operate asynchronously. A resting
processor can become hungry at any time. In order to eat, a pro cessor must obtain
certain forks; we get dierent types of problems dep ending on precisely what \certain"
means. A pro cessor eats for at most a b ounded time, after which it returns to the
resting state. A processor
p
can attempt to \grab" a certain fork, and can release an
owned fork. The grab op eration will fail if the fork is currently owned by the other
processor
q
; if this occurs,
p
may decide to wait for
q
to release the fork. We require
a solution that is starvation free, meaning that a hungry processor will eventually b e
able to eat. An imp ortant measure of the goodness of a solution is the maximum
length of a
waiting chain
that can develop. As p ointed out by Choy and Singh [5], a
diculty with long waiting chains is that if a processor
p
fails while holding a fork,
the failure will aect every processor b ehind
p
in the waiting chain.
In the traditional version of this problem, if a processor shares
d
forks (has
d
incident edges in the conict graph), it can eat only when it has obtained all
d
forks.
In this case, Lynch [11] gave a solution with waiting chains of length
O
(
c
) assuming
that the conict graph is edge colored with
c
colors. The maximum length was reduced
to
O
(log
c
) by Styer and Peterson [17], again assuming that an edge coloring is given.
Choy and Singh [5] give a solution with waiting chains of length at most 3, assuming
that a certain vertex coloring with
d
+ 1 colors is given. All of these solutions require
that the conict graph b e initially colored in some way. Such colorings (provably)
cannot be found in constant time. It is therefore natural to ask whether there is
any
purely local
solution to this problem, i.e., a solution with waiting chains bounded
by a constant, and which does not assume any initial coloring of the conict graph.
In fact, it can be shown that there is no lo cal solution to this problem by reducing
the MIS problem to it. However, we show that there is a purely local solution to
a relaxed version of the problem. In this version, a pro cessor can eat when it has
obtained
any two
forks. This can be viewed as a threshold condition: a pro cessor can
proceed when it has two units of resource. We call this problem the
formal-dining
philosophers
problem. Imagine that dining is formal and in order to eat a philosopher
must dress formally and in particular wear cu links. We assume that the resource on
each edge is a cu link. In order to dress formally (in the western male tradition) and
eat, the philosopher must get any two cu links. Our solution works in any bounded
degree conict graph of minimum degree 3, i.e., every vertex has at least 3 incident
edges. (If the degree is 2, then we have Dijkstra's original version on a ring, for which
it is impossible to nd a lo cal solution.) To our knowledge, this is the rst nontrivial
resource allo cation problem that has b een solved in a purely local fashion.
Returning to the second question above (Can we characterize the LCL's that can
be solved in constant time?), another result shows that this will be dicult { it is
undecidable. Fix any
d
3, and let
G
be the class of
d
-regular graphs or the class
of graphs of maximum degree
d
. Even if we restrict attention to LCL's such that
every graph in
G
has a legal labeling, we show that it is undecidable, given an LCL
L
, whether there is a constant-time algorithm that solves
L
for every graph in
G
. If
d
= 2, however, the problem becomes decidable. The problem is also decidable if we
are given a specic time
t
and would like to know whether there is a
t
-time algorithm

4
M. NAOR AND L. STOCKMEYER
for the given LCL instance.
We close this Introduction by mentioning two additional \general" results. The
rst states that there is no loss of generality in restricting attention to algorithms that
do not use the actual values of the pro cessor id's, but only their relative order. This
result is useful in proving some of our other results. The proof is by a Ramsey theory
argument similar to ones in [18, 7, 13]. This is in contrast to the non-constant-time
case, where for instance an order-invariant algorithm for 3-coloring the ring would
take time (
n
), but the Cole-Vishkin [6] method (which uses the actual values of the
id's) takes time
O
(log
n
).
Another result states that randomization does not help in solving LCL's in con-
stant time. For the class
G
of
d
-regular graphs or the graphs of maximum degree
d
for any xed
d
2, if there is a randomized algorithm that runs in time
t
and that
solves the LCL
L
with error probability
" <
1 on any graph in
G
, then there is a
deterministic algorithm that runs in time
t
and solves
L
on any graph in
G
.
We now outline the remainder of the paper. Section 2 gives our denitions of
LCL's and lo cal algorithms. In Section 3 we show that every local algorithm can b e
replaced with an order-invariant one. The sub ject of Section 4 is undecidability and
decidability of questions about lo cal solvability. In Section 5 we show that randomiza-
tion do es not help in solving LCL's lo cally. The sub ject of Section 6 is weak coloring.
In Section 7, the local algorithm for weak coloring is used, together with other ideas,
to give a local solution to the formal-dining philosophers problem. In Section 8, we
suggest some op en questions raised by our work. For readers interested mainly in the
results for weak coloring and formal-dining philosophers, we should point out that
Sections 6 and 7 are completely indep endent from Sections 4 and 5. In addition, the
local algorithms for weak coloring and formal-dining philosophers do not dep end on
anything from Sections 3, 4, or 5, although the impossibility results for weak coloring
and formal-dining philosophers use the order-invariance result from Section 3.
2. Denitions.
We rst give some denitions and notations concerning graphs.
All graphs in this paper are simple and undirected. For a graph
G
= (
V ; E
) and
vertices
u; v
2
V
, let
dist
G
(
u; v
) be the distance (length of a shortest path) in
G
from
u
to
v
. If
u
2
V
and
e
2
E
, and if the endp oints of
e
are
v
and
w
, then
dist
G
(
u; e
) = min
f
dist
G
(
u; v
)
;
dist
G
(
u; w
)
g
+ 1. For a vertex
u
and a nonnegative
integer
r
, let
B
G
(
u; r
) denote the subgraph of
G
consisting of all vertices
v
and edges
e
such that
dist
G
(
u; v
)
r
and
dist
G
(
u; e
)
r
. The subscript
G
is omitted when
G
is clear from context. A
centered graph
is a pair (
H; s
) where
H
is a graph and
s
is a
vertex of
H
. The
radius
of (
H; s
) is the maximum distance from
s
to any vertex or
edge of
H
.
We now dene the notion of a \lo cally checkable lab eling" (LCL). For simplicity,
we give the denition only for vertex labelings. A similar denition can b e given
for edge lab elings (e.g., edge colorings or edge orientations). To make the denition
somewhat more general, we allow the vertices of the graph to b e initially lab eled with
\input lab els". Formally, then, an
LCL
L
consists of a positive integer
r
(called the
radius
of
L
), a nite set of
input labels
, a nite set of
output labels
, and a nite
set
C
of
local ly consistent labelings
. Each element of
C
is a centered graph of radius at
most
r
where each vertex is lab eled with a pair from
. Given a graph
G
= (
V ; E
)
and a lab eling
:
V
!
, the labeling
is
L
-
legal
if, for every
u
2
V
, there is a
(
H; s
)
2 C
and an isomorphism
mapping
B
G
(
u; r
) to
H
such that
(
u
) =
s
and such
that
respects the labeling, i.e., for every
w
, the label-pair of
w
equals the lab el-pair
of
(
w
). Although certain types of labelings, such as the usual denition of vertex

WHAT CAN BE COMPUTED LOCALLY?
5
coloring, are more naturally expressed in terms of
forbidden conditions
instead of
allowed conditions, it is easy to see that the denition above captures such lab elings.
Essentially, the set
C
gives a \truth table" of all lo cally consistent lab elings. Many of
our sp ecic examples of LCL's do not have input. Such LCL's are a sp ecial case of
the denition above simply by taking
j
j
= 1.
We consider distributed algorithms which operate on graphs
G
that are initially
input-labeled and where each vertex is also numbered with a unique positive integer
id
. If the algorithm produces an output label for each vertex within
t
steps, we
can assume that, for each vertex
u
, the part of the algorithm running at
u
collects
information ab out the structure, input lab els, and id's of
B
G
(
u; t
), and chooses an
output label for
u
based on this information (although particular algorithms might
not actually \use" all this information). Suppose that the algorithm is to b e run on
graphs of maximum degree
d
. For a constant
t
, a
local algorithm with time bound
t
is a
function
A
; the input to
A
is a centered graph (
H; s
) of radius at most
t
and degree at
most
d
whose vertices are lab eled with (input, id) pairs; the value of
A
((
H; s
)) is some
2
. The local algorithm
A
is applied to an input-lab eled and id-numbered graph
G
by applying
A
independently at each vertex of
G
; that is, for each vertex
u
, the
output lab el of
u
is
A
(
B
(
u; t
)) where
B
(
u; t
) is viewed as a centered graph with center
u
. For a local algorithm
A
, an LCL
L
, and a class
G
of graphs, we say that
A
solves
L
for
G
if, for every
G
2 G
, every input labeling of
G
, and every numbering of the
vertices of
G
with unique id's,
A
produces an
L
-legal lab eling, i.e., the combination
of the output lab eling pro duced by
A
with the initial input labeling is
L
-legal.
Since the sub ject of the pap er is lo cality, we largely restrict attention to (innite)
classes of graphs for which membership in the class can b e checked lo cally. Examples
are
d
-regular graphs and graphs of maximum degree
d
, for any constant
d
. Note that
if membership in
G
can be checked lo cally, then
G
is
closed under disjoint union
; i.e.,
for every
G; G
0
2 G
, the graph consisting of the disjoint union of
G
and
G
0
belongs to
G
. We consider only classes with some constant upper b ound on degree.
Remark.
Although it might be more natural to assume that the id's for an
n
-
vertex graph are drawn from
f
1
;
2
; : : : ; n
g
, there is no harm in requiring algorithms
to handle arbitrary id numberings. For supp ose that
A
incorrectly lab els
G
when
id's are arbitrary. Form a new graph
G
0
with
n
0
vertices consisting of the disjoint
union of
G
with a large enough graph so that the vertices of
G
0
can b e numbered
from
f
1
;
2
; : : : ; n
0
g
while keeping the numbering of
G
the same. Then
A
labels
G
0
incorrectly.
3. Order-invariant algorithms.
In what follows, it is sometimes useful to re-
strict attention to algorithms that do not use the actual values of the id's, but only
their relative order. Two id numberings
and
0
of a graph
H
are
order-equivalent
if,
for every pair of vertices
u
and
v
,
(
u
)
<
(
v
) i
0
(
u
)
<
0
(
v
). A lo cal algorithm
A
is
order-invariant
if for every (
H; s
) in the domain of
A
, if we obtain
H
0
from
H
by
changing the id numbering
to any other
0
such that
and
0
are order-equivalent,
then
A
((
H; s
)) =
A
((
H
0
; s
)).
Using Ramsey theory, we show that there is no loss of generality in restricting
attention to order-invariant algorithms. This type of application of Ramsey theory
is hardly new: starting with Yao's celebrated paper on searching tables [18], through
Frederickson and Lynch's [7] paper on a problem in distributed computing and Moran,
Snir and Manber's [13] work on decision trees, and many other papers.
For a set
S
and an integer
p
j
S
j
, let [
S
]
p
denote the set of subsets
A
S
with
j
A
j
=
p
. We use the following theorem due to Ramsey [16]. (For information on

Citations
More filters
Proceedings ArticleDOI

What cannot be computed locally

TL;DR: Time lower bounds are given for the distributed approximation of minimum vertex cover (MVC) and related problems such as minimum dominating set (MDS) and the construction of maximal matchings and maximal independent sets.
Proceedings ArticleDOI

On the complexity of distributed graph coloring

TL;DR: This paper proves new strong lower bounds for two special kinds of coloring algorithms, and proves a time lower bound of Ω(Δ/log2 Δ+ log*m) to obtain an O(Δ)-coloring.
Journal ArticleDOI

Proof labeling schemes

TL;DR: The approach separates the configuration design from the verification, which allows for a more modular design of algorithms, and has the potential to aid in verifying properties even when the original design of the structures for maintaining them was done without verification in mind.
Journal Article

Improving Graph Neural Network Expressivity via Subgraph Isomorphism Counting

TL;DR: Graph Substructure Networks (GSN) is proposed, a topologically-aware message passing scheme based on substructure encoding that allows for multiple attractive properties of standard GNNs such as locality and linear network complexity, while being able to disambiguate even hard instances of graph isomorphism.
Proceedings Article

What graph neural networks cannot learn: depth vs width

TL;DR: GNNmp are shown to be Turing universal under sufficient conditions on their depth, width, node attributes, and layer expressiveness, and it is discovered that GNNmp can lose a significant portion of their power when their depth and width is restricted.
References
More filters
Journal ArticleDOI

On a Problem of Formal Logic

TL;DR: This paper is primarily concerned with a special case of one of the leading problems of mathematical logic, the problem of finding a regular procedure to determine the truth or falsity of any given logical formula.
Journal ArticleDOI

Locality in distributed graph algorithms

TL;DR: This model focuses on the issue of locality in distributed processing, namely, to what extent a global solution to a computational problem can be obtained from locally available data.
Book

Deterministic coin tossing with applications to optimal parallel list ranking

TL;DR: The algorithms apply a novel “random-like” deterministic technique that provides for a fast and efficient breaking of an apparently symmetric situation in parallel and distributed computation.
Journal ArticleDOI

The drinking philosophers problem

TL;DR: Two paradigms are presented: the well-known distributed dining philosophers problem and a generalization of it, the distributed drinking philosophers problem, in which the depth of a process is a distinguishing property and a distributed implementation of an acyclic precedence graph is presented.
Journal ArticleDOI

Should Tables Be Sorted

TL;DR: It is shown that, in a rather general model including al1 the commonly-used schemes, $\lceil $ lg(n+l) $\rceil$ probes to the table are needed in the worst case, provided the key space is sufficiently large.