## 3 Methods
### Transmitting Messages
```
1:for each node \(A\):
2: when node \(A\) encounters node \(B\), they exchange their tables;
3:\(P(A,B)_{n\gets n}=P(A,B)_{old}+[1-P(A,B)_{old}]*\beta\)
4: end for;
5: for each node pair \(i\) and \(j\):
6:\(P(i,j)=\frac{P(i,j)_{old}}{2}\), \((i,j\in N)\)
7: end for;
8: for each message \(M\) of \(A\):
9: if(\(D==B\)){
10:\(A\) forwards \(M\) to \(B\);
11:\(D\) notifies that \(M\) has arrived and it can be deleted from all node buffers;
12: }
13: else{
14:\(A\) exchanges table with \(B\) and gains the set of connected paths (denoted as \(L\));
15: if(\(L\
eq NULL\)){
16: Arrange the paths in \(L\) from high to low according to the value of \(S\);
17: Get the top three paths \(L_{1},L_{2},L_{3}\) from \(L\)
18: if(\(S(L_{1})=S(L_{2})\parallel S(L_{1})=S(L_{2})=S(L_{3})\)){
19:\(A\) calculates the hops of \(L_{1}\), \(L_{2}\), \(L_{3}\) respectively;
20: if(\(h(L_{1})=h(L_{2})\parallel h(L_{1})=h(L_{2})=h(L_{3})\)){
21:\(A\) compares the traffic load of next hop on \(L_{1}\), \(L_{2}\), \(L_{3}\) respectively;
22:\(A\) forwards \(M\) to the next hop with the least traffic load;
23: }
24: }
25: else{
26:\(A\) forwards \(M\) according to \(L_{1}\);
27: }
28: }
29: else{
30: do nothing;
31: }
32: }
33: end for;
```  
**Algorithm 1** Scheduling-PROPHET  
The notations used in the above algorithm are listed as follows:  
* \(A\): a node carrying messages (\(M\));
* \(B\): a node encountered by \(A\);
* \(M\): the message node \(A\) intends to send;
* \(D\): the destination of \(M\);
* \(K\): any other node that is not encountered by \(A\);
* \(N\): the set of all nodes;
* \(L_{i}\): the connected path from source to destination;
* \(S(L_{i})\): the complete predictability of \(L_{i}\). We explain the process of the algorithm further as follows:  
1. The value of \(P(A,B)\) is calculated by Equation (1), and then all \(P\) values are re-normalized by Equation (2). 2. Messages are transmitted to the encountered node based on its priority. Specifically, if node \(A\) discovers the destination (node \(D\)) of the message (\(M\)), \(A\) will transmit \(M\) to \(D\) firstly. Otherwise, transmission is based on a ranked list of messages stored in nodes. 3. The message receiver (node \(D\)) confirms that it has already received the correct message, and notifies ACK to all senders. 4. Messages that have not been transferred in the buffer space will be transmitted one by one according to the priority. Scheduling-PROPHET calculates the possible paths (\(L\)) from the current sender to the destination according to the complete delivery predictability. In the protocol, we denote the maximum amount of paths to compare as \(\Delta\lambda\). Meanwhile, each possible path is normalized by Equation (4). For all paths, we rank them from high predictability to low based on the value of \(S(i,i+1,\ldots,D)\). Scheduling-PROPHET selects the path with the highest predictability for transmission. 5. We found that there will be more than one path with the highest predictability in real-life applications, but Scheduling-PROPHET forbids choosing two or more paths concurrently. Therefore, we attempt to take an additional factor, the hop count of a path (\(h(i,i+1,\ldots,D)\)). To the paths with the same predictability, the hop count of a path is calculated by Scheduling-PROPHET, and those paths are arranged in order according to their hop counts. Scheduling-PROPHET will choose the path with the minimum hops to transmit messages. In our protocol, we set the maximum amount of paths for comparison to 3. 6. Finally, in real applications, traffic load is a significant factor that has an impact on transmission efficiency. Thus, in our protocol, we take traffic load (\(tl_{i}\)) into consideration. For the paths with the same hop count, the traffic load kept by the nodes will be compared. Scheduling-PROPHET will choose the next hop with the least traffic load to transmit messages. In summary, Scheduling-PROPHET keeps choosing paths with the highest predictability for successful delivery, the minimum hop count and the least traffic load.