A genetic approach to the graph and spectral clustering problem