## 4 Complexity Analysis  
In a nutshell, an effective fuzzy control routing-forwarding algorithm is proposed in this paper. We comprehensively considered the possible behavior patterns of nodes and innovatively divided the background of the routing algorithm into working time and non-working time in the opportunistic social network. At the same time, in order to enhance the understanding and readability of our whole algorithm, the detailed steps of the MSFC algorithm are listed as follows:  
Step 1: Firstly, we should judge whether the source node \(i\) is in working time or non-working time. Secondly, we should determine whether the neighbor node \(j\) of source node is in working time or non-working time. Finally, the neighbor nodes are divided into two sets: _List_worktime_ and _List_noworktime_.  
Step 2: This article defines a common function, which includes a label \(t\). When \(t\) is equal to one, nodes \(i\) and \(j\) live in the working time. Otherwise, when \(t\) is equal to zero, nodes \(i\) and \(j\) live in the non-working time. When nodes \(i\) and \(j\) live in the working time, calculate the degree of intimacy and separating time; when the nodes \(i\) and \(j\) live in the non-working time, calculate the node sensitivity of interest and the sensitivity of age.  
Step 3: According to the fuzzy decision control system, each node evaluates the membership degree of CFwith other nodes, determines the level of the transmission preference, and stores it in an \(n\times n\) matrix, which is known as \(M_{ij}\).  
Step 4: The dimension of \(M_{ij}\) is reduced to a vector, and the node with a high degree of membership is selected. That is to say, this node is considered to be in the active state, and the active node is selected as the optimum next hop node.  
Algorithm 1 and Figure 4 are proposed to make the MSFC algorithm more rigorous and intuitive. Specifically, in the process of determining the membership degree, each node pair has a common function corresponding to three different levels (low, medium, high) that contain \(n\) membership degrees values, which presents a time complexity of \(O(n)\). Ultimately, the time complexity of the process of finding the optimum next hop node is \(O(n)\). As a consequence, the overall time complexity of the fuzzy control routing-forwarding algorithm can be computed as \(O(n+n)=O(n)\).  
```
Input: all nodes in the opportunistic social network; Output: the optimal next hop nodes;
1. Begin
2. Defining a common function \(\widetilde{CF}(i,j,t)\);
3. For each node
4. Judge the time of node \(i\) and node \(j\);
5. If node \(i\) and \(j\) live in the working time
6. Calculate \(IS\) and \(AS\);
7. Give different weights for two metrics;
8. Get \(\widetilde{CF}(i,j,1)\);
9. Else
10. Calculate \(DI\) and \(ST\);
11. Give different weight for two metrics;
12. Get \(\widetilde{CF}(i,j,0)\);
13. \(CF(i,j,t)=\tanh(\widetilde{CF}(i,j,t))\);
14. End if
15. End for
16. For (\(i=1\); \(i<=n\); \(i++\)) do
17. If \(CF(i,j,t)\leq u\)
18. Calculate \(A_{low}(CF(i,j,t))\);
19. Else if u \(<\)\(CF(i,j,t)\leq v\)
20. Calculate \(A_{medium}(CF(i,j,t))\);
21. Else
22. Calculate \(A_{high}(CF(i,j,t))\);
23. End if
24. Give the state of the node based on \"IF-THEN\" rules;
25. Get the nodes' state level matrix \(M_{ij}\);
26. Calculate \(A_{i}(x)=\mathop{\vee}\limits_{i=1}^{n}f(u,v)(CF(i,1,t))\);
27. Calculate \(A_{i}(x)\) based on the maximum membership principle for each row;
28. End for
29. Select the node that has high activity as the next hop node;
30. End
```  
**Algorithm 1**Multi-scenario routing algorithm based on fuzzy control theory.