# Low-Latency Short-Packet Transmission over a Large Spatial Scale
## 3 Optimal Relay Deployment and Resource Allocation
### An Approximate, but Analytical Solution  
Finally, we formulate an optimization problem with the overall SNR and blocklength constraints. To obtain an analytical solution to the optimal error probability, we first handle the nonlinear constraint in Equation (27b) by approximation. Then, we add a few conditions to simplify the proof. We present the following lemma to approximate the overall power in Equation (29). **Lemma 1** (Rearrangement inequality [25]). : _For \(L\in\mathbb{N}_{+}\) and two sequences satisfying \(a_{1}\geq a_{2}\geq\cdots a_{L}\) and \(b_{1}\geq b_{2}\geq\cdots b_{L}\),_  
\[\sum_{i=1}^{L}a_{i}b_{L+1-i}\leq\frac{1}{L}\left(\sum_{i=1}^{L}a_{i}\right) \left(\sum_{i=1}^{L}b_{i}\right)\leq\sum_{i=1}^{L}a_{i}b_{i}. \tag{28}\]  
Equations (27b) and (27c) suggest that the sum of \(\gamma_{t}\) can not exceed a certain value. Applying Lemma 1, we present the approximation for the overall SNR (Actually, the SNR is proportional to the transmission power in our model. Therefore, we also consider Equation (28) as the power constraint in the following text.) in Equation (29). \[\sum_{i=1}^{L}\gamma_{t}\approx\frac{LE^{th}}{N^{th}}. \tag{29}\]  
Thus, we estimate the overall power by Equation (29). Finally, we obtain the optimization problem (30). \[\min_{\gamma_{t},n_{t}} \epsilon=\sum_{i=1}^{L}\!Q(\mathcal{G}(\gamma_{t},n_{t}))\] (30a) s.t. \[\sum_{i=1}^{L}\gamma_{t}=\frac{LE^{th}}{N^{th}}, \tag{30b}\] \[\sum_{i=1}^{L}n_{t}=N^{th},\] (30c) \[\max\biggl{\{}\frac{1}{k\ln 2},\frac{1}{n_{t}}\biggr{\}} <\ln(1+\gamma_{t})-\frac{k\ln 2}{n_{t}},\] (30d) \[n_{1} \geq n_{2} \geq\cdots\geq n_{L}\geq 0,\] (30e) \[0 \leq\gamma_{1} \leq\gamma_{2}\leq\cdots\leq\gamma_{L}. \tag{30f}\]  
In order to solve Problem (30), we have Theorem 2 for the convexity of \(Q(\mathcal{G}(\gamma,n))\). Theorem 2: _The function \(Q(\mathcal{G}(\gamma,n))\) is a binary convex function for the pair \((\gamma,n)\) in the domain of Problem (30)._  
Proof of Theorem 2: For a function \(f(x,y)\), we use the abbreviations \(f_{x}^{{}^{\prime}}=\frac{\partial f}{\partial x}\), \(f_{y}^{{}^{\prime}}=\frac{\partial f}{\partial y}\), \(f_{xy}^{{}^{\prime\prime}}=\frac{\partial^{2}f}{\partial x\partial y}\), \(f_{x}^{{}^{\prime\prime}}=\frac{\partial^{2}f}{\partial x^{2}}\), and \(f_{y}^{{}^{\prime\prime}}=\frac{\partial^{2}f}{\partial y^{2}}\). We focus on the Hessian matrix of the function \(\mathcal{H}=Q(\mathcal{G}(\gamma,n))\), which is given by  
\[\
abla^{2}\mathcal{H}= \begin{bmatrix}\mathcal{H}_{\gamma}^{{}^{\prime\prime} }&\mathcal{H}_{\gamma n}^{{}^{\prime\prime}}\\ \mathcal{H}_{\gamma n{}^{\prime\prime}}^{{}^{\prime\prime}}&\mathcal{H}_{n}^{ {}^{\prime\prime}}\end{bmatrix} .\]  
The main idea of the proof is to show that the Hessian matrix is positive definite. Actually, we calculate the partial derivatives of \(\mathcal{H}\) as follows:  
\[\mathcal{H}_{n}^{{}^{\prime\prime}}=(\mathcal{G}(\mathcal{G}_{n}^{{}^{\prime} })^{2}-\mathcal{G}_{n}^{{}^{\prime\prime}})\exp\biggl{(}-\frac{\mathcal{G}^{ 2}}{2}\biggr{)}. \tag{31}\]  
Similarly, we obtain:  
\[\mathcal{H}_{\gamma}^{{}^{\prime\prime}}=(\mathcal{G}(\mathcal{G}_{\gamma}^{{} ^{\prime}})^{2}-\mathcal{G}_{\gamma}^{{}^{\prime\prime}})\exp\biggl{(}-\frac{ \mathcal{G}^{2}}{2}\biggr{)}, \tag{32}\]  
and:  
\[\mathcal{H}_{n\gamma}^{{}^{\prime\prime}}=\mathcal{H}_{\gamma n}^{{}^{\prime \prime}}=(\mathcal{G}\mathcal{G}_{n}^{{}^{\prime}}\mathcal{G}_{\gamma}^{{}^{ \prime}}-\mathcal{G}_{n\gamma}^{{}^{\prime\prime}})\exp\biggl{(}-\frac{ \mathcal{G}^{2}}{2}\biggr{)}. \tag{33}\]  
From Appendix A, we have \(\mathcal{G}_{n}^{{}^{\prime\prime}}<0\) and \(\mathcal{G}_{\gamma}^{{}^{\prime\prime}}<0\).