## 3 Social Relationship Measurement
### Distributed Computing for Social Relationships  
In MONs, each node has an encounter table to record encounter events. Consequently, based on Equation (2), each node can use its own encounter table to calculate the ExSR with other nodes. When two nodes encounter each other, they will exchange their encounter table. With the exchange of encounter tables, the ExSR between two nodes can be calculated based on the information of their direct contacts, and each node can update its circles of friends with other nodes based on the following distributed computing method. In order to collect common friends with other nodes, each node maintains a common friend table. According to the information in the common friend table, each node can calculate the ImSRs with other nodes. With the Figure 1b as an example, the distributed computing method for ImSRs can be described as follows. It is supposed that nodes \(A\), \(B\) and \(C\) have the encounter tables shown in Figure 3, which are used for information exchange with \(D\); thus, \(D\)'s information is removed from these tables. Then, nodes \(A\), \(B\) and \(C\) are going to encounter node \(D\) one by one. As mentioned above, each node has a common friend table storing the information of common friends with other nodes. When node \(A\) encountered \(D\), they exchanged the encounter tables with each other, and node \(D\) got the encounter table of \(A\), which is shown in Figure 3a. Because \(D\) and \(A\) have encountered each other, \(A\) becomes one of \(D\)'s friends. From \(A\)'s encounter table, based on  
Figure 3: Encounter tables of nodes \(A\), \(B\) and \(C\). the symmetry of encounter events, \(A\) is the friend of \(B\), \(C\) and \(E\), and nodes \(B\), \(C\) and \(E\) have 10, 10, and 10 encounters with node \(A\), respectively. Consequently, we can deduce that node \(A\) is one of the common friends of nodes \(D\), \(B\), \(C\) and \(E\). Therefore, after an encounter with node \(A\), node \(D\) has the common friend table shown in Figure 3(a). The first tuple (\(A\), 10) in Figure 3(a) means that nodes \(D\) and \(B\) have a common friend \(A\), and the value 10 denotes the encounter times between \(B\) and \(A\). It should be mentioned that the encounter times between \(D\) and \(A\) can be obtained from \(D\)'s encounter table. Similarly, after encountering \(B\) and \(C\), node \(D\) had the common friend table shown in Figure 3(b,c) respectively. As shown in Figure 3(c), after encountering \(A\), \(B\) and \(C\), \(D\) finds that it has \(A\), \(B\) and \(C\) as common friends with \(E\), and \(E\) has encounters 10 times with each of \(A\), \(B\) and \(C\), which are marked as (\(A\), 10), (\(B\), 10) and (\(C\), 10) in the table item of node \(E\). From Figure 0(b), \(D\) has encounters with each of \(A\), \(B\) and \(C\) eight times. Based on Equations (1) to (7) with \(\mu=40\), the social relationship between \(D\) and \(E\) (\(S_{DE}\)) can be calculated as follows. When node \(D\) encounters \(A\), \(B\) and \(C\), \(D\) can get their encounter tables as shown in Figure 3, and \(D\) can find that each of \(A\), \(B\) and \(C\) has direct contact with other nodes 30 times. From Figure 0(b) (from its own encounter table), node \(D\) has direct contact with other nodes 24 times. Therefore, we can get \(f_{D}=28.5\), and \(W_{D}^{E}(t)=0.7125\), and  
\[f_{D}=\frac{24+30+30+30}{4}=28.5,\]  
\[W_{D}^{E}(t)=\frac{min(28.5A0)}{40}=0.7125,\]  
\[S_{DE}=0.7125\times E_{DE}+(1-0.7125)\times H_{DE}\] \[\quad=0.7125\times\frac{min(40,\,0)}{40}+0.2875\times\frac{min(40, \,0)}{40}+0.2875\times\frac{min(40,\,10)+min(8,\,10)+min(8,\,10)]}{40}\] \[\quad=0.7125\times 0+0.2875\times 0.6\]  
The distributed exchange of node information may raise some privacy and security concerns. If the information is exchanged between nodes in plain text, the nodes can acquire their neighbors' situations about the most encountered nodes, which are sometimes private for the related mobile device carriers.