LEADER ELECTION - PowerPoint PPT Presentation

1 / 16
About This Presentation
Title:

LEADER ELECTION

Description:

all processes are in the same state at the initial ... A Las Vegas algorithm is a probabilistic algorithm that. terminates with positive probability ... – PowerPoint PPT presentation

Number of Views:136
Avg rating:3.0/5.0
Slides: 17
Provided by: lm58
Category:
Tags: election | leader | alas

less

Transcript and Presenter's Notes

Title: LEADER ELECTION


1
LEADER ELECTION
2
Leader election
  • all processes are in the same state at the
    initial configuration, and arrive at a
    configuration where exactly one process is in
    state leader and all other processes are in the
    state lost.
  • an initial phase of centralized algorithms
  • assumptions
  • reliable processes and channels
  • asynchronous system
  • processes are distinguished by unique identities

3
Leader election algorithms
  • algorithms are decentralized
  • the length of messages is O(log N)
  • process identities are used to break symmetry
    between processes
  • extrema-finding algorithms
  • tree algorithms with wake-up phase
  • the phase algorithm O (D E) messages, O (D)
    time
  • MST algorithm O ( E N log N) messages

4
CHANG-ROBERTS RING ALGORITHM
find the node with the maximum id and make it the
leader
5
CHANG-ROBERTS Ring Algorithm
?
6
Ring networks
  • Chang - Roberts
  • O(N2) messages, O(N) time
  • time complexity O(N)
  • all processes start at the same time N
  • the process to the left from Pmax starts ( N -
    1) N
  • communication complexity (all processes start)
    O(N2 )
  • processes are in increasing order 2N - 1
  • processes are in decreasing order ?N i1 1/2
    N(N1)

Pmax
9
2
14
8
11
3
send
6
10
4
7
9

6
7
Hirschberg - Sinclaire
  • bidiretional ring
  • sendLR
  • pass
  • respond
  • complexity
  • O(N logN) messages, O(N) time

8
Hirschberg - Sinclaire
?
9
(No Transcript)
10
Hirschberg Sinclaire complexity
length processes
2 . 1 1 2. 20
phase 0
2 . 21 1 2. 20
phase 1
22
22
2 . 22 1 2. 20
phase 2
N/12 . 22 processes in 3rd phase
N/12.2i-1 processes in i-th phase length of i-th
phase 2i1
4 messages
11
Hirschberg - Sinclaire
  • phase i - 1 leaves N / (2i 1) candidates
  • the length of the phase i 2i 1
  • 4 messages are sent by each node
  • lt 4N (2 2 log N)
  • O (N log N)
  • Complexity
  • O(N logN) messages, O(N) time

12
Anonymous networks
  • a probabilistic algorithm is modeled as a process
    that tosses a coin with every step it executes.
  • ? (?1 , ?2 , . . . ) is an infinite sequence
    of coin flips, i.e., of zeroes and ones in a
    process p.
  • ? -computation is a computation in which the i-th
    transition is specified by the i-th element of ? .

13
Definitions
  • A probabilistic algorithm is ? -terminating if it
    terminates in every ? -computation.
  • A probabilistic algorithm is ? -partially correct
    if each terminal configuration of a ?
    -computation satisfies a condition ? .
  • A probabilistic algorithm is ? -correct if it is
    both ? -terminating and ?
    -partially correct.

14
. . . contd
  • A probabilistic algorithm is terminating if it is
    ? -terminating for every ?
    .
  • A probabilistic algorithm is partially correct
    if it is ? - partially correct for
    every ? .
  • A probabilistic algorithm is correct if it is ?
    -correct for every ? .

15
. . . contd
  • A probabilistic algorithm is terminating with
    probability P if the probability that the
    algorithm is ? -terminating is at
    least P.
  • A probabilistic algorithm is partially correct
    with probability P

    if the probability that the
    algorithm is ? - partially correct is at least
    P.
  • A probabilistic algorithm is correct with
    probability P if the probability that
    the algorithm is ? -correct
    is at least P.

16
Las Vegas and Monte Carlo
  • A Las Vegas algorithm is a probabilistic
    algorithm that
  • terminates with positive probability
  • is partially correct.
  • A Monte Carlo algorithm is a probabilistic
    algorithm that
  • terminates
  • is partially correct with positive probability.
Write a Comment
User Comments (0)
About PowerShow.com