## 1 Introduction  
With the advances in micro-electro-mechanical system technologies, embedding system technology and wireless communication with low power consumption, it is now possible to produce micro wireless sensors for sensing, wireless communication and information processing. These inexpensive and power-efficient sensor nodes work together to form a network for monitoring the target region. Through the cooperation of sensor nodes, the WSNs collect and send various kinds of message about the monitored environment (e.g. temperature, humidity, etc.) to the sink node, which processes the information and reports it to the user. Wireless sensor networks have a wide-range of applications, including military surveillance, disaster prediction, and environment monitoring, and thus have attracted a lot of attention from researchers in the military, industry and academic fields. In wireless sensor networks, the sensor node resources are limited in terms of processing capability, wireless bandwidth, battery power and storage space, which distinguishes wireless sensor networks from traditional _ad hoc_ networks [15]. In most applications, each sensor node is usually powered by a battery and expected to work for several months to one year without recharging. Such an expectation cannot be achieved without carefully scheduling the energy utilization, especially when sensors are densely deployed (up to 20 nodes/m\({}^{3}\)[1]), which causes severe problems such as scalability, redundancy, and radio channel contention. Due to the high density, multiple nodes may generate and transmit redundant data about the same event to the sink node, causing unnecessary energy consumption and hence a significant reduction in network lifetime. For a sensor node, energy consumption includes three parts: data sensing, data processing, and data transmission/reception, amongst which, the energy consumed for communication is the most critical. Reducing the amount of communication by eliminating or aggregating redundant sensed data and using the energy-saving link would save large amount of energy, thus prolonging the lifetime of the WSNs. Data gathering is a typical operation in many WSN applications, and data aggregation in a hierarchical manner is widely used for prolonging network lifetime. Data aggregation can eliminate data redundancy and reduce the communication load. Hierarchical mechanisms (especially clustering algorithms) are helpful to reduce data latency and increase network scalability, and they have been extensively exploited in previous works [2-8]. In this paper, we propose a distributed and energy-efficient protocol, called EAP for data gathering in wireless sensor networks. In EAP, a node with a high ratio of residual energy to the average residual energy of all the neighbor nodes in its cluster range will have a large probability to become the cluster head. This can better handle heterogeneous energy circumstances than existing clustering algorithms which elect the cluster head only based on a node's own residual energy. After the cluster formation phase, EAP constructs a spanning tree over the set of cluster heads. Only the root node of this tree can communicate with the sink node by single-hop communication. Because the energy consumed for all communications in in-network can be computed by the free space model, the energy will be extremely saved and thus leading to sensor network longevity. EAP also utilizes a simple but efficient approach to solve the area coverage problem. With the increase in node density, this approach can guarantee that the network lifetime will be linear with the number of deployed nodes, which significantly outperforms the previous works designed for data gathering application. The remainder of this paper is organized as follows: Section 2 reviews related works. Section 3 describes the system model and the motivation of our work. Section 4 presents the detailed design of EAP. Section 5 reports the result of EAP effectiveness and performance via simulations and a comparison made with LEACH and HEED.