arXiv:2610.31489cs.DMOct 2026

Manuscript Offprint

arXiv:2610.31489

Near-Optimal Bounds for Testing k-Colorability

Bangjie Xu

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original. This text is shared under the same licence.

Abstract

We study the sample complexity of testing k-colorability in the dense graph model. A graph is ε\varepsilon-far from being k-colorable if at least εn2\varepsilon n^2 edge deletions are required to make it k-colorable. We prove that, for every integer k≥2k \geq 2, a uniformly random induced subgraph on

O(klog⁡kε)O\left(\frac{k\log k}{\varepsilon}\right)

vertices is non-k-colorable with probability at least 2/3 whenever the original graph is ε\varepsilon-far from k-colorable. The proof introduces a trial coloring process based on nested palette systems and iteratively selected pivots. This yields an upper bound of O(klog⁡k/ε)O(k \log k/\varepsilon), which is no worse than the previous state of the art O(klog⁡(1/ε)/ε)O(k \log(1/\varepsilon)/\varepsilon) throughout the nonvacuous parameter range, and is an improvement whenever 1/ε1/\varepsilon is superpolynomial in k. Moreover, for every fixed k, our bound matches the known lower bound, thereby establishing the optimal Θ(1/ε)\Theta(1/\varepsilon) dependence on ε\varepsilon and, to the best of our knowledge, achieving this optimal dependence for the first time.

1 Introduction

