## 2 System Model and Problem Formulation
### Overall Mechanism  
The overall mechanism includes the above two phases to jointly allocate sub-channel and SINR. The first phase described in Section 3.3 is to match multiple sub-channels to D2D multicast groups. After the sub-channel allocation in phase 1 is finished, the SINR assignment method in Section 3.2 is performed to determine the optimal SINR of all D2D links for multi-objective optimization on any given sub-channel from phase 1, the pseudo code of overall algorithm is shown in Algorithm 1.  
```
* Initialization: The eNB collects the location information of all D2D multicast groups. The initial valid sub-channel set \(\mathcal{S}_{m}=\varnothing,\forall m\), the initial feasible sub-channel set \(\mathcal{F}_{m}=\mathcal{K},\forall m\), the initial available sub-channel set \(\mathcal{A}=\mathcal{K}\), and the initial binary variable \(\omega_{m,k}=0,\forall m,k\) are set up. The multi-objective optimization value brought by any D2D multicast group reusing any sub-channel is \(\Phi\left(\gamma_{k,m}^{C}\,\gamma_{m,m,k}^{D}\right)\), which is given (31).
* Phase 1. Sub-channel Allocation:
1. If \(\exists m\in\mathcal{M},\mathcal{F}_{m}\
eq\varnothing\), find the optimal matching \((m^{*},k^{*})\) which satisfies \((m^{*},k^{*})=\arg\!\min_{(m,k):m\in\mathcal{M},k\in\mathcal{C}}\!\Phi\left( \gamma_{k,m}^{C}\,\gamma_{m,m,k}^{D}\right)\); Otherwise, go to step 4. 2. If the number of sub-channels allocated to \(m^{*}\) satisfies \(|\mathcal{S}_{m*}|\leq\dfrac{K}{M}-1\), set \(\omega_{m*,k*}=1\), \(\mathcal{S}_{m}=\mathcal{S}_{m}\cup\{k^{*}\}\), \(\mathcal{F}_{m}=\mathcal{F}_{m}\setminus\{k^{*}\}\), \(\mathcal{A}=\mathcal{A}\setminus\{k^{*}\}\). Return to step 1. 3. Otherwise, \(\mathcal{F}_{m*}=\mathcal{F}_{m*}\setminus\{k^{*}\}\), return to step 1. 4. If the available sub-channel set \(\mathcal{A}=\varnothing\), go to step 5. Otherwise, for every \(k^{\prime}\in\mathcal{A}\), find optimal \(m^{opt}\in\mathcal{M}\) which satisfies \(\left(m^{opt},k^{\prime}\right)=\arg\!\min_{(m,k):m\in\mathcal{M},k^{\prime} \in\mathcal{A}}\!\Phi\left(\gamma_{k^{\prime},m^{\prime}}^{C}\,\gamma_{n,m,k^ {\prime}}^{D}\right)\), then set \(\omega_{m^{opt},k^{\prime}}=1\), \(\mathcal{S}_{m^{opt}}=\mathcal{S}_{m^{opt}}\cup\{k^{\prime}\}\), \(\mathcal{A}=\mathcal{A}\setminus\{k^{\prime}\}\). 5. The sub-channel allocation can be determined by repeating the above steps. Phase 1 continues until all available sub-channels are allocated to the D2D groups. * Phase 2. SINR Assignment:
1. For the D2D group \(m\in\mathcal{M}\), obtain all SINR \(\gamma_{n,m,k}^{D}\,{}^{*}\) on the sub-channels by solving the problem (16). 2. According Equations (3), (4) and (9), calculate all \(p_{m,k}^{D}(\gamma_{k,m}^{C}\,{}^{*},\gamma_{n,m,k}^{D}\,{}^{*})\) and \(A_{n,m,k}\). 3. The power consumption and system capacity of D2D group \(m\) are respectively given by \(p_{m}^{D}=\sum_{k\in\mathcal{S}_{m}}p_{m,k}^{D}(\gamma_{k,m}^{C}\,{}^{*},\gamma_ {n,m,k}^{D}\,{}^{*})\), \(X_{n,m}=\left|\cup_{k\in\mathcal{S}_{m}}A_{n,m,k}\right|\). Repeat the above steps until the power consumptions and system capacities of all D2D groups are calculated ultimately.
```  
**Algorithm 1**Resource Allocation For D2D Multicast.  
We analyze the complexity of our proposed algorithm in this subsection. In phase 1, we search for the optimal matching of sub-channel resources between all D2D groups and CUs, and then all available sub-channels are allocated to the D2D groups. Hence the complexity of the sub-channel allocation is \(\mathcal{O}(MK)\). In phase 2, with \(\tau\) as a small acceptable tolerance for bisection algorithm, the complexity of the SINR assignment is \(\mathcal{O}(K\!\log_{2}(1/\tau))\). Therefore the complexity of multi-object optimization resource allocation is \(\mathcal{O}(MK)+\mathcal{O}(K\!\log_{2}(1/\tau))\). Obviously, our algorithm has polynomial complexity which has a linear relation with the scale of \(M\) and \(K\).