## 5 DEADS: The Proposed Scheme
### Data Sensing and Routing  
Let us consider a particular sub-graph as shown in Figure 5 to describe the construction of \(DS\). In this example, depth and energy aware \(DS\) construction for a particular sub-graph is shown. For any vertex \(a\), we represent its neighbor set as; \(N(a)=b\in V\mid a,b\in A\) where \(b\in n\) (\(n\) represents total number of nodes in a network). Initially, each source node finds the number of its one-hop neighbors and selects \(d_{th}\) on its basis. \(d_{th}\) selection process in shown in Algorithm 1. Network lifetime is represented in terms of seconds. \(d_{th}\) recalculation is performed at regular intervals (120 s). Once a node becomes aware of its \(d_{th}\), it divides its neighbor set into two distinct sets (\(N_{outd_{th}}\) and \(N_{ind_{th}}\)) as shown by the given expressions. In this sub-graph, eligible \(DS\) nodes are \(N_{outd_{th}}\) and the eligible \(CC\) nodes are \(N_{ind_{th}}\). For example, node \(a\) has nodes \(h\), \(i\), \(j\), \(q\), \(r\) and \(s\) within its transmission range. After finding its \(d_{th}\) node \(a\) divides its neighbor set into two sets, finds \(CC\) and \(DS\) nodes by following rules 6 to 9 and perform cooperative routing. Node \(b\), \(c\), \(d\), \(e\), \(f\) and \(g\) follow the same procedure as followed by node \(a\). Whereas, all the non-\(CC\) and non-\(DS\) nodes forward data by following rule 10. \[N(a)=h,i,j,q,r,s,N_{ind_{th}}(a)=h,i,j,N_{outd_{th}}(a)=q,r,s,\] \[N(b)=i,j,k,r,s,t,N_{ind_{th}}(b)=r,e,h,i,N_{outd_{th}}(b)=r,s,t,\] \[N(c)=j,k,i,l,s,t,u,v,N_{ind_{th}}(c)=j,k,i,l,N_{outd_{th}}(c)=s,t,u,v,\] \[N(d)=k,l,m,t,u,v,N_{ind_{th}}(d)=k,l,m,N_{outd_{th}}(d)=t,u,v,\] \[N(e)=l,m,n,w,x,y,N_{ind_{th}}(e)=l,m,n,N_{outd_{th}}(e)=w,x,y,\] \[N(f)=m,n,o,w,x,y,z,N_{ind_{th}}(f)=m,n,o,N_{outd_{th}}(f)=w,x,y,z,\] \[N(g)=n,p,o,x,y,z,N_{ind_{th}}(g)=p,n,o,N_{outd_{th}}(g)=x,y,z,\]  
Figure 5: Selection of \(DS\) and \(CC\) nodes in a sub-graph. ```
\(t_{o}\leftarrow\) predefined time interval in seconds \(T_{max}\leftarrow\) Network lifetime in seconds \(N\leftarrow\) Number of a node's neighbors (\(N_{1}>N_{2}\)) \(D_{th}\leftarrow\) Depth threshold \(D_{th1},D_{th2},D_{th3}\leftarrow\) Optimal values of depth threshold (\(D_{th1}>D_{th2}>D_{th3}\)) for\(T=1:t_{o}:T_{max}\)do if\(N\geq N_{1}\)then \(D_{th}\) = \(D_{th1}\) elseif\(N_{1}>N\geq N_{2}\)then \(D_{th}\) = \(D_{th2}\) elseif\(N<N_{2}\)then \(D_{th}\) = \(D_{th3}\) endif endfor
```  
**Algorithm 1** Depth Threshold Selection  
Traditional routing schemes [3, 4, 6] consume surplus energy due to transmission of redundant data and retransmission of critical data. We exploit threshold based data sensing in which data is transmitted only when certain predefined thresholds are met. Threshold values depend on the required application. Algorithm 2 describes data sensing and routing procedure. After nodes become aware of their neighbors, they start sensing the specified environmental attribute and forward the sensed data by using cooperative routing. ```
\(S\leftarrow\) Sensed attribute \(H_{th}\leftarrow\) Hard threshold \(S_{th}\leftarrow\) Soft threshold \(P\leftarrow\) Data packet \(R_{e}\leftarrow\) Residual energy \(F\leftarrow\) Flag if\(S\geq H_{th}\) AND \(R_{e}>\) 0 then  send P  set F = 1 elseif\(S_{th}\leq S<H_{th}\) AND \(R_{e}>\) 0 then  send P  set F = 0 else  no transmission endif
```  
**Algorithm 2** Data Sensing and Transmission  
According to rule 6 (Equation (8)), \(DS\) is formed and by utilizing \(SP_{DS}\) given in rule 7 (Equations (9)-(11)) each node selects an appropriate destination node that belongs to the nodes. Similarly, according to rule 8 (Equation (12)), \(CC\) set is formed and by utilizing rule 9 (Equations (13)-(15)) each node selects an appropriate relay node that belongs to the \(CC\) nodes. \(CC\), non-\(CC\), \(DS\) and non-\(DS\) nodes also forward their data by utilizing rule 10 (Equations (16)-(19)).