*5.4. Comparison between the Optimal IoT Device Pairing and the Random Pairing*

Figure 7 shows the average energy outage probabilities of the EE-CCA when pairing IoT devices based on the optimization problem (denoted by OPTIMAL) and pairing IoT devices randomly (denoted by RAND) as a function of the number of IoT devices. As shown in Figure 7, the average energy outage probability of OPTIMAL decreases as the number of IoT devices increases. This can be explained as follows: a large number of IoT devices means that there are lots of candidate IoT devices to be matched to a specific IoT device. In this situation, each IoT device can be paired to more appropriate IoT device. For example, an energy-scarce IoT device can be paired to more energy-abundant IoT device. On the other hand, since IoT devices are paired randomly in RAND regardless of the number of IoT devices, its energy outage probability is not affected by that number.

**Figure 7.** Comparison between the optimal pairing and random pairing.

#### **6. Conclusions**

In this paper, we proposed an energy efficient cooperative computation algorithm (EE-CCA), in which a pair of IoT devices decide whether to offload some parts of the task to the opponent with the consideration of their energy harvesting probabilities, task occurrence rates, and current energy levels. The optimal offloading decision can be obtained by means of a constraint Markov decision process (CMDP). Moreover, an optimization problem for IoT device pairing is formulated under the optimal offloading strategy. The evaluation results demonstrate that the EE-CCA offloads tasks appropriately, and thus the energy outage probability can be reduced by up to 78% compared to the random offloading scheme while providing the desired probability that tasks are completed before the deadline. Moreover, it can be seen that the EE-CCA operates adaptively even when the operating environment (e.g., inter-task occurrence rate) is changed. In our future works, we will investigate an incentive mechanism to encourage IoT devices to process tasks. In addition, a study for the robustness of the proposed algorithm will be conducted for supporting heterogeneous functionality of IoT devices.

**Author Contributions:** Conceptualization, H.K. and S.P.; methodology, S.J. and J.K.; software, J.L.; validation, H.K., S.J., J.K., and J.L.; investigation, S.P.; writing, original draft preparation, H.K.; review and editing, S.J., J.K., J.L., and S.P.; visualization, H.K.; supervision, S.P.

**Funding:** This research was supported by the National Research Foundation (NRF) of Korea Grant funded by the Korean Government (MSIP) (No. 2019R1C1C1004352).

**Acknowledgments:** The authors are grateful to the anonymous reviewers for their comments and valuable suggestions.

**Conflicts of Interest:** The authors declare no conflict of interest.
