## 4 Our Proposed Algorithm
### Modified Diffusion Wavelets
\[\lambda_{ij}=\left\{ \begin{array}{ll}1-\frac{\chi}{\sum_{a}d_{ij}^{T}},&i=j\\ -\frac{d_{ij}^{T}}{\sqrt{\sum_{a}d_{ii}^{T}\sum_{a}d_{ij}^{T}}},&\text{otherwise} \end{array} \right. \tag{13}\]  
Step 4: However, the diffusion operator \(O\) stems from \(\Lambda\), where \(O\) shares the same eigenvalues as \(\Lambda\) (less than 1). The diffusion operator is \(O=I-\Lambda\) or \(O=\Lambda/2\); in this paper, we choose the first expression. Step 5: Consequently, recursively raise \(O\) to power 2, and delete the diminishing eigenvalues with a threshold. Step by step, this approach splits the space spanned by the eigenvectors. Let the initial space of \(O\) be \(x_{0}=\mathbb{R}^{N}\), which is represented by scale space \(\left\{x_{j}\right\}_{j\in N}\) and wavelet space \(\left\{V_{j}\right\}_{j\in N}\). Wavelet space \(V_{j}\) is different between \(x_{j}\) and \(x_{j+1}\). Then, we derive Equation (14):  
\[x_{j+1}=x_{0}\oplus V_{0}\oplus V_{1}\oplus\cdots\oplus V_{j}. \tag{14}\]  
Here, steps 5.1-5.5 accomplish the modified QR decomposition, where \([O]_{x_{a}}^{x_{b}}\) indicates the column space of matrix \(O\) denoted by basis \(x_{b}\) at scale \(b\), and row space is denoted by basis at scale \(a\), \(\left[x_{b}\right]_{x_{a}}\) represents basis \(x_{b}\) denoted on the basis \(x_{a}\). Step 6: In the end, the diffusion wavelet basis \(\Psi\) is the concatenation of the scale functions and wavelet functions. ```
Input: the number of sensor nodes \(N\), communication radius \(r\), decomposition level \(\eta\), precision \(\varepsilon\) and MQR function. Output: sparse basis \(\Psi\). 1 generate a graph \(G(V,E)\)
2 compute weight adjacency matrix \(\Omega=[w_{ij}]\) according to the vertex degree/Equation (11)
3 calculate normalized Laplacian matrix \(\Lambda\) relying on Equation (12)/Equation (13)
4 generate diffusion operator \(O=I-\Lambda\)
5 recursively raising \(O\) to power 2
5.1 for\(\eta\)=0 to \(\eta-1\)
5.2\([x_{j+1}]_{x_{j}^{\prime}}\) \([O]_{x_{b}}^{x_{b}}\leftarrow\text{MQR}([O^{2^{\prime}}]_{x_{j}^{\prime}}^{x_{ j}^{\prime}}\varepsilon)\)
5.3\(O_{j+1}:=[O^{2^{\prime+1}}]_{x_{j+1}^{\prime}}\leftarrow[x_{j+1}]_{x_{j}}[O^{ 2^{\prime+1}}]_{x_{j}^{\prime}}^{x_{j}^{\prime}}[x_{j+1}]_{x_{j}}^{*}\)
5.4\([\Psi_{\eta}]_{x_{j}}\leftarrow\text{MQR}(\left\{x_{j+1}\right\}-\left[x_{j+1 }\right]_{x_{j}}[x_{j+1}]_{x_{j}^{\prime}}^{*}\varepsilon)\)
5.5 endfor
6 concatenation of the scale functions and wavelet functions is regarded as the sparse basis \(\Psi\). MQR Function: \(Q,R\leftarrow\text{MQR}(B,\varepsilon)\) Input:\(B\):\(N\times N\) sparse matrix, \(\varepsilon\) Output:\(Q\), \(R\) matrix, possibly sparse, such that \(B=_{\varepsilon}QR\) (1) \(Q\) is orthogonal (2) \(R\) is upper triangular up to a permutation (3) The columns of \(Q\)\(\varepsilon\)-span the space spanned by the columns of \(B\)
```  
**Algorithm 1** Modified diffusion wavelets. Figure 3 denotes the topology of 640 nodes of WSNs, and also represents some scale functions. To visualize the wavelets' function, we plot Figures 5 and 6 using the first scheme (Equation (12)) and the second scheme (Equation (13)), respectively. Figure 4(a) introduces the second-level wavelet function, while Figure 4(b) is the 10 th-level wavelet function for the former schedule. Figure 6 represents the second schedule considering the spatial correlation of sensor node readings in WSNs. Figure 5(a),b indicate first- and 10 th-level wavelet functions, respectively. Obviously, the second scheme is set up on a sparser basis, for it can capture the sensor node's relationship and network topology properties and thus gain valuable information from the real world.