Deciding whether a graph GG satisfies χ(G)≤k\chi(G) \leq k is NP-complete for every fixed k≥3k \geq 3 [16, 15]; under the Exponential Time Hypothesis it cannot be decided in time 2o(n)2^{o(n)} [17], where nn is the number of vertices; nevertheless, extensive researches have shown that for every fixed kk it can be decided in exponential but sub-2n2^n time: for k=3k = 3 there is an algorithm running in time O(1.3289n)O(1.3289^n) [10], for k=4k = 4 one running in time O(1.7159n)O(1.7159^n) [24], and for every fixed kk there is εk>0\varepsilon_k > 0 such that kk-colorability can be decided by a randomized algorithm in time O((2−εk)n)O((2 - \varepsilon_k)^n) [25]. In fact, for arbitrary kk and nn there are nn-vertex graphs of chromatic number kk in which every set of Ω(n)\Omega(n) vertices induces a 3-colorable graph [11]. This lack of local witnesses is what makes the global condition χ(G)>k\chi(G) > k hard to detect, and it is what makes testing kk-colorability nontrivial. However, a body of work has shown that if there is a substantial gap between GG and a kk-colorable graph (that is, a constant fraction of GG's edges has to be deleted before it becomes kk-colorable), then even a random small induced subgraph of GG is non-kk-colorable with constant probability, where the size of the subgraph depends only on kk and ε\varepsilon and not on ∣V(G)∣|V(G)|.

A graph GG on nn vertices is ε\varepsilon-far from being kk-colorable if at least εn2\varepsilon n^2 of its edges have to be removed to make it kk-colorable, and the sample complexity Sk(ε)S_k(\varepsilon) of kk-colorability is the smallest qq such that, for every ε\varepsilon-far GG, a uniformly random qq-vertex induced subgraph of GG is non-kk-colorable with probability at least 2/32/3. The quantity Sk(ε)S_k(\varepsilon) is an important parameter in property testing in the dense graph model [13, 14, 12].

Bollobás, Erdős, Simonovits and Szemerédi [9] showed for k=2k = 2, and Rödl and Duke [20] for every fixed kk the existence of a constant fk(ε)f_k(\varepsilon) such that any graph having sufficiently many vertices that is ε\varepsilon-far from being kk-colorable has an induced subgraph with no more than fk(ε)f_k(\varepsilon) vertices that is non-k-colorable; both proofs used Szemerédi's regularity lemma [23]. Their proofs can be reorganized to show that a random sample of C(ε,k)C(\varepsilon, k) (which is independent of nn) vertices succeeds with constant probability. Goldreich, Goldwasser and Ron [13] abandoned regularity altogether and, by constructively extending partitions of the graph, obtained the polynomial bound Sk(ε)=O~(k2/ε3)S_k(\varepsilon) = \tilde{O}(k^2/\varepsilon^3) for k≥3k \geq 3 and O~(1/ε2)\tilde{O}(1/\varepsilon^2) for k=2k = 2. Alon and Krivelevich [1] improved the bound to O~(k/ε2)\tilde{O}(k/\varepsilon^2) for k≥3k \geq 3 and O~(1/ε)\tilde{O}(1/\varepsilon) for k=2k = 2 by growing a tree of colorings of the sample, and they also proved the lower bound Sk(ε)=Ω(1/ε)S_k(\varepsilon) = \Omega(1/\varepsilon). Sohler [22] then obtained O~(k6/ε)\tilde{O}(k^6/\varepsilon), by reducing the problem to the satisfiability of a constraint satisfaction problem.

More recently, Blais and Seth [7, 8] obtained Sk(ε)=O(kεlog⁡21ε)S_k(\varepsilon) = O\left(\frac{k}{\varepsilon} \log^2 \frac{1}{\varepsilon}\right) by introducing the container method of extremal combinatorics [18, 6, 21] into property testing. Kushnir and Shapira [19] refined this analysis, removing a factor of log⁡(1/ε)\log(1/\varepsilon) and thereby attaining O(kεlog⁡1ε)O\left(\frac{k}{\varepsilon} \log \frac{1}{\varepsilon}\right), which was the previous state of the art, and complemented it with the lower bound Sk(ε)=Ω(log⁡k/ε)S_k(\varepsilon) = \Omega(\log k/\varepsilon), conjecturing that Θ(log⁡k/ε)\Theta(\log k/\varepsilon) is the truth. In this paper, we prove an upper bound of O(kεlog⁡k)O\left(\frac{k}{\varepsilon} \log k\right) (Theorem 1.1 below). Compared with the proofs of [7, 8, 19], what this proof shares with them is that it rests on a condition at one particular time point: if that condition fails at every time point t≤Tt \leq T (i.e., every state U(Pt)U(P^t) is still large), the reconstruction step yields a coloring with fewer than εn2\varepsilon n^2 monochromatic edges, which is impossible for an ε\varepsilon-far graph; and, as in those works, a union bound over all possible time points tt then completes the argument. The algorithmic mechanism, however, is different. We introduce a palette system and define a trial coloring process based on it. The use of palettes and lists of available colors is classical in graph coloring; see, for example, work on bounded-palette list coloring and palette sparsification [3, 2, 5, 4].

Theorem 1.1. For every integer k≥2k \geq 2 and every ε>0\varepsilon > 0, under the nonempty-graph convention above, 1^{1}

Sk(ε)=O(kεlog⁡k),S_{k}(\varepsilon)=O\left(\frac{k}{\varepsilon}\log k\right),

with an absolute implied constant. More explicitly, choose

T:=⌈4kε⌉,α:=ε4(k+1),T:=\left\lceil\frac{4k}{\varepsilon}\right\rceil,\qquad\alpha:=\frac{\varepsilon}{4(k+1)},

and set

q:=max⁡{4T,⌈4αlog⁡(16k)⌉}.q:=\max\left\{4T,\left\lceil\frac{4}{\alpha}\log(16k)\right\rceil\right\}.

Then every n-vertex graph that is ε\varepsilon-far from being k-colorable has a non-k-colorable induced subgraph on q uniformly sampled vertices with probability at least 2/3.

Comparing with the former upper bound of O(kεlog⁡1ε)O\left(\frac{k}{\varepsilon}\log\frac{1}{\varepsilon}\right) of Kushnir and Shapira [19], by the conclusion of Lemma 3.2 below, the new bound is no worse than the previous one throughout the nonvacuous parameter range, since ε<1/(2k)\varepsilon < 1/(2k) implies log⁡k<log⁡1ε\log k < \log\frac{1}{\varepsilon}. Moreover, it is a strict improvement whenever 1/ε1/\varepsilon is superpolynomial in kk. Also, if kk is fixed, our upper bound is equal to the existing best lower bound of Ω(log⁡kε)\Omega\left(\frac{\log k}{\varepsilon}\right), which shows that the sample complexity (treating kk as constant) is Θ(1ε)\Theta\left(\frac{1}{\varepsilon}\right).

References (24)