However, if not, then there is an elegant method for solving these kinds of problems which I will call the Voronoi trick.The Voronoi Trick:A clustering of n items into k clusters is a partitioning problem, and as such, there are roughly k^n ways of assigning items to clusters (k^n comes from treating all clusters as distinct; in general, the amount might be reduced by as much as k!).