Gadgets and Anti-Gadgets Leading to a Complexity Dichotomy
We introduce an idea called anti-gadgets in complexity reductions. These combinatorial gadgets have the effect of erasing the presence of some other graph fragment, as if we had managed to include a negative copy of a graph gadget. We use this idea t…
Authors: Jin-Yi Cai, Michael Kowalczyk, Tyson Williams
Gadgets and An ti-Gadgets Leading to a Complexit y Dic hotom y Jin-Yi Cai Univ ersity of Wisconsin-Madison jyc@cs.wisc.edu Mic hael Kow alczyk Northern Michigan Univ ersity mkowalcz@nmu.edu T yson Williams Univ ersity of Wisconsin-Madison tdw@cs.wisc.edu Abstract W e in tro duce an idea called anti-gadgets in complexit y reductions. These com binatorial gadgets hav e the effect of erasing the presence of some other graph fragment, as if we had managed to include a negativ e copy of a graph gadget. W e use this idea to prov e a complexity dic hotomy theorem for the partition function Z ( G ) on 3-regular directed graphs G , where each edge is giv en a complex-v alued binary function f : { 0 , 1 } 2 → C . W e show that Z ( G ) = X σ : V ( G ) →{ 0 , 1 } Y ( u,v ) ∈ E ( G ) f ( σ ( u ) , σ ( v )) , is either computable in p olynomial time or #P-hard, dep ending explicitly on f . T o state the dichotom y theorem more explicitly , w e show that the partition function Z ( G ) on 3-regular directed graphs G is computable in p olynomial time when f b elongs to one of four classes, whic h can b e describ ed as (1) degenerate, (2) generalized disequality , (3) generalized equalit y , and (4) affine after a holographic transformation. In all other cases it is #P-hard. Here class (4), after a holographic transformation, can also b e describ ed as an exp onen tial quadratic p olynomial of the form i Q ( x,y ) , where i = √ − 1 and the cross term xy in the quadratic p olynomial Q ( x, y ) has an ev en co efficient. If the input graph G is planar, then an additional class of functions b ecomes computable in p olynomial time, and everything else remains #P- hard. This additional class is precisely those which can b e computed by holographic algorithms with matc hgates, making use of the Fisher-Kasteleyn-T emperley algorithm via Pfaffians. There is a long history in the study of “Exactly Solved Mo dels” in statistical physics. In the language of complexity theory , physicists’ notion of an “Exactly Solv able” system corresp onds to a system with a p olynomial time computable partition function. A cen tral question is to iden tify which “systems” can b e solved “exactly” and which “systems” are “difficult”. While in ph ysics, there is no rigorous definition of b eing “difficult”, complexity theory supplies the prop er notion—#P-hardness. The main innov ation in this pap er is the idea of an anti-gadget. It is analogous to the pairing of a particle and its anti-particle in physics. Coupled with the idea of anti-gadgets, w e also introduce a general wa y of proving #P-hardness by tw o types of gadgets called recursive gadgets and pro jector gadgets. W e prov e a Group Lemma which sp ells out a general condition for the tec hnique to succeed. This Group Lemma states that as long as the group generated by the transition matrices of the constructed gadgets is infinite, then one can in terp olate all unary functions—a key step in the pro of of #P-hardness. Interpolation is carried out by forming a V andermonde system and proving that it is of full rank. The anti-gadget concept makes the transition to group theory very natural and seamless. Not only is the idea of an ti-gadgets useful in proving a new complexity dic hotomy theorem in counting complexit y , we also show that anti-gadgets provide a simple explanation for some miraculous cancellations that were observ ed in previous results. F urthermore, anti-gadgets can also guide the search for gadget sets more by design than by chance. 1 In tro duction Reduction, the metho d of transforming one problem to another, and thereby pro ving the hardness of a problem for an en tire complexit y class, is arguably the most successful tool in complexit y theory to date. When expressed in terms of graph problems, a typ ical reduction from problem Π 1 to problem Π 2 is carried out b y designing a gadget —a graph fragment with some desirable prop erties. The reduction starts from an instance graph G 1 for Π 1 and introduces one or more copies of the gadget to obtain an instance graph G 2 (or p ossibly multiple instance graphs) for Π 2 . The graph G 2 ma y contain a p olynomial n umber of copies of the gadget. But c an it include some ne gative c opies of a gadget? Of course not; the notion of a ne gative graph fragment seems meaningless. Ho wev er, in this pap er we introduce an idea in reduction theory that has the effe ct of introducing ne gative c opies of a gadget in a reduction. More precisely , we sho w that our new construction idea, when expressed in algebraic terms, has the same effect as er asing the presence of some graph fragmen t. It is as if we managed to include a negativ e cop y of a certain gadget. W e call this an anti-gadget . It is analogous to the pairing of a particle and its an ti-particle in physics. W e demonstrate the elegance and usefulness of anti-gadgets by proving a new complexit y dichotom y theorem in coun ting complexit y where anti-gadgets pla y a decisiv e role. F urthermore, we sho w that an ti-gadgets provide a simple explanation for some miraculous cancellations that w ere observed in previous results [10, 11]. W e also observe how anti-gadgets can guide the searc h for suc h gadget sets more b y design than b y chance. The new dic hotom y theorem that w e prov e using anti-gadgets can b e stated in terms of spin systems on 3-regular graphs with vertices taking v alues in { 0 , 1 } and an arbitrary complex-v alued edge function f ( · , · ) that is not necessarily symmetric. Define the p artition function on G = ( V , E ) as Z ( G ) = P σ : V ( G ) →{ 0 , 1 } Q ( u,v ) ∈ E ( G ) f ( σ ( u ) , σ ( v )). Dep ending on the nature of the edge function f , we show that the problem Z ( · ) is either tractable in P or #P-hard. More precisely , the problem is #P-hard unless the edge function is ( i ) degenerate, ( ii ) generalized equalit y , ( iii ) generalized disequalit y , or is ( iv ) affine after a holographic transformation. F or these four classes of functions, the problem is computable in p olynomial time. F urthermore, if the input is restricted to planar graphs, then the class of tractable problems is augmen ted b y those which are solv able b y holographic algorithms with matchgates—all other problems remain #P-hard. Th us, holographic algorithms with matchgates are a universal methodology for this class of counting problems o ver directed 3-regular graphs, whic h are #P-hard in general, but b ecome tractable on planar graphs. The main innov ation in this pap er is the idea of an anti-gadget. In terms of concrete theorems pro ved, this pap er can b e viewed as extending previous dichotom y theorems for the complexity of the spin system for symmetric edge functions [13, 14, 30, 10, 11] to asymmetric edge functions. The new dichotom y theorem holds ov er 3-regular graphs, for any (not necessarily symmetric) complex- v alued edge function. In physics, the 0-1 vertex assignmen ts are called spins, and the edge function v alues f ( σ ( u ) , σ ( v )) corresp ond to lo cal in teractions b etw een particles. There is a long history in the statistical physics communit y in the study of “Exactly Solved Mo dels” [1, 32]. In the language of mo dern complexity theory , ph ysicists’ notion of an “Exactly Solv able” system corresp onds to a system with polynomial time computable partition function. A central question is to iden tify whic h “systems” can b e solved “exactly” and whic h “systems” are “difficult”. While in ph ysics, there is no rigorous definition of being “difficult”, complexit y theory supplies the proper notion—#P-hardness. The class of problems w e study in this pap er has a close connection with holant problems [36, 35, 15, 16, 9, 29, 12, 25, 17]. W e use holographic algorithms [35, 12] to prov e b oth tractabilit y and #P- hardness. In general, holan t problems are a natural class of counting problems which can enco de 1 all coun ting Constraint Satisfaction Problems (#CSP) [18] and graph homomorphisms. Dichotom y theorems for graph homomorphisms [31, 2, 6, 20, 21, 23, 7, 26] and #CSP [3, 4, 5, 2, 9, 8, 22, 19, 24, 11] hav e b een a very active researc h area. Compared to #CSP and graph homomorphisms, the main difficulty here is b ounded degree, which makes hardness pro ofs more challenging, and for a go od reason—there are indeed more tractable cases. 2 Notation and Bac kground The partition function on directed graphs is a sp ecial case of Holan t problems defined as follows. A signatur e grid Ω = ( G, F , π ) consists of a lab eled undirected graph G = ( V , E ) where π lab els eac h v ertex v ∈ V with a function f v ∈ F . The inputs of f v are identified with the inciden t edges E ( v ) at v . F or any edge assignment ξ : E → { 0 , 1 } , f v ( ξ | E ( v ) ) is the ev aluation, and the counting problem is to compute Holant Ω = P ξ : E →{ 0 , 1 } Q v ∈ V f v ( ξ | E ( v ) ). Giv en an y directed 3-regular graph G = ( V , E ), its edge-v ertex incidence graph G 0 has v ertex set V ( G 0 ) = V ∪ E and edge set E ( G 0 ) = { ( v , e ) | v is incident to e in G } . The graph G 0 is bipartite and (2 , 3)-regular. If we lab el each v ∈ V ⊂ V ( G 0 ) with the Equality function = 3 of arity 3 and eac h e ∈ E ⊂ V ( G 0 ) with the original edge function f from G , then the Holan t v alue on G 0 is exactly the partition function Z ( G ). Essentially = 3 forces all inciden t edges in G 0 at a v ertex v ∈ V ⊂ V ( G 0 ) to take the same v alue, which reduces to vertex assignments on V , as in Z ( G ). W e frequen tly tak e this bipartite p ersp ectiv e of Z ( G ) as holant problems in order to use holographic transformations, whic h is more con venien t on bipartite graphs. A function f : { 0 , 1 } k → C can b e denoted by ( f 0 , f 1 , . . . , f 2 k − 1 ), where f i is the v alue of f on the i th lexicographical bit string of length k . They are also called signatur es . A signature f of arity k is degenerate if f is a tensor pro duct of unary signatures: f = ( a 1 , b 1 ) ⊗ · · · ⊗ ( a k , b k ). F or (2 , 3)-regular bipartite graphs ( U, V , E ), if every u ∈ U is lab eled f and every v ∈ V is lab eled r , then we also use Holant( f | r ) to denote the holant problem. Our main result is a dic hotomy theorem for Holant( f | = 3 ), for an arbitrary binary function f = ( w , x, y , z ), where w, x, y , z ∈ C . It has the same complexity as Holant( cf | = 3 ) for an y nonzero c ∈ C , hence w e often normalize a signature b y a nonzero scalar. More generally , if G and R are finite sets of signatures and the v ertices of U (resp. V ) are lab eled by signatures from G (resp. R ), then we also use Holant( G | R ) to denote the bipartite holan t problem. Signatures in G are called gener ators and signatures in R are called r e c o gnizers . Signatures from G and R are a v ailable at eac h v ertex of the appropriate part of an input graph. Instead of a single vertex, we can use graph fragments to generalize this notion. A ( G | R )-gate Γ is a triple ( H , G , R ), where H = ( U, V , E , D ) is a bipartite graph with some dangling edges D . Other than these dangling edges, a ( G | R )-gate is the same as a signature grid. The purp ose of dangling edges is to provide input and output edges. In H = ( U, V , E , D ), eac h no de in U (resp. V ) is assigned a function in G (resp. R ), E are the regular edges, and D are the dangling edges. The ( G | R )-gate Γ defines a function: Γ( y 1 , y 2 , . . . , y q ) = P ( x 1 ,x 2 ,...,x p ) ∈{ 0 , 1 } p H ( x 1 , x 2 , . . . , x p , y 1 , y 2 , . . . , y q ), where p = | E | , q = | D | , ( y 1 , y 2 , . . . , y q ) ∈ { 0 , 1 } q denotes an assignment on the dangling edges, and H ( x 1 , x 2 , . . . , x p , y 1 , y 2 , . . . , y q ) denotes the pro duct of ev aluations at ev ery vertex of H . W e also call this function the signature of the ( G | R )-gate Γ. A ( G | R )-gate can b e used in a signature grid as if it is just a single no de with the same signature. Signature grids on bipartite (2 , 3)-regular graphs can be iden tified with directed 3-regular graphs, where w e merge t w o inciden t edges at ev ery v ertex w of degree 2, and lab el the new edge b y the arity 2 signature f w . The edge is oriented from 2 (a) As a bipartite (2,3)-regular graph (b) As a directed 3-regular graph Figure 1: The tw o representations of a ( G | R )-gate (a) Pro jector gadget (b) Recursive gadget . . . . . . (c) Planar embedding of interpolation construction Figure 2: Arit y 4 to 1 pro jector and recursive gadgets and the construction for in terp olation u to v if f w = f w ( u, v ). Figure 1 gives an example of a ( G | R )-gate b oth as a bipartite (2,3)-regular graph and as an equiv alen t directed 3-regular graph. W e designate dangling edges as either le ading edges or tr ailing edges. Eac h ( G | R )-gate is pictured with leading edges protruding to the left and any trailing edges to the right. Supp ose a ( G | R )-gate has m leading edges and n trailing edges. Then the signature of the ( G | R )-gate can b e organized as a 2 m -b y-2 n tr ansition matrix M , where the ro w (resp. column) is indexed b y a { 0 , 1 } -assignmen t to the leading (resp. trailing) edges. When pictured, if e 1 , . . . , e n are n dangling edges in top-do wn order, then b 1 . . . b n ∈ { 0 , 1 } n is the index for the assignmen t where e i is assigned b i . W e denote the transition matrix of Gadget i as M i unless otherwise noted. The constructions in this pap er are primarily based up on tw o kinds of ( G | R )-gates, which w e call r e cursive gadgets and pr oje ctor gadgets . An arity- d r e cursive ( G | R ) -gadget is a ( G | R )-gate with d leading edges and d trailing edges. A ( G | R )-gate is a pr oje ctor ( G | R ) -gadget fr om arity n to m if it has m leading edges and n trailing edges. Internally , for b oth recursiv e and pro jector gadgets, we require that all leading edges connect to a degree 2 vertex (equiv alen tly a directed edge), while all trailing edges connect to a degree 3 vertex. These gadget t yp es are defined in this w ay to maintain the bipartite structure of the signature grid when we merge trailing edges of one gadget with leading edges of another (see Figure 2). 3 Gadgets and An ti-Gadgets In this section, w e start with a gentle primer to the asso ciation betw een a com binatorial gadget and its signature written as a transition matrix. W e show that one can t ypically express the transition matrix starting from a few of the most basic gadget comp onen ts and their matrices as atomic building blo c ks, after applying some well defined op erations. W e then introduce anti-gadgets and explain wh y they are so effectiv e. W e start with five basic gadget comp onen ts as depicted in Figure 3. Their signature matrices 3 Gadget A Gadget B Gadget C Gadget D Gadget E Figure 3: Fiv e basic gadget comp onents Gadget 1 Gadget 2 Gadget 3 Gadget 4 Gadget 5 Gadget 6 Figure 4: Recursiv e and pro jector gadgets are A = w x y z , B = w y x z , C = 1 0 0 0 0 0 0 1 , D = 1 0 0 0 0 0 0 1 , and E = w x y z . The first operation is matrix product, which corresponds to sequen tially connecting t w o gadgets together. F or example, Gadget 1 is a simple comp osition of Gadget B and Gadget C, and thus its transition matrix is the matrix pro duct B C = w 0 0 y x 0 0 z (see Figure 5a). The second op eration is tensor pro duct, which corresp onds to putting t wo gadgets in parallel (tw o disconnected parts). The transition matrix of Gadget 2 is AC B ⊗ 2 D = w 3 + x 3 wy 2 + xz 2 w 2 y + x 2 z y 3 + z 3 , where B ⊗ 2 corresp onds to the parallel part of the gadget and is clearly visible in Figure 5b. Similarly , Gadget 3 has signature matrix AC ( A ⊗ B ) D . Note that the order of the tensor pro duct is to mak e the top leading edge for the ro w (resp ectiv ely , the top trailing edge for the column) the most significant bit. The transition matrices of Gadgets 4 and 5 are respectively w x y z ⊗ 2 diag( w , x, y , z ) and w x y z ⊗ 2 diag( w , y , x, z ) and can b e mec hanically derived by our gadgetry calculus as A ⊗ 2 ( C ⊗ I 2 )( I 2 ⊗ A ⊗ I 2 )( I 2 ⊗ D ) and A ⊗ 2 ( C ⊗ I 2 )( I 2 ⊗ B ⊗ I 2 )( I 2 ⊗ D ). The comp osition of Gadget 4 is illustrated in Figure 5c. Gadget E is used to create a self-lo op, as in Gadget 6, whic h has transition matrix AC ( A ⊗ I 2 )( C ⊗ I 2 )( B C E ⊗ I 4 )( A ⊗ B ) D . A comp osition is given in Figure 8 of the app endix. No w we introduce a p ow erful new technique called anti-gadgets . Definition 3.1. L et G b e a r e cursive gadget with tr ansition matrix M . Then a r e cursive gadget G 0 is c al le d an anti-gadget of G if the tr ansition matrix of G 0 is λM − 1 , for some λ ∈ C − { 0 } . A crucial ingredien t in our proof of #P-hardness is to produce an arbitrarily large set of pairwise (a) Composition of Gadget 1 (b) Comp osition of Gadget 2 (c) Comp osition of Gadget 4 Figure 5: Gadget comp ositions using the basic gadget comp onen ts in Figure 3 4 linearly indep enden t signatures. These signatures are used to form a V andermonde system of full rank. One common wa y to pro duce an arbitrarily large set of signatures is to comp ose copies of a recursiv e gadget. Let M b e the transition matrix of some recursive gadget G . As discussed ab o ve, comp osing k copies of G pro duces a gadget with transition matrix M k . If M has infinite order (up to a scalar), then w e hav e an arbitrarily large set of pairwise linearly indep enden t signatures. No w supp ose that M has finite order (up to a scalar), that is, for some p ositiv e in teger k , M k = λI , a nonzero m ultiple of the iden tity matrix. Then comp osing only k − 1 copies of G results in a gadget with a transition matrix that is the inverse of G ’s transition matrix (up to a scalar). This is an an ti-gadget of G . If an anti-gadget of G is comp osed with another gadget containing similar structure to that of G , then cancellations ensue and the composition yields a transition matrix that can be quite easy to analyze. E.g., Gadgets 4 and 5 only differ by the orien tation of the vertical edge. When comp osing an an ti-gadget of Gadget 4 with Gadget 5, the con tribution of the t wo leading edges cancel and w e get M − 1 4 M 5 = diag( w , x, y , z ) − 1 w x y z ⊗ 2 − 1 w x y z ⊗ 2 diag( w , y , x, z ) = diag(1 , y /x, x/y , 1). The resulting transition matrix has infinite order unless x/y is a ro ot of unit y . This situation is analyzed formally in Lemma 6.1. Another use of the anti-gadget technique can be applied with Gadgets 2 and 3. Once again, the con tribution of the leading edge cancels when composing an an ti-gadget of Gadget 3 with Gadget 2. The resulting matrix is a bit more complicated this time. How ev er, when this pair of gadgets is analyzed formally in Lemma 6.2, the assumptions are x = 0 ∧ w yz 6 = 0. In that case, M − 1 3 M 2 = 1 y 2 /w 2 0 1 . This matrix clearly has infinite order (up to a scalar). 4 In terp olation T ec hniques The metho d of p olynomial interpolation has b een pioneered by V aliant [34] and further developed b y man y others [21, 33, 2, 5, 13]. In this section, we give a new unified technique to interpolate all unary signatures. This is our main technical step to prov e #P-hardness. Our metho d pro duces an infinite set of pairwise linearly indep enden t v ectors at any fixed dimension, and then pro jects to a lo wer dimension while retaining pairwise linear indep endence of a nontrivial fraction. In previous work, “finisher gadgets” [30, 10, 11] were used to handle the symmetric case, map- ping symmetric arit y 2 signatures to arit y 1 signatures. In the presen t w ork, we in tro duce pr oje ctive gadget sets . These gadget sets are completely general, in the sense that they can b e used to map any set of pairwise linearly indep endent signatures (symmetric or asymmetric) to any low er arit y , while preserving pairwise linear independence for an inv erse p olynomial fraction. This p ermits m uch more freedom in gadget constructions, and this p o wer is used crucially in the proof of our dic hotomy theorem. W e remark that this adv ance is not just a simple matter of searc hing for the righ t gadgets. One m ust find the abstract criteria for success that simultaneously can b e satisfied b y gadgets that exist in practice. These dev elopments, together with the an ti-gadget concept, come together in the Group Lemma, whic h provides a straigh tforward criterion for pro ving #P-hardness of certain holan t problems. Definition 4.1. A set of matric es M forms a pro jective set from arity n to m if for any matrix N ∈ C 2 n × 2 with r ank 2, ther e exists a matrix M ∈ C 2 m × 2 n in M such that M N has r ank 2. W e also call a set of gadgets pr oje ctive from arity n to m if the set of its signature matrices is pro jectiv e from arit y n to m . A gadget set that is pro jective from arit y 2 to 1 can b e used to 5 transform a pair of ( G | R )-gates with linearly indep endent binary signatures to a pair of ( G | R )- gates with linearly indep enden t unary signatures. Pro jector gadgets in such a set hav e 2 trailing edges and 1 leading edge, but can also b e viewed as operating on signatures of higher arit y , with the iden tity transformation b eing p erformed on the other edges not connected to the pro jector gadget. This wa y of connecting the pro jector gadget to an existing ( G | R )-gate automatic al ly gives us pro jective gadget sets for higher arities. But first, a quic k lemma to assist with the pro of. Lemma 4.1. L et v 0 and v 1 b e nonzer o c olumn ve ctors, not ne c essarily the same length. Then the blo ck matrix av 0 bv 0 cv 1 dv 1 has r ank 2 if and only if a b c d is invertible. Pr o of. W e write av 0 bv 0 cv 1 dv 1 = v 0 0 0 v 1 a b c d , and v 0 0 0 v 1 has rank 2. Thus av 0 bv 0 cv 1 dv 1 has rank 2 if and only if a b c d is in vertible. Lemma 4.2. L et P b e a set of ( G | R ) -gadgets that is pr oje ctive fr om arity 2 to 1 . Then for al l inte gers k ≥ 2 , P acts as a pr oje ctive ( G | R ) -gadget set fr om arity k to k − 1 . Pr o of. W e are given that for any N ∈ C 4 × 2 with rank 2, there exists an F ∈ P such that F ∈ C 2 × 4 and F N is in vertible. W e w ant to sho w that for any in teger k ≥ 2 and an y rank 2 matrix B ∈ C 2 k × 2 , there exists an F ∈ P such that ( I ⊗ F ) B has rank 2, where I is the 2 k − 2 -b y-2 k − 2 iden tity matrix. F or any F ∈ P , the matrix I ⊗ F can b e view ed as b eing comp osed of 2-b y-4 blocks, with F app earing along the main diagonal and 2-b y-4 zero-matrices elsewhere. W e similarly view B as b eing comp osed of 4-by-2 blo c ks B = B 1 B 2 . . . B 2 k − 2 . Then ( I ⊗ F ) B = F B 1 F B 2 . . . F B 2 k − 2 ∈ C 2 k − 1 × 2 . If some B i has rank 2, then there is an F ∈ P suc h that F B i is inv ertible and ( I ⊗ F ) B has rank 2, as desired. No w assume otherwise, so each B i has rank at most 1. Since B has rank 2, there exists a 2-b y-2 inv ertible submatrix D of B , for which the rows of D app ear in B i and B j , for some i < j . It follo ws that B i and B j b oth hav e rank exactly 1. Hence for some nonzero v ectors v 0 , v 1 ∈ C 4 and some a, b, c, d ∈ C , w e can write B i = [ av 0 bv 0 ] and B j = [ cv 1 dv 1 ]. By Lemma 4.1, a b c d is in vertible, as B i B j has rank 2. If v 0 and v 1 are linearly indep enden t, then choose F ∈ P such that F [ v 0 v 1 ] is inv ertible; otherwise let ˜ v ∈ C 4 b e suc h that v 0 and ˜ v are linearly indep enden t, and c ho ose F ∈ P such that F [ v 0 ˜ v ] is in v ertible. In either case (ignoring ˜ v in the second case), we define [ v 0 0 v 0 1 ] = F [ v 0 v 1 ], where v 0 0 and v 0 1 are nonzero. Then by Lemma 4.1, the matrix av 0 0 bv 0 0 cv 0 1 dv 0 1 = F B i F B j has rank 2, and since this app ears as a submatrix of ( I ⊗ F ) B , we are done. Corollary 4.1. L et P b e a finite set of ( G | R ) -gadgets that is pr oje ctive fr om arity 2 to 1 . Then for any inte ger k ≥ 2 , P induc es a finite pr oje ctive ( G | R ) -gadget set fr om arity k to 1. No w w e sho w that a finite pro jectiv e ( G | R )-gadget set from arit y k to 1 preserv es pairwise linear indep endence for an in verse p olynomial fraction of signatures. The essence of the next lemma is an exc hange in the order of quan tifiers. Lemma 4.3. Supp ose { v i } i ≥ 0 is a se quenc e of p airwise line arly indep endent c olumn ve ctors in C 2 k and let F ⊆ C 2 × 2 k b e a finite set of f matric es that is pr oje ctive fr om arity k to 1. Then for every n , ther e exists some F ∈ F and some S ⊆ { F v i | 0 ≤ i ≤ n f } such that | S | ≥ n and the ve ctors in S ar e p airwise line arly indep endent. 6 Pr o of. Let j > i ≥ 0 b e integers and let N = [ v i v j ] ∈ C 2 k × 2 . Since v i and v j are linearly indep enden t, rank( N ) = 2. By assumption, there exists an F ∈ F suc h that F N ∈ C 2 × 2 is in vertible, so we conclude that F v i and F v j are linearly indep enden t. Eac h F ∈ F defines a coloring of the set K = { 0 , 1 , . . . , n f } as follo ws: color i ∈ K with the linear subspace spanned b y F v i . Assume for a contradiction that for each F ∈ F , there is not n pairwise linearly indep enden t vectors among { F v i | i ∈ K } . Then, including p ossibly the 0-dimensional subspace { 0 } , there can b e at most n distinct colors assigned b y eac h F ∈ F . By the pigeonhole principle, some i and j with 0 ≤ i < j ≤ n f m ust receive the same color for all F ∈ F . This is a contradiction with the previous paragraph, so we are done. The next lemma says that under suitable conditions, we can construct all unary signatures ( X , Y ). The metho d will b e in terp olation at a higher dimensional iteration in a circular fashion and finishing with an appropriate pr oje ctor gadget. Lemma 4.4 (Group Lemma) . L et P b e a finite set of pr oje ctive ( G | R ) -gadgets fr om arity 2 to 1, and let S b e a finite set of r e cursive ( G | R ) -gadgets of arity d ≥ 1 with nonsingular tr ansition matric es. L et H b e the gr oup gener ate d by the tr ansition matric es of gadgets in S , mo dulo sc alar matric es λI , for λ ∈ C − { 0 } . If H has infinite or der, then any unary gener ator c an b e simulate d: F or any X , Y ∈ C , Holant( G ∪ { ( X , Y ) } | R ) ≤ P T Holan t( G | R ) . Pr o of. W e prov e a weak er version by making the additional assumption that G contains a non- degenerate binary signature g , and H contains some element of infinite order. The pro of of the stronger v ersion stated here is giv en in the app endix. Tw o matrices are unequal mo dulo scalar matrices λI if and only if they are linearly independent. If any mem b er of S , as a group element in H , has infinite order, then its p o w ers supply an infinite set of pairwise linearly indep endent signatures. Otherwise they all hav e finite order, and the group H is iden tical to the monoid generated b y S , i.e., ev ery h ∈ H is a product o ver S with non-negativ e p o w ers. Such pro ducts give a comp osition of gadgets in S , which is a recursive gadget. Let h ∈ H ha ve infinite order. Then the pow ers of h supply an infinite set of pairwise linearly indep enden t signatures. Before we can use a pro jector gadget set to pro ject these signatures { h i } i ≥ 0 , w e make a small mo dification to the gadget of h i , for each i : connect a degree 2 vertex lab eled with g to ev ery trailing edge. This ensures that the bipartite structure of the graph is preserved when applying pro jector gadgets. Let M b e the 2-by-2 matrix of g . As there are d trailing edges, we apply d copies of g , whic h corresp onds to m ultiplication b y the matrix M ⊗ d . Since M is in vertible, pairwise linear indep endence of the signatures is preserv ed. No w rewrite the 2 d -b y-2 d matrix form of the signature h i M ⊗ d as a column v ector v i ∈ C 2 2 d , indexed b y c d · · · c 1 b 1 · · · b d ∈ { 0 , 1 } 2 d , where b 1 · · · b d and c 1 · · · c d are the ro w and column indices. No w we can attach pro jector gadgets to pro ject each v i do wn to arity 1 (see Figure 2c). T o show Holant( G ∪ { ( X, Y ) } | R ) ≤ P T Holan t( G | R ), supp ose we are given as input a bipartite signature grid Ω for Holan t( G ∪ { ( X, Y ) } | R ), with underlying graph G = ( V , E ). Let Q ⊆ V b e the set of vertices lab eled with generator ( X , Y ), and let n = | Q | . By Corollary 4.1, there exists a finite pro jective set containing f gadgets from arity d to 1, so by Lemma 4.3 there is some pro jector gadget F in this set such that at least n + 2 of the first ( n + 2) f + 1 vectors of the form F v t are pairwise linearly indep enden t. It is straightforw ard to efficiently find such a set; denote it b y S = { ( X 0 , Y 0 ) , ( X 1 , Y 1 ) , . . . , ( X n +1 , Y n +1 ) } and let G 0 , G 1 , . . . , G n +1 b e the corresp onding gadgets. 7 A t most one Y t can b e zero, so without loss of generality assume Y t 6 = 0 for 0 ≤ t ≤ n . If w e replace ev ery element of Q with a cop y of G t , w e obtain an instance of Holan t( G | R ) (note that the correct bipartite structure is preserved), and we denote this new signature grid by Ω t . Although Holant Ω t is a sum of exp onen tially many terms, eac h nonzero term has the form bX i t Y n − i t for some i and for some b ∈ C that do es not depend on X t or Y t . Then for some c 0 , c 1 , . . . , c n ∈ C , the sum can b e rewritten as Holan t Ω t = X 0 ≤ i ≤ n c i X i t Y n − i t . Since eac h signature grid Ω t is an instance of Holant( G | R ), Holant Ω t can b e solved exactly using the oracle. Carrying out this pro cess for ev ery t where 0 ≤ t ≤ n , w e arrive at a linear system where the c i v alues are the unkno wns. Y − n 0 · Holant Ω 0 Y − n 1 · Holant Ω 1 . . . Y − n n · Holant Ω n = X 0 0 Y 0 0 X 1 0 Y − 1 0 · · · X n 0 Y − n 0 X 0 1 Y 0 1 X 1 1 Y − 1 1 · · · X n 1 Y − n 1 . . . . . . . . . . . . X 0 n Y 0 n X 1 n Y − 1 n · · · X n n Y − n n c 0 c 1 . . . c n The matrix ab o ve has entry ( X r / Y r ) c at ro w r and column c . Due to pairwise linear indep endence of ( X r , Y r ), X r / Y r is pairwise distinct for 0 ≤ r ≤ n . Hence this is a V andermonde system of full rank, and we can solve it for the c i v alues. With these v alues in hand, w e can calculate Holan t Ω = P 0 ≤ i ≤ n c i X i Y n − i directly , completing the reduction. Here is ho w we realize a pro jective set of gadgets from arity 2 to 1. Lemma 4.5. L et Φ i ∈ C 2 × 4 for 1 ≤ i ≤ 7 b e matric es with the fol lowing pr op erties: ker(Φ i ) = span { u, u i } for 1 ≤ i ≤ 3 , ker(Φ i +3 ) = span { v , v i } for 1 ≤ i ≤ 3 , ker(Φ 7 ) = span { s, t } , and dim { u, u 1 , u 2 , u 3 } = dim { v , v 1 , v 2 , v 3 } = dim { u, v , s, t } = 4 . Then { Φ i | 1 ≤ i ≤ 7 } is pr oje ctive fr om arity 2 to 1. Pr o of. Let N ∈ C 4 × 2 b e a rank t wo matrix with k er( N ) = span { w 1 , w 2 } . If ker( N ) = span { u, v } , then Φ 7 N has rank 2. Otherwise, either { w 1 , w 2 , u } or { w 1 , w 2 , v } is linearly indep enden t. Say { w 1 , w 2 , u } is linearly indep enden t. Then { w 1 , w 2 , u } can b e further augmen ted b y some u i for 1 ≤ i ≤ 3 to form a basis, in which case Φ i N has rank 2. The other case is similar. V erifying that a sp ecific set of gadgets forms a pro jective set from arity 2 to 1 only requires a straigh tforward linear algebra computation. The pro of of the following lemma is in the app endix. Note that the exceptional cases are either symmetric signatures (for which a dichotom y exists [30]) or largely corresp ond to tractable cases. Lemma 4.6. Ther e exists a finite pr oje ctive ( G | R ) -gadget set fr om arity 2 to 1 unless x = y ∨ w z = xy ∨ ( w , z ) = (0 , 0) ∨ ( x, y ) = (0 , 0) ∨ ( w 3 = − z 3 ∧ x = − y ) Once w e hav e all unary signatures at our disp osal, w e can pro ve #P-hardness under most settings. The pro of for the following lemma is also in the app endix. Lemma 4.7. Supp ose w , x, y , z ∈ C and let G and R b e finite signatur e sets with ( w , x, y , z ) ∈ G and = 3 ∈ R . Assume that Holan t( G ∪ { ( X i , Y i ) | 0 ≤ i < m } | R ) ≤ P T Holan t( G | R ) for any X i , Y i ∈ C and m ∈ Z + . Then Holant( G | R ) is #P -har d unless w z = xy ∨ ( w , z ) = (0 , 0) ∨ ( x, y ) = (0 , 0) . 8 Com bining the Group Lemma with Lemmas 4.6 and 4.7, we get the following theorem. Theorem 4.1. Supp ose w , x, y , z ∈ C and let G and R b e finite signatur e sets wher e ( w , x, y , z ) ∈ G , = 3 ∈ R , x 6 = y , w z 6 = xy , ( w , z ) 6 = (0 , 0) , ( x, y ) 6 = (0 , 0) , and ( w 3 6 = − z 3 ∨ x 6 = − y ) . L et S b e a finite set of r e cursive ( G | R ) -gadgets of arity d ≥ 1 with nonsingular tr ansition matric es, and let H b e the gr oup gener ate d by the tr ansition matric es of S , mo dulo sc alar matric es λI , for λ ∈ C − { 0 } . If H has infinite or der, then Holant( G | R ) is #P -har d. 5 Main Result Theorem 5.1. Supp ose w , x, y , z ∈ C . Then Holan t(( w , x, y , z ) | = 3 ) is #P -har d exc ept in the fol lowing classes, for which the pr oblem is in P . (1) degenerate: w z = xy . (2) generalized disequalit y: w = z = 0 . (3) generalized equalit y: x = y = 0 . (4) affine after holographic transformation: w z = − xy ∧ w 6 = εz 6 ∧ x 2 = εy 2 , where ε = ± 1 . If the input is r estricte d to planar gr aphs, then another class b e c omes tr actable but everything else r emains #P -har d. (5) computable b y holographic algorithms with matc hgates: w 3 = εz 3 ∧ x = εy , where ε = ± 1 . W e prov e the tractability part of Theorem 5.1 next. The pro of of #P-hardness b egins in section 6 and contin ues in section D of the app endix. Pr o of of tr actability. F or any signature grid Ω, Holant Ω is the pro duct of the Holant on eac h con- nected comp onen t. Case (1) is degenerate. W e can break up every edge in to tw o unary functions, and then the Holant v alue is a simple pro duct o ver all vertices. F or case (2), on an y connected comp onen t, the Holant v alue is zero unless it is bipartite, and if so a 2-coloring algorithm can be used to find the only tw o p ertinen t assignments, complements of each other. Similarly , for case (3), only the all-0 and the all-1 assignments can p ossibly yield a nonzero v alue for each connected com- p onen t. F or case (4), if w = z = 0, then this is already cov ered b y case (2). Otherwise w z 6 = 0 since w 6 = εz 6 , in which c ase we apply the holographic transformation α 0 0 α 2 with α = εw 2 /z 2 . Note that α 3 = εw 6 /z 6 = 1. The edge signature b ecomes ( w , x, y , z ) α 0 0 α 2 ⊗ 2 = ( α 2 w , x, y , αz ), while = 3 is unchanged since α 0 0 α 2 − 1 ! ⊗ 3 = I , the 8-by-8 iden tity matrix [35, 12]. This reduces to the case wz = − xy ∧ w 2 = εz 2 ∧ x 2 = εy 2 , where ε = ± 1. This edge signature b elongs to the so-called affine function family and is tractable b y Theorem 5.2 of [15]. F urther discussion on this case is in section E. If the input is restricted to planar graphs and w 3 = εz 3 ∧ x = εy , where ε = ± 1, then we use the theory of holographic algorithms with matc hgates to compute the Holant in p olynomial time (see [12]). 6 An ti-Gadgets in Action No w we use our new idea of an ti-gadgets to construct explicit matrices of infinite order. Lemma 6.1. If w z 6 = xy , w xy z 6 = 0 , and | x | 6 = | y | , then Holant(( w, x, y , z ) | = 3 ) is #P -har d. 9 Pr o of. The transition matrices for Gadgets 4 and 5 are M 4 = w x y z ⊗ 2 diag( w , x, y , z ) and M 5 = w x y z ⊗ 2 diag( w , y , x, z ), b oth nonsingular. Since the matrix M − 1 4 M 5 = diag (1 , y /x, x/y , 1) has infinite order up to a scalar, we are done by Theorem 4.1. Lemma 6.2. If x = 0 and w y z 6 = 0 , then Holan t(( w , x, y , z ) | = 3 ) is #P -har d. Pr o of. The transition matrices for Gadget 2 and Gadget 3 are M 2 = w 0 y z w 2 y 2 0 z 2 and M 3 = w 0 y z w 2 0 0 z 2 , b oth nonsingular. Since M − 1 3 M 2 = 1 y 2 /w 2 0 1 has infinite order up to a scalar, we are done b y Theorem 4.1. Lemma 6.3. If w = 0 and xy z 6 = 0 , then Holant(( w, x, y , z ) | = 3 ) is #P -har d. Pr o of. The transition matrices for Gadgets 3 and 6 are M 3 = 0 x y z 0 xy xy z 2 and M 6 = 0 x y z 0 xy z 3 xy z 3 xy 2 z 2 + z 5 , b oth nonsingular. Since M − 1 3 M 6 = z 3 1 y /z 0 1 has infinite order up to a scalar, w e are done by Theorem 4.1. The remainder of the pro of of hardness for Theorem 5.1 app ears in section D of the app endix. 7 An ti-Gadgets and Previous W ork T o further appreciate the usefulness of an ti-gadgets, w e sho w ho w this technique sheds new ligh t on previous results. One can find failur e c onditions for a binary recursiv e gadget using the follo wing lemma. Lemma 7.1. L et G b e a binary r e cursive gadget having nonsingular tr ansition matrix M . Then { M i } i ≥ 0 is a se quenc e of p airwise line arly indep endent signatur es unless a 2 | a 1 | 2 − | a 3 | 2 a 2 a 0 = 0 , wher e x 4 + a 3 x 3 + a 2 x 2 + a 1 x + a 0 is the char acteristic p olynomial of M . Analyzing a failure condition such as a 2 | a 1 | 2 − | a 3 | 2 a 2 a 0 = 0 simultaneously for several gadgets is quite difficult, ev en with the aid of symbolic computation. Previous work [10, 11] relied heavily on miraculous cancellations in the failure conditions to contend with this. F or example, consider the t wo gadgets in Figure 6. They are from [10], where symmetric (i.e. x = y ) signatures ( w , x, y , z ) w ere considered on k -regular graphs. After a c hange of v ariables X = w z x − 2 and Y = ( w /x ) 3 + ( z /x ) 3 and making a few assumptions to guarantee that M 7 and M 8 are nonsingular (whic h w e omit in this discussion), the failure conditions of Gadgets 7 and 8 (when restricted to the real n umbers) simplify to ( X − 1) 3 ( X k − 2 − 1)( X k − 2 ( X + 1) 2 ( X k − 1 + X k − 2 + X + 3 Y + 1) − Y 3 ) = 0 , X 3 ( X − 1) 3 ( X k − 4 − 1)( X k − 2 ( X + 1) 2 ( X 2 + X k − 2 + X + 3 Y + X k − 3 ) − Y 3 ) = 0 . Assuming that b oth gadgets fail and X / ∈ { 0 , ± 1 } , this giv es tw o polynomial expressions for Y 3 . Setting these equal to each other and refactoring results in the contradiction X k − 2 ( X + 1) 3 ( X − 1)( X k − 3 − 1) = 0, implying that either one or the other gadget works. At the time of this disco v ery , it was a mystery whether there w as any underlying explanation for such miraculous cancellations. No w we see how anti-gadgets reveal a b etter understanding of this same gadget pair. 10 By assuming that M 7 fails to pro duce an infinite set of pairwise linearly independent signatures, w e hav e an explicit recursive gadget for M − 1 7 . Then M − 1 7 M 8 = diag (1 , X , X , 1) clearly pro duces an infinite set of pairwise linearly indep enden t signatures unless X is zero or a ro ot of unity . Note that in the “gadget language” of M − 1 7 M 8 , the t wo leading directed edges of Gadget 7 and 8 simply annihilate each other, as do k − 4 copies of the vertical edge. The signatures = 3 at the degree 3 v ertices force the matrix M − 1 7 M 8 to be diagonal. Thus, with almost no effort we hav e a strictly stronger result (i.e. ov er the complex num b ers) through the use of an an ti-gadget. This also shows that the an ti-gadget concept is useful in the symmetric setting as well as the asymmetric setting. In [11], a similarly fantastic cancellation o ccurred inv olving Gadgets 9 and 10 (see Figure 7). They form a suitable gadget and anti-gadget pair, as M − 1 9 M 10 is a diagonal matrix. While this diagonal matrix is not as easy to analyze as the previous example, anti-gadgets would inform the searc h for such useful gadgets, even if the analysis is carried out with different techniques. Ac kno wledgemen ts W e thank Heng Guo for his many insigh tful comments and suggestions. W e also thank him for p oin ting out an idea similar to that of an an ti-gadget that app eared in the finite characteristic case of a v ery recen t pap er [24], where finite order is forced by the c haracteristic. All authors were supp orted in part by NSF CCF-0914969. Gadget 7 Gadget 8 Figure 6: Recursive gadgets from [10] on k -regular graphs. Bold edges represent parallel edges. In Gadget 7 (resp. 8), the multiplicit y is k − 2 (resp. k − 4) so that the v ertices hav e degree k . Gadget 9 Gadget 10 Figure 7: Recursive gadgets from [11] on k -regular graphs for k even. The gadgets are pictured for k = 4 but generalize to all even k ≥ 4 by adding self lo ops to the vertices. References [1] Rodney J. Baxter. Exactly solve d mo dels in statistic al me chanics . Academic press London, 1982. [2] Andrei Bulato v and Martin Grohe. The complexity of partition functions. The or. Comput. Sci. , 348:148–186, Decem b er 2005. 11 [3] Andrei A. Bulatov. A dichotom y theorem for constraint satisfaction problems on a 3-element set. J. A CM , 53:66–120, January 2006. [4] Andrei A. Bulato v. The complexit y of the coun ting constrain t satisfaction problem. In ICALP , pages 646–661. Springer-V erlag, 2008. [5] Andrei A. Bulatov and V ´ ıctor Dalmau. T ow ards a dichotom y theorem for the coun ting con- strain t satisfaction problem. Information and Computation , 205(5):651–678, 2007. [6] Jin-Yi Cai and Xi Chen. A decidable dichotom y theorem on directed graph homomorphisms with non-negativ e weigh ts. In FOCS , pages 437–446. IEEE Computer So ciet y , 2010. [7] Jin-Yi Cai, Xi Chen, and Piny an Lu. Graph homomorphisms with complex v alues: A di- c hotomy theorem. CoRR , abs/0903.4728, 2009. [8] Jin-Yi Cai, Xi Chen, and Piny an Lu. Non-negatively weigh ted #csp: An effective complexity dic hotomy . In IEEE Confer enc e on Computational Complexity , pages 45–54, 2011. [9] Jin-Yi Cai, Sangxia Huang, and Piny an Lu. F rom holant to #csp and back: Dichotom y for holan t c problems. In ISAA C , pages 253–265, 2010. [10] Jin-Yi Cai and Michael Kow alczyk. A dichotom y for k -regular graphs with { 0, 1 } -vertex assignmen ts and real edge functions. In T AMC , pages 328–339, 2010. [11] Jin-Yi Cai and Mic hael Kow alczyk. Spin systems on graphs with complex edge functions and sp ecified degree regularities. In COCOON , pages 146–157, 2011. [12] Jin-Yi Cai and Piny an Lu. Holographic algorithms: F rom art to science. J. Comput. Syst. Sci. , 77(1):41–61, 2011. [13] Jin-Yi Cai, Piny an Lu, and Ming ji Xia. Holographic algorithms by fib onacci gates and holo- graphic reductions for hardness. In FOCS , pages 644–653. IEEE Computer So ciet y , 2008. [14] Jin-Yi Cai, Pin y an Lu, and Mingji Xia. A computational pro of of complexit y of some restricted coun ting problems. In T AMC , pages 138–149. Springer-V erlag, 2009. [15] Jin-Yi Cai, Piny an Lu, and Ming ji Xia. Holant problems and counting csp. In STOC , pages 715–724, 2009. [16] Jin-Yi Cai, Pin yan Lu, and Ming ji Xia. Holographic algorithms with matc hgates capture precisely tractable planar #csp. In FOCS , pages 427–436. IEEE Computer So ciet y , 2010. [17] Jin-Yi Cai, Piny an Lu, and Ming ji Xia. Dichotom y for holant* problems of b oolean domain. In SOD A , pages 1714–1728, 2011. [18] Nadia Creignou, Sanjeev Khanna, and Madhu Sudan. Complexity classific ations of b o ole an c onstr aint satisfaction pr oblems . So ciet y for Industrial and Applied Mathematics, 2001. [19] Martin Dy er, Leslie Ann Goldb erg, and Mark Jerrum. The complexit y of w eighted b o olean csp. SIAM J. Comput. , 38:1970–1986, January 2009. 12 [20] Martin Dy er, Leslie Ann Goldberg, and Mik e Paterson. On coun ting homomorphisms to directed acyclic graphs. J. ACM , 54, December 2007. [21] Martin Dy er and Catherine Greenhill. The complexit y of counting graph homomorphisms. R andom Struct. Algorithms , 17:260–289, Octob er 2000. [22] Martin Dy er and Da vid Ric herby . On the complexit y of #csp. In STOC , pages 725–734. A CM, 2010. [23] Leslie Ann Goldberg, Martin Grohe, Mark Jerrum, and Marc Th urley . A complexit y dic hotomy for partition functions with mixed signs. SIAM J. Comput. , 39:3336–3402, August 2010. [24] Heng Guo, Sangxia Huang, Pin yan Lu, and Ming ji Xia. The complexity of weigh ted b oolean #csp mo dulo k . In ST ACS , pages 249–260, 2011. [25] Heng Guo, Piny an Lu, and Leslie G. V aliant. The complexity of symmetric b oolean parity holan t problems - (extended abstract). In ICALP , pages 712–723, 2011. [26] P a vol Hell and Jaroslav Ne ˇ set ˇ ril. On the complexity of h-coloring. J. Comb. The ory Ser. B , 48:92–110, F ebruary 1990. [27] P . W. Kasteleyn. The statistics of dimers on a lattice. Physic a , 27:1209–1225, 1961. [28] P . W. Kasteleyn. Graph theory and crystal ph ysics. In F. Harary , editor, Gr aph The ory and The or etic al Physics , pages 43–110. Academic Press, London, 1967. [29] Mic hael Ko walczyk. Dichotomy the or ems for holant pr oblems . PhD thesis, Univ ersit y of Wisconsin—Madison, 2010. [30] Mic hael Kow alczyk and Jin-Yi Cai. Holant problems for regular graphs with complex edge functions. In ST A CS , pages 525–536, 2010. [31] L´ aszl´ o Lo v´ asz. Op erations with structures. A cta Mathematic a Hungaric a , 18:321–328, 1967. [32] H. N. V. T emp erley and M. E. Fisher. Dimer problem in statistical mec hanics—an exact result. Philosophic al Magazine , 6:1061–1063, 1961. [33] Salil P . V adhan. The complexit y of counting in sparse, regular, and planar graphs. SIAM J. Comput. , 31(2):398–427, 2001. [34] Leslie G. V aliant. The complexit y of enumeration and reliabilit y problems. SIAM J. Comput. , 8(3):410–421, 1979. [35] Leslie G. V aliant. Holographic algorithms. SIAM J. Comput. , 37(5):1565–1594, 2008. [36] Mingji Xia, P eng Zhang, and W enbo Zhao. Computational complexity of coun ting problems on 3-regular planar graphs. The or. Comput. Sci. , 384(1):111–125, 2007. 13 App endix Figure 8: Comp osition of Gadget 6 using the basic gadget comp onen ts in Figure 3 A Pro of of Group Lemma Pr o of. Two matrices are unequal modulo scalar matrices λI if and only if they are linearly inde- p enden t. If any member of S , as a group elemen t in H , has infinite order, then its p o wers supply an infinite set of pairwise linearly indep enden t signatures. Otherwise they all ha ve finite order, and the group H is identical to the m onoid generated by S , i.e., ev ery h ∈ H is a pro duct ov er S with non-negativ e p o w ers. Such pro ducts giv e a composition of gadgets in S , whic h is a recursiv e gadget. By assumption, H has infinite order, so by comp osing recursive gadgets from S , a breadth-first tra versal of the Cayley graph of the monoid generated b y S supplies an arbitrarily large set of recursiv e gadgets having pairwise linearly indep endent signatures. Before we can use a pro jective gadget set to pro ject the set of pairwise linearly indep enden t signatures down to arity 1, we mak e a small mo dification to each corresponding gadget: connect a nondegenerate generator g to every trailing edge. This ensures that the bipartite structure of the graph is preserved when applying pro jector gadgets. W e claim that there is some nondegenerate signature g ∈ G . If this were not the case, then an y recursive gadget s ∈ S (note S is nonempty) could b e rewritten with all leading edges internally incident to unary signatures. The recurrence matrix of such a gadget is expressible as a pro duct of a column v ector and a ro w vector (b y partitioning s into tw o gadgets with no shared edges), hence the recurrence matrix of s would hav e rank at most 1, which is less than 2 d as promised. Let a ≥ 2 b e the arity of g . One can sho w b y induction that any nondegenerate signature has at least one index i , such that if we express the signature as a 2-by-2 a − 1 matrix M indexed by the i -th v ariable for the ro w and the remaining a − 1 v ariables for the column, then M has rank 2. W e designate one suc h dangling edge of g as the leading edge and all other dangling edges as trailing edges. As there are d trailing edges in s , w e apply d copies of g , whic h corresp onds to multiplication by the matrix M ⊗ d . Since M has full rank, pairwise linear indep endence of the signatures is preserv ed. Now rewrite the 2 d -b y-2 d ( a − 1) matrix form of the signature as a column v ector in C 2 da , indexed b y c d ( a − 1) · · · c 1 b 1 · · · b d ∈ { 0 , 1 } da , where b 1 · · · b d and c 1 · · · c d ( a − 1) are the row and column indices. Denote these vectors as { v i } i ≥ 0 . Finally w e can attach pro jector gadgets to pro ject eac h v i do wn to arity 1. T o show Holant( G ∪ { ( X, Y ) } | R ) ≤ P T Holan t( G | R ), supp ose we are given as input a bipartite signature grid Ω for Holan t( G ∪ { ( X, Y ) } | R ), with underlying graph G = ( V , E ). Let Q ⊆ V b e the set of vertices lab eled with generator ( X , Y ), and let n = | Q | . By Corollary 4.1, there exists a finite pro jective set containing f gadgets from arity d to 1, so by Lemma 4.3 there is some pro jector gadget F in this set such that at least n + 2 of the first ( n + 2) f + 1 vectors of the form F v t are pairwise linearly indep enden t. It is straightforw ard to efficiently find such a set; denote it b y S = { ( X 0 , Y 0 ) , ( X 1 , Y 1 ) , . . . , ( X n +1 , Y n +1 ) } and let G 0 , G 1 , . . . , G n +1 b e the corresp onding gadgets. 14 A t most one Y t can b e zero, so without loss of generality assume Y t 6 = 0 for 0 ≤ t ≤ n . If w e replace ev ery element of Q with a cop y of G t , w e obtain an instance of Holan t( G | R ) (note that the correct bipartite structure is preserved), and we denote this new signature grid by Ω t . Although Holant Ω t is a sum of exp onen tially many terms, eac h nonzero term has the form bX i t Y n − i t for some i and for some b ∈ C that do es not depend on X t or Y t . Then for some c 0 , c 1 , . . . , c n ∈ C , the sum can b e rewritten as Holan t Ω t = X 0 ≤ i ≤ n c i X i t Y n − i t . Since eac h signature grid Ω t is an instance of Holant( G | R ), Holant Ω t can b e solved exactly using the oracle. Carrying out this pro cess for ev ery t where 0 ≤ t ≤ n , w e arrive at a linear system where the c i v alues are the unkno wns. Y − n 0 · Holant Ω 0 Y − n 1 · Holant Ω 1 . . . Y − n n · Holant Ω n = X 0 0 Y 0 0 X 1 0 Y − 1 0 · · · X n 0 Y − n 0 X 0 1 Y 0 1 X 1 1 Y − 1 1 · · · X n 1 Y − n 1 . . . . . . . . . . . . X 0 n Y 0 n X 1 n Y − 1 n · · · X n n Y − n n c 0 c 1 . . . c n The matrix ab o ve has entry ( X r / Y r ) c at ro w r and column c . Due to pairwise linear indep endence of ( X r , Y r ), X r / Y r is pairwise distinct for 0 ≤ r ≤ n . Hence this is a V andermonde system of full rank, and we can solve it for the c i v alues. With these v alues in hand, w e can calculate Holan t Ω = P 0 ≤ i ≤ n c i X i Y n − i directly , completing the reduction. B Pro of of Lemma 4.6 W e are giv en that x 6 = y ∧ w z 6 = xy ∧ ( w , z ) 6 = (0 , 0) ∧ ( x, y ) 6 = (0 , 0) ∧ ( w 3 6 = − z 3 ∨ x 6 = − y ). W e pro ve Lemma 4.6 b y exhibiting pro jective gadget sets that satisfy the h yp otheses of Lemma 4.5. Let F i b e the transition matrix of Gadget i for 28 ≤ i ≤ 42. There are five cases of pro jectiv e ( G | R )- gadget sets from arit y 2 to 1. W e omit the v erification that each set of pro jectors forms a pro jective gadget set from arity 2 to 1 under its particular assumptions since this is a straightforw ard linear algebra computation. The five cases are (1) w z 6 = xy ∧ wxy z 6 = 0 ∧ w 3 x + w xy z + w 2 z 2 + y z 3 6 = 0 ∧ x 2 6 = y 2 , (2) w z 6 = xy ∧ wxy z 6 = 0 ∧ w 3 x + w xy z + w 2 z 2 + y z 3 6 = 0 ∧ x = − y ∧ w 3 6 = − z 3 , (3) w z 6 = xy ∧ wxy z 6 = 0 ∧ w 3 x + w xy z + w 2 z 2 + y z 3 = 0 ∧ x 6 = y , (4) w z 6 = xy ∧ w = 0 ∧ z 6 = 0 ∧ x 6 = y , and (5) w z 6 = xy ∧ x = 0 ∧ y 6 = 0. Whic h pro jectors are used in eac h case (and the role of each pro jector within eac h case) can b e found in T able 1. In all five cases, the vector u in the kernels of Φ 1 , Φ 2 , and Φ 3 is (0 , − 1 , 1 , 0) and the v ector v in the k ernels of Φ 4 , Φ 5 , and Φ 6 is (0 , − x, y , 0). All five cases utilize the assumption wz 6 = xy , i.e., the edge signature is non-degenerate. Un- der three additional disequalit y assumptions, the pro jectors in row 1 of T able 1 ha ve the desired prop erties. The purp ose of the remaining four cases is to handle the situation that these three disequalities are not all true. Case (2) retains tw o of the additional disequality assumptions but assumes that x 2 = y 2 . Since w e are considering the asymmetric case, the only option is x = − y . By assumption, it is not the 15 Φ 1 Φ 2 Φ 3 Φ 4 Φ 5 Φ 6 Φ 7 Case 1 F 28 F 35 F 37 F 28 F 29 F 31 F 33 Case 2 F 30 F 36 Case 3 F 42 F 41 F 34 Case 4 F 39 F 38 F 32 Case 5 F 40 F 31 T able 1: This table indicates whic h pro jectors are used in each case (and the role of each pro jector within eac h case) in the pro of of Lemma 4.6. The seven Φ i refer to the matrices in Lemma 4.5. As an example, the pro jective set in case (1) is { F 28 , F 35 , F 37 , F 28 , F 29 , F 31 , F 33 } . Note that F 28 pla ys the role of b oth Φ 1 and Φ 4 . case that x = − y ∧ w 3 = − z 3 , so w e hav e w 3 6 = − z 3 . Under these conditions, the pro jectors in ro w 2 of T able 1 hav e the desired prop erties. Lik e cases (1) and (2), case (3) retains the assumption that no v ariable is zero but no w considers the case that the p olynomial w 3 x + w xy z + w 2 z 2 + y z 3 is zero. Given that we are also considering the asymmetric case, i.e., x 6 = y , the pro jectors in ro w 3 of T able 1 hav e the desired prop erties. Cases (4) and (5) handle the remaining case w z 6 = xy ∧ w xy z = 0. The assumptions w z 6 = xy ∧ ( w , z ) 6 = (0 , 0) ∧ ( x, y ) 6 = (0 , 0) imply that at most one of w , x , y , and z is zero. By switching the role of 0 and 1 via the holographic transformation 0 1 1 0 , the complexity of the case y z = 0 is the same as the complexit y of the case w x = 0. Therefore, w e assume that y z 6 = 0. Case (4) considers w as zero, so z is nonzero by assumption. Then still within the asymmetric case, the pro jectors in ro w 4 of T able 1 ha ve the desired prop erties. Case (5) considers x as zero, so y is nonzero b y assumption and the pro jectors in row 5 of T able 1 hav e the desired prop erties. These fiv e cases cov er all settings not excluded by the assumptions in the statement of the lemma, so the pro of is complete. C Pro of of Lemma 4.7 The pro of of Lemma 4.7 makes use of the follo wing lemma. Lemma C.1 (Lemma 3.3 of [30]) . Supp ose that ( a, b ) ∈ C 2 − { ( a, b ) | ab = 1 } − (0 , 0) and let G and R b e finite signatur e sets wher e ( a, 1 , 1 , b ) ∈ G and = 3 ∈ R . F urther assume that Holant( G ∪ { ( X i , Y i ) } | 0 ≤ i < m } | R ) ≤ P T Holan t( G | R ) for any X i , Y i ∈ C and m ∈ Z + . Then Holan t( G ∪ { (0 , 1 , 1 , 1) } | R ) ≤ P T Holan t( G | R ) and Holant( G | R ) is #P -har d. θ Gadget 11 ρ γ θ γ ρ Gadget 12 Figure 9: Gadgets used to simulate the generator (0 , 1 , 1 , 1) 16 Pr o of of L emma 4.7. Since Holant((0 , 1 , 1 , 1) | = 3 ), # Ver texCover on 3-regular graphs, is #P- hard, we only need to sho w how to simulate the generator signature (0 , 1 , 1 , 1). The assumptions w z 6 = xy ∧ ( w , z ) 6 = (0 , 0) ∧ ( x, y ) 6 = (0 , 0) imply that at most one of w , x , y , and z is zero. By switc hing the role of 0 and 1 via the holographic transformation 0 1 1 0 , the complexity of the case y z = 0 is the same as the complexity of the case w x = 0. Therefore, we assume that y z 6 = 0. If w = 0, then Gadget 11 with θ = 1 x z y 2 , 1 z sim ulates ( x/z , 1 , 1 , 2 z /x ), which can in turn sim ulate (0 , 1 , 1 , 1) b y Lemma C.1. If x = 0, then Gadget 11 with θ = 1 w 1 y , y z 2 sim ulates ( w /y, 1 , 1 , 2 y /w ), whic h can in turn sim ulate (0 , 1 , 1 , 1) b y Lemma C.1. If w x 6 = 0 ∧ w z = − xy , then Gadget 11 with θ = 1 xy 2 x w , w x sim ulates (3 w/y , 1 , 1 , 3 y /w ), whic h can in turn simulate (0 , 1 , 1 , 1) b y Lemma C.1. Finally if w x 6 = 0 ∧ w z 6 = xy ∧ w z 6 = − xy , then Gadget 12 with θ = wz + xy wx ( w z − xy ) − x w , w x , γ = 1 ( wz − xy ) − 1 wx , wx y z ( w z + xy ) , and ρ = ( xz , − w y ) simulates (0 , 1 , 1 , 1). D More An ti-Gadgets in Action F or the remainder of the pro of of #P-hardness of Theorem 5.1, we use our anti-gadget tec hnique in com bination with Lemmas D.1, D.2, and D.3. In the con trapos itiv e, these lemmas pro vide sufficien t conditions to conclude that a matrix has infinite order (up to a scalar). Their pro ofs follo w from a few observ ations. F or monic p olynomials in C [ X ] of degree n with ro ots λ i for 1 ≤ i ≤ n of the same nonnegativ e norm r ∈ R , let a k ∈ C b e the coefficient of X k and σ k the elemen tary symmetric p olynomial of degree k in λ i /r for 1 ≤ i ≤ n , the norm one (scaled) ro ots. 1 Th us, a k = ( − r ) n − k σ n − k . By b eing norm one, σ k = σ n − k σ n , a k = ( − 1) n r n − 2 k a n − k σ n , and | a k | = r n − 2 k | a n − k | , for 0 ≤ k < n . Lemma D.1 (Lemma 4.4 in [30]) . If b oth r o ots of X 2 + a 1 X + a 0 ∈ C [ X ] have the same norm, then a 1 | a 0 | = a 1 a 0 . If further a 0 a 1 6 = 0 , then Arg( a 2 1 ) = Arg( a 0 ) thus a 2 1 /a 0 ∈ R + . Lemma D.2. If al l r o ots of X 4 + a 3 X 3 + a 2 X 2 + a 1 X + a 0 ∈ C [ X ] have the same norm, then a 2 | a 1 | 2 = | a 3 | 2 a 2 a 0 . Lemma D.3. If P 8 k =0 a k X k ∈ C [ X ] is monic and al l r o ots have the same norm, then a 2 3 | a 1 | 2 = | a 7 | 2 a 5 2 a 2 0 , a 4 | a 2 | 2 = | a 6 | 2 a 4 a 0 , and | a 3 | 2 a 2 = a 6 | a 5 | 2 a 0 . On directed 3-regular graphs, there are some symmetries under whic h the Holan t is inv arian t. The next lemma states these symmetries. Lemma D.4. L et G b e a dir e cte d 3-r e gular gr aph. Then ther e exists a p olynomial P with inte ger c o efficients in six variables, such that for any signatur e grid Ω having underlying gr aph G with vertex signatur e = 3 and e dge signatur e ( w , x, y , z ) , the Holant value is Holan t Ω = P ( w z , xy , w 3 + z 3 , x + y , w 3 x + y z 3 , w 3 y + xz 3 ) . Pr o of. Consider an y 0 , 1 v ertex assignmen t σ with a non-zero v aluation. If σ 0 is the complement assignmen t switc hing all 0’s and 1’s in σ , then for σ and σ 0 , w e ha ve the sum of v aluations w a x b y c z d + w d x c y b z a for some a, b, c, d . Here a (resp. d ) is the n umber of edges connecting t w o degree 3 v ertices 1 This argument assumes r 6 = 0. How ever, when r = 0, the conclusion still holds trivially . 17 b oth assigned 0 (resp. 1) b y σ . Similarly , b (resp. c ) is the n umber of edges from one degree 3 v ertex to another that are assigned 0 and 1 (resp. 1 and 0), in that order, by σ . W e note that w a x b y c z d + w d x c y b z a = ( w z ) min( a,d ) ( xy ) min( b,c ) w | a − d | y | b − c | + x | b − c | z | a − d | a > d X OR b > c ( w z ) min( a,d ) ( xy ) min( b,c ) w | a − d | x | b − c | + y | b − c | z | a − d | otherwise . W e pro ve a ≡ d (mod 3) inductiv ely . F or the all-0 assignment, this is clear since every edge con tributes a factor w and the n umber of edges is divisible by 3 for a 3-regular graph. No w starting from any assignmen t σ , if we switch the assignment on one vertex from 0 to 1, it is easy to v erify that it c hanges the v aluation from w a x b y c z d to w a 0 x b 0 y c 0 z d 0 , where a − d = a 0 − d 0 + 3. As every { 0 , 1 } assignment is obtainable from the all-0 assignment b y a sequence of switches, the conclusion a ≡ d (mo d 3) follows. No w w a x b y c z d + w d x c y b z a = ( w z ) min( a,d ) ( xy ) min( b,c ) w 3 k y ` + x ` z 3 k a > d X OR b > c ( w z ) min( a,d ) ( xy ) min( b,c ) w 3 k x ` + y ` z 3 k otherwise for some k , ` ≥ 0. Consider w 3 k y ` + x ` z 3 k (the other case is similar). Two simple inductive steps w 3 k y ` +1 + x ` +1 z 3 k = w 3 k y ` + x ` z 3 k ( x + y ) − xy w 3 k y ` − 1 + x ` − 1 z 3 k w 3( k +1) y ` + x ` z 3( k +1) = w 3 k y ` + x ` z 3 k w 3 + z 3 − ( w z ) 3 w 3( k − 1) y ` + x ` z 3( k − 1) (when combined with the other case) show that the Holant is a p olynomial P ( w z , xy , w 3 + z 3 , x + y , w 3 x + y z 3 , w 3 y + xz 3 ) with in teger co efficients. Assume non-degeneracy of ( w , x, y , z ), Lemmas 6.1, 6.2, and 6.3 pro ved #P-hardness unless t wo (or more) of w , x , y , and z are zero or none are zero and | x | = | y | . If any t wo (or more) of v ariables are zero, then the problem is tractable, as prov ed after Theorem 5.1. Therefore, the dic hotomy in Theorem 5.1 holds unless wxy z 6 = 0 and | x | = | y | . In accordance with Lemma D.4, w e mak e a change of v ariables to A = w z , B = xy , C = w 3 + z 3 , D = x + y , E = w 3 x + y z 3 , and F = w 3 y + xz 3 . Since the complexit y of a Holant remains the same under m ultiplication by a nonzero constan t to any signature, w e normalize so that | x | = 1 and x = y without repeatedly stating this as an assumption. Thus, B = 1 and D = x + y ∈ [ − 2 , 2] with D 2 = 4 corresp onding to the symmetric case: x = y . A degenerate edge signature no w means A = 1. Additionally , notice that E + F = C D and E F = − 4 A 3 B + B C 2 + A 3 D 2 . Theorem 5.1 can also b e stated in these symmetrized v ariables. Theorem D.1. Supp ose w, x, y , z ∈ C . Then Holan t(( w , x, y , z ) | = 3 ) is #P -har d exc ept in the fol lowing c ases, for which the pr oblem is in P . (1) w z = xy ⇐ ⇒ A = B . (2) w = z = 0 ⇐ ⇒ A = C = 0 . (3) x = y = 0 ⇐ ⇒ B = D = 0 . (4) w z = − xy ∧ w 6 = z 6 ∧ x 2 = y 2 ⇐ ⇒ A = − B ∧ 4 A 3 C = C 3 ∧ 4 B D = D 3 . (5) w z = − xy ∧ w 6 = − z 6 ∧ x 2 = − y 2 ⇐ ⇒ A = − B ∧ 2 A 3 = C 2 ∧ 2 B = D 2 . If the input is r estricte d to planar gr aphs, then two mor e c ases b e c ome tr actable but al l other c ases r emain #P -har d. (6) w 3 = z 3 ∧ x = y ⇐ ⇒ 4 A 3 = C 2 ∧ 4 B = D 2 . (7) w 3 = − z 3 ∧ x = − y ⇐ ⇒ C = D = 0 . 18 No w we contin ue with the pro of of #P-hardness. Lemma D.5. If D 2 6 = 4 , and A 6∈ R , then Holan t(( w , x, y , z ) | = 3 ) is #P -har d. Pr o of. The transition matrices for Gadgets 15 and 16 are M 15 = w y x z w 2 xy xy z 2 and M 16 = w x y z w 2 xy xy z 2 . Both matrices hav e determinant ( A − 1) 2 ( A + 1), which is nonzero since A is not real. Then N = M 15 M − 1 16 has determinan t 1 and trace tr w y x z w x y z − 1 = 2 w z − x 2 − y 2 w z − xy = 2 A − D 2 + 2 A − 1 , whic h is nonzero since A is not real. If the eigenv alues of N ha v e distinct norms, then it has infinite order up to a scalar and we are done by Theorem 4.1, so assume that its eigen v alues are of equal norm. Then Lemma D.1 says that tr( N ) 2 det N = (2 A − D 2 +2) 2 ( A − 1) 2 ∈ R + . T aking square ro ots, we ha ve 2 A − D 2 +2 A − 1 ∈ R , which implies that − D 2 +4 A − 1 ∈ R . Since D 2 6 = 4, this gives A ∈ R , a con tradiction. Unary recursive gadgets, suc h as the ones used in the pro of of Lemma D.5, are quite useful for pro ving #P-hardness when v ariables like A = w z are complex. When all v ariables are real, the conclusion of Lemma D.1 is weak (though one can still prov e #P-hardness using a related lemma with significan t effort in the symmetric case [14]). F or complex v ariables in the symmetric case, [30] sho wed that using higher arity (namely binary) recursive gadgets can give a m uch simpler pro of of #P-hardness. The next lemma contin ues this pattern with the first ever use of ternary recursive gadgets. Lemma D.6. If A 2 6 = 1 , AD 6 = 0 , and D 2 6 = 4 , then Holan t(( w , x, y , z ) | = 3 ) is #P -har d. Pr o of. The determinan ts of the 8-b y-8 transition matrices of Gadget 26 and Gadget 27 are b oth A 2 ( A − 1) 4 6 = 0. If N = M − 1 26 M 27 has an y tw o eigen v alues with distinct norms, then it has infinite order up to a scalar and we are done b y Theorem 4.1. Thus assume that all eigh t eigen v alues of N hav e the same norm. Then by Lemma D.3, we kno w that several equations hold among the co efficien ts of its characteristic p olynomial. After scaling by the nonzero factor A ( A − 1), these co efficien ts for A ( A − 1) N are a 7 = ( A − 1)( AD 2 + 2 A + 2) a 6 = ( A − 1) 2 (5 A 2 D 2 − 3 A 2 + 2 AD 2 + 2 A + 1) a 5 = A ( A − 1) 3 ( A 2 D 4 + 5 A 2 D 2 − 6 A 2 + 7 AD 2 − 6 A + D 2 ) a 4 = A 2 ( A − 1) 4 (3 A 2 D 4 − 4 A 2 D 2 + 4 A 2 + AD 4 + 4 AD 2 − 4 A + 2 D 2 − 2) a 3 = A 3 ( A − 1) 5 (2 AD 4 + 3 A 2 D 4 − 6 A 2 D 2 + 6 A 2 − 4 AD 2 + 6 A + D 2 ) a 2 = A 4 ( A − 1) 6 ( A 2 D 4 + A 2 D 2 − 3 A 2 + AD 4 − 2 AD 2 + 2 A + 1) a 1 = A 6 ( A − 1) 7 (2 AD 2 − 2 A + D 2 − 2) a 0 = A 8 ( A − 1) 8 . Amazingly , C , E , and F do not app ear. 2 Lemma D.5 sho ws #P-hardness unless A ∈ R , so assume that A ∈ R . Because A, D ∈ R , the equations in Lemma D.3 are simplified b y the disapp earance 2 The runtime of CylindricalDecomposition is a double exp onential in the num b er of v ariables, so it is crucial that our query include as few v ariables as possible. 19 of norms and conjugates. Using CylindricalDecomposition in Mathematica TM , we conclude that there are no solutions under our assumptions, which is a contradiction. The meaning of the assumptions in Lemma D.6 will b e explained after the next lemma, which considers the same as sumptions except that D is zero (a situation not cov ered in Lemma D.6) and C is nonzero. Lemma D.7. If A 2 6 = 1 , AC 6 = 0 , and D = 0 , then Holant(( w, x, y , z ) | = 3 ) is #P -har d. Pr o of. Lemma D.5 shows #P-hardness unless A ∈ R , so assume that A ∈ R . The transition matrix for Gadget 19 is M 19 = w x y z ⊗ 2 diag( w , x, y , z ) and has determinan t A ( A − 1) 2 6 = 0. If M 19 has an y t wo eigen v alues with distinct norms, then it has infinite order up to a scalar and w e are done b y Theorem 4.1, so assume that all eigen v alues hav e the same norm. How ev er, the co efficien ts of the c haracteristic p olynomial of M 19 , whic h are ( a 3 , a 2 , a 1 , a 0 ) = − C, ( A + 1) 2 ( A − 1) , − ( A − 1) 2 C, A ( A − 1) 4 , do not satisfy the conclusion of Lemma D.2 under the assumptions, a con tradiction. The case A = 1 is degenerate (th us tractable), the case A = 0 is cov ered in Lemma 6.3, and recall that D 2 = 4 corresp onds to the symmetric case [30], so now w e assume that A 6 = 0 , 1 ∧ D 2 6 = 4. Lemma D.6 handled A 6 = − 1 and D 6 = 0 while Lemma D.7 handled A 6 = − 1 ∧ D = 0 ∧ C 6 = 0. W e note that C = D = 0 is tractable on planar graphs. No w we fo cus on the case A = − 1. The next t wo pro ofs of #P-hardness (the pro ofs of Lemmas D.9 and D.10) make use of the follo wing technical lemma. Lemma D.8. L et c ∈ C and ε = ± 1 . Then the only solutions to the e quation ( c + 2 ε ) c = ε ( c + 2 ε ) ar e the trivial solutions c ∈ {− 2 ε, ε } . Pr o of. Assume that c 6 = − 2 ε . No w we show that c = ε . T aking norms, we see that | c | = 1. Then simplifying ( c + 2 ε ) c = ε ( c + 2 ε ) using cc = | c | 2 = 1 yields c = ε as claimed. Lemma D.9. If A = − 1 and E 6∈ { 0 , ± 2 i } , then Holant(( w, x, y , z ) | = 3 ) is #P -har d. Pr o of. The transition matrices of Gadgets 21, 22, and 24 are M 21 = w x y z ⊗ 2 diag( w , y , x, z ) w y x z ⊗ 2 diag( w , x, y , z ) M 22 = w x y z ⊗ 2 w 4 + w xy 2 w 2 xy + xy 2 z 0 0 w 2 xy + xy 2 z w xyz + y z 3 0 0 0 0 w 3 x + w xy z w x 2 y + xy z 2 0 0 w x 2 y + xy z 2 x 2 y z + z 4 M 24 = w x y z ⊗ 2 diag( w , y , x, z ) I 2 ⊗ w x y z w 2 + y z 0 0 w x + z 2 with det M 21 = 2 8 , det M 24 = − 2 6 E 2 , and det M 22 = 2 6 ( E 2 + 4), so all are nonsingular. Let N 1 = M − 1 21 M 24 and N 2 = M − 1 21 M 22 . The co efficien ts of the characteristic p olynomials of − 2 4 N 1 and 2 4 N 2 are resp ectiv ely ( a 3 , a 2 , a 1 , a 0 ) = − 4 , E 2 + 12 , − 4( E 2 + 4) , 4( E 2 + 4) ( a 3 , a 2 , a 1 , a 0 ) = 4 , − E 2 + 8 , − 4 E 2 , − 4 E 2 . 20 If N 1 (resp. N 2 ) has any tw o eigen v alues with distinct norms, then N 1 (resp. N 2 ) has infinite order up to a scalar and w e are done b y Theorem 4.1, so assume that all eigen v alues of N 1 (resp. N 2 ) ha ve the same norm. Then b y Lemma D.2, we ha ve tw o equations relating these co efficien ts. Ho wev er, after a change of v ariables by c = ( E 2 + 4) / 4 (for the co efficien ts of N 1 ) and c = E 2 / 4 (for the co efficien ts of N 2 ), Lemma D.8 sa ys that the only solutions to b oth equations require E ∈ { 0 , ± 2 i } , a con tradiction. The next lemma is similar to Lemma D.9 with E in place of F . Lemma D.10. If A = − 1 and F 6∈ { 0 , ± 2 i } , then Holant(( w, x, y , z ) | = 3 ) is #P -har d. Pr o of. The transition matrices of Gadgets 21, 23, and 25 are M 21 = w x y z ⊗ 2 diag( w , y , x, z ) w x y z ⊗ 2 diag( w , x, y , z ) M 23 = w x y z ⊗ 2 w 4 + w x 2 y w 2 xy + x 2 y z 0 0 w 2 xy + x 2 y z w xy z + xz 3 0 0 0 0 w 3 y + w xy z wxy 2 + xy z 2 0 0 w xy 2 + xy z 2 xy 2 z + z 4 M 25 = w x y z ⊗ 2 diag( w , x, y , z ) I 2 ⊗ w x y z w 2 + xz 0 0 w y + z 2 . The rest of the pro of uses the same reasoning as the pro of of Lemma D.9 with Gadgets 22 and 24 replaced b y Gadgets 23 and 25 resp ectiv ely . All remaining cases, those for which A = − 1 and E , F ∈ { 0 , ± 2 i } , imply tractabilit y . Since this is not immediately ob vious, we pro ve this next. As p oin ted out after Lemma D.4, the following equations hold and are used frequently b elo w. They simplify to E + F = C D (1) E F = − 4 A 3 B + B C 2 + A 3 D 2 = 4 + C 2 − D 2 (2) when A = − 1 and B = 1. These next four lemmas cov er all p ossibilities of E , F ∈ { 0 , ± 2 i } as follo ws: Lemma D.11: Both zero Lemma D.12: Both nonzero and equal Lemma D.13: Both nonzero and not equal Lemma D.14: Exactly one zero Lemma D.11. If A = − 1 ∧ E = F = 0 , then ( D = 0 ∧ C 2 = − 4) or ( D 2 = 4 ∧ C = 0) , which ar e b oth tr actable. Pr o of. Since 0 = E + F = C D , either C or D is zero. In either cas e, simplifying equation (2) gives the desired result and is cov ered b y tractable case (4) in Theorem D.1. Lemma D.12. If A = − 1 ∧ E = F = ± 2 i , then C 2 = − 4 ∧ D 2 = 4 , which is tr actable. 21 Gadget 13 Gadget 14 Figure 10: Gadgets with a symmetric generator signature Pr o of. Using w z = A = − 1 and xy = B = 1, we multiply ± 2 i = E = w 3 x + yz 3 b y w 3 y to get y 2 ± 2 iw 3 y − w 6 = 0. Similarly , m ultiplying ± 2 i = F = w 3 y + xz 3 b y w 3 x gives x 2 ± 2 iw 3 x − w 6 = 0. This is the same quadratic p olynomial with x and y as indeterminates. Its discriminan t is zero, so x = y whic h means that D 2 = 4. Simplifying equation (2) yields C 2 = − 4 as required. This is co vered by tractable case (4) in Theorem D.1. Lemma D.13. If A = − 1 ∧ E = − F = ± 2 i , then C = D = 0 , which is tr actable. Pr o of. Since 0 = E + F = C D , either C or D is zero. Simplifying equation (2) gives C 2 = D 2 , so b oth C and D are zero. This is cov ered by tractable case (4) in Theorem D.1. Lemma D.14. If A = − 1 ∧ (( E = ± 2 i ∧ F = 0) ∨ ( E = 0 ∧ F = ± 2 i )) , then D 2 = 2 ∧ C 2 = − 2 , which is tr actable. Pr o of. Since ± 2 i = E + F = C D , neither C or D is zero. Squaring this equation and solving for C 2 giv es C 2 = − 4 /D 2 . In equation (2), first w e substitute for C 2 to conclude that D 2 = 2 and then substitute for D 2 to conclude that C 2 = − 2. This is tractable case (5) in Theorem D.1. A t this p oin t, ev ery setting of the v ariables has either b een pro ven tractable o ver planar graphs or #P-hard. So far, all our hardness pro ofs originate from # Ver texCo ver on 3-regular graphs, which is Holan t((0 , 1 , 1 , 1) | = 3 ) (see the pro of of Lemma 4.7 in section C). Recall that # Ver texCover is #P-hard ev en for 3-regular planar graphs [36] and notice that all of our gad- get constructions are planar, including our in terp olation construction in the Group Lemma (see Figure 2c). Therefore, all of the #P-hardness results prov ed so far still apply when the input is restricted to planar graphs. There are, how ever, some cases where the problem is #P-hard in general, y et is p olynomial time computable when restricted to planar graphs. W e analyze this case next using a lemma from [30] that can also b e found in [29]. Lemma D.15 (Lemma 33 of [29]) . The pr oblem Holan t(( w , 1 , 1 , w ) | = 3 ) is #P -har d unless w ∈ { 0 , ± 1 , ± i } , in which c ase it is in P . Lemma D.16. The pr oblem Holant(( w, 1 , − 1 , − w ) | = 3 ) is #P -har d, unless w ∈ { 0 , ± 1 , ± i } , in which c ase it is in P . Pr o of. If w ∈ { 0 , ± 1 , ± i } , then the problem is in P by the tractabilit y pro of of Theorem 5.1. If w 6∈ { 0 , ± 1 , ± i } , then Gadgets 13 and 14 simulate tw o symmetric generators. Using Reduce in Mathematica TM , we conclude that at least one of the gadgets satisfies the hypothesis for #P- hardness from Lemma D.15. Lemma D.17. If w 3 = εz 3 ∧ x = εy wher e ε = ± 1 , then Holant(( w, x, y , z ) | = 3 ) is #P -har d unless x = 0 ∨ w /x ∈ { 0 , ± 1 , ± i } , in which c ase it is in P . 22 Pr o of. If x = 0, then also y = 0 and this case, generalized equality , is tractable in Theorem 5.1. Now assume x 6 = 0. If wz 6 = 0, then we apply the holographic transformation α 0 0 α 2 with α = εz /w . Note that α 3 = εw 3 /z 3 = 1. The edge signature b ecomes ( w , x, y , z ) α 0 0 α 2 ⊗ 2 = ( α 2 w , x, y , αz ), while = 3 is unchanged since α 0 0 α 2 − 1 ! ⊗ 3 = I , the 8-by-8 iden tity matrix [35, 12]. This reduces to the case w = εz ∧ x = εy . W e note that when w z = 0, this equiv alence still holds. W e then normalize x = 1 (since it is nonzero) and replace z with εw to obtain the edge signature ( w /x, 1 , ε, εw /x ). Dep ending on ε , this case is either co vered in Lemma D.15 or Lemm a D.16, so w e are done. E T ractable Signatures and Quadratic P olynomials Here w e briefly discuss an alternative and more conceptual catalog of all the tractable functions f . In Theorem 5.1, Case (1) is degenerate: det f (0 , 0) f (0 , 1) f (1 , 0) f (1 , 1) = 0. Case (2) is generalized disequalit y: 0 f (0 , 1) f (1 , 0) 0 . Case (3) is generalized equality: f (0 , 0) 0 0 f (1 , 1) . The tractable Case (4) of Theorem 5.1 is more interesting: for f = w x y z , w e hav e wz = − xy ∧ w 6 = εz 6 ∧ x 2 = εy 2 , where ε = ± 1. If an y of w , x, y , z = 0, then the ab o ve condition forces all w = x = y = z = 0. This constant 0 function is trivially tractable. Assume w xy z 6 = 0. In the pro of of tractabilit y of Theorem 5.1, it is sho wn that under a holographic transformation, this is equiv alent to w z = − xy ∧ w 2 = εz 2 ∧ x 2 = εy 2 , where ε = ± 1. If we further normalize f b y setting w = 1, which corresp onds to a global nonzero constan t factor, then this tractable case is equiv alent to z = − xy ∧ 1 = εz 2 ∧ x 2 = εy 2 , where ε = ± 1. This has a simple form as an exp onen tial quadratic p olynomial. Lemma E.1. F or x 1 , x 2 ∈ { 0 , 1 } , let f ( x 1 , x 2 ) = (1 , x, y , z ) . Then z = − xy ∧ ε = z 2 ∧ x 2 = εy 2 with ε = ± 1 iff ther e exists a, b ∈ Z / 4 Z such that f ( x 1 , x 2 ) = i 2 x 1 x 2 + bx 1 + cx 2 . Pr o of. The pro of is b y a direct v erification on the 16 possible cases, eight of whic h ha ve ε = 1 whic h corresp ond to a + b ≡ 0 (mo d 2) while the other eight hav e ε = − 1 which corresp ond to a + b ≡ 1 (mo d 2). Note that without normalizing w = 1, and including some degenerate cases, we can use f ( x 1 , x 2 ) = λi 2 ax 1 x 2 + bx 1 + cx 2 , where λ ∈ C only contributes a constant factor, and the case a = 0 is degenerate. 23 F Gadgets Gadget 15 Gadget 16 Gadget 17 Gadget 18 Figure 11: Unary recursive gadgets Gadget 19 Gadget 20 Gadget 21 Gadget 22 Gadget 23 Gadget 24 Gadget 25 Figure 12: Binary recursive gadgets Gadget 26 Gadget 27 Figure 13: T ernary recursive gadgets 24 Gadget 28 Gadget 29 Gadget 30 Gadget 31 Gadget 32 Gadget 33 Gadget 34 Gadget 35 Gadget 36 Gadget 37 Gadget 38 Gadget 39 Gadget 40 Gadget 41 Gadget 42 Figure 14: Pro jector gadgets from arity 2 to 1 25
Original Paper
Loading high-quality paper...
Comments & Academic Discussion
Loading comments...
Leave a Comment