# AI-Based Resource Allocation in E2E Network Slicing with Both Public and Non-Public Slices
## 3 Algorithm Design  
The problem in (22) consists of two types of optimization variables: \(x_{s,u}^{k}\), which indicates how to assign RBs to users in the slices in RAN, and \(\eta_{j,v}^{s}\), which indicates how to map VNFs of all slices to the VMs of the server nodes in CN. Looking at the objective function of the problem in (22), we see that it is only a function of the allocation scheme of RBs in RAN and is not related to the mapping scheme of the VNFs in CN. Furthermore, (22b), (22f), and (2) are constraints that only involve the RB allocation scheme, while (22c), (8), (14), and (15) are constraints that only involve the VNF mapping scheme. The constraints (22d), (22e), (22g), and (22h) involve both the RB allocation scheme and the VNF mapping scheme due to the delay variables \(d_{s,u}^{\text{total}}\) and the rate variables \(r_{u}^{s}\). For problem (22), once the RB allocation scheme is fixed, the variables \(r_{u}^{s}\) is fixed and \(d_{\text{RAN}}^{s,u}\) in (5) is fixed. According to (4), fixed \(r_{u}^{s}\) provides fixed \(r^{s}\); hence, given the RB allocation scheme, (22d) and (22e) becomes constraints involving only the VNF variables \(\eta_{j,v}^{s}\). Next, we transform the constraints (22g) and (22h) to separate the effect of the RB allocation scheme and the VNF mapping scheme. First, denote the total CN delay of a User \(u\) in Slice \(s\) as \(y^{s}\), which is a function of only \(s\), and not a function of \(u\) according to (12). Then, we discuss the transform of the constraints (22g) and (22h) for different types of lices. 1. For User \(u\) in an eMBB slice \(s\), due to (16), the constraint (22h) only involves the RB allocation scheme. Next, we discuss the transform of (22g). To satisfy (22g), \(y^{s}\) must satisfy \[y^{s}\leq d_{\text{max}}^{s}-\max_{u\in\mathcal{U}_{s}}d_{\text{RAN}}^{s,u}\] (23) according to (13). Hence, based on (12), for the eMBB slice \(s\), to satisfy (22g), the VNF mapping scheme must satisfy \[d_{\text{prop, CN}}^{s}+d_{\text{proc, CN}}^{s}\leq d_{\text{max}}^{s}-\max_{u\in\mathcal{U}_{s}}d_{\text{RAN}}^{s,u}\] (24)
2. For the URLLC or NPN slice \(s\), to satisfy (22g), \(y^{s}\) again has to satisfy (23). Now, we transform the constraint (22h). The term \(\min\left(1,\frac{d_{s,u}^{d}}{d_{\text{RAN}}^{s,u}}\right)=\min\left(1,\frac {d_{s,u}^{d}}{d_{\text{RAN}}^{s,u}+y^{s}}\right)\). Hence, for User \(u\) in the URLLC slices (NPN slices), we may express the user satisfaction \(\xi_{u}^{s}\) as a function of \(y^{s}\), according to (17) and (18) for a fixed RB allocation scheme. Correspondingly, according to constraint (22h), \(y^{s}\) has to satisfy \[\frac{1}{\mathcal{U}_{s}}\sum_{u\in\mathcal{U}_{s}}\min\left(1,\frac{d_{s,u}^ {d}}{d_{\text{RAN}}^{s,u}+y^{s}}\right)\geq\xi_{\min}^{s}\] (25) for the URLLC slice \(s\), and \[\frac{1}{\mathcal{U}_{s}}\sum_{u\in\mathcal{U}_{s}}\frac{1}{2}\left(\min\left( 1,\frac{d_{s,u}^{d}}{d_{\text{RAN}}^{s,u}+y^{s}}\right)+\min\left(1,\frac{r_{ u}^{s}}{d_{s,u}^{s}}\right)\right)\geq\xi_{\min}^{s}\] (26) for the NPN slice \(s\). The left-hand side (LHS) of (25) and (26) are both decreasing functions of \(y^{s}\). Hence, the bisection search method can be used to find the maximum \(y^{s}\) that satisfies (25) and (26), which is denoted as \(y_{\max}^{s}\). Hence, for the URLLC or NPN slice \(s\), to satisfy (22g) and (22h), the VNF mapping scheme must satisfy \[d_{\text{prop, CN}}^{s}+d_{\text{proc, CN}}^{s}\leq\min\left(d_{\max}^{s}-\max_{u\in\mathcal{U}_{s}}d_{\text{RAN}}^{s,u},y_{ \max}^{s}\right)\] (27)Define \(d^{s}_{CN}\) as  
\[d^{s}_{CN}=\left\{ \begin{array}{ll}d^{s}_{\max}-\max_{u\in\mathcal{U}_{s}}d^{s,u }_{\text{RAN}}&\text{for eMBB slice $s$}\\ \min\bigl{(}d^{s}_{\max}-\max_{u\in\mathcal{U}_{s}}d^{s,u}_{\text{RAN}^{s}},y^{ s}_{\max}\bigr{)}&\text{for URLLC, NPN slice $s$}\end{array} \right.