Exponential-time quantum algorithms for graph coloring problems

The fastest known classical algorithm deciding the $k$-colorability of $n$-vertex graph requires running time $\Omega(2^n)$ for $k\ge 5$. In this work, we present an exponential-space quantum algorithm computing the chromatic number with running time $O(1.9140^n)$ using quantum random access memory (QRAM). Our approach is based on Ambainis et al's quantum dynamic programming with applications of Grover's search to branching algorithms. We also present a polynomial-space quantum algorithm not using QRAM for the graph $20$-coloring problem with running time $O(1.9575^n)$. In the polynomial-space quantum algorithm, we essentially show $(4-\epsilon)^n$-time classical algorithms that can be improved quadratically by Grover's search.


Introduction
Exhaustive search is believed to be (almost) the fastest classical algorithm for many NP-complete problems including SAT, hitting set problem, etc [8]. Grover's quantum search quadratically improves the running time of exhaustive search [15]. Hence, the best classical running time for many NP-complete problems can be quadratically improved by quantum algorithms. On the other hand, non-trivial faster classical algorithms are known for some NP-complete problems including the travelling salesman problem (TSP), the graph coloring problem, etc. For these problems, more complicated techniques, such as dynamic programming, arithmetic algorithm based on inclusion-exclusion principle, etc., are used in the fastest known classical algorithms. It is not obvious how to boost these classical algorithms by a quantum computer. Recently, Ambainis et al. showed a general idea of quantum dynamic programming using quantum random access memory (QRAM) and showed quantum speedup for many NP-hard problems including TSP, set cover, etc [1]. Ambainis et al.'s work gives a new general method for exact exponential-time quantum algorithms.
In this work, we present exact exponential-time quantum algorithms for the graph coloring problem. The fastest known classical algorithm computes the chromatic number of n-vertex graph with running time poly(n)2 n on the random access memory (RAM) model. The main result of this work is the following theorem. The quantum algorithm in Theorem 1 is based on Ambainis et al's quantum dynamic programming for TSP with applications of Grover's search to Byskov's algorithm enumerating all maximal independent sets (MISs) of fixed size [7]. Byskov's algorithm is not naive exhaustive search, but is a branching algorithm (also referred as Branch & Reduce), for which Grover's search can be applied [12]. While RAM is widely accepted model of classical computation, QRAM is sometimes criticized due to the difficulty of implementation. In this paper, we also present quantum algorithms not using QRAM.
Theorem 2. For k ≤ 20, there exists ǫ > 0 such that there is polynomial-space bounded error quantum algorithms not using QRAM for the graph k-coloring problem with running time 2 (1−ǫ)n .
Note that classical algorithms with running time 2 (1−ǫ)n are known only for k = 3, 4 [2], [7]. Running times of the quantum algorithms in Theorem 2 are shown in Table 1. For proving Theorem 2, we essentially show classical algorithms with running time 4 (1−ǫ)n that can be improved quadratically by Grover's search. These classical algorithms are obtained by generalizing Byskov's techniques for reducing the graph k(≥ 4)coloring problem to the graph 3-coloring problem [7].

