Input: a set of n sequences, S, with |Si| = k
Output:
two sets of
sequences, S1 and S2
begin
Partition( S )
if
|S| < 3 then
base case return;
end
do
while counter < epochs do
while j < k do
winner = argmin( foreach weight Wi do D(Wi, Sj) end )
push(Pj, Wwinner)
end
foreach weight Wi
foreach element v of Pi
L(W1, v)
end
end
counter ← counter + 1;
end
while |S1| ~= 0 and |S2| ~= 0
foreach Sw do
Partition( Sw )
end