## 2 System Model and Problem Formulation  
We consider a two-hop wireless sensor network with one transmitter node (source), \(K\) receiver nodes (also known as secondary users/nodes), \(L\) relay nodes and \(M\) primary users/nodes. Each relay, transmitter, and receiver is equipped with a single antenna. We denote by \(h_{l}^{s}\), the channel from the source to the \(l\)th relay, \(h_{k}^{l}\), the channel from the \(l\)th relay to the \(k\)th secondary user, \(g_{m,k}^{s}\), the channel from the source to the \(m\)th primary user, and \(g_{m,k}^{l}\), the channel from the \(l\)th relay to the \(m\)th primary user. We denote by \(p_{l}\), the \(l\)th relay's transmission power; \(p_{l}^{max}\) is the maximum power of the \(l\)th relay, \(p_{k}^{s}\), the source power in the \(k\)th user band, and \(P_{s}\), the maximum source power, _i.e._, \(\sum_{k}p_{k}^{s}\leq P_{s}\). In our system model, each user will receive the data on a separate frequency band. Each relay will transmit and receive in the same frequency band. \begin{table}
\begin{tabular}{|l|l|} \hline
**Symbol** & **Definition** \\ \hline \(K\) & Number of secondary users \\ \(M\) & Number of primary users \\ \(L\) & Number of relays \\ \(I_{m}\) & Interference threshold at \(m\)th PU \\ \(h_{l}^{s}\) & Channel between the source and the \(l\)th relay \\ \(h_{k}^{l}\) & Channel between the \(k\)th SU and the \(l\)th relay \\ \(p_{l}\) & Transmission power of the \(l\)th relay \\ \(p_{l}^{max}\) & Maximum power of the \(l\)th relay \\ \(p_{k}^{s}\) & Transmission power of the source at the \(k\)th SU band \\ \(P_{s}\) & Maximum available power of the source \\ \(g_{m,k}^{s}\) & Channel between the source and the \(m\)th PU in the \(k\) SU band \\ \(g_{m,k}^{l}\) & Channel between the \(m\)th PU and the \(l\)th relay in the \(k\) SU band \\ \(\mathbf{\varepsilon}\) & binary assignment indicator \\ \(F()\) & Fitness function as mentioned in Equation (7) \\ \(W_{H}\) & Upper limit of the EDA search window \\ \(W_{L}\) & Lower limit of the EDA search window \\ \(\Delta_{t}\) & The population at the \(t\)th iteration and \(|\Delta_{t}|\) denotes the cardinality \\ \(\eta_{t}\) & The set of best candidate solutions selected from set \(|\Delta_{t}|\) at the \(t\)th iteration. \\ \(\rho_{s}\) & The selection probability. The EDA selects \(\rho_{s}|\Delta_{t}|\) individuals from the set \(|\Delta_{t}|\) to \\  & make up the set \(\eta_{t}\). \\ \(I_{Ter}\) & The maximum number of iterations \\ \hline \end{tabular}
\end{table} 
Table 1: Notations. We consider a half-duplex shared band amplify and forward (AF) protocol in which each symbol is transmitted in two time slots; in the first time slot, by the source, and in the second time slot, by the relays. In the first time slot, the signal received by the \(l\)th relay (after listening to the \(k\)th SU's band) can be written as \(\sqrt{p_{k}^{s}}h_{l}^{s}s+Z_{l}\), where complex-valued \(s\) represents the transmitted symbol and \(Z_{l}\) represents the complex-valued white Gaussian noise at the \(l\)th relay. The symbol value, \(s\), is normalized, so that \(E(|s|^{2})=1\) and \(\frac{N_{o}}{2}\) are the power spectral density of the noise \(Z_{l}\). The noise power, \(N\), in watts, in each SU band can be written as \(N=\left(\frac{N_{o}}{2}\right)2W\), where \(W\) is the bandwidth of each SU band [36]. In the second time slot, the relays amplify the received signal and re-transmit the amplified signal. The channel capacity of the \(k\)th user for shared band, AF, is [37]:  
\[C_{k}=\frac{1}{2}\log\left[1+\frac{p_{k}^{s}}{N}\left(|h_{k}^{s}|^{2}+\Omega_{ k}\right)\right] \tag{1}\]  
where \(\Omega_{k}=\left(\frac{\left(\sum_{l=1}^{L}|h_{l}^{s}h_{l}^{l}|\beta_{l}\sqrt{ p}\right)^{2}}{1+\sum_{l=1}^{L}\left(|h_{k}|\beta_{l}\sqrt{p}\right)^{2}}\right)\) and \(\beta_{l}=\left(\sqrt{p_{k}^{s}|h_{l}^{s}|^{2}+\frac{N}{2}}\right)^{-1}\). Note that the capacity formula for the shared band, AF, is not a concave function of the relay powers. This is due to the term \(\Omega_{k}\).