Decision making algorithm implemented.
Supposed all nodes are loyal, and all messages are delivered.