## 3 Proposed CS-DDSG Scheme  
### Procedures of CS-DDSG  
Based on the network model, we propose CS-DDSG to avoid packet loss and reduce the total number of transmissions and receptions, as presented in Figure 3. The procedures involved in CS-DDSG are detailed below. Stage 1. Initialization. The proposed scheme requires precise time to help nodes to cooperate with each other. Assuming the network is synchronized and slotted based on Reference Broadcast Synchronization (RBS) [25], which can achieve the goal of high accuracy and energy-efficiency. At the beginning of data gathering, each node senses a data \(\mathbf{x_{i}}\) and generates a coefficient \(\mathbf{\varphi_{i}}=\mathbf{1}\). Then, each node \(\mathbf{i}\) forms an initial packet, denoted by \(\mathbf{S(i)}\) which defines has two components:  
\[\mathbf{S(i)}=\left\{ \begin{array}{l}\mathbf{S(i)}.\text{id}=[i]\\ \mathbf{S(i)}.\text{data}=\mathbf{x_{i}}\end{array} \right.. \tag{9}\]  
The component \(\mathbf{S(i)}.\text{id}\) stores the node ID of nodes and \(\mathbf{S(i)}.\text{data}\) stores the readings. Stage 2. Broadcasting. After a fixed and long enough period of time for synchronization and initialization, \(\mathbf{N_{s}},\left(\mathbf{N_{s}}<\mathbf{N}\right)\) nodes are randomly selected as source nodes with a probability \(\mathbf{p_{1}}\) in this stage. The source nodes broadcast their own packets and do not receive any packets. If an ordinary node \(\mathbf{m(m\in[1,N])}\) is located with the communication range of the source node \(\mathbf{n(n\in[1,N])}\) and has not received a packet before, then node \(m\) receives the data broadcasted by node \(n\) and updates its packet as follows:  
\[S(m)=\left\{ \begin{array}{l}S(m).\mathrm{id}=[m,n]\\ S(m).\mathrm{data}=x_{m}+x_{n}\end{array} \right.. \tag{10}\]  
If node \(m\) has already received any other broadcast data, then this node stops receiving data; in other words, each node receives only one broadcast packet. Stage 3. Forwarding. In the following, only the receiving nodes from Stage 2 continue to broadcast their updated packets to neighboring nodes with the probability \(p_{2}\). Similarly, the neighboring nodes around the forwarding nodes will receive a packet only if they have not received any prior packets. These new receiving nodes broadcast their updated packets as described above. Actually, the Stage 2 and Stage 3 could start simultaneously. Nodes get the packets of source nodes in Stage 2 and then decide whether to broadcast immediately. Thus, the neighboring nodes of those forwarding nodes could update their packets relying on the packets of source nodes or forwarding nodes. Finally, the forwarding operation will stop until there are no new reception nodes. Because of the reception condition and the small probability \(p_{2}\), in practice, the forwarding process stops after repeating only a few times, which is analyzed in Section 5 in detail. Stage 4. Visiting. The mobile sink starts the visiting phase after a fixed and sufficiently long period, which can be preset according to the number of nodes \(N\). \(M\) nodes are randomly queried by the mobile sink to extract the corresponding information, i.e., the measurement vector \(Y\) and the measurement matrix \(\Phi\). Finally, the entire network's readings \(X\) can be reconstructed from \(Y\) and \(\Phi\) based on Equation (3). The entire pseudocode of CS-DDSG is presented in Algorithms 1 and 2. Figure 3: Flow chart of CS-DDSG.