## 4 EMOR Protocol Design for WSN in NAN
### Construction of Opportunistic Connection Random Graph  
The construction of OCRG is dependent on the asynchronous working-sleeping cycle of sensor nodes and additional source information received within probe message forwarding during the initialization phase. In order to construct an OCRG, we assumed that the mobile sink is always in working mode and any sensor node within the short radio range \(R_{S}\) of the mobile sink can communicate with the mobile sink at any time. Furthermore, we proposed a data set \(D\)(\(S\),\(N_{s}\),\(W\)/\(S\),\(F_{ST}\),\(R_{E}\),\(B_{S}\),\(S\)/N) consisting of source (\(S\)) and its neighboring nodes (\(N_{S}\)) information, working-sleeping cycle schedule (\(W\)/\(S\)), status transition frequencies (\(F_{ST}\)) for every sensor node, residual energy of every sensor node after every round of communication (\(R_{E}\), buffer size (\(B_{S}\)) and signal-to-noise ratio (\(S\)/\(N\))) of every sensor node with its adjacent nodes. Using this data set \(D\)(\(S\),\(N_{s}\),\(W\)/\(S\),\(F_{ST}\),\(R_{E}\),\(B_{S}\),\(S\)/N), we analyzed the opportunistic connection between any adjacent sensor nodes which are in working mode. Additionally, for EMOR, the link connectivity between adjacent nodes is dependent on asynchronous working-sleeping cycle _W/S_, status transition frequencies \(F_{ST}\) of the adjacent nodes, residual energies of the adjacent nodes \(R_{E}\), remaining buffer size of the adjacent nodes to cache the sensory data and link quality factor between adjacent nodes in terms of signal-to-noise ratio _S/N_. More status transitions of a node will lead to an improvement in its link connectivity with the adjacent node as the probability of establishing a link connection will increase. Keeping in view the data set _D(S,N,W,S,FST,R_{E},B_{S},S/N\)_, the time-frequency parameter \(TF_{VIVj}\) of link connectivity \(L_{VIVj}\) can be calculated as:  
\[TF_{VIVj} =\left(\frac{F_{STVi}}{F_{STmax}}\times\frac{W_{Vi}}{T_{CP}}\right) \left(\frac{F_{STVj}}{F_{STmax}}\times\frac{W_{Vj}}{T_{CP}}\right) \tag{4}\] \[TF_{VIV_{SINK}} =\left(\frac{F_{STV_{i}}}{F_{STmax}}\times\frac{W_{V_{i}}}{T_{CP} }\right)\left(W_{V_{SINK}}\right) \tag{5}\]  
where \(W_{Vi}\)_and_\(W_{Vj}\) are the whole working time of the adjacent nodes \(V_{i}\) and \(V_{j}\), \(T_{CP}\) is the data collection period during probe message forwarding mechanism, \(F_{STVi}\) and \(F_{STVj}\) are the status transition frequencies of adjacent nodes \(V_{i}\) and \(V_{j}\), \(TF_{VIVj}\) is the time-frequency parameter of link connectivity \(L_{VIVj}\), and \(F_{STmax}\) is the max status transition frequency value obtained during \(T_{CP}\) which is used here for normalization of the sensor node's \(F_{ST}\). The mobile sink is always in working mode, so \(W_{SINK}=1\) and Equation (5) will be become,  
\[TF_{VIV_{SINK}} =\left(\frac{F_{STV_{i}}}{F_{STmax}}\times\frac{W_{V_{i}}}{T_{CP}}\right) \tag{6}\]  
Hence, the time-frequency parameter \(TF_{VIV_{SINK}}\) only depends upon the whole working time and status transition frequency of the sensor nodes. With time-frequency parameter \(TF\), we have to calculate the residual energy, remaining buffer size and link quality factor between adjacent nodes. In order to determine the next best hop, we assume that there are N nodes deployed in the NAN, so our link connectivity function \(L_{VIVj}\) in terms of \(TF\), \(R_{E}\), \(B_{S}\), _S/N_ will be:  
\[L_{VIVj}=\max_{Vj\in N}\{\alpha TF_{VIVj}+\beta R_{E,Vj}+\gamma B_{S,Vj}+ \sigma S/N_{VIVj}\} \tag{7}\]  
\[L_{V_{SINK}V_{i}}=\max_{Vi\in N}\{\alpha TF_{V_{SINK}V_{i}}+\beta R_{E,V_{i}} +\gamma B_{S,V_{i}}+\sigma S/N_{V_{SINK}V_{i}}\} \tag{8}\]  
where \(R_{E,Vj},R_{E,V_{i}}\) are the contemporary residual energies of node \(V_{j}\) and \(V_{i}\), \(B_{S,V_{i}},B_{S,V_{i}}\) are the available buffer size of nodes \(V_{j}\) and \(V_{i}\), \(S/N_{V_{i}V_{j}}\), \(S/N_{V_{SINK}V_{i}}\) are the link quality factors in terms of signal-to-noise ratio between \(V_{i}\) and \(V_{j}\) and \(V_{SINK}\) and \(V_{i}\), respectively.