# Low-Latency Short-Packet Transmission over a Large Spatial Scale
## 3 Optimal Relay Deployment and Resource Allocation
### Problem Formulation  
We let \(Q(\mathcal{Y}(\gamma_{t},d_{t},n_{t}))\) be the error probability of the link from \(R_{i-1}\) to \(R_{i}\). \(\mathcal{Y}\) is given by:  
\[\mathcal{Y}(\gamma,d,n)=\left(\ln\bigl{(}1+\gamma d^{-\alpha}\bigr{)}-\frac{k \ln 2}{n}\right)\sqrt{\frac{n(\gamma d^{-\alpha}+1)^{2}}{\gamma d^{-\alpha}( \gamma d^{-\alpha}+2)}}. \tag{15}\]  
We denote by \(D\) the summation of \(d_{t}\). Then, \(\sum_{t=1}^{L}d_{t}=D\). In Section 2, we have the latency (blocklength) constraint in Equation (13) and the energy constraint in Equation (14). From the previous discussion, we establish the optimization problem (16) to minimize the error probability by allocating blocklength and power to each relay:  
\[\min_{\gamma_{t},d_{t},n_{t}} \epsilon=\sum_{t=1}^{L}Q(\mathcal{Y}(\gamma_{t},d_{t},n_{t}))\] (16a) s.t. \[\sum_{t=1}^{L}n_{t}\gamma_{t}\leq E^{th}, \tag{16b}\] \[\sum_{t=1}^{L}d_{t}=D,\] (16c) \[\sum_{t=1}^{L}n_{t}\leq N^{th},\] (16d) \[\gamma_{t}\geq 0,\] (16e) \[n_{t}\in\mathbb{N}_{+}. \tag{16f}\]  
The optimization problem (16) is subject to the relay placement in Equation (16c) and the finite-blocklength coding in Equations (16b) and (16d). We consider a case where the blocklength of a finite-blocklength code tends to infinity, i.e., \(N^{th}\rightarrow\infty\). As the overall blocklength \(N^{th}\) increases, the effect of finite-blocklength coding is no longer apparent. There is no loss of generality in assuming the same coding process for each relay. Therefore, in this case, a uniform distribution of relays minimizes the error probability. Thus, when we consider the general FBC case, unless otherwise stated, we assume that the relays are deployed equidistantly. We then only consider resource allocation in the finite-blocklength coding. Furthermore, this deployment strategy can also be verified as the optimal one in the simulation results in Section 6.  
Then, we simplify Problem (16) under the assumption that relays are placed equidistantly. The error probability \(\epsilon\) given by (16a) is a decreasing function of \(n_{i}\) and \(\gamma_{i}\). Thus, we can certainly rewrite the inequations in Equations (16b) and (16d) as equations. Moreover, we expand the domain of \(n_{i}\) to real numbers in the interval \([1,\infty)\) to avoid the complex integer programming.  
In the case where relays are placed equidistantly, we denote by \(Q(\mathcal{G}(\gamma,n))\) the error probability to transfer \(k\) bits from \(R_{i-1}\) to \(R_{i}\), where:  
\[\mathcal{G}(\gamma,n)=\left(\ln(1+\gamma)-\frac{k\ln 2}{n}\right)\sqrt{ \frac{n\left(\gamma+1\right)^{2}}{\gamma(\gamma+2)}}. \tag{17}\]  
With the discussion above, we have the optimization problem (18).  
\[\min_{\gamma_{i},\mu_{i}}\epsilon =\sum_{i=1}^{L} Q(\mathcal{G}(\gamma_{i},n_{i}))\] (18a) s.t. \[\sum_{i=1}^{L}n_{i}\gamma_{i} \leq E^{th}, \tag{18b}\] \[\sum_{i=1}^{L}n_{i} \leq N^{th},\] (18c) \[\gamma_{i} \geq 0,\] (18d) \[n_{i} \geq 1, \tag{18e}\]  
The \(\gamma_{i}\) in Problem (18) denotes the received SNR with a path loss of \(d^{-\alpha}\) from \(\gamma_{i}\) in Problem (16). This is the same situation for the constant \(E^{th}\).