8.4. Simple leader election

Algorithm construction 1/1

Let \( L_{p,N} \) be the number of devices with the variable LEADER set to true at the end of GLE algorithm. Notice that \( L_{p,N} \) is a random variable. A careful and quite complicated analysis of the LTE algorithm gives a possibility of estimating the number \( \Pr[L_{p,N} \leq k] \) for a given number k. This formulas shows that \( \Pr[L_{10^{-2},N} \gt 10] \approx 10^{-20} \). Hence with a very high probability we may expect that the number \( L_{p,N} \) is bounded by 10.

Let us consider the following algorithm (which will run on each device), controlled by one parameter L:

LEADER = true;
FOR I=1 TO L DO
  x = random({0,1});
  IF (x==1) {
    send message
  } ELSE {
    listen
    if (hear message or noise){
      LEADER = false;
      BREAK;
    }
  }
OD

We call this algorithm the Simple Leader Election algorithm (SLE(L)). Let us observe that this algorithm is very similar to the second part of Jacquet's algorithm. The difference is in making decision when a device should send a message: in SLE algorithm a decision is done according to fair Poisson try: at each round the device decides to send a message independently and with probability \(\frac12\). The formal analysis of this algorithm where first done by H. Prodinger in 1993   : 1  and lated by J. Fill, H. M. Mahmoud and W. Szpankowski in 1996   : 2 .

Let \(W_n\) denotes the first moment (round) of the SLE algorithm when the leader is selected, when there there are \(n\) devices at the beginning. The following beautiful formula was proved in   : 1 : \[ \Pr[W_n \leq k] = \frac{n}{2^{kn}} \sum_{j=0}^{2^k - 1} j^{n-1} \] From this formula we may deduce that \[ \Pr[W_{10} \leq k] = 1 - \frac{5}{2^k} + \frac{15}{2}\frac{1}{2^{2k}} - \frac{7}{2^{4 k}} + \frac{5}{2^{6k}} - \frac{3}{2} \frac{1}{2^{8k}} \approx 1 - \frac{5}{2^k} ~ \]

Conclusion

A numeric solution of the equation \( \Pr[W_{10} \leq k] = 1-10^{-20} \) is \( k=69 \). Therefore if we use the parameter \(L=69\) in the algorithm SLE then for each group of devices of cardinality not exceeding 10 we know that with probability at least \(1-10^{-20}\) this algorithm will select a leader.

Bibliography 1/1

1

H. Prodinger: How to select a looser

Discrete Mathematics, 120 (1993)

2

J. A. Fill, H. M. Mahmoud, W. Szpankowski: On the Distribution for the Duration of a Randomized Leader Electron Algorithm

Ann. Appl. Probab., 1996, vol. 6




Projekt Cloud Computing – nowe technologie w ofercie dydaktycznej Politechniki Wrocławskiej (UDA.POKL.04.03.00-00-135/12)jest realizowany w ramach Programu Operacyjnego Kapitał Ludzki, Priorytet IV. Szkolnictwo wyższe i nauka, Działanie 4.3. Wzmocnienie potencjału dydaktycznego uczelni w obszarach kluczowych w kontekście celów Strategii Europa 2020, współfinansowanego ze środków Europejskiego Funduszu Społecznego i budżetu Państwa