## 3 Sociocentric and Egocentric Centrality Measures
### Egocentric Centrality Measures  
First of all, the definition of ego-networks is needed in order to understand the concept of egocentric centrality measures. By definition, an ego-network is a local subgraph consisting of a single node (ego) in addition to nodes that are connected to it (alters) and all the interconnection links among alters [5; 6]. Figure 1 highlights a local subgraph where \(n\) represents ego and the one-hop neighbours (1, 2, 3, 4 and 5) denote the alters. Inside the ego-network, the degree centrality of the nodes can be easily computed, as it is the number of direct connections of one node to its immediate neighbourhood. Because of that, it is possible to conclude that the degree centrality is similar to both egocentric and sociocentric network topologies. Incidentally, this same conclusion was reported by [PERSON] and [PERSON] [1]. On the other hand, the closeness centrality measure concerns the geodesic distances from a given node to all other nodes within the network. It is possible to notice that this measure requires the participation of all nodes involved in the network. Thereby, this measure cannot be directly applied in ego-networks, since all geodesic distances from the ego to other nodes are one-hop neighbours by definition, and this holds true because geodesic paths are no greater than two. Among the three measures presented in  
Figure 1: An illustration of the ego-network (local subgraph), where \(n\) represents the ego and the nodes (1, 2, 3, 4 and 5) denote the alters. Section 3.1, the betweenness centrality measure is the most studied in several fields [5; 29]. However, the literature lacks an investigation of this measure on VANETs. The betweenness centrality in ego-networks will be analysed in the remainder of this section. From now on, we are going to call it the egocentric betweenness measure (EBM). The definition and how it is computed are presented below. **Definition 2**. : _Once again, let an undirected graph \(G=(V,E)\) where \(V\) corresponds to a set of nodes (\(v\)) and \(E\) corresponds to a set of edges (\(e\), where \(e\in E\subseteq V\times V\) is identified by a pair of nodes). The neighbourhoods of the node \(v^{\prime}\) are expressed as set of nodes \(v\in V\) reachable in \(r\) hops. Let \(N_{n}^{r}\) be the set of nodes that is \(r\) hops away from \(n\) (ego), i.e., \(N_{n}^{r}=\{v^{\prime}\in V|v^{\prime}\
eq n\wedge 1\leq d(n,v^{\prime}) \leq r\}\), where \(d(n,v^{\prime})\) denotes one hop between \(n\) and \(v^{\prime}\). Thereby, the first-order of node \(n\) consists of an undirected graph \(G=(V_{n}^{1},E_{n}^{1})\), where the set of nodes corresponds to \(V_{n}^{1}=\{N_{n}^{1}\cup\{n\}\}\) and the set of edges corresponds to \(E_{n}^{1}=\{(i,j)\in E_{n}^{1}|i,j\in V_{n}^{1}\}\)._  
The EBM of a certain node, \(n\), can be calculated by the sum of reciprocal values of the \(A_{n}^{2}[1-A_{n}]_{i,j}\), as defined in Equation (4) [6]. \[EBM_{(n)}=\sum_{A_{n}(i,j)\
eq 0,i<j}\frac{1}{A_{n}^{2}[1-A_{n}]_{i,j}} \tag{4}\]  
where \(A_{n}\) depicts the adjacency matrix of the node \(n\), \(1\) is a matrix of all ones and the matrix \(A_{n}^{2}\) provides the number of geodesic distances of a length of two between node pairs \(i\) and \(j\). Mathematically, an adjacency matrix (\(A_{k\times k}\)) can represent node-to-node inter-communication links, where \(k\) is the number one-hop neighbours. Thereby, each element of the adjacency matrix, \(a_{i,j}\), is given by:  
\[a_{ij}= \begin{cases}1&\text{if a direct link exists between $i$ and $j$}\\ 0&\text{otherwise}\end{cases} \]  
To demonstrate the calculation of the egocentric betweenness measure using the adjacent matrix, we employed a classical graph example [5]; see Figure 2.  
Just to give one example, the egocentric betweenness score from the perspective of node \(W4\) of Figure 2 is computed. The following adjacency matrix describes a view of all connection links between \(W4\) (ego) and its alters, as well as the connection links between the alter pairs. Figure 2: A classical graph example [5].