# Cooperative Admission Control with Network Coding in 5G Underlying D2D-Satellite Communication
## Appendix B Theorem II  
Proof.: Let us consider following cases.  
* \(X_{c}\geq(2\mid X_{s}|+|X_{d}|)\): During this conditional statement, the base station transmits the packets \(X_{c}\) and the D2D area network coded packets transmit the \(X_{s}\) and \(X_{d}\) via D2D link in such a way that first \(X_{d}\) is transmitted then \(X_{s}\) is transmitted after that. After the \((2\mid X_{s}|+|X_{d}|)\) timeslots of transmission, only \(|X_{c}|-(2\mid X_{s}|+|X_{d}|)\) packets are left behind for the transmission and requires \(|X_{c}|-(2\mid X_{s}|+|X_{d}|)\) timeslots to re-transmit the packets from the base station. The packet completion under this condition is mathematically written as \(T_{(1)}=|X_{c}|\).
* \((2\mid X_{s}|+|X_{d}|)\geq|X_{c}|\geq(|X_{d}|-|X_{s}|)\): To evaluate this condition, the problem is divide into two statements. First, \(|X_{c}|\leq|X_{d}|\) and second \(|X_{c}|\geq|X_{d}|\). For the first case, if the base station is transmitting from \(|X_{c}|\), then via D2D link \(|X_{d}|\) is transmitted. Since \(|X_{c}|\leq|X_{d}|\) is then after some time, all the packets in \(|X_{c}|\) transmitted and only \(|X_{c}|-|X_{d}|\) packets are left to transmit. Then cooperative transmission is done by the satellite and D2D for codes available in \(X_{s}\). After \(|X_{c}|-|X_{d}|\) timeslot, one code is sent by D2D link from \(|X_{d}|\) and at the same time, one code is transmitted from the \(X_{s}\). At last, only packets \(|X_{s}|-(|X_{d}|-|X_{c}|)\) will remain and sent by the \(\frac{2}{3}(|X_{s}|-(|X_{d}|-|X_{c}|))\) timeslot for transmission through satellite and cooperative devices in D2D. So the required number of time slots for re-transmission in second stage is \(\frac{1}{5}(|X_{s}|+(|X_{d}|+2|X_{c}|))\). Now for the second case, the base station transmits the packet from \(|X_{c}|\) and \(|X_{d}|\) via D2D link. The \(|X_{c}|\geq|X_{d}|\), so after \(|X_{c}|-|X_{d}|\) transmission, only \(|X_{c}|\geq|X_{d}|\) packets is left to be transmitted by D2D link. It takes \(\frac{2}{3}(\frac{|X_{s}|-(|X_{s}|-|X_{d}|)}{2})\)timeslots by the source and D2D supported satellite network to complete the re-transmission of the complete packets. So for case two, \(\frac{1}{5}(|X_{s}|+2\mid X_{c}|+|X_{d}|)\) is the total completion time required. Moreover, the inequality \(|D_{n}|\geq(|X_{c}|+|X_{s}|)\) holds for all devices \(neR\). Mathematically, shown as \[|X_{s}|\leq(min|D_{n}|-X_{c})\quad n\varepsilon R.\] (11) The upper bound on packet completion time becomes as \[T_{(2)}=\frac{1}{3}(2\mid X_{s}|+2|X_{c}|+|X_{d}|)\leq\frac{1}{3}(2\:min_{ neR}|D_{n}|+|X_{d}|).\] (12)
* \(|X_{c}|\leq(|X_{d}|-|X_{s}|)\): The base station starts re-transmitting the packets available in \(|X_{c}|\) set, and \(|X_{d}|\) packets are transmitted via the D2D link. After \(|X_{c}|\) time slots, all the packets transmitted by the base station and \((|X_{d}|-|X_{c}|)\) packets are left to be transmitted by the satellite and D2D links. In next time slots, \((|X_{d}|-|X_{c}|)\)packets are transmitted via D2D link and satellite links cooperatively. At last, \(|X_{d}|-|X_{c}|-|X_{s}|\) left and it takes \(\frac{(|X_{d}|-|X_{c}|-|X_{s}|)}{2}\) timeslots fo the transmission by satellite and D2D cooperative network. So combining all the cases, the upper bound of the packet completion time becomes as \[T_{(3)}=\frac{|X_{d}|+|X_{c}|+|X_{s}|}{2}\leq\frac{|X_{d}|+min_{ neR}|D_{n}|}{2}.\] (13) By combining the \(T_{(1)}\), \(T_{(2)}\) and \(T_{(3)}\), we get the Equation (18).