# A Fuzzy Method for Joint Resource Allocation and Stable Pairing in D2D Communications
## 1 Introduction and Related Works
### Pairing in D2D Communications  
In the history of D2D communications, it is often supposed that the D2D pairs are formed before. The main issues are selecting the proper cellular user to share resourceswith, selecting the operating mode, and setting the power for cellular and D2D users. In the literature, pairing is defined and investigated as permitting a D2D connection (a transmitter and its associated receiver) to use the resource of a cellular connection [3; 4; 5; 6]. However, stable pairing for a D2D user in a practical scenario is an essential problem.  
This problem is investigated and studied in various approaches in the literature [7; 8; 9; 10; 11; 12; 13]. The nearest transmitter is considered to be the best transmitter in [7; 8; 9; 10], while the nearest transmitter is not necessarily the best [11; 12; 13]. Our approach to pairing is similar to [11; 12; 13], except that we consider the problem of multi-user pairing and resource allocation.  
In [14], the interactions and correlations among user equipments (UEs) and an iterative power allocation algorithm with a game-theoretic approach is studied to analyze establish mutual preferences based on nonlinear fractional programing. Then, a Gale-Shapley algorithm is employed to match D2D pairs with cellular UEs.  
A novel two-timescale resource allocation scheme is investigated in [15], so that the pairing between CUs and D2D pairs is decided at a long timescale. Moreover, the transmission time for the CU and D2D pair is presented at a short timescale. Specifically, the optimal cooperation policy to decide the transmission time based on the instantaneous channel state information (CSI) is investigated to characterize the long-term payoff of each potential CU-D2D pair. They prove that the optimal policy is a threshold policy that can be achieved via binary search.  
In [16], the authors solve a combinatorial NP-hard problem. User equipments (UEs) from two finite and disjoint sets are matched in a two-sided stable way based on the mutual preferences in each stage. First, the preferences of UEs are defined as the maximum achievable EE. An iterative power allocation algorithm is proposed to optimize EE under a specific match, which is developed by exploiting nonlinear fractional programming and Lagrange dual decomposition. Second, the authors propose an iterative matching algorithm, which first produces a stable match based on the fixed preferences and then dynamically updates the preferences according to the latest matching results in each iteration.  
In all the mentioned articles except [11; 12; 13], the nearest transmitter is considered to be the best transmitter, while the nearest transmitter is not necessarily the best due to interference and battery level. In other articles, it is assumed that the D2D users are paired and their proposed algorithms focused on resource allocation of D2D users with proper cellular users. Our proposed method shows that more suitable options can be found for pairing in D2D communications.  
There are limited works in the literature consider the battery of UEs in D2D-based cellular communications [17; 18; 19]. Ref. [17] takes into account the remaining battery time of relay nodes to improve the performance of D2D communications. Ref. [18] proposes a spectrum sharing algorithm to maximize the energy efficiency of D2D communications that enhances the battery lifetime of UEs. Finally, Ref. [19] presented a relay discovery mechanism to optimize the periodic discovery transmission of D2D UEs.