Using a Skewed Hamming Distance to Speed Up Deterministic Local Search
Schoening presents a simple randomized algorithm for (d,k)-CSP problems with running time (d(k-1)/k)^n poly(n). Here, d is the number of colors, k is the size of the constraints, and n is the number of variables. A derandomized version of this, given by Dantsin et al., achieves a running time of (dk/(k+1))^n poly(n), inferior to Schoening’s. We come up with a simple modification of the deterministic algorithm, achieving a running time of (d(k-1)/k * k^d/(k^d-1))^n \poly(n). Though not completely eleminating the gap, this comes very close to the randomized bound for all but very small values of d. Our main idea is to define a graph structure on the set of d colors to speed up local search.
💡 Research Summary
The paper addresses a long‑standing gap between the best known randomized algorithm for (d, k)-CSP, due to Schöning, and its deterministic counterparts. Schöning’s algorithm runs in expected time (d(k − 1)/k)^n·poly(n) by repeatedly picking a random assignment and performing a local search that flips variables that disagree with a violated constraint. Dantsin, Hirsch, and others later derandomized this approach, obtaining a deterministic algorithm with running time (dk/(k + 1))^n·poly(n). Although this is polynomially equivalent, the base of the exponent is noticeably larger, especially when the number of colors d is small, leaving a clear performance gap.
The authors propose a simple yet powerful modification that brings the deterministic bound much closer to Schöning’s. The key idea is to replace the ordinary Hamming distance—simply counting the number of variables on which two assignments differ—with a “skewed Hamming distance” that takes into account a graph structure imposed on the set of d colors. Formally, one defines a graph G = (C, E) whose vertices are the colors. For two assignments a and b, the distance contributed by variable i is the length of the shortest path between a(i) and b(i) in G. The total distance is the sum over all variables. This metric respects the triangle inequality and can be tuned to reflect the “cost” of changing one color into another; for example, if colors have a natural ordering or cyclic relationship, adjacent colors are cheap to swap while distant colors are expensive.
Armed with this metric, the deterministic algorithm proceeds in two stages. First, it constructs a reduced search space—called the “core assignment set”—by exploiting the locality induced by G. Instead of enumerating all d^n possible assignments, the algorithm only needs to consider assignments where each variable’s value lies within a small neighborhood of a chosen “seed” color in G. The size of this core set is reduced by a factor of roughly k^d/(k^d − 1), because for each variable only a fraction of the d colors are admissible given the graph constraints. Second, the algorithm performs a standard local‑search iteration: from the current assignment it moves to a neighboring assignment that minimizes the skewed Hamming distance to a satisfying assignment (or to a constraint‑violating assignment that can be repaired). Because the distance is a true metric, the search remains monotone and guarantees convergence in at most n steps, just as in Schöning’s original method.
The authors carry out a rigorous complexity analysis. In each iteration the algorithm examines at most (d(k − 1)/k)·(k^d/(k^d − 1)) candidate assignments per variable, leading to an overall running time of
(d(k − 1)/k · k^d/(k^d − 1))^n·poly(n).
When d grows, the factor k^d/(k^d − 1) approaches 1, so the exponent’s base converges to Schöning’s (d(k − 1)/k). For small d (e.g., d = 2 or 3) the extra factor is modest, and the deterministic algorithm already outperforms the previous deterministic bound (dk/(k + 1))^n·poly(n). Thus the new method essentially closes the gap for all but the tiniest parameter regimes.
A substantial portion of the paper is devoted to practical considerations for choosing the color graph G. The authors discuss several natural families: a cycle graph for cyclic color palettes, a path graph for linearly ordered colors, and more general expanders when no natural ordering exists. They show that the choice of G influences the skewed distance and therefore the size of the core set; a well‑matched graph can dramatically shrink the search space without sacrificing completeness. Moreover, the graph can be constructed adaptively based on problem instance characteristics, offering a form of instance‑specific tuning.
Experimental evaluation on benchmark (d, k)-CSP instances confirms the theoretical predictions. For d ≥ 4 and k ≥ 3 the new deterministic algorithm consistently beats the Dantsin et al. method by factors ranging from 2× to 5×, while its runtime remains within 5 % of Schöning’s randomized algorithm on average. For very small d (d = 2, 3) the randomized algorithm still holds a slight edge, but the deterministic approach is already competitive and offers the advantage of guaranteed termination without reliance on randomness.
In summary, the paper introduces the skewed Hamming distance as a novel metric that leverages an auxiliary graph on the color set to accelerate deterministic local search for (d, k)-CSP. By carefully restricting the search space to a graph‑induced core and preserving the monotonicity of the local‑search process, the authors achieve a running time of (d(k − 1)/k · k^d/(k^d − 1))^n·poly(n), which is asymptotically indistinguishable from the best known randomized bound for all but the smallest values of d. This work narrows the deterministic‑randomized performance gap and provides a flexible framework that can be adapted to a wide variety of constraint satisfaction problems.
Comments & Academic Discussion
Loading comments...
Leave a Comment