A wireless sensor network (WSN) consists of distributed sensors and actor nodes linked by a wireless medium to perform distributed sensing and acting tasks (Abbasi and Mohamed, 2007). WSNs have been used to solve this problem by more and more researchers for its various advantages such as the wireless medium and its ease of deployment.