two absolute bounds for distributed bit complexity yefim dinitz, noam solomon, 2007 presented by: or...
TRANSCRIPT
![Page 1: Two absolute bounds for distributed bit complexity Yefim Dinitz, Noam Solomon, 2007 Presented by: Or Peri & Maya Shuster](https://reader037.vdocuments.net/reader037/viewer/2022110205/56649c745503460f94927fa7/html5/thumbnails/1.jpg)
Two absolute bounds for distributed bit
complexityYefim Dinitz , Noam Solomon, 2007
Presented by: Or Peri & Maya Shuster
![Page 2: Two absolute bounds for distributed bit complexity Yefim Dinitz, Noam Solomon, 2007 Presented by: Or Peri & Maya Shuster](https://reader037.vdocuments.net/reader037/viewer/2022110205/56649c745503460f94927fa7/html5/thumbnails/2.jpg)
OUTLINE
• Introduction
• Model• Problems• Definitions and notation
• 2-processor solutions & bounds
• Chain solutions
![Page 3: Two absolute bounds for distributed bit complexity Yefim Dinitz, Noam Solomon, 2007 Presented by: Or Peri & Maya Shuster](https://reader037.vdocuments.net/reader037/viewer/2022110205/56649c745503460f94927fa7/html5/thumbnails/3.jpg)
Model
• A chain of n+1 processors and n links.
• Each processor is assigned with a unique ID from the set Zm = {0,1,…,(M-1)}, where |Zm|=M ≥ 2.
• Each processor has knowledge of its links (up to 2).
• All processes are running the same (deterministic) algorithm A(n,M).
![Page 4: Two absolute bounds for distributed bit complexity Yefim Dinitz, Noam Solomon, 2007 Presented by: Or Peri & Maya Shuster](https://reader037.vdocuments.net/reader037/viewer/2022110205/56649c745503460f94927fa7/html5/thumbnails/4.jpg)
Model
Zzz…
• Initially, all processors are asleep and in the same initial state, except for the id and number of incident links information.
Zzz… Zzz…
…
![Page 5: Two absolute bounds for distributed bit complexity Yefim Dinitz, Noam Solomon, 2007 Presented by: Or Peri & Maya Shuster](https://reader037.vdocuments.net/reader037/viewer/2022110205/56649c745503460f94927fa7/html5/thumbnails/5.jpg)
Model
• When a processor receives a message on an incident link or when it wakes up spontaneously (before receiving the first message) - it is activated.
!!!INCOMING
!!!!!!
![Page 6: Two absolute bounds for distributed bit complexity Yefim Dinitz, Noam Solomon, 2007 Presented by: Or Peri & Maya Shuster](https://reader037.vdocuments.net/reader037/viewer/2022110205/56649c745503460f94927fa7/html5/thumbnails/6.jpg)
Model
• Upon activation, a processor processes its local information according to Algorithm.
• Sends messages on its incident links (it may send zero or more messages on each link),• It may also output something, then enters the
waiting state...
5+3-15+132
Send Message
![Page 7: Two absolute bounds for distributed bit complexity Yefim Dinitz, Noam Solomon, 2007 Presented by: Or Peri & Maya Shuster](https://reader037.vdocuments.net/reader037/viewer/2022110205/56649c745503460f94927fa7/html5/thumbnails/7.jpg)
Model• All of this is done immediately.
• We assume that a scheduler wakes each terminal eventually, if not awaken by a message previously
• And that no internal processor is awaken by the scheduler.
• For convenience of analysis, we consider a formal clock:
it starts from moment 0, and each processor activation step is done at the next moment 1, 2, . . . .
NOTE: This clock isn’t shared or synchronized by the processors, it is merely for overview analysis.
![Page 8: Two absolute bounds for distributed bit complexity Yefim Dinitz, Noam Solomon, 2007 Presented by: Or Peri & Maya Shuster](https://reader037.vdocuments.net/reader037/viewer/2022110205/56649c745503460f94927fa7/html5/thumbnails/8.jpg)
Model• Each message consists of a single bit.
• Messages are assumed to arrive in a finite, yet unbounded time from the moment they are sent.
• There may be different executions beginning from the same initial state, due to scheduling.
![Page 9: Two absolute bounds for distributed bit complexity Yefim Dinitz, Noam Solomon, 2007 Presented by: Or Peri & Maya Shuster](https://reader037.vdocuments.net/reader037/viewer/2022110205/56649c745503460f94927fa7/html5/thumbnails/9.jpg)
Example
ID = 2 ID =5 ID = 1
Zzz…Zzz…Zzz…
![Page 10: Two absolute bounds for distributed bit complexity Yefim Dinitz, Noam Solomon, 2007 Presented by: Or Peri & Maya Shuster](https://reader037.vdocuments.net/reader037/viewer/2022110205/56649c745503460f94927fa7/html5/thumbnails/10.jpg)
Example
ID = 2 ID =5 ID = 1
Zzz…Zzz… !!!
![Page 11: Two absolute bounds for distributed bit complexity Yefim Dinitz, Noam Solomon, 2007 Presented by: Or Peri & Maya Shuster](https://reader037.vdocuments.net/reader037/viewer/2022110205/56649c745503460f94927fa7/html5/thumbnails/11.jpg)
Example
ID = 2 ID =5 ID = 1
Zzz…Zzz…
115+2-1=2
1
![Page 12: Two absolute bounds for distributed bit complexity Yefim Dinitz, Noam Solomon, 2007 Presented by: Or Peri & Maya Shuster](https://reader037.vdocuments.net/reader037/viewer/2022110205/56649c745503460f94927fa7/html5/thumbnails/12.jpg)
Example
ID = 2 ID =5 ID = 11
Zzz…!!!!!!
![Page 13: Two absolute bounds for distributed bit complexity Yefim Dinitz, Noam Solomon, 2007 Presented by: Or Peri & Maya Shuster](https://reader037.vdocuments.net/reader037/viewer/2022110205/56649c745503460f94927fa7/html5/thumbnails/13.jpg)
Example
ID = 2 ID =5 ID = 1
Zzz…515+2-1…=215+2-1…=
1 0
![Page 14: Two absolute bounds for distributed bit complexity Yefim Dinitz, Noam Solomon, 2007 Presented by: Or Peri & Maya Shuster](https://reader037.vdocuments.net/reader037/viewer/2022110205/56649c745503460f94927fa7/html5/thumbnails/14.jpg)
Example
ID = 2 ID =5 ID = 10
!!!Zzz…
Non-Leader
1
Zzz…
Non-Leader
![Page 15: Two absolute bounds for distributed bit complexity Yefim Dinitz, Noam Solomon, 2007 Presented by: Or Peri & Maya Shuster](https://reader037.vdocuments.net/reader037/viewer/2022110205/56649c745503460f94927fa7/html5/thumbnails/15.jpg)
Example
ID = 2 ID =5 ID = 11
Zzz…
Non-Leader
!!!
Non-Leader
Zzz…
Leader
![Page 16: Two absolute bounds for distributed bit complexity Yefim Dinitz, Noam Solomon, 2007 Presented by: Or Peri & Maya Shuster](https://reader037.vdocuments.net/reader037/viewer/2022110205/56649c745503460f94927fa7/html5/thumbnails/16.jpg)
Example
ID = 2 ID =5 ID = 1
Zzz…
Non-LeaderNon-Leader
Zzz…
Leader
Zzz…
![Page 17: Two absolute bounds for distributed bit complexity Yefim Dinitz, Noam Solomon, 2007 Presented by: Or Peri & Maya Shuster](https://reader037.vdocuments.net/reader037/viewer/2022110205/56649c745503460f94927fa7/html5/thumbnails/17.jpg)
Problem1. The Leader problem requires that each processor
should output (decide on) a binary value:
[1]“leader”/ [0]“non-leader”
so that there will be exactly one leader.
Besides, it is required that any non-leader should learn which of its incident links is in the direction to the leader.
![Page 18: Two absolute bounds for distributed bit complexity Yefim Dinitz, Noam Solomon, 2007 Presented by: Or Peri & Maya Shuster](https://reader037.vdocuments.net/reader037/viewer/2022110205/56649c745503460f94927fa7/html5/thumbnails/18.jpg)
Problem2. The MaxF version of Leader requires that the
terminal with the maximal id must be the elected leader.
ID = 2 ID =5 ID = 1
Non-LeaderNon-Leader
Leader
![Page 19: Two absolute bounds for distributed bit complexity Yefim Dinitz, Noam Solomon, 2007 Presented by: Or Peri & Maya Shuster](https://reader037.vdocuments.net/reader037/viewer/2022110205/56649c745503460f94927fa7/html5/thumbnails/19.jpg)
Definition• For a task T , Bit-C(T ) is the number of bits sent
needed to solve T, in the worst case.• We will express bounds for it in the terms of chain length: n and
Id-domain size: M.
clearly, Bit-C(MaxF) ≥ Bit-C(Leader)
![Page 20: Two absolute bounds for distributed bit complexity Yefim Dinitz, Noam Solomon, 2007 Presented by: Or Peri & Maya Shuster](https://reader037.vdocuments.net/reader037/viewer/2022110205/56649c745503460f94927fa7/html5/thumbnails/20.jpg)
Lower & Upper bound• An upper bound must be valid for all inputs and all
schedulers.
• To obtain a lower bound L, however, it is sufficient to show that, for any algorithm, there exists some input and some scheduler, such that the execution under that scheduler with that input requires at least L bits.
![Page 21: Two absolute bounds for distributed bit complexity Yefim Dinitz, Noam Solomon, 2007 Presented by: Or Peri & Maya Shuster](https://reader037.vdocuments.net/reader037/viewer/2022110205/56649c745503460f94927fa7/html5/thumbnails/21.jpg)
Definition - Termination Property• A distributed algorithm solving some task is said to
have the termination property (or is terminating), if:
Each processor is eventually ensured that no more messages concerning this task will be sent by any processor and that there are no messages in transit,except, maybe, messages sent by itself.
• For a distributed task T , we denote by Bit-Ct(T) its bit complexity for the case when the termination property is required.
clearly, Bit-Ct(T) ≥Bit-C(T).
![Page 22: Two absolute bounds for distributed bit complexity Yefim Dinitz, Noam Solomon, 2007 Presented by: Or Peri & Maya Shuster](https://reader037.vdocuments.net/reader037/viewer/2022110205/56649c745503460f94927fa7/html5/thumbnails/22.jpg)
OUTLINE
• Introduction
• 2-processor solutions & bounds
• MaxF – Terminating algorithm in bits• MaxF – Algorithm in bits• Exactly Matching Lower Bounds
• Chain solutions
![Page 23: Two absolute bounds for distributed bit complexity Yefim Dinitz, Noam Solomon, 2007 Presented by: Or Peri & Maya Shuster](https://reader037.vdocuments.net/reader037/viewer/2022110205/56649c745503460f94927fa7/html5/thumbnails/23.jpg)
2-processor solutions• Goal: solve MaxF for a chain of length 1
Thus, solving Leader as well…
![Page 24: Two absolute bounds for distributed bit complexity Yefim Dinitz, Noam Solomon, 2007 Presented by: Or Peri & Maya Shuster](https://reader037.vdocuments.net/reader037/viewer/2022110205/56649c745503460f94927fa7/html5/thumbnails/24.jpg)
Naïve solution
Each Sends log2M -1 bits
ID = 100101bID = 101100b
0010 11 0 1 1 0
![Page 25: Two absolute bounds for distributed bit complexity Yefim Dinitz, Noam Solomon, 2007 Presented by: Or Peri & Maya Shuster](https://reader037.vdocuments.net/reader037/viewer/2022110205/56649c745503460f94927fa7/html5/thumbnails/25.jpg)
Naïve solution
Each Sends log2M -1 bits
ID = 100101bID = 101100b
0010 11 0 1 1 0
Why is this enough?
![Page 26: Two absolute bounds for distributed bit complexity Yefim Dinitz, Noam Solomon, 2007 Presented by: Or Peri & Maya Shuster](https://reader037.vdocuments.net/reader037/viewer/2022110205/56649c745503460f94927fa7/html5/thumbnails/26.jpg)
Naïve solution
Each Sends log2M -1 bits
ID = 100101bID = 101100b
0010 11 0 1 1 0
Can we do better?
![Page 27: Two absolute bounds for distributed bit complexity Yefim Dinitz, Noam Solomon, 2007 Presented by: Or Peri & Maya Shuster](https://reader037.vdocuments.net/reader037/viewer/2022110205/56649c745503460f94927fa7/html5/thumbnails/27.jpg)
A Terminating Algorithm• For M=2, no bits are sent.
Processor with ID=1 is leader; other is non-leader• For M>2:
• A recursive Algorithm• In each round we divide the ID range [0..(M-1)] to:
[0 .. ( ⌊𝑀 /2 ⌋−1 ) ] ⌊𝑀 /2 ⌋
Lesser
Median Greater
![Page 28: Two absolute bounds for distributed bit complexity Yefim Dinitz, Noam Solomon, 2007 Presented by: Or Peri & Maya Shuster](https://reader037.vdocuments.net/reader037/viewer/2022110205/56649c745503460f94927fa7/html5/thumbnails/28.jpg)
Round Description
Lesser
0
Greater 1
Median
wait
Upon wake-up(spontaneous or Message)
![Page 29: Two absolute bounds for distributed bit complexity Yefim Dinitz, Noam Solomon, 2007 Presented by: Or Peri & Maya Shuster](https://reader037.vdocuments.net/reader037/viewer/2022110205/56649c745503460f94927fa7/html5/thumbnails/29.jpg)
Round Description
Lesser
1
Greater 0
I’m Non-Leader
I’m the Leader
![Page 30: Two absolute bounds for distributed bit complexity Yefim Dinitz, Noam Solomon, 2007 Presented by: Or Peri & Maya Shuster](https://reader037.vdocuments.net/reader037/viewer/2022110205/56649c745503460f94927fa7/html5/thumbnails/30.jpg)
Round Description
Median 1
Median 0
I’m Non-Leader
I’m the Leader
![Page 31: Two absolute bounds for distributed bit complexity Yefim Dinitz, Noam Solomon, 2007 Presented by: Or Peri & Maya Shuster](https://reader037.vdocuments.net/reader037/viewer/2022110205/56649c745503460f94927fa7/html5/thumbnails/31.jpg)
Round Description
Lesser
0
Greater 1
Both are the sameGoTo next round on
the sub-range
[0 .. ( ⌊𝑀 /2 ⌋−1 ) ]
![Page 32: Two absolute bounds for distributed bit complexity Yefim Dinitz, Noam Solomon, 2007 Presented by: Or Peri & Maya Shuster](https://reader037.vdocuments.net/reader037/viewer/2022110205/56649c745503460f94927fa7/html5/thumbnails/32.jpg)
ExampleSay M=11 ZM=[0..10]
ID = 8 ID = 10
![Page 33: Two absolute bounds for distributed bit complexity Yefim Dinitz, Noam Solomon, 2007 Presented by: Or Peri & Maya Shuster](https://reader037.vdocuments.net/reader037/viewer/2022110205/56649c745503460f94927fa7/html5/thumbnails/33.jpg)
Round I
ID = 8 ID = 10
⌊𝑀/2 =⌊ ⌋11/2=⌋5 < 8
I’m greater
⌊𝑀/2 =⌊ ⌋11/2=⌋5 < 10
I’m greater
1 1
![Page 34: Two absolute bounds for distributed bit complexity Yefim Dinitz, Noam Solomon, 2007 Presented by: Or Peri & Maya Shuster](https://reader037.vdocuments.net/reader037/viewer/2022110205/56649c745503460f94927fa7/html5/thumbnails/34.jpg)
Round I
ID = 8 ID = 10
He’s the same as me!
He’s the same as me!
11
![Page 35: Two absolute bounds for distributed bit complexity Yefim Dinitz, Noam Solomon, 2007 Presented by: Or Peri & Maya Shuster](https://reader037.vdocuments.net/reader037/viewer/2022110205/56649c745503460f94927fa7/html5/thumbnails/35.jpg)
Round II
ID = 8 ID = 10
ZM=[6..10]
⌊𝑀/2( =⌊ ⌋11+6/)2=⌋8 = 8
I’m Median
⌊𝑀/2( =⌊ ⌋11+6/)2=⌋8 < 10
I’m greater
1
![Page 36: Two absolute bounds for distributed bit complexity Yefim Dinitz, Noam Solomon, 2007 Presented by: Or Peri & Maya Shuster](https://reader037.vdocuments.net/reader037/viewer/2022110205/56649c745503460f94927fa7/html5/thumbnails/36.jpg)
Round II
ID = 8 ID = 10
He’s greater than me! I’m non-Leader
1
0
![Page 37: Two absolute bounds for distributed bit complexity Yefim Dinitz, Noam Solomon, 2007 Presented by: Or Peri & Maya Shuster](https://reader037.vdocuments.net/reader037/viewer/2022110205/56649c745503460f94927fa7/html5/thumbnails/37.jpg)
Round II
ID = 8 ID = 10
Non-Leader
He’s smaller than me! I’m the Leader
0
![Page 38: Two absolute bounds for distributed bit complexity Yefim Dinitz, Noam Solomon, 2007 Presented by: Or Peri & Maya Shuster](https://reader037.vdocuments.net/reader037/viewer/2022110205/56649c745503460f94927fa7/html5/thumbnails/38.jpg)
Example - Outcome
ID = 8 ID = 10
Non-Leader
He’s smaller than me! I’m the Leader
• Elected Leader is the one with maximal ID.• Non-leader knows it isn’t leader.• The algorithm terminates under any scheduler
• Total Bits sent: 2*2=4
![Page 39: Two absolute bounds for distributed bit complexity Yefim Dinitz, Noam Solomon, 2007 Presented by: Or Peri & Maya Shuster](https://reader037.vdocuments.net/reader037/viewer/2022110205/56649c745503460f94927fa7/html5/thumbnails/39.jpg)
Example - Outcome
ID = 8 ID = 10
Non-Leader
He’s smaller than me! I’m the Leader
What could change under different scheduling?
![Page 40: Two absolute bounds for distributed bit complexity Yefim Dinitz, Noam Solomon, 2007 Presented by: Or Peri & Maya Shuster](https://reader037.vdocuments.net/reader037/viewer/2022110205/56649c745503460f94927fa7/html5/thumbnails/40.jpg)
Example - Outcome
ID = 8 ID = 10
Non-Leader
He’s smaller than me! I’m the Leader
Why must it terminate?
![Page 41: Two absolute bounds for distributed bit complexity Yefim Dinitz, Noam Solomon, 2007 Presented by: Or Peri & Maya Shuster](https://reader037.vdocuments.net/reader037/viewer/2022110205/56649c745503460f94927fa7/html5/thumbnails/41.jpg)
Worst-case Time Analysis• For M=2, no bits are sent.
Processor with ID=1 is leader; other is non-leader
• For M>2:- In each round we divide the ID range [0..(M-1)], such that the next round, if needed, will have a range of size ≤ . We thus formalize a recurrent relation:
[0 .. ( ⌊𝑀 /2 ⌋−1 ) ]⌊𝑀 /2 ⌋
Lesser Me
dian
Greater
𝒎𝒕𝟐(𝒓 +𝟏)❑ =𝟐 ∙𝒎𝒕
𝟐𝒓❑ +𝟏
![Page 42: Two absolute bounds for distributed bit complexity Yefim Dinitz, Noam Solomon, 2007 Presented by: Or Peri & Maya Shuster](https://reader037.vdocuments.net/reader037/viewer/2022110205/56649c745503460f94927fa7/html5/thumbnails/42.jpg)
Worst-case Time AnalysisLemma: If M is at most , at most 2r bits are sent by the Algorithm.
Proof – by Induction: base: r = 0, then and no bits are sent (2∙r = 0)
Assumption: Lemma is correct for some r=k
Step: consider r=k+1, for any Either there is a single round with 2 bits sent, OR
the length of the next round’s id’s sub-range
using the assumption, next step and on uses up to 2k bits
Total bits sent ≤ 2k+2 (=2(r+1) as required)
![Page 43: Two absolute bounds for distributed bit complexity Yefim Dinitz, Noam Solomon, 2007 Presented by: Or Peri & Maya Shuster](https://reader037.vdocuments.net/reader037/viewer/2022110205/56649c745503460f94927fa7/html5/thumbnails/43.jpg)
Worst-case Time Analysis• We have a way to keep track of M between rounds:
• Our Lemma proves that for M , no more than 2r bits are sent.
• How many rounds are there?
• Thus, .
If M is in-between, the total amount of sent bits
![Page 44: Two absolute bounds for distributed bit complexity Yefim Dinitz, Noam Solomon, 2007 Presented by: Or Peri & Maya Shuster](https://reader037.vdocuments.net/reader037/viewer/2022110205/56649c745503460f94927fa7/html5/thumbnails/44.jpg)
Worst-case Time Analysis• We have a way to keep track of M between rounds:
• Our Lemma proves that for M , no more than 2r bits are sent.
• How many rounds are there?
• Thus, M
• Finally, total amount of sent bits
≤
This is roughly a 1-bit difference
![Page 45: Two absolute bounds for distributed bit complexity Yefim Dinitz, Noam Solomon, 2007 Presented by: Or Peri & Maya Shuster](https://reader037.vdocuments.net/reader037/viewer/2022110205/56649c745503460f94927fa7/html5/thumbnails/45.jpg)
OUTLINE
• Introduction
• 2-processor solutions & bounds
• MaxF – Terminating algorithm in bits• MaxF – Algorithm in bits• Exactly matching Lower Bounds
• Chain solutions
![Page 46: Two absolute bounds for distributed bit complexity Yefim Dinitz, Noam Solomon, 2007 Presented by: Or Peri & Maya Shuster](https://reader037.vdocuments.net/reader037/viewer/2022110205/56649c745503460f94927fa7/html5/thumbnails/46.jpg)
Another solution• Goal: lowering runtime constant from to .
• “Cost of improvement”: The algorithm may not terminate!
- In our distributed network model, messages are guaranteed to be delivered in some finite time. - This means, a sent message will arrive, but a processor cannot stop waiting, if there is a chance that some message is on its way.
![Page 47: Two absolute bounds for distributed bit complexity Yefim Dinitz, Noam Solomon, 2007 Presented by: Or Peri & Maya Shuster](https://reader037.vdocuments.net/reader037/viewer/2022110205/56649c745503460f94927fa7/html5/thumbnails/47.jpg)
The Algorithm• For M<6, use the former Algorithm (up to 4 bits used).
• For any M≥6:
• divide the ID range [0..(M-1)] to:
• In each round, 2 bits are sent.• Last round is an exception: 4 bits are sent.
[1 .. ⌊𝑀 /2 ⌋ ]0
Lesser
Min Greater
𝑀−1
Max
![Page 48: Two absolute bounds for distributed bit complexity Yefim Dinitz, Noam Solomon, 2007 Presented by: Or Peri & Maya Shuster](https://reader037.vdocuments.net/reader037/viewer/2022110205/56649c745503460f94927fa7/html5/thumbnails/48.jpg)
Round Description
Lesser 0
Greater
1
Min
wait
Max
wait
Decide: leader
Decide: non-leader
![Page 49: Two absolute bounds for distributed bit complexity Yefim Dinitz, Noam Solomon, 2007 Presented by: Or Peri & Maya Shuster](https://reader037.vdocuments.net/reader037/viewer/2022110205/56649c745503460f94927fa7/html5/thumbnails/49.jpg)
Round Description
Lesser0
Greater1
Both are the sameGoTo next round on
sub-range
![Page 50: Two absolute bounds for distributed bit complexity Yefim Dinitz, Noam Solomon, 2007 Presented by: Or Peri & Maya Shuster](https://reader037.vdocuments.net/reader037/viewer/2022110205/56649c745503460f94927fa7/html5/thumbnails/50.jpg)
Round Description
Min
Max
0/1
0/1
1/0
1/0
When Min/Max receive any bitRespond with opposite bit
As if to say:“we are different, let’s finish”
![Page 51: Two absolute bounds for distributed bit complexity Yefim Dinitz, Noam Solomon, 2007 Presented by: Or Peri & Maya Shuster](https://reader037.vdocuments.net/reader037/viewer/2022110205/56649c745503460f94927fa7/html5/thumbnails/51.jpg)
Round Description
Lesser1
Greater0
Resend last bit to confirm intentions
0
1
![Page 52: Two absolute bounds for distributed bit complexity Yefim Dinitz, Noam Solomon, 2007 Presented by: Or Peri & Maya Shuster](https://reader037.vdocuments.net/reader037/viewer/2022110205/56649c745503460f94927fa7/html5/thumbnails/52.jpg)
Round Description
Min
Max
0/1
0/1
0
1
When Min/Max receive any bitRespond with “decision” bit
As if to say:“no matter what you are, my
decision is the final one”
![Page 53: Two absolute bounds for distributed bit complexity Yefim Dinitz, Noam Solomon, 2007 Presented by: Or Peri & Maya Shuster](https://reader037.vdocuments.net/reader037/viewer/2022110205/56649c745503460f94927fa7/html5/thumbnails/53.jpg)
Round Description
Lesser0/1
Greater
0/1Got ‘0’: Decide Leader
Got ‘1’:Decide Non-Leader
![Page 54: Two absolute bounds for distributed bit complexity Yefim Dinitz, Noam Solomon, 2007 Presented by: Or Peri & Maya Shuster](https://reader037.vdocuments.net/reader037/viewer/2022110205/56649c745503460f94927fa7/html5/thumbnails/54.jpg)
Correctness
Lesser
0
Lesser got ‘0’ go to next round
0
![Page 55: Two absolute bounds for distributed bit complexity Yefim Dinitz, Noam Solomon, 2007 Presented by: Or Peri & Maya Shuster](https://reader037.vdocuments.net/reader037/viewer/2022110205/56649c745503460f94927fa7/html5/thumbnails/55.jpg)
Correctness
Lesser1
Lesser got ‘1’ This is the last round! )resend ‘0’(
Either second processor is greater / Max second bit will be ‘1’ and it’ll decide ‘Non-Leader’
Or, second processor is Min Second bit will be ‘0’ and it’ll decide ‘Leader’
0
0
![Page 56: Two absolute bounds for distributed bit complexity Yefim Dinitz, Noam Solomon, 2007 Presented by: Or Peri & Maya Shuster](https://reader037.vdocuments.net/reader037/viewer/2022110205/56649c745503460f94927fa7/html5/thumbnails/56.jpg)
Correctness
Min
0/1
Min element decides immediately ‘Non-leader’Either other processor is Lesser: got ‘0’ sent ‘1’ [“we are different – let’s finish”]
(will get ‘0’ again) sends ‘0’ [I am Non-Leader]
Or other processor is Greater: got ‘1’ sent ‘0’ [“we are different – let’s finish”]
(will get ‘1’ again) sends ‘0’ [I am Non-Leader]
1/0 0
![Page 57: Two absolute bounds for distributed bit complexity Yefim Dinitz, Noam Solomon, 2007 Presented by: Or Peri & Maya Shuster](https://reader037.vdocuments.net/reader037/viewer/2022110205/56649c745503460f94927fa7/html5/thumbnails/57.jpg)
Round Description
Min
Max
But what if one is Min and one is MAX???
wait
wait
![Page 58: Two absolute bounds for distributed bit complexity Yefim Dinitz, Noam Solomon, 2007 Presented by: Or Peri & Maya Shuster](https://reader037.vdocuments.net/reader037/viewer/2022110205/56649c745503460f94927fa7/html5/thumbnails/58.jpg)
Round Description
Min
Max
The algorithm is still correct, since they both decide immediately,
But it will not terminate, as they can’t tell when to stop waiting for a message.
wait
wait
Decide: leader
Decide: non-leader
![Page 59: Two absolute bounds for distributed bit complexity Yefim Dinitz, Noam Solomon, 2007 Presented by: Or Peri & Maya Shuster](https://reader037.vdocuments.net/reader037/viewer/2022110205/56649c745503460f94927fa7/html5/thumbnails/59.jpg)
Worst-case Time Analysis• Similar to previous Algorithm
• For M≥6: The proper recurrent relation:
[1 .. ( ⌊𝑀 /2 ⌋ ) ]0
Lesser
Min
Greater
𝒎𝒏𝒕𝟐(𝒓 +𝟏)❑ =𝟐∙𝒎𝒏𝒕
𝟐𝒓❑ +𝟐
𝑟 ≥1 ;𝒎𝒏𝒕𝟐❑=𝟓 ;𝒎𝒏𝒕
𝟎❑=𝟐
M−1Max
![Page 60: Two absolute bounds for distributed bit complexity Yefim Dinitz, Noam Solomon, 2007 Presented by: Or Peri & Maya Shuster](https://reader037.vdocuments.net/reader037/viewer/2022110205/56649c745503460f94927fa7/html5/thumbnails/60.jpg)
Worst-case Time AnalysisLemma: If M is at most , at most 2r bits are sent by the Algorithm.
Proof – by Induction: base: r = 0, then and no bits are sent (2∙r = 0) r = 1, then
and correctness is obtained by using the previous algorithm,
Assumption: Lemma is correct for some r=k
Step: consider r=k+1, for any Either there is a single round with 4 bits sent, OR
length next round’s id’s sub-range
using the assumption, next step and on uses up to 2k bits
Total bits sent ≤ 2k+2 (=2(r+1) as required)
Only difference and isn’t a problem since 2r≥4
![Page 61: Two absolute bounds for distributed bit complexity Yefim Dinitz, Noam Solomon, 2007 Presented by: Or Peri & Maya Shuster](https://reader037.vdocuments.net/reader037/viewer/2022110205/56649c745503460f94927fa7/html5/thumbnails/61.jpg)
Worst-case Time Analysis• Using exactly the same trickery as before we obtain:
• And finally, total amount of sent bits