Related work
Since a graph is k-colorable if and only if the set of vertices can be partitioned into k independent sets, many algorithms for the graph k-coloring problem use enumeration algorithms of independent sets. There is a simple branching algorithm enumerating all MISs in time O * (3 n/3 ) = O(1.4423 n ) [11]. Lawler showed that 3-colorability can be decided in time O * (3 n/3 ) by enumerating all MISs and checking the bipartiteness of the subgraph induced by the complement of each MIS [17]. Lawler also showed that the chromatic number can be computed in time O(2.4423 n ) by a simple dynamic programming.
Beigel and Eppstein showed an efficient algorithm for the graph 3-coloring problem with running time O(1.3289 n ) [2]. Byskov showed reduction algorithms from the graph k(≥ 4)-coloring problem to the graph 3-coloring problem [7]. By using Beigel and Eppstein's graph 3-coloring algorithm, Byskov showed classical algorithms for the graph 4-, 5-and 6-coloring problems with running time O(1.7504 n ), O(2.1592 n ) and O(2.3289 n ), respectively. Fomin et al. showed an algorithm for the graph 4-coloring problem with running time O(1.7272 n ) by using the path decomposition [10].
In 2006, Björklund and Husfeldt, and Koivisto showed an exponential-space O * (2 n )-time algorithm for the chromatic number problem on the RAM model [3], [16]. These algorithms are based on the inclusionexclusion principle. They also showed that if there is a polynomial-space O * (α n )-time algorithm counting the number of independent sets, then there is a polynomial-space O * ((1 + α) n )-time algorithm computing the chromatic number [3], [5]. Since the fastest known polynomial-space algorithm computes the number of independent sets with running time O(1.2356 n ) [13], there is a polynomial-space O(2.2356 n )-time algorithm computing the chromatic number.
There is almost no previous theoretical work on quantum algorithms for the graph coloring problems. Fürer mentioned that Grover's algorithm can be applied to branching algorithms so that Beigel and Eppstein's algorithm for the graph 3-coloring problem can be improved to running time O( √ 1.3289 n ) = O(1.1528 n ) [12]. The quantum algorithms for Theorem 2 are basically obtained by applying Grover's search to generalized Byskov's reduction algorithms on the basis of Fürer's observation.
For general NP-hard problems, Ambainis et al. showed exponential-space exponential-time quantum algorithms using QRAM for many NP-hard problems [1]. The quantum algorithm for Theorem 1 is based on Ambainis et al's algorithm for TSP with application of Grover's search to Byskov's algorithm enumerating MISs of fixed size on the basis of Fürer's observation.

Quantum algorithm for the chromatic number problem
Similarly to Ambainis et al.'s quantum algorithm for TSP, the quantum algorithm for Theorem 1 is a simple divide-and-conquer algorithm with dynamic programming approach. The basic classical algorithm was shown in [4,Proposition 3]. The chromatic number of a graph G is equal to a sum of the chromatic numbers of G[S] and G[V \ S] for some non-empty S V unless G is one-colorable. If we can assume that S has size exactly ⌊n/2⌋ or ⌈n/2⌉, then we can consider a classical algorithm that recursively finds S of size ⌊n/2⌋ or ⌈n/2⌉ minimizing χ(G[S]) + χ(G[V \ S]). Let T (n) be the running time of this algorithm. Then, it follows T (n) = n ⌊n/2⌋ (T (⌊n/2⌋) + T (⌈n/2⌉)) so that we can apply Ambainis et al's quantum dynamic programming straightforwardly and obtain O(1.7274 n )-time quantum algorithm [1]. However, the balanced partition S satisfying does not necessarily exist. Hence, we use the following useful fact. Proof. Let t := max j ∈ {2, . . . , k} | j i=2 ≤ m . Let S := {2, 3, . . . , t}. Then, i∈{t+1,t+2,...,k} a i ≤ i∈{1,t+2,t+3,...,k} a i = n − i∈{2,3,...,t+1} a i ≤ n − m + 1. From Fact 1, we can consider following quantum algorithm computing the chromatic number. First, the algorithm precomputes the chromatic number of all induced subgraphs with size at most n/4. This precomputation is based on Lawler's formula where MIS(G) denotes the set of all MISs of G [17]. There is a classical algorithm enumerating all MISs with running time 3 n/3 . We will show in Section 3 that Grover's search can be applied to this algorithm so that the quantum algorithm can search all MISs with running time 3 n/6 . Here, computed chromatic numbers are stored to QRAM. Hence, we can apply Grover's search for computing the minimum in (1). The precomputation requires the running time O * n/4 i=1 n i 3 i/6 = O(1.8370 n ). Then, the main part of the algorithm computes the chromatic number of G by using the formula for χ(G) ≥ 3. This formula is justified by Fact 1 for m = ⌊n/2⌋. At the third level, the number of vertices in a graph is at most n/4. Hence, the chromatic number was precomputed and stored to QRAM. The running time of the main part of the quantum algorithm is Quantum algorithm for Theorem 1 searches all MISs of size t for each t ∈ {1, 2, . . . , n} separately. Then, precise analysis shows that the running time of the improved quantum algorithm is O(1.9140 n ).

