In this paper, we consider energy-efficient gathering of correlated data in sensor networks. We focus on single-input coding strategies in order to aggregate correlated data. For foreign coding we propose the MEGA algorithm which yields a minimum-energy data gathering topology in O n3 time. We also consider self-coding for which the problem of finding an optimal data gathering tree was recently shown to be NP-complete; with LEGA, we present the first approximation algorithm for this problem with approximation ratio 2(1 + √ 2) and running time O(m + n log n). Categories and Subject Descriptors: F.2.2 [Analysis of Algorithms and Problem Complexity]: Nonnumerical Algorithms and Problems—computations on discrete structures; G.2.2 [Discrete Mathematics]: Graph Theory—graph algorithms; G.2.2 [Discrete Mathematics]: Graph Theory—network problems General Terms: Algorithms, Theory.