Skip to main content
. 2021 Apr 21;23(5):497. doi: 10.3390/e23050497
Algorithm 1: LPA.
Input:G=(V,E)
Output: The result of community detection
  • 1:

    Initializaion: assign a unique label to each node in the network, Cx(0)=x

  • 2:

    Set t=1

  • 3:

    Arrange nodes in random order and set it to X.

  • 4:

    Select each node x in the X sequentially and update its label according to the following function, Cx(t)=f(Cxi1(t),,Cxim(t),Cxi(m+1)(t1),,Cxik(t1)), where xi1,,xim are the neighbors that have been updated before time t, and xi(m+1),,xik are the neighbors that have not been updated before time t.

  • 5:

    If the label in network no longer changes, stop the algorithm, else set t=t+1 and go to step 3.