Quantum algorithms for the graph k-coloring problem
We will derive classical algorithms that can be improved quadratically by Grover's search. In the classical algorithms, the graph k-coloring problem is reduced to the graph k ′ -coloring problems for some Let us consider a classical algorithm that simply searches S ⊆ V satisfying the above condition. Let T k (n) be the running time of this algorithm for the graph k-coloring problem. Then, T k (n) satisfies where polynomial factors in n are ignored. Then, we obtain T 4 (n) = O * (2 n ), T 8 (n) = O * (3 n ) and T 16 (n) = O * (4 n ). Let us consider a quantum algorithm that uses Grover's search for finding S. Let T * k (n) be the running time of the quantum algorithm. Then, it follows T * This yields a weaker version of Theorem 2 that is valid for k ≤ 8 rather than k ≤ 20.

Organization
In Section 2, notations and known classical and quantum algorithms are introduced. In Section 3, we present details of quantum algorithm for branching algorithms. In Section 4, we prove Theorem 1. In Section 5, we prove a weaker version of Theorem 2 that is valid for k ≤ 19 rather than k ≤ 20. Theorem 2 is obtained by improving the quantum algorithms in Section 5. The details of the proof of Theorem 2 are shown in Appendix B.

Definitions and notations
For a finite vertex set V , a set E of edges consists of subsets of V of size two. A pair (V, E) of finite vertex set V and a set E of edges is called an undirected simple graph. In this paper, we simply call a graph rather than an undirected simple graph. The number of vertices |V | is denoted by n. A mapping For a graph G, the smallest k such that there exists a k-coloring is called the chromatic number of G, and denoted by χ(G). A subset I ⊆ V of vertices is called an independent set if {v, w} / ∈ E for all v, w ∈ I. An independent set I is said to be maximal if there is no strict superset of I that is an independent set. A maximal independent set of size t is called t-MIS. 1] where 0 log 0 = 0. In this paper, the base of logarithm is 2. The notation g(n) = O * (f (n)) means that g(n) = O(n c f (n)) for some constant c. For O * (λ n ), we often round λ up to the fourth digit after the decimal point. In this case, we can use O() rather than O * (). For example, we often write g(n) = O(1.4143 n ) rather than g(n) = O * (2 n/2 ). The notation g(n) = O(f (n)) means that g(n) = O((log f (n)) c f (n)) for some constant c.

Known classical algorithm for enumerating all t-MISs
Byskov showed the following theorem.
Theorem 3 (Byskov [7]). The maximum number of t-MISs of n-vertex graphs is Furthermore, there is a classical algorithm enumerating all t-MISs of n-vertex graph in time O * (I(n, t)).
We can straightforwardly obtain the following lemma and corollary.

Grover's search
Here, Grover's search is briefly introduced without using quantum circuit, unitary oracle, etc.

QRAM
QRAM is the quantum analogue of RAM which can be accessed in a superposition [14]. QRAM has been used in many quantum algorithms [1]. RAM

