To see how one might view (read "transform" or "reduce") a centroid-based clustering problem as a (metric) facility location problem, view each data point in the former as a demand point in the latter. Suppose that the data to be clustered are elements of a metric space formula_59 (e.g. let formula_59 be formula_61-dimensional Euclidean space for some fixed formula_61). In the facility location problem that we are constructing, we permit facilities to be placed at any point within this metric space formula_59; this defines the set of allowed facility locations formula_64. We define the costs formula_65 to be the pairwise distances between location-demand point pairs (e.g., see metric k-center). In a centroid-based clustering problem, one partitions the data into formula_66 equivalence classes (i.e. colors) each of which has a centroid. Let us see how a solution to our constructed facility location problem also achieves such a partition. A feasible solution is a non-empty subset formula_67 of formula_66 locations. These locations in our facility location problem comprise a set of formula_66 centroids in our centroid-based clustering problem. Now, assign each demand point formula_70 to the location formula_71 that minimizes its servicing-cost; that is, assign the data point formula_70 to the centroid formula_73 (break ties arbitrarily). This achieves the partitioning provided that the facility location problem's costs formula_65 are defined such that they are the images of the centroid-based clustering problem's distance function.