## 3 The Proposed Solution Method Using the PA-Jaya Algorithm
### PA-Jaya for the User Fairness Issue in Cognitive OFDM Radio Network  
This problem becomes more complicated when the secondary user rate proportional constraint is considered. Obviously, in this problem, the subchannel and power should be jointly allocated to achieve the optimal capacity under the user rate proportional constraints. However, this joint optimization results in high computational costs. In order to address this complex model, the traditional methods are usually based on three steps. The first step is to allocate channels for each secondary user based on the interference factors of each channel. The second step roughly allocates the total transmit power to each user based on the number of channels obtained by each secondary user. The third step is implemented on the basis of the previous two allocations while using the traditional water-filling algorithm to choose the best allocation method for every secondary user. Figure 2: Flowchart of the PA-Jaya algorithm for the cognitive orthogonal frequency division multiplexing (OFDM) radio network power allocation model. In order to better handle this problem, the following fairness indicator is introduced [50]. \[\mathbf{I}=\left(\sum\limits_{i=1}^{K}\frac{R_{k}}{\alpha_{k}}\right)^{2}\left(K \sum\limits_{i=1}^{K}\left(\frac{R_{k}}{\alpha_{k}}\right)^{2}\right)^{-1}. \tag{15}\]  
The maximum value of Equation (15) is 1, and when it reaches this value, the fairness of the allocation model is optimal. The signal-to-noise ratio (SNR) in this model can be written as  
\[\text{SNR}=\frac{g_{m,n}^{2}}{\delta(N_{0}W_{c}+S_{m,n})}. \tag{16}\]  
Theoretically, allocating more power to the channels with larger SNRs can maximize the total channel capacity demanded in this model, but doing so may not satisfy the user fairness constraints in Equation (10). Then, considering the user fairness issue, an optimization approach, called the ROOT-FINDING algorithm, was proposed on the basis of proportional rate constraints [39]. For the case of high channel gain, the ROOT-FINDING algorithm can solve the user rate proportional constraint problem well and achieve spectrum efficiency improvement. However, in order to satisfy the proportional constraint, many subcarriers are often not correctly allocated to the optimal user, resulting in a low overall utilization efficiency of the subcarrier. In Ref. [51], an improved algorithm, called LINEAR, was proposed in an effort to effectively address this problem. This algorithm achieves an increase in spectral efficiency by relaxing the fairness constraint while improving the computational time. Since the user fairness and spectral efficiency may not be well weighed, the algorithm still has room for improvement. In response to these limitations, through the use of the two-stage allocation scheme described in Ref. [51], here we present a novel method on the basis of the PA-Jaya algorithm. In the first stage, we fully consider the state of each channel. Assuming that transmit power is evenly distributed across all subchannels, then we can reasonably suppose that the proportion of subcarriers assigned to different users is approximately the same as their capacity rates after power allocation. Then, we use the proposed PA-Jaya algorithm to allocate each channel to the user with the best SNR as much as possible while satisfying the total power constraints and user fairness constraints. This procedure can be described as follows. First, we assign each secondary user the unallocated subcarrier that has the maximum SNR for that user. Then, each user is assigned a number of subcarriers according to his proportion constant, and the priority of the secondary users is determined by the ratio of his obtained capacity to the proportion constant, which is \(\frac{R_{k}}{\alpha_{k}}\left(k=1,2,\cdots,K\right)\). Finally, all unoccupied subcarriers are allocated to users who can obtain the maximum SNR; in this case, each secondary user can get one subcarrier at most.