Research Article

Research on Manhattan Distance Based Trust Management in Vehicular Ad Hoc Network

Algorithm 1

Calculating the path algorithm with the maximum probability.
INPUT:
The storage matrix of the weighted directed graph and the vertex set , where represents the number of vertices in the graph.
OUTPUT:
  The path with the maximum probability ()
(1)   Initialize the shortest path length array , let , where ;
(2)   Initialize the path array with the maximum probability, let , where ;
(3)   Set , vertex is the road segment where the vehicle sending message is located;
(4)   Select the vertex k with the shortest path from the set , ();
(5)   Add vertex k to set U, let ;
(6)   For (each )
(7)    
(8)     let ;
(9)     let ;
(10)    End If
(11)    End For
(12)   If ()
(13)   Go to step 4;
(14)   End If