Random, deterministic, and hybrid algorithms for distributed beamforming