A Local Decision Algorithm for Maximum Lifetime in Ad Hoc Networks