## 2 System Model and Problem Formulation  
### System Model  
To make this paper easy to follow, we present some frequently used notations in the considered system model in Table 1.  
As shown in Figure 1, we consider an uplink heterogeneous network underlaid with \(K\) D2D pairs and \(M\) CUs, where \(K<M\). Let \(\mathcal{K}=\{1,2,\ldots,K\}\) and \(\mathcal{M}=\{1,2,\ldots,M\}\) be the sets of the D2D pairs and the CUs, respectively. We assume that the overall radio spectrum is divided into \(M\) subcarriers, or resource blocks (RBs) or chunks [18; 19; 20]. Each CU uses one of the subcarriers with a specific transmit power. Thus, there is no vacant spectrum and a fully loaded cellular network scenario is investigated similarly to [9]. The eNB can obtain the instantaneous channel state information (CSI) on all involved links. In order to improve the achievable rate of D2D users, the D2D pairs are allowed to reuse multiple cellular uplink resources for direct transmission. The channel gain from the CU \(m\) to the eNB is denoted by \(h^{CB}_{m,B}\), and the channel gain from the CU \(m\) to the D2D receiver (D2D-Rx) \(k\) by \(h^{CD}_{k,m}\). The channel gain from the D2D transmitter (D2D-Tx) \(k\) to its receiver is denoted by \(h^{DD}_{k}\), and the channel gain from the D2D-Tx \(k\) to the eNB by \(h^{DB}_{k,B}\). Assuming that D2D pair \(k\) reuses the subcarrier of CU \(m\), the received signal of CU \(m\) at the eNB is  
\[y^{C}_{k,m}=h^{CB}_{m,B}x^{C}_{m}+h^{DB}_{k,B}x^{D}_{k}+n^{C}_{m} \tag{1}\]  
where \(x^{C}_{m}\) and \(x^{D}_{k}\) represent the transmit signal by CU \(m\) and D2D pair \(k\), respectively, and \(n^{C}_{m}\) represents the additive white Gaussian noise (AWGN) with a variance of \(\sigma_{0}^{2}\). Similarly, the D2D-Rx received signal on subcarrier \(m\) is  
\[y^{D}_{k,m}=h^{DD}_{k}x^{D}_{k}+h^{DC}_{k,m}x^{C}_{m}+n^{D}_{k} \tag{2}\]  
where \(n^{D}_{k}\) represents the AWGN at the eNB with a variance of \(\sigma_{0}^{2}\), and the received signal of CU \(m\) at the eNB without resource reusing can be expressed as  
\[y^{C}_{k,m}=h^{CB}_{m,B}x^{C}_{m}+n^{C}_{m} \tag{3}\] \begin{table}
\begin{tabular}{c l} \hline \hline
**Symbol** & **Semantics** \\ \hline \(\mathcal{M}\) & The set of the CUs \\ \(M\) & The number of the CUs \\ \(p^{C}_{m}\) & The transmission power of the CU \(m\) \\ \(h^{CB}_{m,B}\) & The channel gain from the CU \(m\) to the eNB on the \(m\)th subcarrier \\ \(R^{C}_{m}\) & The spectrum efficiency of CU \(m\) without resource sharing \\ \(\mathcal{K}_{m,\min}\) & The spectrum efficiency requirement of the CU \(m\) \\ \(\mathcal{K}\) & The set of the D2D pairs \\ \(K\) & The number of the D2D pairs \\ \(p^{D}_{k,m}\) & The transmission power of the D2D-Tx \(k\) on the mth subcarrier \\ \(p^{D}_{k,D}\) & The maximum transmission power of the D2D-Tx \\ \(h^{DB}_{k,B}\) & The channel gain from the D2D-Tx \(k\) to the D2D-Rx \(k\) \\ \(h^{CD}_{k,B}\) & The channel gain from the D2D-Tx \(k\) to the eNB \\ \(h^{CD}_{k,m}\) & The channel gain from the CU m to the D2D-Rx \(k\) \\ \(R^{C}_{k,m}(p^{D}_{k,m})\) & The spectrum efficiency of the CU \(m\) with resource sharing \\ \(R^{D}_{k,m}(p^{D}_{k,m})\) & The spectrum efficiency of the D2D pair \(k\) with resource sharing \\ \(\Delta R^{C}_{m}(p^{D}_{k,m})\) & The spectrum efficiency decrement of the CU \(m\) \\ \(\Delta R^{D}_{k,m}(p^{D}_{k,m})\) & The spectrum efficiency gain of the D2D pair \(k\) \\ \(\sigma_{0}^{2}\) & The noise power on each subcarrier \\ \(G^{P}_{k,m}(p^{D}_{k,m})\) & The system positive gain \\ \(G^{N}_{k,m}(p^{D}_{k,m})\) & The system negative gain \\ \(\pi_{k,m}\) & The D2D pairs assignment index \\ \(\mathcal{M}_{k}\) & The set of the subcarriers which are assigned to the \(k\)th D2D pair \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Symbol Notations. CU, cellular users; eNB, evolved node B; D2D, device-to-device. Since the D2D link \(k\) shares the same subcarrier with CU \(m\), they can generate mutual interference to each other.