We analyze the running time of Hartigan's method, an old algorithm for the $k$-means clustering problem. First, we construct an instance on the line on which the method can take $2^{\Omega(n)}$ steps to converge, demonstrating that Hartigan's method has exponential worst-case running time even when $k$-means is easy to solve. As this is in contrast to the empirical performance of the algorithm, we also analyze the running time in the framework of smoothed analysis. In particular, given an instance of $n$ points in $d$ dimensions, we prove that the expected number of iterations needed for Hartigan's method to terminate is bounded by $k^{12kd}\cdot \poly(n, k, d, 1/\sigma)$ when the points in the instance are perturbed by independent $d$-dimensional Gaussian random variables of mean $0$ and standard deviation $\sigma$.
翻译:我们分析了Hartigan方法的运行时间,这是一种用于$k$-均值聚类问题的经典算法。首先,我们在直线上构造了一个实例,在该实例上该方法可能需要$2^{\Omega(n)}$步才能收敛,这表明即使当$k$-均值易于求解时,Hartigan方法仍具有指数级的最坏情况运行时间。由于这与该算法的实际表现相悖,我们还在平滑分析框架下对其运行时间进行了分析。具体而言,给定一个$d$维空间中包含$n$个点的实例,当该实例中的点被均值为0、标准差为$\sigma$的独立$d$维高斯随机变量扰动时,我们证明Hartigan方法终止所需的期望迭代次数上界为$k^{12kd}\cdot \poly(n, k, d, 1/\sigma)$。