Basic Girvan-Newman implementation