Distributed Computing 3. Leader Election – lower bound for ring networks Shmuel Zaks...
-
Upload
felicity-blake -
Category
Documents
-
view
213 -
download
0
Transcript of Distributed Computing 3. Leader Election – lower bound for ring networks Shmuel Zaks...
Theorem: For every algorithm A for maximum finding in unidirectional rings, and every set I of n identities,
( ) ( log )Aavg I n n
PKR
Unidirectional ring
Same messages in every execution
1
3
5
4ring
(4 , 1 , 3 , 5) (1 , 3 , 5 , 4) (3 , 5 , 4 , 1) (5 , 4 , 1 , 3)
messages)4 (
)4 ,1
()4 , 1 , 3 (
1
3
5
4
Sequence 1 2( , ,..., )ts s s s
( )length s tPrefix of a sequence
1 2' ( , ,..., ), 1rs s s s r t Concatenation of sequences su subsequence of if s.t. su ,r t s rutC(S) = all cyclic permutations of S
|C(s)| = length (s)
( {4 , 1 , 3 , 5,)
(1 , 3 , 5 , 4,)
(3 , 5 , 4 , 1,)
(5 , 4 , 1 , 3} )
s = (4 , 1 , 3 , 5 )
C(s)=
length (s) = 4(4,1,3) is a prefix of s(1,3) is a subsequence of s
1
3
5
4
In every execution of a maximum finding algorithm A, at least one processor must see its own value
In a ring labeled s, at least one message in C)s( is sent by A
)4 (
)4 ,1 ()4,1,3 (
1
3
5
4)4,1,3,5 (
– set of all finite sequences of distinct integers
1 2{( , ,..., ) | 1, : }k i jD s s s k i j s s For , , | | :s D E D E
( , ) |{ | ( )} |N s E t E t is a prefix of some r C S
( , ) |{ ( , ) ( ) } |kN s E t N s E length t k ( )
1( , ) ( , )
length s
kkN s E N s E
D
E does not have to be a finite set.
, , | | :s D E D E
Note: though we wrote
Why?
s = (4 , 1 , 3 , 5 )
1
3
5
4
E={(4,5),(3,5),(5,4,1),(3),(6,2),(5,4) {
N(s,E) = 4
N1(s,E) =
1 N2(s,E) =
2 N3(s,E) =
1 Nk(s,E) = 0 for k ≥ 4
Definition: A set
is exhaustive if it has the following two properties:
Prefix property: if then for every
prefix s of u.
Cyclic permutation property:
u E s E
: ( )s D C s E
E D
is exhaustive: Prefix property: if then for every prefix s of u.
Cyclic permutation property:
u E s E
: ( )s D C s E
E D
Example: the set
1 2 1 1 2{( , ,..., ) | max{ , ,..., }}k kE s s s s s s s
1
3
5
4E contains also the following:
(4), (4,1),(4,1,3),
(1),
(3),
(5),(5,4),(5,4,1),(5,4,1,3)
E is the set of messages sent by the Chang & Roberts’ algorithm!
Lemma: Let such that is a
prefix of and , and let A be a maximum
finding algorithm.
If in the execution of A on ring a message
is sent, then in the execution of A on ring a message is sent.
, ,s t u D us t
su t
u
s t
uu
Theorem: For every maximum finding algorithm A for unidirectional rings, there exists an exhaustive set E(A), such that, for every ring s, A sends at least N(s,E(A)) messages on s. Proof: Let
{ |
}
E(A) s D
A
s
s
a message is sent
when executes on ring
1. E)A( is exhaustive
1a. Prefix property
,
t
message was sent on ring
was sent on ring
by Lemma : was sent on ring
E(A) length(t) 1
E(A)
tu
tu tu
t tu
t t
{ |
}
E(A) s D
A
s
s
a message is sent
when executes on ring
1. E)A( is exhaustive
1b. Cyclic permutation property
s
for a ring at least one processor must send
a message C(S)
E(A)
t
t
{ |
}
E(A) s D
A
s
s
a message is sent
when executes on ring
2. At least N(s,E(A)) messages sent by A on s
E(A)
N(s,E(A))
t
t s
t t
t s
s
is a subsequence of
message was sent on ring
by Lemma : message was sent on ring
at least messages were sent on
{ |
}
E(A) s D
A
s
s
a message is sent
when executes on ring
distinct identities , given algorithm
all the rings equally probable
- the average-case message complexity
of for rings in
- the worst-case message complexity
of
A
A
n I A
n! perm(
avg (I
I
)
)
A perm(I )
worst (I )
for rings in A perm(I )
Theorem: For every maximum finding algorithm A for unidirectional rings, and a set of n identities I, we have:
Theorem: For every maximum finding algorithm A for unidirectional rings, and a set of n identities I, we have:
( ) ( log )Aave I n n
( )
( )
1( ) ( , ( ))
!( ) max ( , ( ))
A s perm I
A s perm I
ave I N s E An
worst I N s E A
( )
( ) 1
1 ( )
1
1( ) ( , ( ))
!1
( , ( ))!
1( , ( ))
!1 ! 1 1 1
(1 ... ) 0.69 log! 2 3
A s perm I
n
ks perm I k
n
kk s perm I
n
k
ave I N s E An
N s E An
N s E An
n nn n n
n k n
!
( )
!
n n k
perm I
n n
kk
There are prefixes of size
among all rings in
group them into groups, with
exactly cyclic permutations in each
Theorem: In a unidirectional ring whose size n is unknown, the Chang & Roberts algorithm has an optimal message complexity of
1 1 1(1 ... ) 0.69 log
2 3n n n
n
Exercise: What if n is known?
What if synchronous?
References
J. E. Burns,A formal model for message passing
systems,TR-91, Indiana University, September
1980.
References
E. Chang and R. Roberts,An improved algorithm for decentralized
extrema-finding incircular configurations of processes,Communications of the ACM},22, 5, 1979, pp. 281-283.
References
J. Pachl, E. Korach and D. Rotem Lower bounds for distributed maximum-
finding algorithm. Journal of Association for Computing Machinery, Vol. 31, No. 4, Oct. 1984, pp. 905-918