Research Article

Ad Hoc Communication Topology Construction for Delay-Sensitive Internet of Vehicle Applications

Algorithm 3

A centralized algorithm for the k-LTTC problem.
Input: Cluster Ci, time constant k
Output: k-hop bounded tree Tm
(1)make subset in the Ci;
(2)whiledo
(3)  Choose max number of set Sj in the subset ;
(4)  set ;
(5)  set ;
(6)end while
(7)find connected path between using shortest path;
(8)γ ←  size of connected path;
(9)  if γ> 2k then
(10)   divide connected path;
(11)  end if
(12)  if γ is odd number then
(13)   ;
(14)  else
(15)   ;
(16)  end if
(17)   => construct the bounded k-hop tree removing cycling edge
(18)  whiledo
(19)  for each adjacent vertex to () to (u) do
(20)   if v has no cycling then
(21)    
(22)   end if
(23)  end for
(24)   ←  − 
(25)   ← the min number of u
(26)  end while
(27)
(28)Return k-hop bounded tree Tm;