## System Model  
### Reference Scenario  
As depicted in Figure 1, this paper considers as reference scenario a D2D network composed by one source node (SN) \(\mathcal{S}\), usually the eNodeB, and by a set of end devices (EDs) \(\mathcal{D}=\{1,\ldots,n\}\). It is important to highlight that the proposed framework may be easily contextualized to a sensors network scenario, in which the information has to be spread from a source \(\mathcal{S}\) towards a sensors community \(\mathcal{D}\). The SN \(\mathcal{S}\), located far away from the set of EDs \(\mathcal{D}\), has to transmit the same information of size \(L\) in bits towards the whole ED community \(\mathcal{D}\), sited at the network edges. The ED elements of \(\mathcal{D}\) are geographically close to each other and \(\mathcal{G}_{d}=(\mathcal{D}_{d},\mathcal{E}_{d})\) denotes the EDs' proximity graph, in which the vertices set \(\mathcal{D}_{d}\) is the ED set \(\mathcal{D}\), i.e., \(\mathcal{D}_{d}=\mathcal{D}\), and \(\mathcal{E}_{d}\) is the edges set. Figure 1: The reference network consists of a source node \(\mathcal{S}\) and of a set of end devices (EDs) \(\mathcal{D}\). Furthermore, two EDs are connected through one edge if their mutual distance is such as to allow the D2D one hop communication in a reliable mode. \(\mathcal{G}_{d}\) is an undirected graph with a reputation coefficient \(\rho_{i}\), \(i\in\{1,\ldots,n\}\) associated to each node \(i\in\mathcal{D}_{d}\). A reputation coefficient \(\rho_{i}\in(0,1)\) is relative to every single node \(i\) and expresses the reputation of the vertices of \(\mathcal{G}_{d}\). The degree of each vertex \(i\) of \(\mathcal{G}_{d}\), i.e., the number of edges incident on \(i\), is denoted with \(deg^{d}(i)\). The transmission delay of packet \(l\) from the SN \(\mathcal{S}\) to the ED \(i\) depends on whether \(l\) is sent through the direct link between \(\mathcal{S}\) an \(i\) or with the one hop communication mode, selecting a node \(j\), \(j\
eq i\), as relay. We consider for the channel model, the path loss model for large-scale fading and a block fading Raleigh channel with the channel coefficient that consequently remains unchanged only during the transmission of one packet. Hence, the transmission delay of the direct link between \(\mathcal{S}\) and \(i\) can be expressed as  
\[\delta_{\mathcal{S},i}=\frac{L}{\log_{2}(1+\zeta_{\mathcal{S},i})} \tag{1}\]  
where \(\zeta_{\mathcal{S},i}\) represents the mean signal-to-noise-ratio (SNR) between \(\mathcal{S}\) and \(i\), measured at the ED \(i\) site. The mutual interference at the relays devices is not considered here by assuming the use of a dedicated transmission channel and ideal orthogonal transmissions on the other links. Furthermore, we assumed the use of a same shared channel to arrange communications between the selected relays and the EDs unable to have a reliable direct connection with the eNodeB. No perfect synchronization for the second hop transmissions, i.e., from the selected relays to the associated EDs, is considered. Consequently, the impairments due to the mutual interference effects at each ED connected to the appropriate relay due to the interfering transmissions of all the other relays has to be taken into account. Hence, for each ED \(i\) linked to the relay \(j\), we have  
\[\delta_{\mathcal{S},j,i}=\delta_{\mathcal{S},j}+\frac{L}{\log_{2}(1+\zeta_{i,j })}, \tag{2}\]  
where \(\zeta_{i,j}\) is the mean signal-to-inteference-plus-noise ratio (SINR) at each device ED \(i\) reached by the relay \(j\). Hence, for each ED \(i\), we have that the overall delay transmission from the SN \(\mathcal{S}\) can be defined as  
\[\Delta_{i}=x_{i}\delta_{\mathcal{S},i}+(1-x_{i})\sum_{j\in\mathcal{V}_{i}} \delta_{\mathcal{S},j,i}\mu_{j,i}, \tag{3}\]  
where \(x_{i}\) is a binary variable that assumes value 1 if the SN \(\mathcal{S}\) packet \(l\) to ED \(i\) using the direct mode, 0 otherwise.