# TRUST-ME: Trust-Based Resource Allocation and Server Selection in Multi-Access Edge Computing
## 3 Trust-Based Reinforcement-Learning-Enabled MEC Server Selection
### Influencers' Overall Trust  
The users combine their direct trust (Equation (9)) and their indirect trust (Equation (12)) in order to form their overall trust in MEC server \(s\), which is given as follows:  
\[tr_{s,n}=\left\{\begin{array}{ll}\kappa\cdot d\bar{r}_{s,n}+(1-\kappa)itr_{s,n},&\text{if }N_{n,s}\
eq 0\\ 0.5&\text{otherwise}\end{array}\right. \tag{13}\]  
where \(N_{n,s}\) denotes the number of times that MEC server \(s\) has provided services to user \(n\), and the weight factor \(\kappa\) is defined as follows:\[\kappa=\frac{1-\exp(-N_{n,s})}{1+\exp(-N_{n,s})} \tag{14}\]  
The role of the weight factor \(\kappa\) is to balance the impact of the direct and indirect trust into the overall trust score. Higher values of \(\kappa\) give priority to the users' personal experiences, while lower values allow the overall trust score to incorporate broader feedback for comprehensive trust evaluation.  
In our proposed research work, the robustness of the direct and indirect trust metrics against varying network conditions and user behaviors is a critical aspect of the multi-access edge computing (MEC) environment's operation. The direct and indirect trust leverage (1) the users' historical interactions and (2) the collective experiences of other users to evaluate the trustworthiness of the MEC servers. It is noted that the direct trust is influenced by the user's previous interactions with the server, while accounting for the satisfaction (or not) of the user's utility and latency requirements. On the other hand, the indirect trust incorporates the recommendations provided by other socially connected users. By jointly considering the direct and indirect trust, the evaluation of the trust level of each user to the MEC servers is improved, even under scenarios where individual interactions are infrequent or the network conditions fluctuate. The main network conditions that can influence the users' trust are the bandwidth, channel gain conditions, and service load of the MEC servers. Focusing on the bandwidth, if the bandwidth varies, then the users' experienced throughput is affected. However, the direct trust metric takes into account the experienced latency and utility, which can reflect changes due to the bandwidth fluctuations. Focusing on the users' channel gains, which can also vary due to the users' mobility or even due to environmental factors, the direct trust metric adjusts to the channel gain conditions' variations as it incorporates the real-time performance of the MEC server. Focusing on the MEC server's load, which can vary depending on the users' offloaded tasks, the computing capacity allocated to each user can vary and ultimately affect the processing time. The indirect trust metric includes the feedback from other users, who may experience different server loads. Thus, the proposed approach helps in adjusting the trust score based on the server's performance under varying loads. Focusing on the users' behavior, the users who interact infrequently with the MEC servers depend on the input stemming from the indirect trust metric. The indirect trust aggregates the collective experiences of other users and provides a reliable trust score, even with limited direct interactions. For example, new users can trust servers with high indirect trust scores based on the feedback from established users. The indirect trust also accounts for potential malicious behavior by weighing the reliability of the feedback from other users. Specifically, recommendations from users with strong social connections and similar behavior patterns are given more weight, and thus, filter out unreliable or deceptive feedback from potentially malicious users.