-
Notifications
You must be signed in to change notification settings - Fork 1
How the Program Works
Hasan Heydari edited this page Jun 3, 2018
·
4 revisions
Luby's algorithm consists of a while loop.
The while loop of Luby's algorithm is implemented with a while loop in Run method of MisAlgorithm class.
The while loop calls six methods- Round1, Round2, ..., and Round6. In Round1 method, the node generates a random number and sends it to all of its neighbors.
In Round2 method, the node receives the generated random numbers of neighbors and find the maximum of them.
In Round3 method, if the random number of the node is greater than all of the neighbors' random numbers, the status of the node changes to Mis