Depending on the underlying graph, you also need to handle cycles intelligently. In social networks, mutual relationships are ...