  The problem of designing policies for in-network function computation with
minimum energy consumption subject to a latency constraint is considered. The
scaling behavior of the energy consumption under the latency constraint is
analyzed for random networks, where the nodes are uniformly placed in growing
regions and the number of nodes goes to infinity. The special case of sum
function computation and its delivery to a designated root node is considered
first. A policy which achieves order-optimal average energy consumption in
random networks subject to the given latency constraint is proposed. The
scaling behavior of the optimal energy consumption depends on the path-loss
exponent of wireless transmissions and the dimension of the Euclidean region
where the nodes are placed. The policy is then extended to computation of a
general class of functions which decompose according to maximal cliques of a
proximity graph such as the $k$-nearest neighbor graph or the geometric random
graph. The modified policy achieves order-optimal energy consumption albeit for
a limited range of latency constraints.
