An Energy Efficient Method for Nodes Assignment in Cluster-based Ad Hoc Networks