Research Article

[Retracted] 5G-EECC: Energy-Efficient Collaboration-Based Content Sharing Strategy in Device-to-Device Communication

Algorithm 1

Cluster formation and cluster head selection.
Input:
(i)    List of device ids and their transmission range
(ii)    Coefficients of
(iii)    List of device ids and transmission range
Output: Cluster formation and cluster head selection
Steps
(1) Begin
(2)  for any node  ∊ G
(3)   then
(4)    form a neighboring list N(j) by broadcasting the hello message;
(5)   Calculate the coefficient of equation (6) and calculate
(6)   Initialize time cluster and state vector for all node  ∊ G
(7)   Vector state (id, weight, list neighbor, CH, Helper);
(8)   Initially CH = 0, helper = 0;
(9)   if ∊ G broadcast hello message && N(j)! = 
(10)    then
(11)    Vn is set at the header of Ci
(12)   else
(13)    Choose cluster leader = 
(14)   end if
(15)   State vector of elected CH is updated
(16)   CH = id;
(17)   helper = 0;
(18)   CH send “CHMSG” to neighbor N[CH] to stop selection
(19)   K = Count[N[CH]];
(20)  end for
(21)  for i = 1 to K Do
(22)   then
(23)    if receive “CHMSG”
(24)    then
(25)     Stop cluster head selection and become member of cluster
(26)    if energy > threshold energy && capacity > threshold capacity
(27)      then
(28)      CH sort helper in ascending order based on energy and capacity
(29)     else
(30)     Nodes become ordinary member
(31)    end if
(32)   else
(33)     Continue selection process
(34)   end if
(35)   State vector of selected helper is updated
(36)   helper = id;
(37)  end for
(38) end