A spectral clustering algorithm for intelligent grouping in Dense Wireless Networks