\\begin{algorithm}
\\caption{Lloyd's Algorithm for k-Means Clustering}
\\label{alg:lloyds}
\\begin{algorithmic}
\\REQUIRE $k \\geq 0$
select k points as initial centroids
\\REPEAT
\\STATE {form k clusters by assigning all points to the closest centroid}
\\STATE {recompute the centroid of each cluster}
\\UNTIL{no recentroids}
\\end{algorithmic}
\\end{algorithm}