1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
|
.\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3
.
.TH "WS" "1" "September 2017" "www.complex-networks.net" "www.complex-networks.net"
.
.SH "NAME"
\fBws\fR \- Create a small\-world graph using the Watts\-Strogatz model
.
.SH "SYNOPSIS"
\fBws\fR \fIN\fR \fIm\fR \fIp\fR [SHOW]
.
.SH "DESCRIPTION"
\fBws\fR creates a small\-world undirected graph with \'N\' nodes using the Watts\-Strogatz small\-world network model\. The nodes are initially placed around a circle and each node is connected to its \'m\' closest neighbours on either side\. Then, each edge is rewired (independently) with probability \'p\'\. The program prints on output the edge\-list of the resulting graph\.
.
.SH "PARAMETERS"
.
.TP
\fIN\fR
Number of nodes in the final graph\.
.
.TP
\fIm\fR
Number of neighbours on the circle graph to which a node is connected on either side (i\.e\., each node will initially have \'2m\' edges)\.
.
.TP
\fIp\fR
Edge rewiring probability\.
.
.TP
SHOW
If the fourth (optional) parameter is equal to \fBSHOW\fR, the program will print on STDERR the number of edges rewired while constructing the graph\.
.
.SH "EXAMPLES"
The command:
.
.IP "" 4
.
.nf
$ ws 100 3 0\.1
0 95
0 2
0 3
1 2
1 24
1 4
2 3
\.\.\.\.
99 0
99 56
99 2
$
.
.fi
.
.IP "" 0
.
.P
creates a Watts\-Strogatz small\-world network with \'N=100\' nodes and \'K=m*N=300\' edges, where each edge is independently rewired with probability \'p=0\.1\'\. The output of \fBws\fR is the edge\-list of the resulting graph\. Notice that in this case the first edge od node \fB0\fR has been rewired and connected to node \fB95\fR\. In order to be useful, such edge\-list should be saved into a file\. The following command:
.
.IP "" 4
.
.nf
$ ws 100 300 0\.1 SHOW > ws_100_3_0\.1\.net
Rewired edges: 32
$
.
.fi
.
.IP "" 0
.
.P
will save the resulting graph in the file \fBws_100_3_0\.1\.net\fR\. Notice the usage of the symbol ">" to redirect the output of the program to a file\. The line printed on output reports the number of rewired edges, since \fBSHOW\fR was specified as a fourth parameter\.
.
.SH "SEE ALSO"
er_A(1), er_B(1)
.
.SH "REFERENCES"
.
.IP "\(bu" 4
D\. J\. Watts and S\. H\. Strogatz\. "Collective dynamics of \'small\-world\' networks"\. Nature 393 (1998), 440–442\.
.
.IP "\(bu" 4
V\. Latora, V\. Nicosia, G\. Russo, "Complex Networks: Principles, Methods and Applications", Chapter 4, Cambridge University Press (2017)
.
.IP "" 0
.
.SH "AUTHORS"
(c) Vincenzo \'KatolaZ\' Nicosia 2009\-2017 \fB<v\.nicosia@qmul\.ac\.uk>\fR\.
|