Algorithms for graphs that represent friendships (e.g. Facebook)