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$个点的实例,我们证明:当该实例中的点被独立同分布的$d$维高斯随机变量(均值为0,标准差为$\sigma$)扰动时,Hartigan方法终止所需的期望迭代次数不超过$k^{12kd}\cdot \poly(n, k, d, 1/\sigma)$。