经典案例 > C/C++代写 >

Exercises election leader in synchronize ring structure

(Chapter 3 Lynch, Nancy A. (1996-04-16). Distributed Algorithms (The Morgan Kaufmann Series in Data Management Systems) (Kindle Locations 1327-1335). Elsevier Science. Kindle Edition.)


    1. Show that the HS algorithm still works correctly in the version of the synchronous model allowing variable start times (you might have to modify the code slightly).

    2. Suppose that the HS leader-election algorithm is modified so that successive powers of k are used for path lengths, k>2, instead of successive powers of 2. Analyze the time and communication complexity of the modified algorithm, similarly to the way the original HS algorithm is analyzed in the book. Compare the results to those for the original algorithm.

    3. Consider modifying the HS algorithm so that the processes only send tokens in one direction rather than both.

      1. Show that the most straightforward modification to the algorithm in the text does not yield O (n log n) communication complexity. What is an upper bound for the communication complexity?

      2. dd a little more cleverness to the algorithm in order to restore the O (n log n) complexity bound.

    4. Design a unidirectional leader-election algorithm that works with unknown ring size, and only uses O (n log n) messages in the worst case. Your algorithm should manipulate the UIDs using comparisons only.

51作业君