# 6G Goal-Oriented Communications: How to Coexist with Legacy Systems?
## 4 Problem Formulation and Solution
Interestingly, as easily proved in ([58], Section 4.4) constraint (20) is guaranteed if the associated virtual queue is _mean-rate stable_, i.e.,  
\[\lim_{T\to\infty}\frac{1}{T}\mathbb{E}\{Z_{T}\}=0. \tag{22}\]  
To ensure the mean-rate stability of the virtual queue, it is sufficient to guarantee that the so-called _Conditional Lyapunov Drift (CLD)_ is bounded by a finite constant at each slot. Therefore, let us introduce the CLD by first defining the Lyapunov function [58]  
\[L(Z_{t})=\frac{1}{2}Z_{t}^{2}, \tag{23}\]  
which is a measure of the congestion state of the system in terms of the defined virtual queue(s). From (23), the CLD is defined as follows:  
\[\Delta_{t}(Z_{t})=\mathbb{E}\{L(Z_{t+1})-L(Z_{t})|Z_{t}\}, \tag{24}\]  
i.e., it is the expected variation of the Lyapunov function over two successive time slots. Guaranteeing that \(\Delta_{t}(Z_{t})\leq B\), with \(B\) a finite constant, also ensures the mean-rate stability of \(Z_{t}\), and therefore constraint (20). Now, for the virtual queue defined in (21), it is easy to prove that  
\[\frac{Z_{t+1}^{2}-Z_{t}^{2}}{2}\leq\frac{(x_{\max}-x_{\text{th}})^{2}}{2}+Z_{t }(x_{t}-x_{\text{th}}), \tag{25}\]  
where \(x_{\max}\) is the (finite by hypothesis) maximum value that \(x_{t}\) can take, given system design constraints. Then, one can write the following upper bound ([58], Equation (4.47)):  
\[(a) \lim_{T\rightarrow\infty}\frac{1}{T}\sum_{t=0}^{T-1}\mathbb{E} \Big{\{}\mathbf{1}_{\{\Theta_{t\geq\Theta_{\text{th}}}\}}\cdot\mathbf{1}_{\{D _{\text{tot}}\leq D_{\text{max}}\}}\Big{\}}\geq\mathcal{E}_{g,\text{th}},\]0  
Following stochastic optimization arguments [58], it is sufficient to remove the expectation and minimize the CLD upper bound in (26) in a per-slot basis to guarantee the mean-rate stability of \(Z_{t}\) and, as a consequence, constraint (20), under the assumption of i.i.d. realizations of context parameters (an assumption that can be relaxed in some cases). However, in this way, no importance is assigned to the objective function of the problem, i.e., the goal cost in this case. To take the latter into account, denoting by \(C_{t}\) the goal cost at time \(t\), one can write the so-called _drift-plus-penalty_ (DPP) function [58]:  
\[(a) \lim_{T\rightarrow\infty}\frac{1}{T}\sum_{t=0}^{T-1}\mathbb{E} \Big{\{}\mathbf{1}_{\{\Theta_{t\geq\Theta_{\text{th}}}\}}\cdot\mathbf{1}_{\{D _{\text{tot}}\leq D_{\text{max}}\}}\Big{\}}\geq\mathcal{E}_{g,\text{th}},\]1  
where \(\Omega\) denotes a scalar hyper-parameter (the only one) controlling the trade-off between (original) constraint guarantees and objective function value minimization. The DPP is an augmented version of the CLD, and it penalizes high values of the objective function, e.g., excessive usage of resources in a network. Interestingly, by bounding the DPP, one can derive a similar result on virtual queue stability and long-term constraint guarantees, i.e., if \(\Delta_{p}(Z_{t})\leq B,\forall t\), the same result applies, with the following difference: by increasing the trade-off hyper-parameter \(\Omega\), the value of the objective function decreases at the cost of longer convergence time of the virtual queue and its average value ([58], Theorem 4.8). Finally, to adapt the above analysis to problem (19), we can define the following virtual queue evolution for constraint \((a)\) of problem (19):  
\[(a) \lim_{T\rightarrow\infty}\frac{1}{T}\sum_{t=0}^{T-1}\mathbb{E} \Big{\{}\mathbf{1}_{\{\Theta_{t\geq\Theta_{\text{th}}}\}}\cdot\mathbf{1}_{\{D _{\text{tot}}\leq D_{\text{max}}\}}\Big{\}}\geq\mathcal{E}_{g,\text{th}},\]2  
For virtual queue \(Z_{t}\) in (28), we can write (cf.