ANONYMOUS NETWORKS - PowerPoint PPT Presentation

1 / 14
About This Presentation
Title:

ANONYMOUS NETWORKS

Description:

A Las Vegas algorithm is a probabilistic algorithm that. terminates with ... one of k processes selected a minimal value (algorithm ends); let P = mink Pk ... – PowerPoint PPT presentation

Number of Views:109
Avg rating:3.0/5.0
Slides: 15
Provided by: lm58
Category:

less

Transcript and Presenter's Notes

Title: ANONYMOUS NETWORKS


1
ANONYMOUS NETWORKS
2
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.

3
The Itai-Rodeh election algorithm
  • Las Vegas algorithm for rings of known size
  • Chang-Roberts algorithm with random IDs ? 1 ..
    N
  • Selecting the minimal ID node
  • Ring size N detects the return of the token to
    the initiator
  • un(seen) variable detects the same ID node
  • If un false another round is started with new
    IDs

4
Itai-Rodeh
5
Itai-Rodeh
my token
pass
6
Partial correctness
  • If at least one process generates a token at
    level l, either one process becomes elected at
    that level and no process generates a token at
    level l 1, or at least one process generates a
    token at level l 1.
  • a process generates a token on level l 1 iff it
    has received its own token from level l
  • 1. the token is not minimal on level l -gt is
    purged by a process on level l 1 or by a
    process having with smaller identity
  • the process with the smaller identity is elected
    or it will generate a token on level l 1
  • 2. the token is minimal on level l it will
    either be purged by a process on level l 1 or
    will return to the initiator
  • this token is minimal on level l, un is true and
    the process is elected
  • un is false gt the process generates a token on
    level l 1

7
Itai-Rodeh correctness
  • The Itai-Rodeh algorithm terminates with
    probability one.
  • Proof
  • let k be a number of processes that generated a
    token on level l
  • let Pk be the probability that one of k processes
    selected a minimal value (algorithm ends) let P
    mink Pk
  • the probability that a token is generated on
    level l 1 is (1 - P)
  • the probability that the algorithm does not stop
    after l levels is (1 - P)l
  • (1 - P)l for a big value of l is 0

8
A probabilistic algorithm for the ring size
  • Monte-Carlo
  • terminates
  • when it terminates, estp N with probability
    depending on a parameter R (R is a
    range of random numbers)
  • Process p increases its estimate when
  • est gt estp a token is received that contains an
    estimate est gt estp.
  • est estp a token with estimate est estp is
    received,
    this token has made est hops, but the included
    label differs from ps label.
  • Process p purges the token
  • est lt estp
  • Otherwise pass the token

9
Ring size algorithm
1
a
2
2
1
b
2
10
Complexity
  • The algorithm message-terminates after exchanging
    O(N3 ) messages. In the terminal configuration
    all estp are equal, and their common value is
    bounded by N.
  • Proof
  • the estimate remains conservative (never
    decreases), lbl changes only when est increases
  • Assume, by induction that when the estimate is
    received in a token it has been conservative so
    far
  • 1. estp est and est ?? N because est is
    conservative estimate (by induction) (case
    a2)
  • 2. estp esp 1 when
  • (a1) h est estp lt est gt est ? N (not
    my token) and est ?? N (conservative)
  • (b2) estp est h , lbl ? lblp gt est
    ? N (not my token) and est ?? N
    (conservative)

11
. . . contd
  • every successor on a ring either keeps the value
    est or increases it
  • estNextp ? estp and estp ? N gt
  • est has to be the same for all processes
  • time complexity O(N3 )
  • N processes
  • each sends at most N tokens
  • each token is at most N - times forwarded

12
Termination
  • The algorithm terminates,
  • and upon termination est N for all p
  • with probability at least 1 - (N - 2)
    (1/R)N/2
  • Proof
  • the algorithm terminates in the configuration
    when all estimates are equal and less or equal to
    N

13
  • Consider the probability of termination with a
    wrong result (est lt N)
  • Probability that processes make a low estimate
    est lt N and it will not be improved
  • a token lttest, e, lblp , hgt is forwarded e hops
  • e-th process does not increase its estimate
    becasuse lblp lbl
  • lets divide processes to f groups f gcd (N,
    e)
  • processes in each group have the same estimate

14
. . . contd
  • processes in a distance const f have the
    same label
  • labels are chosen randomly from 1, . . . , R
  • probability that all processes in one group have
    the same label R (1/R) N/f R (1/R)
    (N/f ) - 1
  • this holds for all groups ((1/R) N/f-1) f
    (1/R) N/f (1/R) N/2
  • because f lt N/2
  • all possible wrong estimates 2 ... N-1
  • probability of a wrong answer (N - 2) (1/R)
    N/f
  • probability of a correct answer 1 - (N - 2)
    (1/R) N/f
Write a Comment
User Comments (0)
About PowerShow.com