concomp function

Connectivity components of an undirected graph