## 6 Properties Analyses
### Stability
6: calculate \(R_{new}\)
7:if\(R_{new}>R\)then
8: move the CU(D2D) in licensed to the unlicensed spectrum and the CU(D2D) in unlicensed spectrum are forced to access to the licensed spectrum. 9:if\(R_{new}-R<\) 0.5* eps then
10:\(R\)=\(R_{new}\)
11: temp = temp + 1
12:elseif\(R_{new}-R\gg\) 0 then
13: continue. 14:endif
15:elseif\(R_{new}\leq R\)then
16: len = len + 1
17: maintain preceding state. 18:endif
19:endwhile
20:endwhile
```

**Algorithm 2** Iteration-based user access and resource allocation algorithm

### Optimality

**Proposition 3**: _The matching result \(\varphi\) obtained from the proposed algorithm can achieve the optimal solution._

Proof. : This proof is based on the Pareto improvement [33]. We assume \(\varphi(C_{m})=\{D_{n},D_{n^{\prime}}\}\), if the improvement for CU \(C_{m}\) in the licensed spectrum is \(\{D_{n^{\prime\prime}},D_{n^{\prime\prime}}\}\), i.e., \(\{D_{n^{\prime\prime}},D_{n^{\prime}}\}>_{C_{m}}\varphi(C_{m})\), D2D pair \(D_{n^{\prime\prime}}\) accesses to the unlicensed spectrum. The swap iteration \(p\) occurs between \(D_{n^{\prime\prime}}\) and \(D_{n}\) which can increase the sum rates of all users under matching pair \(\varphi(C_{m})=\{D_{n^{\prime\prime}},D_{n^{\prime}}\}\) which is defined as \(H_{i}\); however the Wi-Fi users do not permit this swap operation since the rate of the Wi-Fi users will decrease seriously, i.e., \(H_{d}+H_{i}<\) 0. It is obvious that the system rate will decrease after the swap iteration \(p\). From the above analysis, we can conclude that the iteration-based joint user access and resource allocation algorithm can achieve the optimal system rate. ### Complexity

All the procedures of the matching-iteration-based joint user access and resource allocation algorithm are summarized in Algorithms 1 and 2. The computational complexity of Algorithm 1 is \(\mathcal{O}(M^{3})\) based on GS matching algorithm. The computational complexity of Algorithm 2 is \(\mathcal{O}(t+l)\). The results show the algorithm in this paper can get better performance with low computational cost. ## 7 Simulation Results

In this section, we evaluate the performance of our proposed interation-based joint user access and resource allocation algorithm by simulation results. In Table 1, we summarize the simulation parameters, which are set based on the prior works [27; 28]. As shown in Figure 4, we consider a single cell network with one BS and multiple CUs, D2D users and Wi-Fi users. The CUs and the D2D users are distributed randomly in the circle area with radius of 250 m. In addition, the distance between the transmitter and the receiver of each D2D pair is no more than the required value \(d_{max}\). A Wi-Fi network is also co-located in the cellular network. We adopt the send/clear to send (RTS/CTS) mechanism working at unlicensed 5 GHz in the simulation. For simplicity, we denote our proposed algorithm as JUARA. We consider several benchmark algorithms for comparison, i.e., JUARA-CUs only algorithm, matching algorithm, and random allocation scheme. JUARA-CUs only algorithm represent that we only exchange CUs after many-to-one matching. Matching algorithm refers that we only use many-to-one matching to obtain the subchannel allocation of the D2D users reusing the \begin{table}
\begin{tabular}{l l} \hline \hline
**Parameters** & **Values** \\ \hline Number of licensed channels & 3-8 \\ coverage of BS & 250 m \\ Number of CUs & 5-20 \\ Number of D2D users & 7-20 \\ Number of Wi-Fi users & 6 \\ Licensed transmit power & 23 dBm \\ Unlicensed transmit power & 20 dBm \\ Noise power & \(-174\) dBm/Hz \\ \(R_{min}\) & 8 \\ \(CW_{min}\) & 32 \\ E[P] & 8224 bits \\ \(T_{or}\) & 20 \(\upmu\)s \\ MAC header & 224 bits \\ PHY header & 195 bits \\ ACK & 112 Bbits + PHY header \\ SIFS & 19 \(\upmu\)s \\ DIFS & 40 \(\upmu\)s \\ subchannel bit rate & 300 Mbps \\ Slot time & 7 \(\upmu\)s \\ \hline \hline \end{tabular}
\end{table} 
Table 1: System Parameters. Figure 4: A snapshot of user locations for a single cell network. licensed spectrum.