Solution

ID: past-exam-of-the-mathematical-and-computational-biology-course-of-the-university-of-cambridge/2025/paper-1/7/c/solution

Combining the first two parts gives the centroid sum-of-squares identity
The added term is nonnegative and, since , vanishes exactly at . Thus the unique minimizing centroid in this step of K-means clustering is
An empty cluster needs a separate algorithmic convention because its sample mean is undefined and its objective is identically zero.

New to topics? Read the docs here!