Menu

#898 Underlying algorithm of Watts Strogatz random model

3.5.x
closed-fixed
nobody
None
5
2024-05-14
2024-05-13
No

My understanding of the parameter k of the Watts-Strogatz model is that every node starts by having exactly k neighbors (k/2 on each "side" of a ring structure), resulting in a graph with Nk/2 edges in total. This agrees with the definition published on wikipedia, for instance.
Since the algorithm works by rerouting edges (with porbability p), the number of edges remains unchanged and the resulting graph should have Nk/2 edges. However, when running the import plugin with k = 3 and k = 4 I respectively get graphs having 1200 and 1500 edges just as if the values for k were 8 and 10 respectively.
What am I getting wrong here?
Thanks

Discussion

  • Patrick Mary

    Patrick Mary - 2024-05-14
    • status: open --> closed-fixed
     
  • Patrick Mary

    Patrick Mary - 2024-05-14

    Thanks for your report.
    The algorithm works as you described when the “original” parameter is set to “true”.
    Unfortunately, in this configuration, the check of the parameters is wrong
    N < ln(k) (instead of k >= ln(N))
    which causes an error to be returned, preventing the algorithm from being correctly executed.

    This will be fixed for the next Tulip release.

     
  • Melançon Guy

    Melançon Guy - 2024-05-14

    I see, thanks for looking into this. I overlooked the parameter "original model" so I expected the original model to be executed ... May I suggest to set the default value of the "original model" parameter to true?

     
  • Patrick Mary

    Patrick Mary - 2024-05-14

    Seems to be a good idea.

     

Log in to post a comment.