+The sensor node sets a timer to $T_d$ seconds after entering in the discovery state. As soon as the timer fires, the sensor node broadcasts its discovery message and enters the active state. The active sensor node sets a timeout value $T_a$ to define how long it can stay in the active state. After $T_a$, the sensor node will return to the discovery state. Sensor node changes its state to Discovery to give a chance to other nodes within the same grid to become Active.
+%Whilst, during its active state, it re-broadcasts its discovery message at intervals $T_d$ periodically.
+The sensor node with Discovery or Active state can change its state to Sleeping when it detects that some other equivalent node will handle routing inside the grid. The sensor nodes in the Sleeping state wake up after a sleeping time $T_s$ and go back to the Discovery state. In GAF, load balancing is performed by means of periodic election of the leader (i.e., the active node that handle the routing inside the fixed grid). Inside each fixed square grid, sensor nodes collaborate with each other to play different roles. For example, nodes will elect
+one sensor node (based on the remaining energy of sensor nodes inside the fixed square grid) to stay awake for a certain period of time, and then the rest go to sleep. This sensor node is responsible for monitoring, routing, and reporting data to the base station on behalf of the nodes in the square grid. For nodes with same state, GAF gives nodes with longer expected lifetime (enat) higher rank, therefore they are called high rank nodes.
+%A rank-based election algorithm has been used to elect the leader. It is based on the remaining energy of sensor nodes inside the fixed square grid so as to extend the network lifetime.
+
+\subsection{Distributed Energy-efficient Scheduling for K-coverage (DESK)}
+\label{ch2:sec:03:2}
+
+% The authors in~\cite{DESK} design a novel distributed heuristic, called Distributed Energy-efficient Scheduling for K-coverage (DESK), which
+DESK is a novel distributed heuristic to ensure that the energy consumption among the sensors is balanced and the lifetime maximized while the coverage requirement is satisfied~\cite{DESK}. This heuristic works in rounds, it requires only one-hop neighbor information, and each sensor decides its status (Active or Sleep) based on the perimeter coverage model from~\cite{ref133}.
+
+%DESK is based on the result from \cite{ref133}.
+In DESK \cite{ref133}, the whole area is K-covered if and only if the perimeters of all sensors are K-covered. The coverage level of a sensor $s_i$ is determined by calculating the angle corresponding to the arc that each of its neighbors covers its perimeter. Figure~\ref{figp}~(a) illuminates such arcs whilst Figure~\ref{figp}~(b) shows the angles corresponding with those arcs in the range [0,2$ \pi $]. According to Figure~\ref{figp}~(a) and (b), the coverage level of sensor $s_i$ can be calculated as follows.
+%via traversing the range from 0 to 2$ \pi $.
+For each sensor $s_j$ such that $d(s_i,s_j)$ $<$ $2R_s$, we calculate the angle of $s_i$'s arc, denoted by [$\alpha_{j,L}$, $\alpha_{j,R}$], which is perimeter covered by $s_j$, where $\alpha= arccos(d(s_i, s_j)/2R_s)$ and $d(s_i,s_j)$ is the Euclidean distance between $s_i$ and $s_j$. After that, we locate the points $\alpha_{j,L}$ and $\alpha_{j,R}$ of each neighboring sensor $s_j$ of $s_i$ on the line segment $[0, 2\pi]$. These points are sorted in ascending order into a list L. We traverse the line segment from 0 to $2\pi$ by visiting each element in the sorted list L from the left to the right and determine the perimeter coverage of $s_i$. Whenever an element $\alpha_{j,L}$ is traversed, the level of perimeter coverage should be increased by one. Whenever an element $\alpha_{j,R}$ is traversed, the level of perimeter coverage should be decreased by one.
+
+
+\begin{figure}[h!]
+ \centering
+ \begin{tabular}{@{}cr@{}}
+ \includegraphics[scale=0.8]{Figures/ch2/P22.jpg} & \raisebox{3cm}{(a)} \\
+ \includegraphics[scale=0.8]{Figures/ch2/P11.jpg} & \raisebox{3cm}{(b)}
+ \end{tabular}
+ \caption{Determining the perimeter-coverage of $s_i$’s perimeter.}
+ \label{figp}
+\end{figure}