Skip to content

How the Program Works

Hasan Heydari edited this page Jun 3, 2018 · 4 revisions

Luby's algorithm consists of a while loop.

lubysalgorithm

The while loop of Luby's algorithm is implemented with a while loop in Run method of MisAlgorithm class.

runmethod

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.

round1

In Round2 method, the node receives the generated random numbers of neighbors and find the maximum of them.

round2

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

round3

Clone this wiki locally