## 3 The Proposed Deep Learning Approach  
In the proposed work, first we divide a task into \(n\) components and then using the partial offloading technique, the UE offloads some of the components to MES and some of the components are executed on UE. However, for a task of size \(m\) there are \({}^{m}\!Z_{n}\) possible partitioning options and \(2^{n}\) possible offloading options, therefore, to find the option with minimum cost, the complexity of the algorithm becomes \(O({}^{m}\!Z_{n}2^{n})\). To avoid this computation overhead and high complexity, we generate a training dataset using our comprehensive mathematical model to find the cost for all \({}^{m}\!Z_{n}2^{n}\) options. In Algorithm 1, we consider all possible partitions (partition matrix, **PR**) and all possible partial offloading policies (offloading policies matrix, **OP**) for a task of size \(m\) with a constant \(\gamma\). We select the option with minimum cost and store its corresponding input data, partitioning option, and offloading policy as a training dataset for different task sizes. To consider the dynamics of the system, we take the input parameters (frequency of UE, tranmiting power of UE, distance between UE and MES, subcarriers, computing resources of MES, number of components, division resolution, and task size) as uniform random distribution for different datasets. This training dataset is used to train the DNN and reduce the complexity to \(O(1)\) of the trained DNN. The trained DNN has the ability to address the dynamics of the system because in the training dataset we consider all the dynamics in the input data parameters. Our proposed technique considers the comprehensive cost function to minimize the energy consumption and service delay, therefore, we name the proposed technique as comprehensive and energy efficient deep-learning-based offloading technique (CEDOT). There are three types of layers in the DNN [44; 45], namely input layer, hidden layer, and output layer. The input layer consists of the information about the size of task, division resolution \((\gamma)\), number of components, distance from MES, available computing resources of MES, and network status, as shown in Algorithm 1. The two hidden layers consist of 100 neurons each. The output layer gives the information about the best option for division \((z^{*})\) and offloading decision for each component represented by \(op^{*}\). The rectified linear unit (ReLU) and Softmax activation functions [46; 47] are used for two hidden layers and an output layer, respectively. The trained DNN is tested on unseen data to calculate the accuracy of the proposed technique. We achieve more than 70% accuracy for different sets of test data. The following benchmark techniques are considered for comparison with CEDOT: (i) Total offloading technique (TOT) [37], (ii) random offloading technique (ROT) [37], (iii) deep learning-based offloading technique (DOT) [37], and (iv) energy efficient deep learning-based offloading technique (EEDOT) [38]. TOT offloads all components to MES without considering other partial offloading options. ROT selects any offloading decision at random. DOT considers all available \(2^{n}\) offloading decisions and train a DNN with the training dataset containing the minimum cost but the energy consumption and component size are ignored in the cost function. EEDOT considers the partial offloading technique with random size of components and does not consider the partitioning in the cost function. None of the above techniques consider the delay and energy consumption of task-division-process in their approaches. Similarly, none of them consider the energy consumption of UE in the cost function. The proposed technique (CEDOT) finds the partitioning and offloading decisions with minimum cost, in terms of service delay and energy consumption, simultaneously, using the trained DNN which is trained on a comprehensive dataset generated from the comprehensive mathematical model.