Logical locality entails
frugal distributed computation
over graphs
Stéphane Grumbach, Zhilin Wu
INRIA-LIAMA
07/22/09
WG 2009
1
Introduction
Find a route to
node g
a
b
c
Build a spanning
tree with me as
the root
f
g
d
k
e
Use logics to describe globally
the expected results of network
functionalities
j
h
Logical formulas
l
i
m
Distributed computation
(complexity)
n
07/22/09
WG 2009
2
Classical logics
First order logic (FO)
Fixpoint logics
Monadic second order logic (MSO)
…
The starting point: FO
07/22/09
WG 2009
3
First Order Logic
Foundation of mathematics and theoretical
computer science
Used in databases: relational query languages
Expressive power
Locality
Local areas of the graphs sufficient to evaluate FO
formulas
Expressive power limited
07/22/09
Connectivity, parity (whether a set is of even size) are
non-local properties, thus not expressible in FO
WG 2009
4
Complexity of FO
Sequential complexity
Parallel complexity
Linear time over classes of locally tree
decomposable graphs (including bounded degree
graphs, planar graphs, etc)
Evaluated in AC0, constant time over Boolean
circuits with unbounded fan-in
Distributed complexity?
07/22/09
WG 2009
5
Local distributed computation
Message passing model
Constant distributed time
Compute with information only from a bounded
neighborhood
Solve global problems
by local distributed computations around each node
07/22/09
WG 2009
6
Does logical locality imply
local distributed computation?
The answer is “NO”
Simple properties cannot be checked by local
computations
“There are at least two distinct triangles”
Non-local communication is necessary
to check the distinctness of the two triangles
07/22/09
WG 2009
7
Frugal distributed computations
A bounded number of messages
of size O(log n)
sent over each link
Frugal computations resemble
local computations
over bounded degree networks
Each node receives only
a bounded number of messages
Though the messages can come from
remote nodes
07/22/09
WG 2009
8
Outline
Locality of first order logic (FO)
Frugal distributed computation
Frugality of FO over bounded degree
networks
Frugality of FO over planar networks
Frugality beyond FO properties
07/22/09
WG 2009
9
Locality of FO: Intuition
Connectivity : non-local
Parity : non-local
2k
k
k
...
Versus
Versus
2k+1
2k
07/22/09
...
WG 2009
10
Neighborhood
First order logic over graphs
FO with vocabulary “E(x,y)”
k-neighborhood of v (Nk(v))
Vertices with distance from v no more than k
Let v be a list of vertices, then
N k (v ) := N k (vi )
i
“The distance between x and z is no more than k”
Expressed by an FO formula dist ( x , z ) ≤ k
07/22/09
WG 2009
11
Local Formula
(k )
ϕ
(
y
)
(x)
Local formula
( x is a list of variables not occurring in ϕ ( y ) )
The quantifiers of ϕ ( y ) are bounded to the kneighborhood of x
Example, if ϕ ( y ) := ∃ zψ ( y , z ) , then
(ϕ ( y ))
07/22/09
(k )
(
( x ) := ∃ z dist ( x , z ) ≤ k ∧ (ψ ( y , z ) ) ( x )
(k )
WG 2009
)
12
Gaifman theorem
Each FO formula ϕ (u ) ( u = u1 ⋯ u p )
can be written into a Boolean combination
of sentences of the form
∃ x1 ⋯ ∃ xs ∧ d ( xi , x j ) > 2r ∧ ∧ ψ ( r ) ( xi )
i
1≤ i < j ≤ s
ψ
(t )
( y ),
and formulae of the form
where y = y1 ⋯ yq and yi ∈ {u1,⋯, u p }
07/22/09
WG 2009
13
Outline
Locality of first order logic (FO)
Frugal distributed computation
Frugality of FO over bounded degree
networks
Frugality of FO over planar networks
Frugality beyond FO properties
07/22/09
WG 2009
14
Distributed computation model
Message passing model
Asynchronous system
Network topology modeled by a graph
G=(V,E)
Unique identifier for each node
A breath-first-search (BFS) tree
rooted at a distinguished node (requesting
node) distributively stored
07/22/09
WG 2009
15
Frugal distributed algorithms
Only a constant number of messages
of size O(log n)
sent over each link
during its computation
07/22/09
WG 2009
16
Frugal computation of FO sentences
Let C be a class of graphs, and ϕ be an FO
sentence. ϕ can be frugally computed over C
if
∃ a frugal distributed algorithm such that
∀ G ∈ C and any requesting node in G,
after the algorithm terminates, the requesting
node is in the accepting state iff G |= ϕ
07/22/09
WG 2009
17
Outline
Locality of first order logic (FO)
Frugal distributed computation
Frugality of FO over bounded degree
networks
Frugality of FO over planar networks
Frugality beyond FO properties
07/22/09
WG 2009
18
Locality of FO
over bounded degree networks
r-type of v
Isomorphic type of (〈Nr(v)〉G,v)
G1 and G2 are (r,m)-equivalent
For every r-type τ,
either G1and G2 have the same number of vertices
with r-type τ,
or both have at least m vertices with r-type τ.
07/22/09
WG 2009
19
Locality of FO
over bounded degree networks
(continued)
Theorem. Fagin-Stockmeyer-Vardi
∀k,d, ∃r=f(k), m=g(k,d), s.t.
For all G1 and G2 with degree at most d,
if G1 and G2 are (r,m)-equivalent, then
G1 and G2 satisfy the same
FO sentences with quantifier rank at most k.
07/22/09
WG 2009
20
Frugal algorithm for FO
over bounded degree networks
The requesting node ask each node to collect
the topology information of its rneighborhood.
The r-types of the nodes are
aggregated through the BFS tree
to the requesting node
up to the threshold m for each r-type.
Finally the requesting node
decides whether G |=ϕ
by using the information about the r-types.
07/22/09
WG 2009
21
Complexity
The total number of distinct r-types of
graphs with degree bounded by d
depends only on r and d
Each r-type is counted up to the threshold m
Over each link,
only O(1) messages are sent during the
computation
07/22/09
WG 2009
22
Outline
Locality of first order logic (FO)
Frugal distributed computation
Frugality of FO over bounded degree
networks
Frugality of FO over planar networks
Frugality beyond FO properties
07/22/09
WG 2009
23
Frugality of FO
over planar networks
Idea
Transform
the linear time centralized evaluation algorithm
into
the frugal distributed evaluation algorithm
07/22/09
WG 2009
24
Linear time centralized computation of
FO over planar graphs
Sufficient to consider FO sentences of the form
∃ x1 ⋯ ∃ xs ∧ d ( xi , x j ) > 2r ∧ ∧ ψ
i
1≤ i < j ≤ s
Centralized algorithm
( xi )
Select a distinguished vertex v0, decompose G=(V,E) into
subgraphs G[i,i+2r]:={v | i ≤ dist(v0,v) ≤ i+2r}.
Evaluate ψ(r)(x) over G[i,i+2r]
(r )
Each G[i,i+2r] is a graph with bounded tree width
Construct from ψ(r)(x) an automaton A and run it over a tree
decomposition obtained from G[i,i+2r]
Let P be the set of vertices v such that ∃i, Nr(v) ⊆G[i,i+2r] and
G[i,i+2r] |= ψ(r)(v).
Decide whether ψ ′ := ∃ x1 ⋯ ∃ xs 1≤ i∧< j ≤ s d ( xi , x j ) > 2r ∧ ∧i P ( xi ) holds over G or
not
07/22/09
WG 2009
25
Distributed computation of FO over
planar networks
Transform the centralized algorithm
into a distributed one
while ensuring frugality
The most difficult part is
to evaluate distributively ψ(r)(x) over G[i,i+2r]
07/22/09
WG 2009
26
Distributively Evaluate ψ(r)(x) over
G[i,i+2r]
ψ (r) (x) is a local formula, so
ψ (r) (x) can be evaluated over each connected
component of G[i,i+2r]
Still use automata-theoretic technique
Construct an automaton A from ψ (r) (x)
Construct and store distributively a tree
decomposition for each connected component of
G[i,i+2r]
Evaluate ψ (r) (x) by distributively running A over the
tree decomposition.
07/22/09
WG 2009
27
Construct a tree decomposition for Ci
Let Ci be a connected component
of G[i,i+2r] and w1i ,⋯, wli be the
nodes of Ci with distance i from the
requesting node.
Let Ci′ be the graph obtained from Ci by
i
i
including all ancestors of w1 ,⋯, wl in
the BFS tree.
Let Ci* be the graph obtained from Ci by
i
i
contracting all the ancestors of w1 ,⋯ , wl
into one vertex v*
07/22/09
WG 2009
*
Ci′ Ci
w1i
w1i
w1i
*
v
..
.
.
.. . . .
. . C. i
...
...
...
i
w
l
i
wl
wli
Ci* is a planar graph with
bounded diameter
28
Construct a tree decomposition for Ci
(continued)
A tree decomposition of
planar networks with bounded diameter
can be computed frugally
[Grumbach & Wu, manuscript]
Construct a tree decomposition for Ci
Construct distributively a tree decomposition for Ci*,
while doing special treatments for the virtual vertex,
and get a tree decomposition for Ci .
07/22/09
WG 2009
29
Outline
Locality of first order logic (FO)
Frugal distributed computation
Frugality of FO over bounded degree
networks
Frugality of FO over planar networks
Frugality beyond FO properties
07/22/09
WG 2009
30
Frugality beyond FO properties
FO unary queries: FO formulas ϕ(x) with one free
variable x
FO(#): Extension of FO with unary counting
Example: “Vertices of degree d”
ξd(x) := ∃y1…∃ yd (∧i≠j yi≠yj ∧ ∧i E(x, yi) ∧ ∀z (E(x,z) → ∨i z=yi))
Frugally computed over
bounded degree and planar networks
Example: “the same number of vertices of degree 2 and 3”
#x.ξ2(x) = #x.ξ3(x)
Frugally computed over
bounded degree and planar networks
Fixpoint, MSO, …
07/22/09
WG 2009
31
Conclusion
Logical locality implies low distributed complexity
BFS tree assumption
Can be replaced by
a pre-computed tree 2-spanner,
independently of the choice of the requesting node
Best distributed message complexity:
O(∆) messages sent over each link
Open question:
Does a BFS tree can be frugally computed?
Open question: Does NP-complete problems like
Hamiltonicity, can be frugally computed?
07/22/09
WG 2009
32
Thanks!
07/22/09
WG 2009
33
© Copyright 2026 Paperzz