Research Article
Replication-Based Data Dissemination in Connected Internet of Vehicles
Algorithm 2
Distributed randomised algorithm.
Input: graph ; | |
Output: graph , parameter . | |
( Initialisation; | |
(Let ; | |
(Let indicate a vehicular node; | |
(Let indicate the distribution task of node ; | |
(Let indicate the new distribution task of node ; | |
(repeat | |
(; | |
(Each vehicular node at sending status randomly | |
chooses a vehicular node within its neighbourhood, then | |
sends the communication request; | |
(Each vehicular node at receiving status selects the | |
node from the received request if the gap between the | |
two nodes is the largest; | |
(Take pairwise proportional average operations for the | |
corresponding pairs of nodes; | |
(Let and indicate the vehicles who take average with | |
each other; | |
(New values of node and are updated | |
as , and | |
, respectively; | |
(until () | |
(End of Algorithm. |