Download presentation
Presentation is loading. Please wait.
1
Election in the Complete Graph
Paola Flocchini Election in the Complete Graph 3 6 8 2 1 5 7 4 Paola Flocchini
2
Ask neighbours one at a time
Paola Flocchini Trivial Algorithm. Ask neighbours one at a time 3 2 I am 1 You win 5 1 7 6 Paola Flocchini
3
Ask neighbours one at a time
Paola Flocchini Trivial Algorithm. Ask neighbours one at a time 3 2 5 1 7 6 Paola Flocchini
4
Paola Flocchini Message Complexity O(n2) Paola Flocchini
5
- Territory acquisition (capture neighbours)
Paola Flocchini Better Algorithm Ideas: - In stages - Territory acquisition (capture neighbours) ensuring that a node is captured by at most one candidate in the same stage - Disjoint territories Paola Flocchini
6
A node attacks another node, if successful
Paola Flocchini A node attacks another node, if successful it captures the node increasing the size of its territory (= stage number) Defeated nodes become captured (belonging to a owner) and stop attacking CANDIDATE: still playing trying to increase the territory PASSIVE: transitional phase, will not attack anymore, will eventually become captured CAPTURED: belong to a territory, owned by a candidate An attack could reach candidate passive captured Paola Flocchini
7
Paola Flocchini 4 3 8 territories Paola Flocchini
8
Bigger territories win over smaller ones (i.e. higher stages)
Paola Flocchini The Attack Bigger territories win over smaller ones (i.e. higher stages) In case of tie, smaller Ids win 3 8 8 4 Paola Flocchini
9
Bigger territories win over smaller ones (i.e. higher stages)
Paola Flocchini The Attack Bigger territories win over smaller ones (i.e. higher stages) In case of tie, smaller Ids win 3 8 8 4 Paola Flocchini
10
Send capture message to one neighbour
Paola Flocchini Attacking a candidate Send capture message to one neighbour (stage,Id:3) 3 8 captured 8 3 Increase territory and stage (+1) (stage,Id:3) 3 reject 8 8 3 Paola Flocchini If still candidate, 3 becomes passive
11
Paola Flocchini Attacking a passive 3 8 Paola Flocchini
12
Increase territory and stage (+1)
Paola Flocchini Attacking a passive captured 3 8 Increase territory and stage (+1) Paola Flocchini
13
3 becomes passive, if still candidate
Paola Flocchini Attacking a captured 3 8 no If I know I belong to a bigger territory (stage,Id:3) 8 3 3 becomes passive, if still candidate 3 8 Not sure, ask my owner (stage,Id:3) 8 3 Paola Flocchini
14
Increase territory and stage (+1)
Paola Flocchini Attacking a captured If I know I belong to a bigger territory (stage,Id:3) 8 3 8 no 3 Not sure, ask my owner yes (stage,Id:3) 8 8 3 3 Paola Flocchini Increase territory and stage (+1)
15
3 becomes passive, if still candidate
Paola Flocchini Attacking a captured If I know I belong to a bigger territory (stage,Id:3) 8 3 8 no 3 Not sure, ask my owner no (stage,Id:3) 8 8 3 3 3 Paola Flocchini 3 becomes passive, if still candidate
16
Paola Flocchini passive candidate captured Paola Flocchini
17
When does a candidate become a leader ?
Paola Flocchini When to terminate ? When does a candidate become a leader ? When it captures more than n/2 nodes If a candidate has captured more than n/2 nodes nobody else can become leader Paola Flocchini
18
The territories of any two candidates are disjoint
Paola Flocchini Important The territories of any two candidates are disjoint Because at any time, any node has only ONE owner. 3 Each territory is rooted in its owner 6 8 2 1 5 7 Paola Flocchini 4
19
Paola Flocchini Paola Flocchini
20
We need: number of stages and messages per stage
Paola Flocchini We need: number of stages and messages per stage Paola Flocchini
21
candidate --- candidate 2 msgs
Paola Flocchini Messages per attack candidate --- candidate 2 msgs 2 msgs candidate --- passive candidate --- captured 4 msgs At most 4 messages per attack Paola Flocchini
22
A candidate with n/2 +1 captured nodes becomes leader and notify
Paola Flocchini Number of stages A candidate with n/2 +1 captured nodes becomes leader and notify n/2 +1 stages Paola Flocchini
23
How many candidates in each stage ?
Paola Flocchini How many candidates in each stage ? i Stage i ---> territory of size i i i i i With disjoint territories There cannot be more than n/i candidates in stage i ni n/i Paola Flocchini
24
4 n/i O( ) O( ) Message Complexity At most 4 messages per attack
Paola Flocchini Message Complexity At most 4 messages per attack ni n/i Messages in stage i 4 n/i Harmonic number Hn/2 = O(log n) 4 n/i 1 n/2 O( ) n/2 O( 4 n 1/i ) = 1 M(completeElect) = O(n log n) Paola Flocchini
25
Election in a Complete Graph with Chordal Sense of Direction
Paola Flocchini Election in a Complete Graph with Chordal Sense of Direction 5 1 4 1 2 5 3 3 2 4 5 4 1 2 3 3 2 4 5 1 4 3 3 2 5 1 2 4 1 5 Any ring algorithm IDEA: Put information in messages. At the next step, use a smaller ring. Paola Flocchini
26
(Id:3, originLink: 1) 8-1=7. the message was originated from
Paola Flocchini (Id:3, originLink: 1) 1 7 3 8-1=7. the message was originated from my neighbour 6 2 1 7 5 6 4 3 6 5 8 2 4 7 3 3 1 5 4 2 6 7 6 1 2 3 5 2 4 1 4 3 5 2 1 6 7 3 4 6 2 5 1 5 4 7 3 5 6 2 7 4 7 3 5 6 1 2 1 7 4 Paola Flocchini
27
(Id:3, originLink: 1) (Id:3, originLink: 2) 3 6 8 2 1 5 7 4
Paola Flocchini (Id:3, originLink: 1) 3 1 7 6 2 1 7 (Id:3, originLink: 2) 5 4 3 6 6 8 2 5 4 3 1 7 3 2 5 4 6 7 6 1 2 3 5 2 4 1 4 3 5 2 1 6 7 3 4 6 2 5 1 5 4 7 3 5 6 2 7 4 7 3 5 6 1 2 1 7 4 Paola Flocchini
28
Modulo 8 (Id:3, originLink: 2) Which means my link 8-2=6 3 6 8 2 1 5 7
Paola Flocchini Modulo 8 3 1 7 6 2 1 7 (Id:3, originLink: 2) 5 4 3 6 6 8 2 5 4 3 1 7 3 2 5 4 6 Which means my link 8-2=6 7 6 1 2 3 5 2 4 1 4 3 5 2 1 6 7 3 4 6 2 5 1 5 4 7 3 5 6 2 7 4 7 3 5 6 1 2 1 7 4 Paola Flocchini
29
Similarly for the other candidates
Paola Flocchini Similarly for the other candidates Modulo 8 3 1 7 (Id:2, originLink: 6) 6 2 1 7 5 4 3 6 6 8 2 5 4 3 1 7 3 2 5 4 6 7 6 1 2 3 5 2 4 1 4 3 5 2 1 6 7 3 4 6 2 5 1 5 4 7 3 5 6 2 7 4 7 3 5 6 1 2 1 7 4 Paola Flocchini
30
Similarly for the other candidates
Paola Flocchini Similarly for the other candidates Modulo 8 (Id:2, originLink: 6+6=4) 3 1 7 6 2 1 7 5 4 3 6 6 8 2 5 4 3 1 7 3 (Id:2, originLink: 6) 2 5 4 6 7 6 1 2 3 5 2 4 1 4 3 5 2 1 6 7 3 4 6 2 5 1 5 4 7 3 5 6 2 7 4 7 3 5 6 1 2 1 7 4 Paola Flocchini
31
Similarly for the other candidates
Paola Flocchini Similarly for the other candidates Modulo 8 3 1 7 6 2 1 7 5 4 3 6 6 8 2 5 Which means my 8-4=4 4 3 1 7 3 2 5 4 6 7 6 1 2 3 5 2 4 1 4 3 5 2 1 6 7 3 4 6 2 5 1 5 4 7 3 5 6 2 7 4 7 3 5 6 1 2 1 7 4 Paola Flocchini
32
Similarly for the other candidates
Paola Flocchini Similarly for the other candidates Modulo 8 3 1 7 6 2 1 7 5 4 3 6 6 8 2 5 4 3 1 7 3 2 5 4 6 7 6 1 2 3 5 2 4 1 4 3 5 2 1 6 7 3 4 6 2 5 1 5 4 7 3 5 6 2 7 4 7 3 5 6 1 2 1 7 4 Paola Flocchini
33
Message Complexity Planar graph - 2 messages per edge
Paola Flocchini Message Complexity Planar graph - 2 messages per edge O(n) [because a planar graph has O(n) edges] Paola Flocchini
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.