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, 3 8, 2 8, 10 7, 2 2, 7 5 and 2 9, with two centres started at 2 8 and 3 8. How many rounds until no centre moves?
the answer, and why
the answer is D
Rounds 1 to 2 each move a centre. Round 3 changes nothing.
if you chose another
ARound 2 still moves both centres, so one more round is needed to see none move.
BRound 1 moves both centres, so it cannot be the last.
Six points, 6 4, 4 5, 10 0, 3 1, 0 6 and 9 9, with two centres started at 3 1 and 6 4. How far does the second centre move in round 1?
the answer, and why
the answer is D
Its points are 6 4, 4 5, 10 0 and 9 9, whose middle is 7.25, 4.5. The centre started at 6, 4. 1.25 squared plus 0.5 squared is 1.813, and its root is about 1.35.
if you chose another
AThat is how far the first centre moves in round 1.
BThat is how far the second centre moves in round 2.
CThat is how far the first centre moves in round 2.