Distributed Collaborative Computation in Wireless Sensor Systems