  In WSN, each sensor is responsible for sensing environmental conditions and
sending them to the one or more base stations. Battery-operated sensors are
severely constrained by the amount of energy that can be spend for transmitting
these sensed data. However, aggregation of data (including removal of redundant
data) at intermediate sensors and forwarding of aggregate data reduce overall
energy consumptions in WSN. In general, data gathering refers to the process of
periodic collection of sensed data from various sensors to one or more base
stations (BS). Energy efficient data gathering scheduling is essential for
improving the lifetime of WSN. In this paper, we propose a distributed
algorithm to compute data-gathering schedule that aim to improve the lifetime
of WSN by suitably selecting energy-efficient data-flow paths from various
sensors to the base station. For a multihop WSN with $n$ sensors, the proposed
algorithm first computes a schedule in $O(n^2)$ time steps, and then this
schedule is periodically updated based the residual energy and the feedback
received from the BS. The system performs approximately $\log(\mathcal{L})$
schedule updates where $\mathcal{L}$ is the expected lifetime of the system in
number of data-gathering rounds. Moreover, each updation process uses the
existing active schedule (data-flow path) - thus consuming only a small
fraction of a single data gathering round activity. Such an algorithm thus
could precisely incorporate the energy consumptions due to updates and related
activities. Moreover, our algorithm does not assume any global knowledge of the
topology or the positions of various sensors. Through simulation study, we
found that our proposed algorithm achieves significantly higher network
lifetime compared to existing data-flow schedules based on the Minimum Spanning
Tree (MST), the Shortest Path Tree (SPT), the Weighted Rooted Tree (WRT).
