# TRUST-ME: Trust-Based Resource Allocation and Server Selection in Multi-Access Edge Computing
## 3 Trust-Based Reinforcement-Learning-Enabled MEC Server Selection
### Influuencers' Indirect Trust  
In an edge computing environment, the users establish a variety of social connections, which are represented as \(\mathcal{C}=\{1,\ldots,c,\ldots,C\}\) and include friendships, familial bonds, and acquaintances with strangers. The strength of the social connection \(c\) between any two users is indicated by \(\eta_{c}\), where \(\eta_{c}>0\) for all \(c\in\mathcal{C}\). The relationship vector between user \(n\) and user \(n^{\prime}\) is denoted by \(\boldsymbol{\Lambda}_{n,n^{\prime}}=\{\Lambda_{n,n^{\prime},1},\ldots,\Lambda _{n,n^{\prime},c},\ldots,\Lambda_{n,n^{\prime},c}\}\). If \(\Lambda_{n,n^{\prime},c}=1\), it means that the users \(n\) and \(n^{\prime}\) have a relationship of type \(c\); otherwise, \(\Lambda_{n,n^{\prime},c}=0\). For a user \(n\), the trustworthiness of MEC server \(s\) is influenced by recommendations from other users with whom the user has several social connections. Generally, the users who are reliable provide truthful recommendations, while the users with malicious intent provide deceptive feedback. The reliability factor \(r_{n,n^{\prime}}\) serves as a weight for these recommendations provided by other users \(n^{\prime}\) to user \(n\), which reflects how trustworthy the other users' feedback is. This factor is based on both the degree of their social relationship and the similarity between user \(n\) and user \(n^{\prime}\), which is calculated as follows:  
\[rl_{n,n^{\prime}}=\frac{\eta_{c}\cdot\Lambda_{n,n^{\prime},c}\cdot SIM_{n,n^{ \prime}}}{\max\limits_{c\in C}\eta_{c}} \tag{10}\]  
Let SIM\({}_{n,n^{\prime}}\) denote the similarity score between the users \(n\) and \(n^{\prime}\). To standardize these scores, we used the normalization factor \(\max\limits_{c\in C}\eta_{c}\). In general, the users with more similar ratings will have a higher similarity score, which is calculated using the Pearson correlation coefficient. This coefficient measures the degree of similarity between the users \(n\) and \(n^{\prime}\) by analyzing their ratings on the MEC servers that they both have been served from. The similarity score is given by  
\[SIM_{n,n^{\prime}}=\frac{\sum\limits_{s\in S_{n,n^{\prime}}}(r_{s,n}-\bar{r}_{ n})(r_{s,n^{\prime}}-\bar{r}_{n^{\prime}})}{\sqrt{\sum\limits_{s\in S_{n,n^{ \prime}}}(r_{s,n}-\bar{r}_{n^{\prime}})^{2}}\sqrt{\sum\limits_{s\in S_{n,n^{ \prime}}}(r_{s,n^{\prime}}-\bar{r}_{n^{\prime}})^{2}}} \tag{11}\]  
where \(\bar{r}_{n}\) and \(\bar{r}_{n^{\prime}}\) represent the average ratings given by user \(n\) and user \(n^{\prime}\), respectively. The set \(\mathcal{S}_{n,n^{\prime}}\) includes all the MEC servers that have provided computing services to both users \(n\) and \(n^{\prime}\). From this analysis, the indirect trust \(itr_{s,n}\) can be expressed as follows:  
\[itr_{s,n}=\frac{\sum\limits_{n,n^{\prime}\in\mathcal{N}_{s},n\
eq n^{\prime}}rl _{n,n^{\prime}}\cdot d\bar{r}_{s,n^{\prime}}}{\sum\limits_{n,n^{\prime}\in \mathcal{N}_{s},n\
eq n^{\prime}}rl_{n,n^{\prime}}} \tag{12}\]  
where \(\mathcal{N}_{s}\) denotes the set of users being served by MEC server \(s\). Different types of social connections, such as friendships and familial bonds, can significantly impact the strength of the social connection \(\eta_{c}\) of the indirect trust in an MEC environment. Friendships often imply a higher degree of trust and regular interaction. Recommendations from friends are typically considered reliable because friends are likely to share similar standards and expectations regarding service quality. Friends often interact frequently, which means they have a richer history of shared experiences with MEC servers. This historical data enhances the accuracy of the trust metric, as the feedback is based on multiple interactions over time. Familial bonds are usually the strongest social connections. Recommendations from family members are highly reliable because the family members generally prioritize each other's best interests and provide honest feedback.