Grover's search for branching algorithms
Fürer mentioned that Grover's search can be applied to branching algorithms [12]. Since the details of the quantum algorithm were not explicitly described in [12], we will show the details in this section. A branching algorithm is an algorithm which recursively reduce a problem into some problems of smaller parameters. We now consider decision problems with ℓ parameters n 1 , n 2 , . . . , n ℓ that are non-negative integers. If the parameters are sufficiently small, we do not apply any branching rule and solve this problem in some way. For a problem P with parameters n 1 , . . . , n ℓ that are not sufficiently small, we choose a branching rule b(P ) such that P is reduced to m b(P ) problems P 1 , P 2 . . . , P m b(P ) of the same class. Here, P i has parameters 1, 2, . . . , m b(P ) and j = 1, 2, . . . , ℓ. At least one of the parameters of P i must be smaller than the same parameter of P for all i ∈ 1, 2, . . . , m b(P ) . The solution of P is true if and only if at least one of the solutions of P 1 , . . . , P m b(P ) is true. Hence, we will call this algorithm OR-branching algorithm. For a problem P of this class, we can consider a computation tree that represents the branchings of the reductions. The computation tree for P is a single node if P has sufficiently small parameters so that any branching rule is not performed, and is a rooted tree where children of the root node are the root nodes of the computation trees for P 1 , P 2 , . . . , P m b(P ) if some branching rule b(P ) is applied to P . Let L(n 1 , . . . , n ℓ ) be the maximum number of leaves of the computation tree for P with parameters n 1 , . . . , n ℓ . Assume that the running time of the computation at a non-leaf node, including computations of b(P ), P i , and f b(P ),i j , is polynomial with respect to n 1 , . . . , n ℓ . Then, the total running time of the OR-branching algorithm is at most poly(n 1 , . . . , n ℓ )L(n 1 , . . . , n ℓ )T where T is the running time for the computation at a leaf node. We can apply Grover's search to OR-branching algorithms if we have an upper bound of L(n 1 , . . . , n ℓ ) with some properties.
Proof. If we can assign an integer s ∈ {1, 2, . . . , U (n 1 , . . . , n ℓ )} to every leaf of the computation tree, and can compute the corresponding leaf from given s in polynomial time with respect to the parameters, then, we can apply Grover's search for computing where a(P ) denotes the solution of a problem P and W (P ) denotes the set of all problems corresponding to leaves of the computation tree for P . Then, we obtain quantum algorithm with running time poly(n 1 , . . . , n ℓ ) U (n 1 , . . . , n ℓ )T [12]. The algorithm computing s-th leaf of a problem P is shown in Algorithm 1. We will show the validity of Algorithm 1.
Proof. The proof is an induction on the depth of the computation tree for P . If the computation tree for P consists of a single node, then Algorithm 1 returns P . Assume that the proposition holds for any P with the computation tree of depth at most d. We will consider a problem P with computation tree of depth d + 1.
Let i be the index of the branching at P that achieves Q. if P is a leaf then return P
Since the depth of the computation tree for P is at most ℓ j=1 n j , the running time of Leaf(P, s) is polynomial with respect to the parameters. Hence, there is a quantum algorithm computing a(P ) with running time poly(n 1 , . . . , n ℓ ) U (n 1 , . . . , n ℓ )T .
For a problem P whose solution is an integer, we can also consider a branching algorithm satisfying a(P ) = min a(P i ) for children P 1 , . . . , P m b(p) of P . In this case, we will call this algorithm MINbranching algorithm. Similarly to OR-branching algorithm, we can apply Grover's search to MIN-branching algorithm from Theorem 5.
In this paper, we apply Lemma 4 to Byskov's algorithm in Theorem 3. Byskov showed the upper bound I(n, t) satisfying the conditions in Lemma 4 for the branching algorithm with two parameters n and t. Hence, we can apply Grover's search to Byskov's algorithm in Theorem 3. Since Algorithm 2 Algorithm computing the chromatic number of G. Grover's search is used for mins.
Here, we only consider maximum for t ≤ n/3 since I(n, t) is decreasing with respect to t for t ≥ n/3, and since the another part s n−t s T 2 (s) in (3) is decreasing with respect to t. Numerical calculation shows that the maximum is given at δ = 1/7, λ = 1/2. Hence, we obtain Careful readers may notice that the running time of the precomputation and the main computation are not balanced. If the quantum algorithm precomputes the chromatic number of induced subgraphs with size at most (1/4 + ǫ)n for some ǫ > 0, the precomputation and the main computation require more and less running time, respectively (we can use Fact 1 for unbalanced m). By optimizing ǫ such that the both running time are balanced, we may obtain improved running time. This idea improved the running time of the quantum algorithm for TSP [1], but does not improve the running time of Algorithm 2. Equation (2) is dominated by t = n/5 and s = (2/5)n. Equation (3) is dominated by t = n/7 and s = n/2. In order to exclude s = (2/5)n in the summation in (2), the chromatic number of induced subgraph with size at most (3/10)n must be precomputed. However, the running time of the precomputation in this case is (3/10) For larger k, Byskov showed reduction algorithms from the graph k-coloring problem to the graph 3coloring problem [7]. Since a graph G is k-colorable if and only if there exists an MIS I of size at least ⌈n/k⌉ such that G[V \ I] is (k − 1)-colorable, we obtain the following reduction algorithm.
Let T (1) k (n) be the running time of an algorithm for the graph k-coloring problem using Reduction algorithm 1. Then, it satisfies for k ≥ 4 by ignoring a polynomial factor. By using Reduction algorithm 1 and Theorem 7, Byskov obtained algorithms for the graph 4-and 5-coloring problems with running time O(1.7504 n ) and O(2.1592 n ), respectively. Byskov also introduced another reduction algorithm. Here, we introduce it in a general form.
Since a graph G is k-colorable if and only if there exists a subset S of vertices of size at least ⌈nk ′ /k⌉ such that G[S] is k ′ -colorable and G[V \ S] is (k − k ′ )-colorable for arbitrary k ′ < k, we obtain the following reduction algorithm.
Reduction algorithm 2 (Byskov [7], Lawler [17]). Let T (2) k (n) be the running time of an algorithm for the graph k-coloring problem using Reduction algorithm 2. Then, it satisfies for k ≥ 4 by ignoring a polynomial factor. Reduction algorithm 2 is a simple generalization of a reduction algorithm in [7]. For k = 6, Reduction algorithm 2 with k ′ = 3 gives T

