## 4 Fuzzy Logic Based Collaborative Task Offloading
### Fuzzification
#### 4.1.1 Membership Functions  
For effective collaboration among SBS-MEC servers, we must choose the significant input variables. In this study, we defined five variables: task size, delay sensitivity of task, local SBS-MEC VM utilization, network delay, and neighboring SBS-MEC VM utilization, as given below:  
\[\Omega=[\alpha,\beta,\gamma,\delta,\theta],\Omega\in\Upsilon^{t} \tag{6}\]  
where \(\alpha\) is the volume of input task size, which directly effects the task execution time; \(\beta\) represents the related task's delay sensitivity, which decides whether the offloaded task is either a latency-sensitive or a delay-tolerant task. \(\gamma\) indicates the local SBS-MEC server VM utilization and provides the information about the resource computing capacity of the local SBS-MEC server. If the SBS-MEC server is least loaded, then it is beneficial to offload the task to the local SBS-MEC server. \(\delta\) represents the network delay, and it is a significant bottleneck of the system. When the network delay is high or congested due to the excessive number of user requests, it is convenient to offload the task to local SBS-MEC server rather than the neighboring SBS-MEC server. In this study, network delay is observed through a single SBS-MEC server queue with the Markov Modulated process in Poisson fashion (MMPP) [56]. \(\theta\) is the neighboring SBS-MEC \begin{table}
\begin{tabular}{c c c} \hline \hline
**Offloading Decision** & **Membership Function** & **Ranges** \\ \hline Local Edge & Triangular & 0–60 \\ Neighboring Edge & Triangular & 40–100 \\ \hline \hline \end{tabular}
\end{table} 
Table 4: Fuzzification of output. \begin{table}
\begin{tabular}{c c c c c} \hline \hline
**Fuzzification** & **Variables** & **Fuzzy Set** & **Membership Function** & **Ranges** \\ \hline Task Size (GI) & \(\alpha\) & Small & L-R open shoulder & 0–8 \\  & \(\alpha\) & Medium & Triangular & 6–18 \\  & & Large & L-R open shoulder & 16–50 \\  & & Low & L-R open shoulder & 0–0.4 \\ Delay Sensitivity of Task (\%) & \(\beta\) & Medium & Triangular & 0.3–0.7 \\  & & High & L-R open shoulder & 0.6–1.0 \\  & & Light & L-R open shoulder & 0–40 \\ Local SBS-MEC VM Utilization (\%) & \(\gamma\) & Normal & Triangular & 30–70 \\  & & Heavy & L-R open shoulder & 60–100 \\  & & Short & L-R open shoulder & 0–4 \\ Network Delay (ms) & \(\delta\) & Medium & Triangular & 2–12 \\  & & Large & L-R open shoulder & 10–100 \\  & & Light & L-R open shoulder & 0–40 \\ Neighboring SBS-MEC VM Utilization(\%) & \(\theta\) & Normal & Triangular & 30–70 \\  & & Heavy & L-R open shoulder & 60–100 \\ \hline \hline \end{tabular}
\end{table} 
Table 3: Fuzzification of input variables. server utilization. In densely deployed SBS-MEC server environments, it is not a good decision to always offload the task to the local SBS-MEC server. If network delay is not congested and local SBS-MEC server is heavily loaded, offloading the task to the neighboring SBS-MEC server is advantageous. In Table 3, according to membership and its ranges, we can model them into membership functions. Membership function (MF) can be mathematically characterized by using Equation (7), where each element of \(\chi\) is within the range of 0 and 1. \(A\) is the fuzzy set which is described using Equation (8):  
\[\xi_{A}(\chi):\chi\rightarrow[0,1],\ \ \forall\chi\in X \tag{7}\]  
\[A=\{(\chi,\ \xi_{A}(\chi)):\chi\in X\} \tag{8}\]  
Moreover, membership functions allow us to depict a fuzzy set graphically. Membership function, \(\xi_{A}(\chi)\), is presented by a different function, such as triangular, Gaussian, left-right open shoulder, piece-wise linear, or singleton [57]. According to the information in Table 3, our model can use the triangular and left-right open shoulder membership function. These functions are given as:  
\[\xi_{A}^{triangular}(\chi)= \begin{cases}0&;\ \ \ if\ \ \chi\leqslant p\\ \frac{\chi-p}{m-p}&;\ \ \ if\ \ p<\chi\leqslant m\\ \frac{q-\chi}{q-m}&;\ \ \ if\ \ m<\chi\leqslant q\\ 0&;\ \ \ if\ \ \chi\geq q\end{cases}  \tag{9}\]  
\[\xi_{A}^{left}(\chi)=