Spectral clustering is a popular graph-based method due to the simplicity of its implementation, the reasonable computation time, and the fact that it overcomes the \(\mathcal {NP}\) -hardness of other graph-theoretic approaches by solving a relaxed optimization problem in polynomial time. Its idea is based on the eigendecomposition
of matrices that describe the connectivity of a graph [1]}.
The spectral clustering of the total number of nodes \(n = |V|\)  into groups \(C_1, \dots , C_k\)  is equivalent to a partitioning problem, usually with a dual objective: high intracluster
similarity and low intercluster similarity is desired, while at the same time the vertex size \(|C|\)  (cardinality) of the clusters
should not differ excessively.
