1 / 43

Efficient Algorithms for Leader Election in Radio Networks

Efficient Algorithms for Leader Election in Radio Networks. Tomasz Jurdziński Mirosław Kutyłowski Jan Zatopiański. Adversary Immune Leader Election in Ad Hoc RN. Mirosław Kutyłowski Wojciech Rutkowski. Introduction. What are Radio networks? Why elect a leader? Who is the adversary?.

knoton
Download Presentation

Efficient Algorithms for Leader Election in Radio Networks

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Efficient Algorithms for Leader Election in Radio Networks Tomasz Jurdziński Mirosław Kutyłowski Jan Zatopiański

  2. Adversary Immune Leader Election in Ad Hoc RN Mirosław Kutyłowski Wojciech Rutkowski

  3. Introduction What are Radio networks? Why elect a leader? Who is the adversary?

  4. Radio Networks (RN) • Hand-held devices running on batteries with no central control. • The set of activated stations is unknown - the network has to organize itself • No infrastructure - useful in disaster-relief, law-enforcement, logistics, etc. • Crucial to design efficient algorithms for fundamental tasks.

  5. RN Model • Stations are computers equipped with radio transceivers. The stations of a RN are identical and execute the same code • They work synchronously (GPS): We split the execution time into time slots, called steps • There is a single communication channel available to all stations

  6. Collisions • During a step a station may either send (broadcast) a message or listen to the channel • If exactly one station sends, then all stations that listen at this moment receive the message sent • If at least two stations send, then a collision occurs • A collision is indistinguishable from the situation when no station is sending: no collision-detection (no-CD)

  7. Messages • The size of the message sent by a station in one step is not limited. • If a station sends a message during step i and no other station is sending at this moment, then we say that the station succeeds and that step i is successful • An active station might be either awake or asleep: In the first case, a station sends a message or listens to the communication channel

  8. Leader Election Problem • A RN network is given, such that each active station has no knowledge which stations are active (except itself). Initialize the network so that exactly one station gets status leader and the rest of the active stations receive the status nonleader.

  9. Randomized Leader Election • Two kinds of randomized RN algorithms are considered: • Either The number of active stations is unknown, or • This number is known or can be approximated • The stations have no ID's or serial numbers - these have to be assigned during initialization process

  10. Deterministic Leader Election • Station ID's are necessary for symmetry breaking • We assume The stations have unique ID numbers from the range [1...n] • An arbitrary number of ID's might be used by active stations

  11. Complexity measures • There are two main complexity measures for RN algorithms: time complexity and energy cost • Time complexity is the number of steps executed • Energy cost is the maximum over all stations of the number of steps in which the station is awake • In the case of probabilistic algorithms we require that the prescribed energy or time bound is satisfied with high probability (1/n)

  12. The Adversary • We cannot defend against an adversary which jams all communications • We assume that the adversary has energy capacity of O(logN) • But he knows our protocol, and will try to defeat it’s goals: • Have no leader elected • Have more than one leader elected

  13. Example of leader election • The simplest leader election algorithm is used by Ethernet: with a certain probability each candidate sends a message (a trial). If a station sends a message and there is no collision, then it becomes the leader. The step is repeated until a leader is elected. • The adversary may: • Cause collisions all the time (block) • Pretend to win, than disappear (no leader)

  14. Tree Leader Election Algorithm 1 2 3 4 5 6 7 8

  15. Adversary Failing Leader Election X 1 2 3 4 5 6 7 8

  16. Cryptographic Assumptions • We will assume that the adversary cannot hear our encrypted messages, and cannot participate in the algorithm. • It does know our protocol, and may try to damage it by interfering with communications at strategic instances

  17. Resisting the Adversary • A participant becomes a sender or a receiver. It participates in d rounds: during a round a participant decides to be active with probability N-1, only one attempt • The round consists of 3 communication steps: • sender broadcasts a message, receiver listens • receiver repeats the message while sender listens • if sender gets its own message, it repeats it, while receiver is listening (collision detection)

  18. Results • In case there was no collision we say that the pair of participants succeeds, and we assign to them the round number as a temporary ID • the initial selection is resistant against an adversary: since we assume that its energy capacity is O(logN), for a sufficiently large r = Θ(logN), the adversary can only reduce probability of success in a trial if r trials are performed.

  19. Log* deterministic leader election for special cases

  20. Sharing the Load • Large energy consumption occurs only at these stations that come close to being a leader, The worst one occurs for the leader. • In our algorithm the stations that loose, called slaves, take over the tasks of the stations that have won with them, their masters,and thereby reduce the number of steps in which they are awake • We assume that at the beginning each active station has 2/c (virtual)slaves

  21. Initial Parameters • Our algorithm consists of O(log* n) stages. at the beginning of each stage i: • there are xistations called masters participating in the phase, some are rich, the rest are passive (nonexistent or with not enough slaves) • there are at least ci·xirich masters • each rich master has a group of at least si slaves – stations that serve this master

  22. Stage Process • during stage i: • the masters are split into groups of size 2^si, every group of masters elects a leader that becomes a master for the next stage • after electing a leader in a group all other masters and slaves of the group become slaves of the leader; leaders with less than Si+1slaves become passive

  23. Tree Leader Election Algorithmwith Slaves 1 2 3 4 5 6 7 8

  24. Efficiency • Let x1 = n, s1 = 2/c, c1 = C, and the following condition be fulfilled for each i (may be except the last phase): ci+1 = ci/2 , xi+1 = xi/2^si , si+1 = ci+1 · si · 2^si • sigrows so that for i = O(log*n) we end up with a single group and perform the last phase. Energy cost is O(log*n), since each station is awake for O(1) steps during each phase. The execution time of the algorithm is O(n)

  25. Sublogarithmic Leader Election for general cases

  26. Initial State • A group of size n stations with unique IDs in the range [1..n] • The number of active stations among them is arbitrary • The parameter k (which is an increasing function k : N  N) is responsible for divide and conquer feature of the algorithm and can be tuned separately

  27. Algorithm Sn(k) – Phase 1 • The stations are split into groups of size k = k(n)based on the IDs of the stations. • During step i every active station of the group i sends a message: • no active stations in a group, nothing happens • one active station in a group, it can hear its own message • at least two active stations, they recognize that their messages have been scrambled

  28. Algorithm Sn(k) – Phase 2 • In the groups, where there was one active station, the only active station is a leader. These leaders wait until phase 4.

  29. Algorithm Sn(k) – Phase 3 • Each group of size k(n), which during phase 1 had more than one active station, runs recursively algorithm Sk(n)(k) • When it is finished, then each leader elected has a slave that is used in Phase 4 for reducing the energy cost of its master by half.

  30. Algorithm Sn(k) – Phase 4 • A leader is elected from the leaders of Phases 2 and 3, by an execution of Sn/k(n)(k)(with IDs equal to the numbers of the groups to which appropriate leaders belong)

  31. Efficiancy • The energy cost of the algorithm S satisfies the following relation: E(Sn(k))= O(1)+max{ E(Sn/k(n)(k)), E(Sk(n)(k)) + ½E(Sn/k(n)(k)) } • Let t  N and δ = 2-t. For a parameter k(n) = nδwe can check that a solution to this relation satisfies E(Sn(k)) = 0((logn)-t)

  32. Fast randomized leader election Logarithmic time, high probability, log* energy cost

  33. Two Phases • there are k trial steps: in each one, each station that has not sent a message yet decides to send with probability 1/n • Only the stations that have succeeded during trial steps participate in the second phase of the algorithm. Each of them has a temporary ID, which is the number of a trial step during which it succeeded • During this phase, the stations execute the first algorithm

  34. Efficiency • Each station is awake for O(1) steps during the first phase and O(log*n) steps during the second phase: energy cost is O(log* n) • The algorithm may fail to elect a leader if the number of stations that participate in the second phase is too small

  35. Probability of Success • The probability that some station succeeds during the each trial step equals: N·1/n·(1 – 1/n)N-1 N·(1 – 1/N)max(N,n) = Θ(1) • Based on Chernoff Bounds, the number of successes is Θ(k) with probability at least 1 – 1/n

  36. Adversary Resistant Leader Election for a cryptographically safe network

  37. Preprocessing • Initial selection seen earlier is executed for d = v·k turns, where v = Θ(logN) and k = O(logN) • If a round j of initial selection succeeds, then the stations chosen are denoted by Pj and P'j • The station Pj is a candidate for the leader in our algorithm, P'j is required for auxiliary purposes. • Each of the v groups has Θ(logN) pairs of stations (high probability)

  38. Building Chains • Current Agent tries to contact the next one • If Current Agent succeeds, the next station becomes the Current Agent • Otherwise it keeps trying, until energy runs low • If there is no active Agent - the first active pair becomes Current Agent and starts a new chain.

  39. Building Comunication • We use communication slots to hinder the Adversary • Pa and P’a are the agents, trying to communicate with Pj and P’j • The agent Pa of the current chain transmits the string encoding status of the current chain • P’a repeats the previous message • Pj acknowledges that it exists • P’j repeats the previous message of Pj

  40. Messages Get Scrambled • 1st or 2nd: Padoes not receive its message back, Pj, P’jare aware that either there was no agent or at least one message was scrambled. Pjstarts a new chain. Paterminates the current chain • 3rd: Pjdoes not receive its own message, Pjand P’jare aware of the attack. Pjand P’j “commit suicide” • 4th: Pjbehaves the same, P’jwill never hear its partner, so will never respond with a message

  41. Merging Chains • We begin to group the Chains to longer chains, while spreading information about active stations • Once a large enough Chain is collected, it prevents other chains from uniting by "interfering" in reserved positions • The one large group elects a leader

  42. The adversary • Must guess the transmission slots • IDs are hashed and rotated • Cannot stop all candidates • Must keep guessing correctly at second stage to cause real damage • Almost impossible to prevent the success of the internal attack

  43. Thank You Ran Arad

More Related