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.)
3.6. 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).
3.7. 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.8. Consider modifying the HS algorithm so that the processes only send tokens in one direction rather than both.
(a) 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?
(b) Add a little more cleverness to the algorithm in order to restore the O (n log n) complexity bound.
3.9. 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.