## 4 Execution of MAMC-MAC Protocol
### Multi-Hop Message Routing  
The major challenge in multi-hop message delivery is choosing the best next node path to route the data. The next node is selected based on the hops present in the direction of the destination hop. This maximizes the possibility of detecting the shortest path [28]. We consider P hops in the network, say the location of a random cluster a1 is \(P_{a1}\). It is clear from the below equation (Equation (1)) that, during any time slot '\(t\)', if any two clusters are enclosed in RF range of each other, they satisfy the following equation:  
\[P=\frac{\frac{A_{a1}(t)}{(P_{a1}(t)-P_{a2}(t))^{2}}}{\frac{\Sigma P_{a1}(t)}{(P _{a1}(t)-P_{a2}(t))^{2}}}>SINR \tag{1}\]  
where \(A_{n1}(t)\) gives the node n1 transmission power, \(P_{a1}(t)-P_{a2}(t)\) gives the inter cluster distance of two clusters, SINR gives the signal-to-interference-and noise ratio, while \(\sum A_{a1}(t)\) gives the cluster a1 summarized transmission power. Equation (2) states that the two clusters (a1 and a2) are coupled at some random time '\(t\)' if transmission range \(T_{r}\) is greater than the distance between them.  
\[(P_{a1}(t)-P_{a2}(t))<T_{r} \tag{2}\]  
In multi-hop scenario, the message broadcasting is performed very fast amid the nodes connected with a message routing schema. Here, a hop within a cluster transfers data packets to its surrounding clusters and every cluster after successful reception of the packet forwards it to the next neighboring cluster. To ensure transmission efficiency of messages, it is necessary to have an effective routing method, as shown in [29]. The multi-hop message routing algorithm is shown in Algorithm 3.  
The flowchart of the proposed MAMC-MAC protocol is shown in Figure 5. First, HELLO message signaling grants nodes within the network to become familiar with each other's coordinates. Next, in our approach, we split the complete DSRC band into frames so that the complete bandwidth is available for transmission of a safety message. Later, clusters are formed depending upon the mobility pattern congregated to beaconing of the HELLO message. Furthermore, frame assignment to the clusters is performed depending upon their mobility pattern. This implies that a greater number of frames are assigned to the clusters with maximum speed. This guarantees the successful transmission and strengthens channel utilization. These frames are further split into a number of slots. For transmitting a message, each node is assigned to a slot. Now, consider initiation of the safety message at node i and transferred to the clusters with a hop distance of (i+\(h_{c}\)), with \(h_{c}\) representing the message hop count. At first, we consider the \(h_{c}\) value to be 1. Whenever the clusters near one hop receives the message, it is verified for the present \(h_{c}\). If the \(h_{c}\) value is less than M, for M = 4, the message is transmitted and the value of \(h_{c}\) is augmented by 1. Similarly, the message is relayed and broadcasts up to M nodes far away clusters. We assume \(h_{c}\) to be 4 because the message is no longer relayed when \(h_{c}\) becomes greater than M hops and is discarded as obtained from the performance evaluation.  
Figure 4: TDMA frame format.  
```
1 Routing begins whileit is truedo
2 ifRequest is receivedthen
3 get the \(h_{c}\) and source ID
4 endif
5
6 else
7 SAS is updated
8 endif
9 Retransmit REQ
10 ifhc = hc + 1
11 then
12 REQ is retransmitted
13 else
14 if\(h_{c}\) > N
15 REQ will be rejected
16 endif
17 end while
```  
**Algorithm 3**Multi-hop message routing.  
Figure 5: MAMC-MAC flowchart.