logo

Write working code for the Hirschberg-Sinclair algorithm for

1 Pages223 Words741 Views
   

Added on  2019-09-13

Write working code for the Hirschberg-Sinclair algorithm for

   Added on 2019-09-13

ShareRelated Documents
Write working code for the Hirschberg-Sinclair algorithm for leader election using Java RMI/sockets. Each node acts as both client and server for its two neighbours on the logical ring.You need to decide on the details of the algorithm. Examples include: how to set the parameter n, who to choose/assign process ids, how to count the number of messages used 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 you implemented the algorithm in Java RMI or sockets. Justify your choice of RMI or sockets. 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 exact expression for the asymptotic message complexity of the algorithm.For each value ofnyou choose, calculate the average number of messages. Repeat this for various values ofn, e.g., 8, 16, 32, 64, .... Then plot the number of messages as a function ofnin a graph. Do your results validate the theoretical asymptotic message complexity?
Write working code for the Hirschberg-Sinclair algorithm for_1

End of preview

Want to access all the pages? Upload your documents or become a member.

Related Documents
CS193P IPHONE APPLICATION DEVELOPMENT
|7
|1737
|170

CS193P IPHONE APPLICATION DEVELOPMENT
|7
|1737
|58

CS193P IPHONE APPLICATION DEVELOPMENT
|7
|1737
|381

CS193P IPHONE APPLICATION DEVELOPMENT
|7
|1737
|403

CS193P IPHONE APPLICATION DEVELOPMENT
|7
|1737
|136

CS193P IPHONE APPLICATION DEVELOPMENT
|7
|1737
|309