Clustering algorithm and limits