## 4 Algorithm Description
### Meta-Data Extraction
#### 4.2.1 Activity Meta-Data  
Suppose within a time interval \(\Delta=[t_{1},t_{K}]\) the locations in the trajectory of node \(s_{i}\) is \(\Phi=\{l_{1},..,l_{K}\}\), where \(l_{k}\) corresponds to the recorded location of node at time \(t_{k}\). Then the _activity range_ of node \(s_{i}\) is defined as follows:  
\[ar_{i,\Delta}=max(||l_{k},C_{\Delta}||),\;k=1,..,K \tag{1}\]  
where \(||a,b||\) denotes the Euclidean distance of point \(a\) and \(b\), and \(C_{\Delta}\) is the geometric center of the recorded points. The centroid \(C_{\Delta}\) is defined as:  
\[C_{\Delta}=centroid(\Phi)=(\frac{1}{K}\sum_{k=1}^{K}l_{k}.x,\;\frac{1}{K}\sum_ {k=1}^{K}l_{k}.y) \tag{2}\]  
Based on the activity range, ADG then calculates the time duration and the central point when a node stays stationary or only roams within a small area. We abstract these as the _stationary stay_ (\(ss\)), which  
Figure 3: Examples of node trajectories and their activity ranges: (**a**) moving trajectories of node \(s_{1}\); (**b**) moving trajectories of node \(s_{2}\); (**c**) moving trajectories of node \(s_{3}\). Figure 2: An example of data gathering schedule within an epoch. is defined as \((sd,C_{sd})\). \(sd\) is the _stationary duration_, \(C_{sd}\) is the central location within the duration. \(sd=[t_{m},t_{n}]\) follows the following conditions:  
\[(1)\ t_{n}-t_{m}>\tau,\ \ [t_{m},t_{n}]\subseteq E;\ \ (2)\ \ ar_{i,sd}\leq 0.5R;\ \ (3)\ \ \ \
ot \exists sd^{\prime}\supset sd,\ \ s.t.\ \ ar_{i,sd^{\prime}}\leq 0.5R \tag{3}\]  
where \(\tau\) is the minimal time length of stationary duration, \(E\) is the time range within an epoch, e.g., [8:00, 20:00], \(R\) is the communication range of the node. Here the activity range \(ar_{i,sd}\) is less than half of the communication range \(R\), so any two nodes, if they are both within the circular area centered at \(C_{sd}\), could communicate with each other and makes the message exchange. Figure 3 illustrates examples of the trajectories and their average ranges. The lines are the moving trajectories of the nodes, the numbers denote the timestamps at that position, \(p_{i}\) is the centroid and the line segments in blue color is the activity range \(ar\). We could see that node \(s_{2}\) has smallest \(ar\), yet node \(s_{3}\) has the largest \(ar\). Also, if \(ar_{2,[t_{1},t_{7}]}=0.5R\), then the stationary duration for node \(s_{2}\) is \([t_{1},t_{7}]\), and any node within circle \(p_{2}\) could communicate with \(s_{2}\) during the time period. A node usually has more than one stationary stays in an epoch, and it records multiple stationary stays after several epochs. Figure 4 illustrates an example of stationary durations during an observing window of 5 epochs. The x-axis is the line of epoch, e.g., 8:00 to 20:00, the y-axis denotes \(id\) of the epochs. The colored line segments are the static durations (\(sd\)) at different epochs, and \(sd\)'s from multiple epochs could be aggregated into the key static durations (\(ksd\)), which are denoted by the colored rectangles. Given an observing window \(W\), the expected probability that a point, e.g., \(x\), is within a stationary duration is estimated as:  
\[p1(x)=\sum_{e_{k}\in W}f(x,e_{k})=\sum_{e_{k}\in W}\frac{sgn(x,e_{k})}{2^{|W|+ 1-k}} \tag{4}\]  
where \(f\) is a weighting function, \(sgn\) is a function signifying 1 or 0. When time \(x\) is within a \(sd\) in epoch \(e_{k}\), \(sgn(x,e_{k})\)=1, and the weight \(f(x,e_{k})\) equals \(\frac{1}{2^{|W|+1-k}}\); otherwise, \(sgn(s_{i},s_{j},k,\Delta)\)=0, and the weight \(f(x,e_{k})\) is 0. We assume later \(sd\) has larger impact on the weight. Although various weight degrading functions could be used, here we use a simple one: the weight is divided by \(2^{|W|+1-k}\), which means the weight of a \(sd\) is twice of that of the previous one.