Limited-time offer! Save up to 50% Off | Solutions starting at $6 each  

Write working code for the Hirschberg-Sinclair algorithm for

Added on - 13 Sep 2019

Trusted by 2+ million users,
1000+ happy students everyday
Showing pages 1 to 1 of 1 pages
Write working code for the Hirschberg-Sinclair algorithm for leader election usingJava RMI/sockets. Each node acts as both client and server for its two neighbours onthe logical ring.You need to decide on the details of the algorithm. Examples include: how to set theparameter n, who to choose/assign process ids, how to count the number of messagesused in a leader election.Build an appropriate interface, to demonstrate the working of the algorithm.Turn in a printout of commented running code; and a 1-2 page writeup of how youimplemented the algorithm in Java RMI or sockets. Justify your choice of RMI orsockets. Give the summary of how many messages it took to elect the leader, averagedover a large number of runs, for each value ofnyou choose. Also, derive an exactexpression for the asymptotic message complexity of the algorithm.For each value ofnyou choose, calculate the average number of messages. Repeatthis for various values ofn, e.g., 8, 16, 32, 64, .... Then plot the number of messagesas a function ofnin a graph. Do your results validate the theoretical asymptoticmessage complexity?
You’re reading a preview
Preview Documents

To View Complete Document

Click the button to download
Subscribe to our plans

Download This Document