Clustering, calc edges with hamming distance.
could probably be faster.