## 2 System Model and Problem Statement  
We consider the RAN and Core segments of a mobile network and model them as a graph \(\mathcal{G}(\mathcal{V},\mathcal{E})\), where \(\mathcal{V}\) is the set of nodes (excluding mobile users) and \(\mathcal{E}\) is the set of non-access edges/links among them, as illustrated in Figure 1 (which also shows access links, for completeness). The nodes in \(\mathcal{V}\) comprise gNB and/or SCs (hereafter referred to as BSs) in the RAN, as well as switches/routers and other middlebox devices (e.g., load balancers, firewalls, etc.) in the Core. These devices typically operate as VNFs running in virtual instances (e.g., VMs, containers, etc.) utilizing computational resources collocated with network nodes. Each link \(e=(u,v)\in\mathcal{E}\), where \(u,v\in\mathcal{V}\), can be wired or wireless (the latter enables wireless X-hauling, typically mmWave), has a communication capacity \(c_{e}\), and induces a delay \(\delta_{e}\) (being the sum of transmission and propagation delays) to all packets traversing it. We partition \(\mathcal{E}\) into the sets \(\mathcal{E}_{fi}\) and \(\mathcal{E}_{url}\) of wired/fiber and wireless links, respectively, and denote with \(\mathcal{V}_{sw}\subseteq\mathcal{V}\) the set of nodes in \(\mathcal{V}\) that have at least one incident link in \(\mathcal{E}_{fi}\) (i.e., \(u\in\mathcal{V}_{sw}\) if there exists \(w\in\mathcal{V}\) such that \((u,w)\in\mathcal{E}_{fi}\)). We abstractly refer to the nodes in \(\mathcal{V}_{sw}\) as \"switches\" since most fiber links in a mobile Core are typically Point-to-Point links among switches or routers. For modeling reasons, and although all physical links are inherently bidirectional, we explicitly distinguish between links \((u,v)\) and \((v,u)\) in \(\mathcal{E}\) (and also for \(\mathcal{E}_{fi},\mathcal{E}_{url}\)). We denote with \(h(e)=u\) and \(t(e)=v\) the head and tail, respectively, of directed link \((u,v)\). The UEs are **not** included in \(\mathcal{V}\) but rather in \(\mathcal{J}\) (we also define \(\tilde{\mathcal{V}}\triangleq\mathcal{V}\cup\mathcal{J}\)). Each UE \(j\in\mathcal{J}\) connects to a BS \(a\in\mathcal{A}^{(j)}\subseteq\mathcal{V}\), where the dependence on \(j\) captures the typical signal level-based association rules. We define \(\mathcal{A}\triangleq\cup_{j\in\mathcal{J}}\mathcal{A}^{(j)}\) as the set of all BSs and \(\mathcal{S}^{(a)}\triangleq\left\{j:a\in\mathcal{A}^{(j)}\right\}\subseteq \mathcal{J}\) as the set of UEs which **may** be served by BS \(a\in\mathcal{A}\). We focus on Downlink (DL) and consider the set of DL AN links \(\mathcal{E}_{AN}\triangleq\left\{(a,j):a\in\mathcal{A},\,j\in\mathcal{S}^{(a)}\right\}\) with \(\mathcal{E}\triangleq\mathcal{E}\cup\mathcal{E}_{AN}\). To capture the underlying Physical layer constraints in the air interface, we also assume that each BS \(a\in\mathcal{A}\) has a **maximum** number of \(\tilde{N}_{u}^{(RB)}\) Resource Blocks (RBs) to allocate to the UEs in \(\mathcal{S}^{(a)}\). Let \(\mathcal{V}_{c}\subseteq\mathcal{V}\) be the set of network nodes which also have _computational_ (i.e., CPU) resources able to host one or more VNFs. Additional computational resources such as memory and storage can be similarly handled and are omitted for simplicity and without loss of generality. For each node \(y\in\mathcal{V}_{c}\), we denote with \(c_{y}\) the amount of CPU resources, measured in Giga-Floating Point Operations per Second (GFLOPS). We denote with \(\mathcal{F}\) the set of all available VNFs (viewed as **complete software stacks**) that can be deployed and allow for multiple **instances** of a given VNF in the same or different nodes depending on  
Figure 1: Mobile network of heterogeneous communication and computation nodes along with middlebox functionality offered by deployed VNFs. Dashed color lines indicate 2 illustrative E2E paths selected for 2 highlighted UEs. network traffic.