A probabilistic analysis for the range assignment problem in ad hoc networks