*3.5. Algorithm*

The new probability matrix is obtained by using the matrix of social relation transformation and the matrix of cooperation forwarding relation. Because meeting the probability matrix is obtained by node meet history information, which is often incomplete, we need to fill in the missing value with additional information or update the encounter value with the cooperation degree and social of the devices. We called the newly updated probability matrix the encounter cooperation matrix containing the encounter cooperation (EC) values. Our algorithm is shown as follows:

**Algorithm 1:** PEBN (predict the probability of encounters between nodes).

**Input:** *M*: The encounter matrix formed by the node encounter probability map in the *T* period *Sim*, *Move*, *Conn*, *Pre f* , *Rel*, *Act*, *Need*, *E*

*T* period


## **Return** Step 5;

26: **End if**

### **Algorithm 2:** Matrix update algorithm

**Input:** *M* The matrix trained by Algorithm 1

*Mt*1 ··· *Mtn* The encounter matrixes carried by the nodes entering the area that are received at different time intervals.

**Output:** *M<sup>T</sup>* Complete the updated matrix


9: *Mij*.*update*(*Mtkij*)

1

