# Cooperative Admission Control with Network Coding in 5G Underlying D2D-Satellite Communication
## Problem Formulation
### Cooperative Admission Control with Multiple Access Network Coding (JAMANC Algorithm)  
After the appropriate power allocation, user selection, and mode assignment for each device, the ATSPSN gives the preference list (mode and user selection) for all the admitted devices named JPFL. On the other hand, the MANC gives another PFL based on the network codes developed for multiple interfaces named MPFL. It categorizes the developed codes in 03 sets \(X_{c}\), \(X_{s}\), and \(X_{d}\) as as shown in Figure 5.  
The stable matching algorithm is developed whose purpose is to maximize the reward (capacity, packet completion time, etc.) jointly so that the benefit of both the techniques be utilized for better performance. For this purpose, a bi-directional local search matching algorithm is used [26]. As compared to the Gale-Shapley algorithm to find an optimal solution, which is selfish matching for the first PFL, the bi-directional used to maximize keeping the in view both PFL. The egalitarian cost \(c(V)\), and the joint cost for stable matching with instances V is defined \(d(V)\) is mathematically defined as:  
\[c(V)=JPFL(V)+MPFL(V) \tag{27}\]  
\[d(V)=|JPFL(V)-MPFL(V)|. \tag{28}\]  
There are several methods to search for stable egalitarian matching, which includes genetic algorithm, ant colony algorithm (ACS), approximation algorithm for finding the near-optimal solution for stable matching. As the number of stable matching (SM) tends to increase exponentially, so these techniques are not feasible in terms of the complexity. The bi-directional local search approach has better performance to attain the egalitarian matching [27]. In this scheme, one forward from MPFL and other backward from JPFL used and found where both meet, indicating the optimal solution. For search, GALE Sharpley [28] used while for the break joint operations [29] is used to generate stable neighboring matching to avoid getting stuck in a local optimum. GALE Sharpley algorithm finds the man optimal stable matching; in our case, MANC optimal stable matching. At starts, the algorithm assigns no mode. At each iteration step, the algorithm selects a device from MPFL and selects the most appropriate matching from the JPFL list. If the mode in \(n\) device from JPFL is free, it will be matched with the device from the same \(n\) device from MPFL. If the device from JPFL is already engaged with some other device, so it rejects the matching from MPFL. The algorithm terminates when all the devices from MPFL are linked to the JPFL or show invalid matching. If MPFL and JPFL are interchanged, then the optimization is based on the JPFL instead of the MPFL. Once the pairing is done in one direction, then the break joint operation is done. Let V be a stable matching and (JPFL, MPFL) be engaged in V. The break joint problem as derived from [29], denoted by the \(Break-Joint(V,MPFL)\), find the stable matching from V to MPFL. In the beginning, the algorithm assigns the preferred mode of the JPFL with the MPFL preference mode. The algorithm performs a sequence of matching, rejection, and acceptance based on the Gale-Shapley algorithm at each iteration. There is always 02 free mode any time execution of the algorithm, if the JPFL mode matches with MPFL mode for the corresponding device, then there is no need of other modes, and \(Break-Joint(V,MPFL)\) returns a stable matching \(V^{\prime}\) of \(l\) engaged pairs. The [PERSON] and [PERSON] imposed conditions [29] are used for stable matching in the break-joint JAMANC operation as follows. * **Condition 1**: If \(Break^{\prime}Joint(V,MPFL)\) returns \(V\) on \(MPFL^{\prime}\), then the \(Break^{\prime}Joint(V^{\prime},i)\) only be performed on MPFL \(\rhd i\ \geq\ MPFL\). * **Condition 2**: In \(Break^{\prime}joint(V,MPFL)\), only MPFL with \(MPFL^{\prime}\geq MPFL\) propose, otherwise the \(Break^{\prime}joint(V,MPFL)\) is stopped. At first in Algorithm 5, [PERSON] is used to finding the optimal matching of mode selection for JPFL and MPFL, which gives a start for the BiLS-Joint algorithm.