## 3 Proposed Schemes: Midpoint Relay Selection Using Social Trust and Battery Level  
We present the design of relay selection schemes for two-hop D2D communications utilizing social information of mobile users and battery level of mobile devices in the network. A relay is selected among the devices that are located around the midpoint of the distance between the source and the destination. The key difference in the design of relay selection schemes proposed in this paper compared to our previous papers in References [9, 10, 11] is that our new design also takes into account the battery power of devices while selecting a relay for D2D communications. We propose two variations of midpoint relay selection using social information and battery level of devices. They are:  
1. Midpoint Relay Selection Using Social Trust and Battery Level (MRS-ST-BL)
2. Midpoint Relay Selection Using Social Distance and Battery Level (MRS-SD-BL)  
This section is mainly focused on the set of tasks performed by different network entities to select a relay for D2D communications, not on details of conventional cellular communications. We present the information exchange between different entities of the network for relay selection, highlighting the use of battery level information of devices during relay selection. Algorithm 1 illustrates the tasks performed by a BS to select a relay. When a source wants to have a relay for D2D communication, it sends a D2D communication request to the BS which contains the source and the destination identity. In response, BS identifies location of the source and the destination, and calculates the corresponding midpoint \(m\) using the location information. The BS then identifies the idle nodes that are located within a circular region of radius \(R\) with the center at the midpoint, and battery level of the idle devices. The BS also determines the maximum transmission power \(Pmax\) that is allowable for D2D communication of based on the system parameters (geo-location) and protection requirement of neighbouring cellular devices [7,8]. After that, BS sends maximum allowable transmission power and the list of idle devices and their corresponding battery level to the source. The additional information on battery power level of devices is used compared to MRS probing protocol [10], to increase throughput of D2D communications when devices in the network have varying battery power levels. The social trust values that the source has for other devices provide an idea of which devices have the potential to transmit at a high power as explained in Section 2.3. Therefore, among the list of idle devices received from the BS, the devices having social trust with the source are identified by the source (e.g., comparing with its contact list). Only the devices that have social trust values above certain social threshold are selected from the list. The way of filtering of devices for relay selection are different for MRS-ST-BL and MRS-SD-BL, and are implemented as in Algorithm 2 for MRS-ST-BL and Algorithm 3 for MRS-SD-BL. In the proposed MRS-ST-BL, a source initially filters the socially trusted devices above social threshold. The source sequentially probes at most \(l\) devices from the list having large social trust values. The probed device transmits at a power proportional to the social trust only when the battery level of the device is greater than or equal to battery threshold (\(B_{\textit{thres}}\)). Otherwise, the device transmits at a lowest power possible. In the proposed MRS-SD-BL, a source initially filters at most \(l\) devices nearest to the midpoint and probes the devices having social trust above social threshold. The transmission power of a probed device also depends upon the battery level of the device and social trust as in MRS-ST-BL. As a reply to a probe, each of the candidate relay devices, individually responds to the source with SNR of the probe signal they have received and also forwards the probe message to the destination as implemented in Algorithm 4.