summaryrefslogtreecommitdiff
path: root/doc/betweenness.1
blob: d16ef9e9f0953293f1be65b08e52a1d5c1e8972e (plain)
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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
.\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3
.
.TH "BETWEENNESS" "1" "September 2017" "www.complex-networks.net" "www.complex-networks.net"
.
.SH "NAME"
\fBbetweenness\fR \- Compute the betweenness centrality of nodes and edges
.
.SH "SYNOPSIS"
\fBbetweenness\fR \fIgraph_in\fR [ SEQ \fInode_start\fR [\fInode_end\fR]]
.
.P
\fBbetweenness\fR \fIgraph_in\fR [ RND \fInum\fR]
.
.SH "DESCRIPTION"
\fBbetweenness\fR computes the betweenness centrality of all the nodes and edges of an undirected graph provided as input\. The program implements the algorithm by U\. Brandes, and computes the betweenness using all the shortest paths originating from a subset of the nodes of the graph, either in a sequence (if \fISEQ\fR is the second parameter) or sampled unirofmly at random (if \fIRND\fR is the second parameter)\. If \fIgraph_in\fR is the only parameter, \fBbetweenness\fR takes into account all the shortest paths\.
.
.SH "PARAMETERS"
.
.TP
\fIgraph_in\fR
input graph (edge list) if equal to \fB\-\fR (dash), read the edge list from STDIN\.
.
.TP
\fInode_start\fR
The label of the first node in a sequence of nodes (when \fISEQ\fR is the second parameter)\.
.
.TP
\fInode_end\fR
The label of the last node in a sequence of nodes (when \fISEQ\fR is the second parameter)\.
.
.TP
\fInum\fR
The number of nodes to be considered (when \fIRND\fR is the second parameter)
.
.SH "OUTPUT"
\fBbetweenness\fR prints on the standard output (STDOUT) the betweenness centrality of all the nodes, starting from the node with label 0, and on the standard error (STDERR) the betweenness centrality of all the edges, one edge per line, in the format:
.
.IP "" 4
.
.nf

node1 node2 bet_score
.
.fi
.
.IP "" 0
.
.SH "EXAMPLES"
The following command:
.
.IP "" 4
.
.nf

      $ betweenness er_1000_5000\.txt >node_bet 2>edge_bet
.
.fi
.
.IP "" 0
.
.P
computes the node and edge betweenness centrality of the graph \fBer_1000_5000\.txt\fR, using all the shortest paths\. Since we used the redirections \fB>node_bet\fR and \fB2>edge_bet\fR, the values of node and edge betweenness will be saved in the files \fBnode_bet\fR and \fBedge_bet\fR, respectively\.
.
.P
The command:
.
.IP "" 4
.
.nf

    $ betweenness er_1000_5000\.txt SEQ 100 200  2>edge_bet_100_200
.
.fi
.
.IP "" 0
.
.P
will compute the betweenness of nodes and edges in the graph \fBer_1000_5000\.txt\fR, based only on the shortest paths originating from the nodes whose labels are in the range [100,200]\. The node betweenness will be printed on STDOUT, while the edge betweenness will be saved in the file \fBedge_bet_100_200\fR\.
.
.P
Finally, the command:
.
.IP "" 4
.
.nf

    $ betweenness er_1000_5000\.txt RND 250 >node_bet_RND
.
.fi
.
.IP "" 0
.
.P
will compute the betweenness centrality based on the shortest paths originating from 250 nodes in the graph, sampled uniformly at random\. The node betweenness is saved in the file \fBnode_bet_RND\fR, while the values of edge betweenness are printed on STDOUT\.
.
.SH "SEE ALSO"
bet_dependency(1), shortest(1)
.
.SH "REFERENCES"
.
.IP "\(bu" 4
U\. Brandes\. "A Faster Algorithm for Betweenness Centrality"\. J\. Math\. Sociol\. 25 (2001), 163\-177\.
.
.IP "\(bu" 4
V\. Latora, V\. Nicosia, G\. Russo, "Complex Networks: Principles, Methods and Applications", Chapter 6, Cambridge University Press (2017)
.
.IP "\(bu" 4
V\. Latora, V\. Nicosia, G\. Russo, "Complex Networks: Principles, Methods and Applications", Appendix 7, Cambridge University Press (2017)
.
.IP "" 0
.
.SH "AUTHORS"
(c) Vincenzo \'KatolaZ\' Nicosia 2009\-2017 \fB<v\.nicosia@qmul\.ac\.uk>\fR\.