# NOMA-Based Rate Optimization for Multi-UAV-Assisted D2D Communication Networks
## 4 Problem Solution
### Subchannel Assignment Based on Dynamic Hypergraph Coloring
#### 4.1.1 Construct the Dynamic Hypergraph  
In dynamic hypergraphs, interference relations are categorized into simple and multilateral edges. Simple edges represent two vertices connected by a strong interference source and are suitable for the case of independent interference, where users connected to the simple edges are assigned different subchannels by the dynamic hypergraph coloring process to ensure that the interfering pairs of communications can be clearly identified and separated at any moment; in contrast, polygons represent the cumulative interference among multiple users, where multiple vertices are connected to the same hyperedge to characterize the interference superposition effect among them. The dynamic adjustment ofthe hyperedges allows the model to respond flexibly to changes in network topology and interference conditions, thus optimizing resource allocation and communication quality. (1) Dynamic simple edge construction. When cellular user \(C_{i}\) and D2D cluster \(D_{j}\) use the same resources such that the received signal-to-interference-noise ratio (SIR) obtained by the cellular link is below a certain threshold, a certain interference relationship is considered to exist between them, and a simplex edge will be established between \(C_{i}\) and \(D_{j}\) at this point. Specifically, under time slot \(t\), if the signal-to-interference ratios of \(C_{i}\) and \(D_{j}\) are below their respective thresholds (\(\lambda_{c}\) and \(\lambda_{d}\)), i.e., when the cellular link satisfies Equation (27) or the D2D link satisfies Equation (28), it is indicated that there is an interfering relationship between \(C_{i}\) and \(D_{j}\) under the current time slot, which is not suitable for direct resource sharing. \[\frac{P_{i}^{u}\big{|}S_{i}^{u}\big{|}^{2}}{P_{i,D_{j}}^{u}\big{|}S_{i,D_{j}T_ {j}}^{u}\big{|}^{2}}<\lambda_{c} \tag{27}\]  
\[\frac{P_{i,D_{j}}^{u}\big{|}S_{i,D_{j}T_{j},DR_{j}}^{u}\big{|}^{2}}{P_{i}^{u} \big{|}S_{i,D_{j}T_{j}}^{u}\big{|}^{2}}<\lambda_{d} \tag{28}\]  
Similarly, if two D2D clusters \(D_{j}\) and \(D_{j}^{\prime}\) satisfy Equations (29) and (30), simple edges will be formed between them. If there are simple edges between \(D_{j}\) and \(D_{j}^{\prime}\), then these two D2D clusters will not be able to share channel resources. In addition, since cellular users can only use orthogonal channel resources, cellular links are constructed as simple edges between them to ensure that different resources are allocated. \[\frac{a_{i,DR_{j,\mu}}^{u}\big{|}S_{i,D_{j}T_{j},DR_{j,\mu}}^{u}\big{|}^{2}}{ \bigg{|}S_{i,D_{j}T_{j}^{\prime},DR_{j,\mu}}^{u}\bigg{|}^{2}}<\lambda_{d} \tag{29}\]  
\[\frac{a_{i,DR_{j,\mu}^{u}}^{u}\bigg{|}S_{i,D_{j}T_{j}^{\prime},DR_{j,\mu}}^{u} \bigg{|}^{2}}{\bigg{|}S_{i,D_{j}T_{j},DR_{j,\mu}}^{u}\bigg{|}^{2}}<\lambda_{d} \tag{30}\]  
(2) Dynamic multilateral construction. A multilateral connects more than two vertices to represent the cumulative interference to the user, considering weaker interference sources other than those that have strong independent interference to the user. From these, a group of interference sources is selected, and the ratio of the signal strength to the cumulative interference strength brought about by their simultaneous multiplexing of the resource is compared with the interference threshold. If it is lower than the threshold, the communication link is connected to this group of interference links as a hyperedge. Under time slot \(t\), for cellular user \(C_{i}\), if the ratio of received signal strength to cumulative interference is less than the threshold \(\lambda_{c}\), as in Equation (31), a multilateral between the cellular user and the D2D cluster is established. Correspondingly, for D2D cluster \(D_{j}\), if the ratio of received useful signal to cumulative interference for any of the D2D links it contains is less than the threshold \(\lambda_{d}\), as in Equation (32), then all the polygons connecting this D2D cluster are created.