Research Article

Game-Theoretic Social-Aware Resource Allocation for Device-to-Device Communications Underlaying Cellular Network

Algorithm 1

The utility function maximization D2D links redistribution algorithm.
Input: Number of mobile users and random resource allocation strategy .
Output: A priority based resource allocation scheme .
Utilize the dataset of Karate Club network
Calculate the transmission rate of the D2D links and cellular links.
Obtain and
if , remove the D2D links
else keep the D2D links
Define the matrix of indicator
  
There is just one cellular users qualified to share
   resources to D2D user,
else if, uniformly randomly choose one cellular users and
   possible cellular users , and denote its associate resource
   sharing as
Calculate and , priority = 0;
if ; then Priority = 1;
else repeat ;
if Priority == 1; then
D2D pairs quit current resource occupying strategy of , and
   turn to adapt the new resource allocation strategy of
substitute the current resource occupying strategy for
   strategy , and add it to
Until all of the D2D pairs complete the priority searching operation, resource
   occupying strategy switching operation and reach Nash Equilibrium