# Cooperative Admission Control with Network Coding in 5G Underlying D2D-Satellite Communication
## Problem Formulation
### Multiple Access Network Coding (Lossy Second Stage)  
The lossless second stage helps identify our proposed network coding scheme's strength, but in reality, there is always some loss. The previous approach is not feasible as it requires a fixed set for all timeslots. The packet completion now depends on the loss in the first stage and the packets lost in the second stage. The packet completion depends upon the packet transmitted and the packets received by the target receivers, which is defined as \(\gamma_{n}\). The admitted receivers have defined as the devices which successfully receive the innovative packets send in that timeslot. First, find the average number of the admitted receivers that receive the targeted packet successfully is calculated as \(\sum_{n\in\gamma_{n}}\left(1-\tau_{n}\right)\). Moreover, the successful packets received given as \(\sum_{n\in\gamma_{n}}\left(1-\vartheta_{n}\right)\). MANC Batch (Second Stage Lossy)  
The Algorithm 3 defines the MANC-batch for lossy communication. ```
Source packet selection criteria
1. Make a random linear combination of the packets at the higher galileos field in \(X\). 2. The transmitter (base station/satellite) broadcast the packet innovative for all the devices. 3. For (any device in \(R\))
4. \(\gamma_{n}=m|(peA_{n}|p\perp A_{m}\) means that packet p cannot be shown as a random linear combination of the packets in \(|A_{k}|\). 5. \(|Avg_{n}|=\sum_{n\in\gamma_{n}}\left(1-\tau_{n}\right)\). 6. \(x=arg\;max_{neR}\;Avg_{n}\). 7. Linear combination of the packet for \(|D_{x}|\). 8. x broadcasts the linear combination of the packets from the source. ```  
**Algorithm 3**MANC Batch (Lossy second stage)  
In Algorithm 3, the number of the average successful receiver during the re-transmission phase is given by the \(\sum_{n\in\gamma_{n}}\left(1-\vartheta_{n}\right)\) while the receiver with \(|D_{n}|>0\) is interested in the innovative packets. To maximize the successful reception of the innovative packets, the \(\gamma_{n}\) devices are selected in such a way to maximize the successful receivers. First, the source determines the missing packets in the devices, and second, transmit the linear combination of the packets from the source. Network coded packet from source or satellite carries information about all the missing packets from the source. So the code always maximizes the selection of maximum \(\gamma_{n}\) devices. After selecting packets from the source, now comes the criteria to select packets from the D2D links in the local network. One device is selected as a controller based on criteria in line 6 of Algorithm 3, which selects the transmitter with the maximum number of the average receivers to have innovative packets in one transmission time slot. Moreover, the linear combination should be independent of all the packets in \(|A_{m}|\). The mobile device x with the largest average successful receivers is selected as the transmitter, and if more than one, then one is selected randomly at the moment for simplicity. After transmitting from the source and via the D2D link, if the innovative data received successfully, then it is added in the matrix of the \(|A_{k}|\). Now for the next transmission, again, the transmitter with the max number of \(|A_{n}|\) and independent from \(|A_{k}|\) is selected and transmits the data, which is as per our algorithm in lossless channel.