## 2 System Architecture and Problem Formulation
### Problem Formulation  
Given the inherent trade-off between energy consumption and latency, this study delves into the network's energy consumption and latency dynamics by analyzing task-offloading strategies. It aims to discern whether individual tasks best suit local or remote computation. The ensuing discourse will explore the formulas quantifying energy consumption and latency for local and remote computation scenarios. These formulas will be tailored to the architecture of the j-th smart device within the m-th zone, as depicted in Figure 4, defining pertinent parameters. First, we define the delay time (\(\text{t}^{\text{local}}_{\text{m,j}}\)) and energy consumption (\(\text{e}^{\text{local}}_{\text{m,j}}\)) when the j-th smart device in the m-th zone selects local computation. The delay time is the total computational capacity required by all tasks generated by the device, divided by the device's computational capacity (\(\text{f}_{\text{m,j}}\)) [12]. \(\text{k}_{\text{m,j}}\) represents the total number of tasks generated by the device. In contrast, \(\text{c}_{\text{m,j,k}}\) represents the computational capacity required to complete  
Figure 4: Framework for task transmission and definition of associated variables for an SMD. Figure 3: Offload decision coding. the k-th task, namely the CPU cycles needed to complete the task. Equation (2) describes the required computation delay to the j-th smart device in the m-th zone:  
\[\mathrm{t_{m,j}^{local}}=\frac{\sum_{k=1}^{k_{m,j}}(1-\mathrm{O_{m,j,k}}) \mathrm{c_{m,j,k}}}{\mathrm{f_{m,j}}}, \tag{2}\]  
Through the computation of the CPU cycles necessary for processing a 1-bit task (\(\mathrm{CPU}^{c_{m,j,k}}\)) and the data size associated with it (\(\mathrm{d_{m,j,k}}\)), we can ascertain the total CPU cycles needed to accomplish the task [12]:  
\[\mathrm{c_{m,j,k}}=\mathrm{d_{m,j,k}}\times\mathrm{CPU}^{c_{m,j,k}}, \tag{3}\]  
The energy consumption (\(\mathrm{e_{m,j}^{local}}\)) incurred by local computation results from the multiplication of the computational capacity needed for each task (\(\mathrm{c_{m,j,k}}\)) by its respective offloading decision (\(\mathrm{O_{m,j,k}}\)). Subsequently, this value is further multiplied by the energy consumption coefficient (\(\mathrm{\epsilon_{m,j}}\)) and the square of the smart device's computational capability (\(\mathrm{f_{m,j}}\)) [12]. \[\mathrm{e_{m,j}^{local}}=\mathrm{\epsilon_{m,j}}\mathrm{f_{m,j}^{2}}\Big{(} \sum_{k=1}^{k_{m,j}}(1-\mathrm{O_{m,j,k}})\mathrm{c_{m,j,k}}\Big{)}, \tag{4}\]  
In the upcoming discussion, we will explore the latency and energy consumption associated with remote computation. When the j-th smart device in the m-th zone engages in remote computation for the kth task, it is crucial to factor in the energy and time needed for task transmission from the device to the small base station and, subsequently, from the small base station to the edge server. Also, this study excludes consideration of the energy consumption and latency of the returned results, given their relatively small data volume and minimal impact on the overall network performance. The forthcoming discussion will outline the transmission time (\(\mathrm{t_{m,j}^{\mathrm{tran}}}\)) and energy consumption (\(\mathrm{e_{m,j}^{\mathrm{tran}}}\)) associated with smart devices transferring tasks to small base stations. The transmission time hinges on the aggregate data size for transmission (\(\mathrm{D_{m,j}}\)), regardless of the transmission rate from the smart device back to the small base station (\(\mathrm{R_{m,j}}\)) [2]. Within this context, \(\mathrm{d_{m,j,k}}\) denotes the data size of the kth task generated by the jth smart device in the mth zone, \(\mathrm{O_{m,j,k}}\) signifies the offloading decision for that specific task, and \(\mathrm{k_{m,j}}\) represents the total number of tasks generated by the device.