Optimization of random selection and forwarding for multiple-relay networks