Also called Lloyd's algorithm and k-means clustering.
fresh numbers
The test's questions that a run answers, asked again on new numbers whenever you like. The answer, its working and the reason for every other choice come from k-means's own run on the numbers shown.
choose one
1question 1
Six points, 5 9, 0 4, 3 0, 2 1, 6 10 and 3 7, with two centres started at 3 7 and 3 0. How many rounds until no centre moves?
the answer, and why
the answer is A
Rounds 1 to 2 each move a centre. Round 3 changes nothing.
if you chose another
BRound 2 still moves both centres, so one more round is needed to see none move.
CRound 1 moves both centres, so it cannot be the last.