## 5 Conclusions  
In the era of IoT, how to improve the quality of service in IoT networks becomes a challenging problem. Since conventional cloud computing architectures do not meet the requirements of the IoT applications, edge computing and fog computing have attracted increasing attention from the industrial and academic sectors in recent years. Although evolutionary algorithms can solve the task assignment problem with hundreds of tasks in the cloud-fog system, the quality of the obtained solution cannot be guaranteed. This study developed a linearization method to solve the nonlinear task assignment problem. Therefore, the global optimality of the obtained solution can be guaranteed by using the proposed deterministic optimization approach. This proposed method can allocate tasks to different cloud nodes or fog nodes based on the requirements of the tasks, the processing speed of nodes, and the resource usage cost of nodes in a cloud-fog system.  
Although the deterministic method can find a global optimum, the limitation of the proposed approach is that the computational complexity grows rapidly as the problem size increases. More investigation and research will be required to develop an efficient approach for solving the task assignment problem in a cloud-fog system.  
Conceptualization, M.-H.L., J.-F.T., and C.-H.H.; methodology, M.-H.L.; software, M.-H.L.; validation, J.-F.T. and M.-H.L.; formal analysis, J.-F.T.; investigation, J.-F.T. and C.-H.H.; resources, M.-H.L. and C.-H.H.; data curation, M.-H.L.; writing--original draft preparation, M.-H.L.; writing--review and editing, M.-H.L., C.-H.H. and J.-F.T.; visualization, M.-H.L.; supervision, [PERSON]-[PERSON] and [PERSON]-[PERSON]; project administration, M.-H.L. and [PERSON]-F.T.; and funding acquisition, M.-H.L. All authors have read and agreed to the published version of the manuscript.  
This research was supported in part by the Ministry of Science and Technology in Taiwan under Grants MOST 108-2410-H-027-018, MOST 109-2410-H-027-012-MY2 and MOST 108-2410-H-845-028.  
**Institutional Review Board Statement:** Not applicable.  
\begin{table}
\begin{tabular}{c c c c c c c c c c} \hline \hline
**Case No.** & **10** & **11** & **12** & **13** & **14** & **15** & **16** & **17** & **18** \\ \hline Number of cloud nodes & 5 & 5 & 5 & 5 & 5 & 5 & 5 & 5 & 5 \\ Number of fog nodes & 12 & 12 & 12 & 12 & 12 & 12 & 12 & 12 & 12 \\ Number of tasks & 10 & 15 & 20 & 25 & 30 & 35 & 40 & 45 & 50 \\ Number of 0-1 variables & 170 & 255 & 340 & 425 & 510 & 595 & 680 & 765 & 850 \\ Number of continuous variables & 19 & 19 & 19 & 19 & 19 & 19 & 19 & 19 & 19 \\ Number of constraints & 45 & 50 & 55 & 60 & 65 & 70 & 75 & 80 & 85 \\ Average _Timespan_ (sec) & 48.9281 & 46.6694 & 59.0551 & 81.3217 & 101.6427 & 124.4561 & 141.8461 & 166.3881 & 214.1368 \\ Average _Total\_Cost_ & 142.4031 & 239.3706 & 239.2414 & 354.4158 & 442.8219 & 535.4207 & 596.2381 & 691.7541 & 760.2561 \\ Average CPU time & 0.3900 & 1.3135 & 12.6975 & 83.7108 & 149.1998 & 453.4950 & 665.6732 & 721.8558 & 844.8545 \\ \hline \hline \end{tabular}
\end{table}
Table 4: Experimental results of the proposed method for 5 cloud nodes and 12 fog nodes (dataset 2).  
\begin{table}
\begin{tabular}{c c c c c c c c c} \hline \hline
**Case No.** & **19** & **20** & **21** & **22** & **23** & **24** & **25** & **26** & **27** \\ \hline Number of cloud nodes & 7 & 7 & 7 & 7 & 7 & 7 & 7 & 7 \\ Number of fog nodes & 14 & 14 & 14 & 14 & 14 & 14 & 14 & 14 & 14 \\ Number of tasks & 10 & 15 & 20 & 25 & 30 & 35 & 40 & 45 & 50 \\ Number of 0-1 variables & 210 & 315 & 420 & 525 & 630 & 735 & 840 & 945 & 1050 \\ Number of continuous variables & 23 & 23 & 23 & 23 & 23 & 23 & 23 & 23 & 23 \\ Number of constraints & 53 & 58 & 63