# NB-IoT for D2D-Enhanced Content Uploading with Social Trustworthiness in 5G Systems
## 5 The Social-Aware Trust Model
Therefore, we assume that the eNodeB will associate the outcome value \(\delta_{d}\) to the node \(j\) that was entrusted by node \(i\) as relay/gateway forming a D2D link \(i\to j\). At time instant \(t=0\) the only information the interested devices can exploit for judging the _player reliability_ is _social player reliability_\((spr_{i,j})\) which is set according to predefined values (see Table 1). If two communicating entities are tied by two or more types of relationships, the strongest tie with the highest factor has to be considered [25]. At subsequent time instants \(t>0\), the results of cooperative interactions can be used to determine the player reliability \(pr_{i,j}^{t}\) with \(j\) acting as relay/gateway for data sent by \(i\). In particular, we define with \(\Delta_{i,j}^{t}=\{\delta_{1},\ldots,\delta_{d}\ldots\delta_{D}\}\) the set of past interactions registered until time \(t\), where the generic \(\delta_{d}\in[0,1]\in\mathbb{R}\) is equal to the total percentage of data that has been successfully forwarded by node \(j\) and reached the eNodeB. Summarizing, we define the player reliability \(pr_{i,j}^{t}\) as follows:  
\[pr_{i,j}^{t}= \begin{cases}spr_{i,j}&t=0\\ \alpha\cdot spr_{i,j}+(1-\alpha)\cdot\frac{\sum_{d\in\Delta_{i,j}^{t}}\delta_{ d}}{|\Delta_{i,j}^{t}|}&t>0\end{cases}  \tag{2}\]  
where \(\alpha\in[0,1]\) is a weighting factor to give more or less importance to the initial sociality relationship between the nodes. The other parameter that is being updated after each cooperative interaction is the player _reputation_ which is based on the opinions of the community in the network. If, for instance, a player \(i\) asks the opinion about player \(j\) to the community, it will receive an opinion from a set of players in the network. Let us say this set of players is \(\mathcal{K}\subseteq\mathcal{N}\backslash\{i\}\), where \(\mathcal{N}\) is the total set of devices in the network. The opinion player \(k\) will provide is its own measure of trust about player \(j\) at time instant \(t\), namely \(pt_{k,j}^{t}\). To best weigh the opinions received from the other players, a confidence factor called _recommendation reliability_\((rr_{i,k})\) is used. In our proposed model this is set according to the social relationship between the involved devices as reported in Table 1. Note that we assumed the _recommendation reliability_ to have a lower value with respect to _social player reliability_ in general. The motivation for this is that the recommendation received by a socially related device may be influenced by the outcome of past cooperative iterations which affected the ability to provide an objective recommendation. Given the collected information, the _player reputation_ at time \(t\) is computed as follows:  
\[pp_{i,j}^{t}=\frac{\sum\limits_{k\in\mathcal{K}}rr_{i,k}\cdot pt_{k,j}^{t}}{ \sum\limits_{k\in\mathcal{K}}rr_{i,k}} \tag{3}\]  
Player \(i\) can then determine the player trust value \(pt_{i,j}^{t}\) it associates to player \(j\) at time instant \(t\), as a combination of the player reliability \((pr_{i,j}^{t})\) and the player reputation \((pp_{i,j}^{t})\) weighted by a real coefficient \(\beta\) ranging in \([0,1]\in\mathbb{R}\):  
\[pt_{i,j}^{t}= \begin{cases}0.5&t=0\\ \beta\cdot pr_{i,j}^{t}+(1-\beta)\cdot pp_{i,j}^{t}&t>0\end{cases}  \tag{4}\]  
The choice to set the initial trust value to 0.5 is caused by _whitewashing strategies_ where a malicious adviser can whitewash its low trustworthiness starting a new account with the initial trustworthiness value.