Create a single Playground module that implements this algorithm. Then, instantiate it many times and arrange the communication pattern in a ring in order to test that it works. You'll need to make some provision for initially assigning each instance a unique identifier. Each process P makes a decision based on its own identifier and the identifiers it has recieved. Now, each active process sends its identifier to its next two active neighbors, clockwise around the ring.
Relay processes simply pass along each message they receive.
Implement this algorithm as a Playground module. Be sure to think about how you will manage sending a message two steps around the ring of active processes. Also, be sure to print out useful messages from the modules in order to demonstrate that your algorithm is working properly. You should be prepared to demonstrate your working application, explain your design and code, and answer questions. Also, be prepared to discuss the message complexities of the two algorithms.