1 Function next_popular_vertex (N, Step,Exclude_destinations[ ]) │ // This function returns the identifier id of a vertex │ // the vertex not included in the vector Exclude_destinations[0::Step - 1] if Step > 0 │ // This identifier is a random value smaller than N and │ // it is generated with probability: 2 │ id ß prob_rand(N; Prob;Exclude_destinations[ ]). 3 └ return id // N is the total amount of Vertices in the community 4 Function Generator (N, Length_paths, Total_paths) │ // This function defines the edges and weights of a single community 5 │ for Source = 0 à N do 6 │ │ for Destination = 0 à N do 7 │ │ │ edge_weight[Source][Destination] ß 0 8 │ for X = 0 à Total_paths do 9 │ │ for Step = 0 à Length_paths do 10 │ │ │ if Step == 0 then 11 │ │ │ └ Path[Step] ß next_popular_vertex(N, Step, Ø) 12 │ │ │ else if Step > 0 then 13 │ │ │ │ Path[Step] ß next_popular_vertex(N; Step; Path[ ]) 14 │ │ │ │ Previous_v ß Path[Step - 1] 15 │ │ │ │ Current_v ß Path[Step] 16 └ └ └ └ edge_weight[Previous_v][Current_v]+=1=(2^Step) |