Quantum algorithms not using QRAM
In this section, we present quantum algorithms not using QRAM, and prove a weaker version of Theorem 2 that is valid for k ≤ 19 rather than k ≤ 20. Theorem 2 is obtained by improving quantum algorithms presented in this section. The improved quantum algorithm and the proof of Theorem 2 are shown in Appendix B. Fürer mentioned that Grover's search can be applied to Beigel and Eppstein's algorithm.
The quantum algorithm in Lemma 6 is obtained by application of Lemma 4 to classical Beigel and Eppstein's algorithm in Theorem 7. On the other hand, Beigel and Eppstein also showed a very simple randomized algorithm for the graph 3-coloring problem with running time O * (2 n/2 ) [2, Corollary 1]. This randomized algorithm searches one of the 2 n/2 solutions from 2 n leaves in a quaternary computation tree of depth n/2. From Theorem 4, we can apply Grover's search to the randomized algorithm and obtain a quantum algorithm with running time O * (2 n/4 ). The quantum algorithms for Theorem 2 reduce the graph kcoloring problems to the graph 3-coloring problem. Theorem 2 can be obtained even if this simpler quantum algorithm is used in place of the involved quantum algorithm in Lemma 6 although the exponents increase. By applying Reduction algorithms 1 and 2 with Grover's search, the following Theorem is obtained.
Proof. We consider quantum algorithm using Reduction algorithms 1 and 2 with Grover's search. Since we can apply Lemma 4 to Byskov's enumeration algorithm of t-MIS in Reduction algorithm 1, we obtain T * k (n) ≤ n t=⌈n/k⌉ I(n, t)T * k−1 (n − t).
Algorithm 3 Algorithm for the k-colorability of G. Grover's search is used for two s. if k ≤ 2 then return the k-colorability of G by a polynomial-time algorithm 3: if k = 3 then return the 3-colorability of G by Beigel and Eppstein's algorithm with Grover's search 4: if k ≤ 5 then 5: for t ∈ {⌈n/k⌉, . . . , n} do Choose k ′ depending on k from Table 2 9: for t ∈ {⌈nk ′ /k⌉, . . . , n} do 10: if S⊆V,|S|=t COL(G[S], k ′ ) ∧ COL(G[V \ S], k − k ′ ) then return true 11: return false Table 2: Precise values of f * k . k f *