# Social-Aware Relay Selection for Cooperative Multicast Device-to-Device Communications
## 3 System Model
As a consequence, the aim of this paper is to minimize the end-to-end delivery delay that is obtained considering \(T_{j}\), the time needed to transmit from the source to the \(j\)th selected relay, and \(T_{j,l}\), the overall time for transmission from the relay to the destinations. In the case of multicast transmission, the time to deliver the data from the relay to destinations is related not only to the link with the higher delay, because all the destinations have to receive the same content, but also to the social-trust level of the relay, which allows or does not allow the transmission to destinations. The quality of physical channels is directly related to the SNR and consequently to the data rate available, while the social trust \(\beta_{j}\) assures the social link among the nodes. These two aspects, the social relationship and the channel quality, must to be balanced to optimize the end-to-end delivery delay for the cooperative multicast D2D relaying. Accordingly to this, the channel rate \(C_{j}\) for the link between the source and the \(j\)th relay is  
\[C_{j}=W\log_{2}(1+\gamma_{S,R_{j}}) \tag{2}\]  
where \(W\) is the system bandwidth and \(\gamma_{S,R_{j}}\) is the SNR of the link between the source and the \(j\)th relay; the multicast channel rate can be expressed for each link from the \(j\)th relay to all the destinations \(D_{i}\) with \(i=1...M\) as  
\[C_{j,i}=Wlog_{2}(1+\gamma_{R_{j},D_{i}}\beta_{j}) \tag{3}\]  
The data rate for cooperative D2D relaying is  
\[C_{j,l}=\min_{i}(C_{j,i}) \tag{4}\]  
Figure 2: Multicast model based on social-trust level. Therefore, by considering the impact of the social trust \(\beta_{j}\), the delivery delays are  
\[T_{j} \simeq\frac{1}{C_{j}} \tag{5}\] \[T_{j,I} \simeq\frac{1}{C_{j,I}} \tag{6}\]  
Then, \(T_{j,I}\) is the maximum delivery delay related to the worst link to the relay destinations. We consider that the transmit power that needs to transmit in two hops, source-relay and relay-destinations, is not larger than that of the multicast transmission without the use of relays. Regarding the social-trust level \(\beta_{j}\), we assume two values, 0 and 1, where a higher value of \(\beta_{j}\) represents a stronger social trust; moreover, we consider that friends have similar behavior in transmitting shared data. For example, a D2D user/relay can choose its friends on its own contact list to define who and how it can help other users for cooperative D2D relaying. To this end, the optimization problem can be formulated and approximated as  
\[\min_{j}(T_{j}+T_{j,I}) \tag{7}\] Figure 2.0 (8) Figure 2.1  
The second constraint (Equation (9)) guarantees that the total transmit power for the two hops due to relay transmission is not larger than that of multicast communication, for which the source transmits with a power \(P_{S_{1}}\) directly to the destinations over a total time duration equal to \(T_{1}\). The power \(P_{S}\) transmitted by the source for the two hops can be different from the power \(P_{S_{1}}\). The optimization problem (Equation (7)) can be solved with a complexity of \(O(M*N)\). An exhaustive search to find the optimal solution is affordable, because in the case of multicast communications, the number of participants to the multicast cluster, and consequently the subset of relays, is limited. In the social relay selection method, we first retrieve the payable transmit power, the geographical locations of each device, and the channel gains and calculate the SNR for each link. Then, we calculate the delivery time needed from the source to each relay and the maximum delivery delay for each group of relay destinations sequentially until the number of relays is reached. We sort the sum related to these delivery times, and, finally, we select the best relay, which assures the minimum delivery time from the source to the destinations. These steps are shown in Algorithm 1 following.