Graph Homomorphisms with Complex Values: a Dichotomy Theorem ∗
Total Page:16
File Type:pdf, Size:1020Kb
SIAM J. COMPUT. c 2013 Society for Industrial and Applied Mathematics Vol. 42, No. 3, pp. 924–1029 GRAPH HOMOMORPHISMS WITH COMPLEX VALUES: A DICHOTOMY THEOREM ∗ † ‡ § JIN-YI CAI ,XICHEN, AND PINYAN LU Abstract. Each symmetric matrix A over C defines a graph homomorphism function ZA(·)on undirected graphs. The function ZA(·) is also called the partition function from statistical physics, and can encode many interesting graph properties, including counting vertex covers and k-colorings. We study the computational complexity of ZA(·) for arbitrary symmetric matrices A with algebraic complex values. Building on work by Dyer and Greenhill [Random Structures and Algorithms,17 (2000), pp. 260–289], Bulatov and Grohe [Theoretical Computer Science, 348 (2005), pp. 148–186], and especially the recent beautiful work by Goldberg et al. [SIAM J. Comput., 39 (2010), pp. 3336– 3402], we prove a complete dichotomy theorem for this problem. We show that ZA(·)iseither computable in polynomial-time or #P-hard, depending explicitly on the matrix A. We further prove that the tractability criterion on A is polynomial-time decidable. Key words. computational complexity, counting complexity, graph homomorphisms, partition functions AMS subject classifications. 68Q17, 68Q25, 68R05, 68R10, 05C31 DOI. 10.1137/110840194 1. Introduction. Graph homomorphism has been studied intensely over the years [28, 23, 13, 18, 4, 12, 21]. Given two graphs G and H, a graph homomorphism from G to H is a map f from the vertex set V (G)to V (H) such that, whenever (u, v)isanedgeinG,(f(u),f(v)) is an edge in H. The counting problem for graph homomorphism is to compute the number of homomorphisms from G to H.Forafixed graph H, this problem is also known as the #H-coloring problem. In 1967, Lov´asz [28] proved that H and H are isomorphic iff for all G, the number of homomorphisms from G to H and from G to H are the same. Graph homomorphisms and the associated partition function defined below provide us an elegant and wide-ranging notion of graph properties [23]. In this paper, all graphs considered are undirected. We follow standard defini- tions: G is allowed to have multiple edges; H can have loops, multiple edges, and, more generally, edge weights. (The standard definition of graph homomorphism does not allow self-loops for G. However, our result is stronger: We prove polynomial-time tractability even for input graphs G with self-loops; at the same time, our hardness results hold for the more restricted case of G with no self-loops.) Formally, we use A to denote an m × m symmetric matrix with entries (Ai,j ), i, j ∈ [m]={1, 2,...,m}. Given any undirected graph G =(V,E), we define the graph homomorphism function ∗ Received by the editors July 11, 2011; accepted for publication (in revised form) February 21, 2013; published electronically May 21, 2013. http://www.siam.org/journals/sicomp/42-3/84019.html †Department of Computer Sciences, University of Wisconsin–Madison, Madison, WI 53706 ([email protected]). This work was supported by NSF CCF-0914969. ‡Department of Computer Science, Columbia University, New York, NY 10027 (xichen@ cs.columbia.edu). This work was supported by NSF grants CCF-0832797 and DMS-0635607 when the author was a postdoc at the Institute for Advanced Study and Princeton University, by a USC Downloaded 07/31/15 to 128.105.14.124. Redistribution subject SIAM license or copyright; see http://www.siam.org/journals/ojsa.php Viterbi School of Engineering startup fund to Shang-Hua Teng, and by CCF-1149257 and a Sloan research fellowship. §Microsoft Research Asia, Beijing 100080, China ([email protected]). 924 Copyright © by SIAM. Unauthorized reproduction of this article is prohibited. GRAPH HOMOMORPHISMS WITH COMPLEX VALUES 925 (1.1) ZA(G)= Aξ(u ),ξ(v). ξ:V →[m] (u,v)∈E This is also called the partition function from statistical physics. It is clear from the definition that ZA(G) is exactly the number of homomorphisms from G to H,when A is the adjacency matrix of H. Graph homomorphism can express many natural graph properties. For example, { } if we take H to be the graph over two vertices 0, 1 with an edge (0, 1) and a loop at 1, then the set of vertices mapped to 1 in a graph homomorphism from G to H corresponds to a vertex cover of G, and the counting problem simply counts the number of vertex covers. As another example, if H is the complete graph over k vertices (without self-loops), then the problem is exactly the k-coloring problem for G. Many additional graph invariants can be expressed as ZA(G) for appropriate A. Consider the Hadamard matrix 11 (1.2) H = − . 1 1 We index its rows and columns by {0, 1}.InthesumZ H(G), each term is either 1 or −1 and equals −1 precisely when the induced subgraph of G on ξ−1(1) has an odd n number of edges. Therefore, (2 − ZH(G))/2 is the number of induced subgraphs of G with an odd number of edges. Also expressible as Z (·)areS-flows, where S is a A subset of a finite Abelian group closed under inversion [18], and a scaled version of the ˆ − − Tutte polynomial T (x, y), where (x 1)(y 1) is a positive integer. In [18], Freedman, Lov´asz and Schrijver characterized the graph functions that can be expressed as ZA(·). In this paper, we study the complexity of the partition function ZA(·), where A is an arbitrary fixed symmetric matrix over the algebraic complex numbers. Throughout the paper, we let C denote the set of algebraic complex numbers and refer to them simply as complex numbers when it is clear from the context. More discussion on the model of computation can be found in section 2.2. The complexity question of ZA(·) has been intensely studied. Hell and Neˇsetˇril first studied the H-coloring problem [22, 23] (i.e., given an undirected graph G, decide whether there exists a graph homomorphism from G to H) and proved that for any fixed undirected graph H, the problem is either in polynomial time or NP-complete. Results of this type are called complexity dichotomy theorems. Such theorems state that every member of the class of problems concerned is either tractable (i.e., solvable in P) or intractable (i.e., NP-hard or #P-hard depending on whether it is a decision or a counting problem). This includes the well-known Schaefer’s dichotomy theorem [31]. The famous complexity dichotomy conjecture made by Feder and Vardi [16] on deci- sion constraint satisfaction problems [11] motivated much of the subsequent work. In [13], Dyer and Greenhill studied the counting version of the H-coloring prob- lem. They proved that for any fixed symmetric {0, 1}-matrix A, ZA(·) is either com- putable in polynomial time or #P-hard. (In this paper, for a function computable in polynomial time we will simply say “in P.”) Then in [4], Bulatov and Grohe gave a sweeping generalization of this theorem to all nonnegative symmetric matrices A. (See Theorem 2.5 for the precise statement.) They obtained an elegant dichotomy theorem, which basically says that ZA(·) is computable in P if each block of A has rank at most one, and is #P-hard otherwise. More precisely, decompose A as a direct sum of Ai which correspond to the connected components Hi of the undirected graph H Downloaded 07/31/15 to 128.105.14.124. Redistribution subject SIAM license or copyright; see http://www.siam.org/journals/ojsa.php · · defined by the nonzero entries of A. Then, ZA( ) is computable in P if every ZAi ( )is · and is #P-hard otherwise. For each nonbipartite graph Hi, the corresponding ZAi ( ) Copyright © by SIAM. Unauthorized reproduction of this article is prohibited. 926 JIN-YI CAI, XI CHEN, AND PINYAN LU is computable in P if Ai has rank at most one and is #P-hard otherwise. For each · bipartite Hi, the corresponding ZAi ( )isinPifAi has the form 0B i Ai = T , Bi 0 where Bi has rank one, and is #P-hard otherwise. The result of Bulatov and Grohe is both sweeping and enormously applicable. It completely solves the problem for all nonnegative symmetric matrices. However, when we are dealing with nonnegative matrices, there are no cancellations in the exponential sum ZA(·). These potential cancellations, when A is either a real or a complex matrix, may in fact be the source of surprisingly efficient algorithms for · computing ZA( ). The occurrence of these cancellations, or the mere possibility of such occurrence, makes proving any complexity dichotomies more difficult. Such a proof must identify all polynomial-time decidable problems utilizing the potential cancellations, such as those found in holographic algorithms [36, 37, 8], and at the same time carve out exactly what is left. This situation is similar to monotone versus nonmonotone circuit complexity. It turns out that indeed there are more interesting tractable cases over the reals, and in particular, the 2× 2 Hadamard matrix H in (1.2) turns out to be one such case. This is the starting point for the next great chapter on the complexity of ZA(·). In a paper [21] comprising 67 pages of beautiful proofs of both exceptional depth and conceptual vision, Goldberg et al. proved a complexity dichotomy theorem for algebraic real-valued symmetric matrices A. Their result is too intricate to give a short and accurate summary here. It states that the problem of computing ZA(G) for any algebraic real A is either in P or #P-hard.