Partition-Based Clustering

The overall strategy here is to partition the Dataset into a set of kk clusters CiC_{i} such that the sum of squared distances to cic_{i} is minimized, where cic_{i} is the centroid or medoid of a cluster CiC_{i}.

mini=1k(j=1nd(oj,ci)2\min \sum_{i=1}^k (\sum_{j=1}^n d\left(o_j, c_i\right)^2

You could enumerate all possible partitions and therefore find the optimal solution or you could use heuristic methods like: