## 5 Simulation Result and Discussion  
### Simulation Based on User Device Computing Capacity  
The computing capacities of the user device within 10, 20, 30, 40, 50, 60, 70, 80, 90, and 100 MHz are taken for the experiment. For the performance metric used in the result, we consider only the total latency in seconds and the total cost for explanation. However, for easy understanding, the result of total latency is converted to millisecond mapping to meet the time constraints of IoT applications. In total cost, the value comes from total latency in seconds and total energy in j. That is why there is a big range between latency and cost value. In Figure 3 on the left side, we compare the performance of total latency on average in terms of the user device computing capacity. In numerical results, the proposed approach incorporates a blend of local computing and offloading to an edge server, yielding the following total latency values in milliseconds for each level of computing capacity of the user devices: 32.42, 17.22, 12.15, 9.62, 8.10, 7.09, 6.36, 5.82, 5.40, and 5.06. These findings demonstrate that as the computing capacity of the user device increases, the total latency decreases, indicating the effectiveness of the proposed approach in latency reduction. In comparison to the proposed approach, the conventional scheme comprises three methods: Greedy Latency, Load Balancing, and Random Offloading. Greedy Latency has a total latency in ms of 35.14, 25.54, 22.34, 20.74, 19.78, 19.14, 18.68, 18.34, 18.07, and 17.86 according to the computing capacity of the user device of 10, 20, 30, 40, 50, 60, 70, 80, 90, and 100 MHz, respectively. Load Balancing can obtain a total latency of 35.54, 26.74, 23.81, 22.34, 21.46, 20.88, 20.46, 20.14, 19.90, and 19.70 according to the computing capacity of the user device of 10, 20, 30, 40, 50, 60, 70, 80, 90, and 100 MHz, respectively. Finally, Random Offloading is less efficient than other approaches, with a total latency of 36.46, 28.46, 25.79, 24.46, 23.66, 23.13, 22.75, 22.46, 22.24, and 22.06 according to the computing capacity of the user device of 10, 20, 30, 40, 50, 60, 70, 80, 90, and 100 MHz, respectively. If we compare the performance of total latency on average in terms of the user device computing capacity, when the computing capacity of the user device increases from 10 MHz to 100 MHz, the total latency of our proposed approach is 97.46% better than that of Greedy Latency, 111.51% better than that of Load Balancing, and 130.28% better than that of Random Offloading. Overall, the proposed approach outperforms all three conventional schemes in terms of latency reduction, and as the computing capacity of the user device increases, the proposed approach's latency reduction becomes even better. In Figure 3 on the right side, we compare the performance of total cost on average in terms of the user device computing capacity. The proposed approach results in the lowest cost compared to other schemes. The Lagrange scheme can compute the total cost of 0.0328, 0.0177, 0.0128, 0.0105, 0.0093, 0.0086, 0.0083, 0.0082, 0.0083, and 0.0085 based on  
Figure 3: Total latency and cost based on different UE capacities. user device computing capacity ranging from 10, 20, 30, 40, 50, 60, 70, 80, 90, to 100 MHz, respectively. The Lagrange scheme's total cost is based on user device computing capacities ranging from 10 MHz to 100 MHz, with the total cost decreasing from 0.0328 to 0.0085 as the device's computing capacity increases. The Greedy Latency scheme can also provide a low cost following the proposed approach, with total costs of 0.0386, 0.0290, 0.0259, 0.0245, 0.0237, 0.0233, 0.0230, 0.0230, 0.0231, and 0.0232 based on user device computing capacities ranging from 10 MHz to 100 MHz, respectively. The Greedy Latency scheme's total cost also decreases as the device computing capacity increases, ranging from 0.0386 to 0.0232.