Exercise 1: Trees
• Propose a leader election algorithm for rooted trees (the leader should be the node with the maximal identifier in the tree). Discuss the complexity of the proposed solution.
• Propose a leader election algorithm for general trees (not rooted). Discuss the complexity of the proposed solution.
Exercise 2: Rings
• Is the leader election possible on rings where all nodes have the same indentifier but one ? Justify your response.
• Assume now that two nodes have the same indentifier which is different from all the other’s identifies that are identical. Is election possible in this case ?
Exercise 3: Hirshberg-Sinclair
1. Recall the Hirshberg-Sinclair leader election algorithm.
2. Propose an execution of the algorithm for a ring of size 10 where identifiers are ordered in a decreasing order.
3. Propose an execution of the algorithm for a ring of size 10 where identifiers are ordered in an increasing order.
4. When a node decides that it lost the election ? 5. When a node decides that it is the leader ?
6. What would be complexity in number of messages of the HS algorithm.
Exercise 4: Grids
Propose a leader election algorithm for grids (mesh of size n*m). Compute the complexity of the proposed algorithm.
Exercise 5: Applications Leader Election
Assume a leader election algorithm exists. Let denote A this algorithm.
• Propose an algorithm for ring coloring using the output of A.
• Propose a naming algorithm using the output of A.
TD5 ALGORES