# 6G Goal-Oriented Communications: How to Coexist with Legacy Systems?
## 4 Problem Formulation and Solution  
The aim of this section is to propose a resource allocation policy able to minimize the \(UE_{d}\) data rate loss (cf. (18)), subject to a goal-effectiveness constraint of the GO system. Of course, minimizing (18) is equivalent to maximizing the average data rate of \(UE_{d}\). Then, following the general formulation in (5), the edge inference problem can be formulated as follows:  
\[\max_{\{\mathbf{\Psi}_{t}\}_{t}} \mathcal{R}_{d}:=\lim_{T\rightarrow\infty}\frac{1}{T}\sum_{t=0}^{T -1}\mathbb{E}\{R_{d,t}\}\] (19) subject to \[(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}},\] \[(b) \ P_{d,t}\in\mathcal{P}_{d},\ \forall t,\quad(c)\ \gamma_{t}\in\Gamma_{g},\ \forall t,\]  
where \(\mathbf{\Psi}_{t}=[P_{d,t},\gamma_{t}]\) is the action set, i.e., the optimization variables, involving DO user transmit power and target GO user PER. The constraints of the problem have the following meaning: \((a)\) the goal effectiveness of the GO system is higher than a predefined threshold; \((b)\) the instantaneous transmit power of \(UE_{d}\) is chosen from a discrete set \(\mathcal{P}_{d}\) involving a minimum value of transmission power (0 in this case) and a maximum value being equal to \(P_{d,\text{max}},\ (c)\) the target PER of the GO system is chosen from a discrete set \(\Gamma_{g}\). In addition, we make the following assumptions:  
1. The goal is achievable, i.e., problem (19) is feasible. 2. The optimization is performed at the MEH, which is provided with the needed connect-compute instantaneous information, as specified here below. 3. All effective channels (i.e., including the receive filters) are perfectly known instantaneously, while their statistics are unknown in advance. 4. The computation delay at the current time slot is estimated and known with high confidence, i.e., we assume the computation delay is known at time \(t\). 5. The GO user has no buffered data, but it is able to accept all data patterns generated at time \(t\), to be transmitted to the MEH. 6. The DO user always has backlogged traffic, i.e., it continuously transmits and interferes with the GO system
7. All thresholds (delay, entropy, effectiveness) are known in advance, i.e., they are requested as part of a service-level agreement. Figure 7: (**a–c**) Goal-effectiveness heat maps as a function of GO communication PER and E2E delay constraint for fixed goal cost and different goal value thresholds \(\Theta_{\text{th}}\); (**d–f**) goal-effectiveness heat maps as a function of goal cost (relative DO user data rate loss) and target PER of the GO system for fixed GO communication E2E delay threshold (45 ms) and different goal value thresholds \(\Theta_{\text{th}}\). Problem (19) is difficult to solve due to the lack of distribution knowledge of wireless channels (i.e., only instantaneous realizations are observed) and computation delays at the MEH. Therefore, we hinge on the tools of Lyapunov stochastic network optimization to solve the problem on a per-slot basis, with instantaneous observations of context parameters. To this end, let us first introduce the concept of _virtual queue_[58], whose aim is to keep track of constraint violations and take specific actions to drive the system towards desired operating modes. In particular, given a long-term constraint written as  
\[\mathcal{X}:=\lim_{T\to\infty}\frac{1}{T}\sum_{t=0}^{T-1}\mathbb{E}\{x_{t}\} \leq x_{\text{th}}, \tag{20}\]  
we can define an associated virtual queue that evolves as follows over successive time slots:  
\[Z_{t+1}=\max(0,Z_{t}+x_{t}-x_{\text{th}}). \tag{21}\]  
The evolution of this mathematical model is straightforward: the size of the virtual queue grows whenever the constraint is violated, and it decreases otherwise.