## 3 User Clustering and Power Allocation Co-Design
### Pairing-Assignment Strategy for User Clustering  
The idea of user clustering is coherent with NOMA systems' standard application requirements, where the simultaneously multiple transmissions are infeasible to apply on all users jointly due to the additional system overhead for channel feedback coordination and error propagation [52]. With users in the cell divided into multiple clusters, NOMA techniques can be employed effectively within each cluster. Several user clustering algorithms are facing different system environments and implementation complexity. The user clustering strategy should be compatible with the power allocation scheme to attain high energy efficiency with a low computational time cooperatively for our design goals. Intuitively, it is clear that the users with higher channel gain have higher energy efficiency with equal energy consumption. Moreover, the higher channel gain users can suppress more interfering signals, e.g., the highest channel gain user's signal in each cluster can suppress interfering signals from any other users while the user with the lowest channel gain can not suppress any interferences [53]. Therefore, increasing the allocation power of the user with the highest channel gain in a cluster will significantly improve throughput to enhance energy efficiency. Naturally, the potential energy efficiency gain is positively correlated with the highest channel gain in the cluster. Accordingly, users with high channel gain should be distributed into different clusters. On the other side, to ensure the minimum data transmission rate requirements for the users with low channel gain, it is necessary to pair them with high channel gain users. Due to the minimum data transmission rate requirements in (10), if users with low channel gain are put into the same cluster, a large part of power is required for them to transmit with the BS and the efficiency of this part of the power will be very low because they are allocated to low channel gain users. Conversely, suppose that high channel gain users and low channel gain users are assigned to the same cluster. In that case, the high channel gain users can achieve a higher transmission rate even with the low allocation power as the rest can satisfy low channel gain users' data transmission rate requirements. Given \(n\) users who are denoted as \(U_{1},U_{2},\cdots,U_{n}\) in ascending order of normalized channel gain \(H_{1},H_{2},\cdots,H_{n}\), based on the above consideration, we adopt the following simple but useful pairing-assignment strategy to allocate them to \(c\) clusters:  
1. User pairing: group high channel gain users and low channel gain users in pair, i.e., \(U_{1}\) and \(U_{n}\) in the first group, \(U_{2}\) and \(U_{n-1}\) in the second group, \(U_{3}\) and \(U_{n-2}\) in the third group, and so on. 2. Group assignment: Assign each group to a cluster in the order of user channel gain from high to low, i.e., the first group to the first cluster, the second group to the second cluster,..., the \(c\)-th group to the \(c\)-th cluster, the \((c+1)\)-th group to the first cluster, the \((c+2)\)-th group to the second cluster, and so on. Figure 2 illustrates an example result of allocating 19 users into three clusters. In the first stage, 19 users are paired into 10 groups as \(\{U_{1},U_{19}\}\), \(\{U_{2},U_{18}\}\), \(\{U_{3},U_{17}\}\), \(\{U_{4},U_{16}\}\), \(\{U_{5},U_{15}\}\), \(\{U_{6},U_{14}\}\), \(\{U_{7},U_{13}\}\), \(\{U_{8},U_{12}\}\), \(\{U_{9},U_{11}\}\) and \(\{U_{10}\}\). Here, \(\{U_{10}\}\) forms a group by itself since there is no user paired with it. After user pairing, 10 groups of users are  
allocated into three clusters as \(\{U_{1},U_{19},U_{4},U_{16},U_{7},U_{13},U_{10}\}\), \(\{U_{2},U_{18},U_{5},U_{15},U_{8},U_{12}\}\) and \(\{U_{3},U_{17},U_{6},U_{14},U_{9},U_{11}\}\). The obtained clustering result will become the input of the dynamic programming model.