I have a problem where, there are a set of nodes and dependencies between them. I want to cluster them based on the maximum number of dependencies.  Dependencies can be thought of as number of edges connected.  I want to group those with maximum dependencies.For example in the set $\{1,2,3\}$ and $\{3,5,7\}$ if $\{3,5,7\}$ have more dependencies i need to group $\{3,5,7\}$. I know the dependencies beforehand. Which algorithm will help to solve this problem?
How to cluster nodes based on the number of dependencies
graph theory;data mining;cluster