## 3 Suboptimal Subcarrier and Power Allocation
### Power Allocation Algorithm  
After the suboptimal subcarrier allocation, the resource allocation optimization problem is formulated as  
\[\max_{p_{k,n}}\frac{B}{N}\sum_{k=1}^{K}\sum_{n\in\Omega_{k}}\log_{2}\left(1+p_ {k,n}H_{k,n}\right) \tag{12}\]  
subject to: C1: \(p_{k,n}\geq 0\)\(\forall k,n\)  
Figure 3: The flow diagram of subcarrier allocation by ACO algorithm. \[\text{C2:}\ \ \sum_{k=1}^{K}\sum_{n=\Omega_{k}}p_{k,n}\leq P_{tot}\] \[\text{C3:}\ \ R_{i}:R_{j}=\varphi_{i}:\varphi_{j}\ \ \ \forall i,j\in\{1,\cdots,K\},i\
eq j\]  
where \(\Omega_{k}\) is the set of subcarriers distributed to user \(k\), and \(H_{k,n}=g^{2}{}_{k,n}/\sigma^{2}\Gamma\) is the channel-to-noise ratio for user \(k\) in subchannel \(n\). The Lagrangian multiplier techniques have been applied to solve the optimization problem and find the optimal power allocation scheme [21]. The power distribution strategy for a single user \(k\) is described as  
\[p_{k,n}=p_{k,3}+\frac{H_{k,n}-H_{k,1}}{H_{k,n}H_{k,1}} \tag{13}\]  
\[P_{k}=\sum_{n=1}^{N_{k}}p_{k,n}=N_{k}p_{k,3}+\sum_{n=2}^{N_{k}}\frac{H_{k,n}-H_ {k,1}}{H_{k,n}H_{k,1}} \tag{14}\]  
for \(k\in\ \{1,2\ldots,K\}\), \(n\in\ \{1,2\ldots,N_{k}\}\) and \(H_{k,1}\leq H_{k,2}\leq\ldots\leq H_{k,Nk}\). \(N_{k}\) is the number of subcarriers in \(\Omega_{k}\). \(P_{k}\) is the total power assigned to user \(k\). Once \(P_{k}\) is derived, the power allocation can be achieved by Equations (13) and (14). The optimal power allocation strategy for each user \(k\) can be described as  
\[\frac{1}{\varphi_{1}}\frac{N_{1}}{N}\Bigg{[}\log_{2}\Bigg{(}1+H_{1,1}\frac{P_ {1}-V_{1}}{N_{1}}\Bigg{)}+\log_{2}W_{1}\Bigg{)}=\frac{1}{\varphi_{k}}\frac{N_ {k}}{N}\Bigg{(}\log_{2}\Bigg{(}1+H_{k,1}\frac{P_{k}-V_{k}}{N_{k}}\Bigg{)}+\log _{2}W_{k}\Bigg{)} \tag{15}\]  
for \(k\in\ \{2,\,3\ldots,\,K\}\), where \(V_{k}\) and \(W_{k}\) are derived as  
\[V_{k}=\sum_{n=2}^{N_{k}}\frac{H_{k,n}-H_{k,1}}{H_{k,n}H_{k,1}} \tag{16}\]  
\[W_{k}=\Bigg{(}\prod_{n=2}^{N_{k}}\frac{H_{k,n}}{H_{k,1}}\Bigg{)}^{\frac{1}{N_ {k}}} \tag{17}\]  
for \(k\in\ \{1,\,2\ldots,\,K\}\). Adding the total power constraint  
\[\sum_{k=1}^{K}P_{k}=P_{tot} \tag{18}\]  
According to Equations (15) and (18), it is necessary to solve the set of \(K\) nonlinear equations with \(K\) variables, which incurs a large amount of computational complexity. Under this circumstance, certain simplified algorithms are utilized to reduce the power allocation complexity. With the assumption that \(V_{k}=0\) and \(H_{k,1}P_{k}/N_{k}=0\), the power allocation problem can be simplified to a single non-linear equation with one variable. This is the power allocation strategy in the root-finding method. In addition, in the linear method, when the assumption \(N_{1}\):\(N_{2}\):\(\ldots\):\(N_{K}=\varphi_{1}\):\(\varphi_{2}\):\(\ldots\):\(\varphi_{K}\) is made, Equations (15) and (18) are then transformed into a set of linear equations. However, the above two methods have different levels of relaxation of proportionality constraints. With proportional fairness constraints unconsidered, the sum rate of OFDMA system is maximized when each subcarrier is assigned to only one user with best channel gain and the power is distributed over the subcarriers by the water-filling policy [19]. In addition, in [19], the equal power allocation algorithm is proposed, which has almost the same performance as the water-filling policy. In the equal power allocation algorithm, the total power is equally assigned to the subcarriers after the subcarrier distribution. The benefit of the equal power allocation is that it is simple and free of calculating the water-filling level. However, the equal power allocation method is bound to undermine the proportional fairness of users. In order to simplify the complexity of power allocation and to guarantee proportional fairness, an effective power allocation algorithm with strict proportional fairness is proposed in this section. The simplified measures are taken as follows.