The Fine-Grained Complexity of Computing the Tutte Polynomial of a Linear Matroid
TTHE FINE-GRAINED COMPLEXITY OF COMPUTINGTHE TUTTE POLYNOMIAL OF A LINEAR MATROID
ANDREAS BJ ¨ORKLUND AND PETTERI KASKI
Abstract.
We show that computing the Tutte polynomial of a linear matroid of dimension k on k O (1) points over a field of k O (1) elements requires k Ω( k ) time unless the et al. [ACM TALG 2014]—is false. This holds also for linear matroids that admit a represen-tation where every point is associated to a vector with at most two nonzero coordinates. Moreover,we also show that the same is true for computing the Tutte polynomial of a binary matroid ofdimension k on k O (1) points with at most three nonzero coordinates in each point’s vector. Thesetwo results stand in sharp contrast to computing the Tutte polynomial of a k -vertex graph (thatis, the Tutte polynomial of a graphic matroid of dimension k —which is representable in dimension k over the binary field so that every vector has exactly two nonzero coordinates), which is knownto be computable in 2 k k O (1) time [Bj¨orklund et al. , FOCS 2008]. Our lower-bound proofs proceedin three steps:(1) a classic connection due to Crapo and Rota [1970] between the number of tuples of codewordsof full support and the Tutte polynomial of the matroid associated with the code;(2) an earlier-established d, CSP on n vertices in d o ( n ) time; and(3) new embeddings of such CSP instances as questions about codewords of full support in alinear code.Geometrically, our hardness results also establish that it is k o ( k ) for a given arrangement of hyperplanes through theorigin of a finite k -dimensional vector space over a k O (1) -element field. We complement these lowerbounds with two algorithm designs to form essentially a complexity dichotomy under k on k O (1) points in k O ( k ) arithmetic operations in the base field. The second design generalizes the Bj¨orklund et al. algorithm from the graphic case and runs in q k +1 k O (1) time for linear matroids of dimension k defined over the q -element field by k O (1) points with at most two nonzero coordinates each. This work was carried out while AB was employed as a researcher at Lund University, Departmentof Computer Science, and the major part of the writeup was carried out while AB was employed asa researcher at Ericsson Research.Aalto University, Department of Computer Science
E-mail addresses : [email protected], [email protected] . a r X i v : . [ c s . CC ] J u l Introduction
Matroids and the Tutte polynomial. A matroid is a tuple ( E, I ), where E is a finite setof points , and I is a nonempty set of subsets of E called the independent sets of the matroid withthe following two properties:(1) every subset of an independent set is an independent set; and(2) for any two independent sets A and B with | A | > | B | , there exists an e ∈ A \ B such that B ∪ { e } is an independent set.Matroids generalize fundamental combinatorial and algebraic notions such as graphs and linearindependence in vector spaces; for an introduction, cf. Welsh [33] and Oxley [26].A matroid is linearly representable (briefly, linear ) over a field F if it can be described by a k × m matrix M ∈ F k × m of rank k , where the number of rows k is the dimension of the matroid, and the m columns are indexed by the points E of the matroid with | E | = m . For any subset S ⊆ E of thecolumns, let us write M [ S ] to denote the k × | S | matrix obtained by restricting M to the columnsindexed by S . We write ρ ( S ) for the rank of M [ S ] over F . The independent sets of a linear matroidare the sets S for which ρ ( S ) = | S | ; that is, the subsets of linearly independent vectors.The Tutte polynomial of a linear matroid M is the integer-coefficient polynomial in two indeter-minates x any y defined by(1) T M ( x, y ) = (cid:88) S ⊆ E ( x − k − ρ ( S ) ( y − | S |− ρ ( S ) . This generalisation of the Tutte polynomial from graphs to matroids was first published by Crapo [9],although it already appears in Tutte’s thesis; Farr [15] gives an historical account of the Tutte poly-nomial and its generalizations. Brylawski [8]—foreshadowed by Tutte [28, 29]—showed that theTutte polynomial is a universal invariant for deletion–contraction recurrences, and thus captures awealth of combinatorial counting invariants ranging from the chromatic polynomial of a graph topartition functions in statistical physics to weight enumerators in coding theory; cf. Biggs [3], God-sil and Royle [18], Vertigan [31], and Welsh [34] for a detailed account. Among these connections,the most relevant to our present work is the connection of the Tutte polynomial to full-supporttuples of codewords of in linear code, cf. Sect. 1.3 for a discussion.In 2008, Bj¨orklund et al. [5] showed that if the matroid is graphic ; that is, when the matrix M is an incidence matrix of an undirected graph over the binary field, then the Tutte polynomial canbe computed in time 2 k poly( k, m ). Due to the universality of the Tutte polynomial, it would behighly serendipitous to obtain a similar running time for a larger class of matroids.1.2. Our results—fine-grained dichotomy for the Tutte polynomial.
In this paper, weprove that such a running time for two natural ways of extending the graphic case to a larger classof linear matroids would have unexpected consequences in the fine-grained complexity of counting.Namely, we relate the complexity of computing Tutte polynomials of linear matroids to the
CountingExponential Time Hypothesis ( et al. [13],which relaxes the Exponential Time Hypothesis (ETH) of Impagliazzo and Paturi [20].Our first main theorem shows that under M —to moderately large fieldsizes without super-exponential scalability in k . Theorem 1 (Hardness of Tutte polynomial of a linear matroid under . Assuming k o ( k ) time the Tutte polynomial of a givenlinear matroid M of dimension k with k O (1) points over a field of size k O (1) . Moreover, this holdseven when every column of M has at most two nonzero entries. Our second main theorem shows that under k . Theorem 2 (Hardness over any fixed finite field under . Assuming k o ( k ) time the Tutte polynomial of a given linear matroid M of dimension k with k O (1) points over any fixed finite field. Moreover, this holds even when everycolumn of the matrix M has at most three nonzero entries. We complement these hardness results to essentially a complexity dichotomy under k . Theorem 3 (An algorithm for general linear matroids) . There is a deterministic algorithm thatcomputes the Tutte polynomial of a given linear matroid M of dimension k with k O (1) points overa q -element field in time k O ( k ) polylog q and k O (1) polylog q space. The second design is a deterministic algorithm for the case when each point has at most twononzero coordinates, with field-size-dependent exponential scalability in k . In particular, this al-gorithm generalizes the 2 k k O (1) -time algorithm of Bj¨orklund et al. [5] from the graphic case toarbitrary finite fields. Theorem 4 (An algorithm for weight at most two) . There is a deterministic algorithm that com-putes the Tutte polynomial of a given linear matroid M of dimension k with k O (1) points, eachhaving at most two nonzero coordinates over a q -element field, in q k +1 k O (1) time and space. Previously, the hardness of the Tutte polynomial has been studied restricted to the graphic casefrom a number of angles, including the et al. [13] under
Key techniques—linear codes and sparse algebraic constraint satisfaction.
Let usnow give a high-level discussion of the key techniques employed. We proceed to prove Theorems 1and 2 by utilizing known connections between linear codes and the Tutte polynomial. Towards thisend, let us recall some basic terminology. A linear code of length m and dimension k over a finitefield F q is a k -dimensional subspace C of the m -dimensional vector space F mq ; the elements of C arecalled codewords . Such a code C can be represented by a k × m generator matrix G ∈ F k × mq of rank k , with the interpretation that any linear combination y = xG with x ∈ F kq is a codeword of C .The support of a codeword y = ( y , y , . . . , y m ) ∈ C is the set S ( y ) = { i ∈ { , , . . . , m } : y i (cid:54) = 0 } of nonzero coordinates. For a nonempty set Y ⊆ C of codewords, the combined support is definedby S ( Y ) = ∪ y ∈ y S ( y ). The combined support is full if S ( Y ) = { , , . . . , m } .Our two lower bounds use the following famous connection between the Tutte polynomial andcode words of full combined support due to Crapo and Rota [10]: Theorem 5 (The Critical Theorem; Crapo and Rota [10]) . Let d be a positive integer and let C ⊆ F mq be a linear code with a generator matrix G . Then, the number of d -tuples of codewords in C d with full combined support is ( − ρ ( G ) T G (cid:0) − q d , (cid:1) . Consider a linear code C ⊆ F mq with generator matrix G . Theorem 5 with d = 1 implies thatthe number of codewords of C with full support can be obtained as the evaluation of the Tuttepolynomial T G at a single point. Our proof of Theorem 1 will crucially rely on this connection. Inessence, the property of the codeword y = Gx having full support corresponds to x being a solutionof a system of linear homogeneous inequations α x + α x + . . . + α k x k (cid:54) = 0 over F q , one inequation for each column of G . Geometrically, each such inequation can be viewed as a constraint thatforces x to lie not on a particular hyperplane through the origin, and a system of such constraintsforces x to lie properly inside a chamber of an arrangement of hyperplanes through the origin. Thecrux of our proof of Theorem 1 is to show via a sequence of lemmas that the task of computingthe total volume of these hyperplane chambers is hard under d to access the codewords of full support in an extension code. In moreprecise terms, let C ⊆ F mq be a base code with generator matrix G ∈ F k × mq . For a positive integer d , we obtain the extension code ¯ C ⊆ F mq d of the base code C by embedding G elementwise into F q d to obtain the generator matrix ¯ G ∈ F k × mq d of ¯ C . Theorem 5 applied to the base code C with this d implies that the number of codewords of the extension code ¯ C with full support can be obtainedas the evaluation of the Tutte polynomial T G of the base code at a single point. This is because forevery d -tuple ( y (1) , y (2) , . . . , y ( d ) ) of codewords in C d with full combined support and x ( i ) G = y ( i ) for i = 1 , , . . . , d , we can build a unique ¯ x = (¯ x , . . . , ¯ x k ) ∈ F kq d so that ¯ x ¯ G is a codeword of ¯ C with full support. Indeed, F q d can be represented as the polynomial quotient ring F q [ w ] / (cid:104) I ( w ) (cid:105) in the indeterminate w , where I ( w ) ∈ F q [ w ] is an irreducible polynomial of degree d over F q , andwe can build the scalars ¯ x j ∈ F q d in this representation as ¯ x j = (cid:80) d − i =0 x ( i ) j w i for j = 1 , , . . . , d .This representation also shows that the reverse transform is possible: from every codeword of fullsupport in ¯ C , we can construct a unique d -tuple of codewords in C d with full combined support.Hence, their cardinalities are the same. We state this well-known connection as a lemma. Lemma 6 (Counting codewords of full support in extension code) . There is a one-to-one corre-spondence between codewords of full support in ¯ C ⊆ F mq d and d -tuples of codewords from C ⊆ F mq having full combined support. Thus, we can rely on a Tutte polynomial of the generator matrix of the base code C to accessthe count of full-support codewords for the extension code ¯ C . In particular, the base code canbe over any fixed finite field, including the binary field, which enables establishing hardness under sum -inequations α x + α x + . . . + α k x k (cid:54) = 0with α i ∈ {− , , } for all i = 1 , , . . . , k , even in the case when α i (cid:54) = 0 for at most three i . Inparticular, sum-inequations are representable over any fixed finite field, which enables our hardnessreductions under n o ( n ) -form tight lower bounds under ETHincludes e.g. the work of Cygan et al. [12] on graph embedding problems. A more recent exampleis the work of Fomin, Lokshtanov, Mihajlin, Saurabh, and Zehavi on the Hadwiger number andrelated contraction problems [17].Finally, our present focus is on tuples of codewords of full support in a linear code via Theorem 5;dually, words of least positive support size determine the minimum distance of the code, a quantitywhich is also known to be hard to compute; cf. Vardy [30].1.4. Organization.
The rest of this paper is organized as follows. Section 2 proves our mainlower-bound theorems, Theorem 1 and Theorem 2. Sections 3 and 4 present our upper-boundalgorithm designs for Theorems 3 and 4, respectively. Lower bounds
This section proves our two main lower-bound theorems, Theorem 1 and Theorem 2. We startwith preliminaries on constraint satisfaction problems, the counting exponential time hypothesisand sparsification, and then proceed to develop the technical preliminaries and tools needed totransform combinatorial CSP instances into appropriately restricted algebraic versions that canthen be accessed in a coding-theoretic context.2.1.
Constraint satisfaction problems.
For nonnegative integers d , a , v , and m , a constraintsatisfaction problem instance ϕ with parameters ( d, a, v, m )—or briefly, a ( d, a, v, m )- CSP instance —consists of v variables x , x , . . . , x v and m constraints C , C , . . . , C m such that(1) associated with each variable x i , there is an at-most- d -element set D i , the domain of x i ;and(2) associated with each constraint C j , there is an a -tuple S j = ( x j , x j , . . . , x j a ) of distinctvariables as well as a set P j ⊆ D j × D j × · · · × D j a of permitted combinations of values forthe variables.We say that the parameter d is the domain size of the variables and the parameter a is the arity ofthe constraints. We may omit the parameters v and m and simply refer to a ( d, a )-CSP instance ifthis is convenient.We say that a ( d, a, v, m )-CSP instance ϕ is satisfiable if there exists a satisfying assignment w ∈ D × D × · · · × D v such that for every j = 1 , , . . . , m it holds that w assigns a permittedcombination of values to the constraint C j —that is—we have ( w j , w j , . . . , w j a ) ∈ P j ; otherwise,we say that ϕ is unsatisfiable . Let us write SAT( ϕ ) ⊆ D × D × · · · × D v for the set of all satisfyingassignments of ϕ .Let us write ( d, a, v, m )-CSP for the task of deciding whether a given ( d, a, v, m )-CSP instance issatisfiable. Similarly, let us write d, a, v, m )-CSP for the task of counting the number of satisfyingassignments to a given ( d, a, v, m )-CSP instance.A constraint where all but one combination of values to the variables is permitted is calleda clause . Instances consisting of clauses over variables with a binary domain are said to be in conjunctive normal form (CNF). We refer to instances in CNF with arity k as k -CNF, where theparameter k is the length of the clauses.2.2. The counting exponential-time hypothesis and sparsification.
No efficient algorithmis known for solving constraint satisfaction problems in the general case. As such, we will establishour present hardness results under the following hypothesis of Dell et al. [13], which relaxes theExponential Time Hypothesis of Impagliazzo and Paturi [20].
Hypothesis 7 (Counting exponential time hypothesis ( et al. [13]) . There exists aconstant c > n -variable instanceof cn ).We will also need a counting-variant of the Sparsification Lemma of Impagliazzo, Paturi, andZane [21] due to Dell et al. [13] (see also Flum and Grohe [16]). Lemma 8 (Counting sparsification; Dell et al. [13]) . For k ≥ , there exists a computable function σ : N → N and a deterministic algorithm that, for p ∈ N and an n -variable k -CNF instance ϕ given as input, in time O (cid:0) t · poly n (cid:1) computes k -CNF instances ϕ , ϕ , . . . , ϕ t , each over thesame variables and variable domains as ϕ , such that (1) t ≤ n/p ; (2) SAT( ϕ ) = ∪ ti =1 SAT( ϕ i ) where the union consists of disjoint sets; and (3) each variable occurs in at most σ ( k, p ) clauses of ϕ i . Hardness of bipartite CSPs.
It will be convenient to base our main hardness reductionson CSPs whose constraints have the topology of a bipartite graph. Towards this end, this sectionpresents variants of well-known (e.g. cf. Traxler [27]) hardness reductions that have been modifiedto establish hardness in the bipartite case.In more precise terms, let us study a CSP instance with arity a = 2. It is immediate thatwe can view the constraints of such an instance as the edges of a (directed) graph whose verticescorrespond to the variables of the instance. We say that such a CSP instance is bipartite if thisgraph is bipartite. Lemma 9 (Hardness of bipartite . Assuming
ET H , there is a constant b > such that there is no deterministic algorithm that solves a given bipartite , , v, O ( v )) -CSP instance in time exp( bv ) .Proof. Let c be the constant in Hypothesis 7 and let ϕ be a n -variable instance of p so that p > /c . Run the sparsification algorithm in Lemma 8 on ϕ to obtainin time O (2 cn/ poly n ) the ϕ , ϕ , . . . , ϕ t with t ≤ cn/ .Let us transform ϕ i into a bipartite , ϕ (cid:48) i with | SAT( ϕ (cid:48) i ) | = | SAT( ϕ i ) | .Without loss of generality we may assume that every variable occurs in at least one clause. Letus assume that ϕ i consists of m clauses C , C , . . . , C m over n variables x , x , . . . , x n with do-mains D , D , . . . , D n , respectively. By Lemma 8, we have m ≤ σ (3 , p ) n = O ( n ). Let us write( x j , x j , x j ) for the support of C j and P j ⊆ D j × D j × D j for the permitted values of C j .The construction of ϕ (cid:48) i is as follows. For each clause C j with j = 1 , , . . . , m , introduce a variable C (cid:48) j with domain D j × D j × D j into ϕ (cid:48) i . For each variable x j with j = 1 , , . . . , n , introduce a variable x (cid:48) j with domain D j into ϕ (cid:48) i . For each clause C j with j = 1 , , . . . , m and each (cid:96) = 1 , ,
3, introduce aconstraint with support ( x (cid:48) j (cid:96) , C (cid:48) j ) and permitted combinations P (cid:48) j,(cid:96) = { ( w, ( w , w , w )) ∈ D j (cid:96) × P j : w = w (cid:96) } ⊆ D j (cid:96) × ( D j × D j × D j ) into ϕ (cid:48) i . In total ϕ (cid:48) i thus has v ≤ ( σ (3 , p ) + 1) n variablesand 3 m ≤ σ (3 , p ) n = O ( v ) constraints. It is also immediate that ϕ (cid:48) i has domain size 2 , arity 2,and bipartite structure as a graph. Furthermore, since every variable of ϕ i occurs in at least oneclause, it is immediate that there is a one-to-one correspondence between SAT( ϕ i ) and SAT( ϕ (cid:48) i ).The transformation from ϕ i to ϕ (cid:48) i is clearly computable in time poly n .To reach a contradiction, suppose now that there is a deterministic algorithm that solves a givenbipartite , , v, O ( v ))-CSP instance in time exp( bv ) for a constant b > b < c/ (2( σ (3 , p ) +1)). Then, we could use this algorithm to solve each of the t ≤ cn/ instances ϕ (cid:48) i for i = 1 , , . . . , t in total time exp( c (cid:48) n ) for a constant c (cid:48) < c . But since | SAT( ϕ (cid:48) i ) | = | SAT( ϕ i ) | , this means that wecould solve each of the instances ϕ i , and thus the ϕ by Lemma 8, in similar totaltime, which contradicts Hypothesis 7. (cid:3) The next lemma contains a well-known tradeoff (e.g. [11]) that amplifies the lower bound on therunning time by enlarging the domains of the variables.
Lemma 10 (Hardness amplification by variable aggregation under . Assuming
ETH,there is no deterministic algorithm that solves a given bipartite (cid:98)√ n (cid:99) , , n, O ( n polylog n )) -CSPinstance in time n o ( n ) .Proof. We establish hardness via Lemma 9. Let ϕ be a bipartite , , v, O ( v ))-CSP instance.Without loss of generality—by padding with extra variables constrained to unique values—wemay assume that (i) the variables of ϕ are x , x , . . . , x v , y , y , . . . , y v , (ii) every constraint of ϕ hassupport of the form ( x i , y j ) for some i, j = 1 , , . . . , v , and (iii) v ≥
2. Let (cid:15) > g = (cid:100) (cid:15) log v (cid:101) . Group the variables x , x , . . . , x v into pairwise disjointsets X , X , . . . , X (cid:100) v/g (cid:101) of at most g variables each. Similarly, group the variables y , y , . . . , y v intopairwise disjoint sets Y , Y , . . . , Y (cid:100) v/g (cid:101) of at most g variables each.Let us construct from ϕ a bipartite ϕ (cid:48) with | SAT( ϕ ) | = | SAT( ϕ (cid:48) ) | as follows.The variables of ϕ (cid:48) are X , X , . . . , X (cid:100) v/g (cid:101) and Y , Y , . . . , Y (cid:100) v/g (cid:101) so that the domain of each variable is the Cartesian product of the domains of the underlying variables of ϕ . The constraints of ϕ (cid:48) areobtained by extension of the constraints of ϕ as follows. For each constraint with support ( x i , y j )in ϕ , let i (cid:48) and j (cid:48) be the unique indices with x i ∈ X i (cid:48) and y j ∈ Y j (cid:48) , and introduce a constraint withsupport ( X i (cid:48) , Y j (cid:48) ) into ϕ (cid:48) ; set the permitted values of this constraint so that they force a permittedvalue to the variables x i and y j as part of the variables X i (cid:48) and Y j (cid:48) but otherwise do not constrainthe values of X i (cid:48) and Y j (cid:48) . This completes the construction of ϕ (cid:48) . It is immediate that ϕ (cid:48) is bipartiteand that | SAT( ϕ ) | = | SAT( ϕ (cid:48) ) | holds. Furthermore, ϕ (cid:48) has n = 2 (cid:100) v/ (cid:100) (cid:15) log v (cid:101)(cid:101) variables, each withdomain size at most 8 (cid:100) (cid:15) log v (cid:101) , and O ( v ) constraints; that is, O ( n polylog n ) constraints. Choosing (cid:15) = 1 /
7, we have 8 (cid:100) (cid:15) log v (cid:101) ≤ √ n for all large enough n . The transformation from ϕ i to ϕ (cid:48) i is clearlycomputable in time poly v .To reach a contradiction, suppose now that there is a deterministic algorithm that solves a givenbipartite (cid:98)√ n (cid:99) , , n, O ( n polylog n ))-CSP instance in time n o ( n ) = exp( o ( n log n )). Then, wecould use this algorithm to solve ϕ (cid:48) , and hence ϕ by | SAT( ϕ (cid:48) ) | = | SAT( ϕ ) | , in time exp( o ( v )),which contradicts Lemma 9. (cid:3) Linear inequation systems and chambers of hyperplane arrangements.
We are nowready to introduce our main technical tool, namely CSPs over finite fields whose constraints are of aspecial geometric form. (For preliminaries on finite fields, cf. e.g. Lidl and Niederreiter [24].) Moreprecisely, let us write F q for the finite field with q elements, q a prime power, and let x , x , . . . , x n bevariables taking values in F q . For α , α , . . . , α n ∈ F q , β ∈ F q , and S = { j ∈ { , , . . . , n } : α j (cid:54) = 0 } ,we say that the constraint(2) α x + α x + . . . + α n x n (cid:54) = β is a ( linear ) inequation of arity (or weight ) | S | . We say that the inequation is homogeneous if β = 0and inhomogeneous otherwise. We say that the inequation is a sum-inequation if for all j ∈ S wehave α j ∈ { , − } .Previously, the complexity of inequations of low arity has been studied for example by Kowalikand Socala [23] under the terminology of generalized list colorings of graphs. We also remarkthat for | S | ≥ x ∈ F nq does notlie in the hyperplane defined by the coefficients α , α , . . . , α n and β ; accordingly, a system ofconstraints of this form is satisfied by a point x if and only if x lies properly inside a chamber ofthe corresponding hyperplane arrangement, and the task of counting the number of such pointscorresponds to determining the total volume of the chambers in F nq . (Cf. Orlik and Terao [25],Dimca [14], and Aguiar and Mahajan [1] for hyperplane arrangements.)Here our objective is to establish that systems of inequations are hard to solve under Homogeneous inequation systems of arity two.
Our first goal is to show that countingthe number of solutions to a homogeneous inequation system of arity two over a large-enough fieldis hard under modular constraints of arity two, andthen proceed to the homogeneous case over F q by relying on the cyclic structure of the multiplicativegroup of F q . The modular setting will also reveal the serendipity of our work with bipartite CSPs.Towards this end, let x , x , . . . , x n , y , y , . . . , y n , and z be 2 n + 1 variables taking values in Z M ,the integers modulo M . We say that an inequation of arity two over Z M is special modular if it isone of the following forms: (i) x i − y j (cid:54) = c , (ii) x i − z (cid:54) = c , or (iii) y j − z (cid:54) = c for i, j = 1 , , . . . , n and c ∈ Z M . A CSP instance over Z M is special modular if all of its constraints are special modular. Lemma 11 (Hardness of special modular systems under . Assuming
ETH, there isno deterministic algorithm that in time n o ( n ) poly M solves a given special modular ( M, , n +1 , O ( M n polylog n )) -CSP instance over Z M with M ≥ n .Proof. We establish hardness via Lemma 10. Let ϕ be a bipartite (cid:98)√ n (cid:99) , , n, O ( n polylog n ))-CSP instance. Without loss of generality—by padding with extra variables constrained to uniquevalues—we may assume that the variables of ϕ are x , x , . . . , x n , y , y , . . . , y n and every constraintof ϕ has support of the form ( x i , y j ) for some i, j = 1 , , . . . , n . Furthermore, by relabeling of thedomains as necessary, we can assume that all variables x i have domain { d, d, . . . , d } and allvariables y j have domain { , , . . . , d − } with d = (cid:98)√ n (cid:99) . Let us now construct a special modularCSP instance ϕ (cid:48) as follows. Let M ≥ n ≥ d . Introduce the 2 n + 1 variables x , x , . . . , x n , y , y , . . . , y n , and z into ϕ (cid:48) so that each variable has domain Z M = { , , . . . , M − } . For each i = 1 , , . . . , n , force x i ∈ { z + d, z + 2 d, . . . , z + d } modulo M by introducing M − d specialmodular constraints of type (ii) into ϕ (cid:48) . For each j = 1 , , . . . , n , force y j ∈ { z, z + 1 , . . . , z + d − } modulo M by introducing M − d special modular constraints of type (iii) into ϕ (cid:48) . We observethat the introduction of these constraints into ϕ (cid:48) forces that for all i, j = 1 , , . . . , n we have x i − y j ∈ { , , . . . , d } modulo M , and the values of x i and y j modulo M are uniquely determinedby the difference x i − y j modulo M . Finally, for each constraint of ϕ with support of the form( x i , y j ) for some i, j = 1 , , . . . , n , use at most M special modular constraints of type (i) to force thevalues of x i and y j to the permitted pairs of values. It is immediate that | SAT( ϕ (cid:48) ) | = M | SAT( ϕ ) | ;indeed, each satisfying assignment to ϕ corresponds to exactly M satisfying assignments to ϕ (cid:48) , onefor each possible choice of value to z . Furthermore, ϕ (cid:48) is computable from ϕ in time poly( M, n ).We also observe that ϕ (cid:48) has 2 n + 1 variables, O ( M n polylog n ) constraints, domain size 3 n , andarity 2.To reach a contradiction, suppose now that there is a deterministic algorithm that in time n o ( n ) poly M solves a given special modular M, , n + 1 , O ( M n polylog n ))-CSP instance over Z M with M ≥ n . Then, we could use this algorithm to solve ϕ (cid:48) , and hence ϕ by | SAT( ϕ (cid:48) ) | = M | SAT( ϕ ) | , in time n o ( n ) , which contradicts Lemma 10. (cid:3) We are now ready to establish hardness of homogeneous inequation systems of arity two over F q for large-enough q . For arithmetic in F q , we tacitly assume an appropriate irreducible polynomialand a generator γ for the multiplicative group of F q are supplied as part of the input. (Foralgorithmics for finite fields, cf. e.g. von zur Gathen and Gerhard [32].) Lemma 12 (Hardness of homogeneous inequation systems of arity two under . Assuming
ETH, there is no deterministic algorithm that in time n o ( n ) poly q solves a given ( q, , n +1 , O ( qn polylog n )) -CSP instance with the structure of a homogeneous inequation system over F q with q ≥ n + 1 .Proof. We proceed via Lemma 11. Let ϕ be a special modular M, , n + 1 , O ( M n polylog n ))-CSP instance with variables x , x , . . . , x n , y , y , . . . , y n , z taking values in Z M for M ≥ n . Bychoosing a large enough M in Lemma 11, we may assume that M + 1 is a prime power. Letus construct a homogeneous inequation system ϕ (cid:48) over F q with q = M + 1 as follows. Let γ be a generator for the multiplicative group of F q . Introduce into ϕ (cid:48) the variables x (cid:48) , x (cid:48) , . . . , x (cid:48) n , y (cid:48) , y (cid:48) , . . . , y (cid:48) n , and z (cid:48) , each taking values in F q . Introduce the homogeneous inequations x (cid:48) i (cid:54) = 0, y (cid:48) j (cid:54) = 0, and z (cid:48) (cid:54) = 0 for all i, j = 1 , , . . . , n into ϕ (cid:48) . By the cyclic structure of the multiplicativegroup of F q , we have that to arbitrary nonzero values of the variables x (cid:48) i , y (cid:48) j , z (cid:48) in F q , therecorrespond unique integers x i , y j , z modulo q − x (cid:48) i = γ x i , y (cid:48) j = γ y j , and z (cid:48) = γ z for all i, j = 1 , , . . . , n . Furthermore, under this correspondence, each special modular constraint x i − y j (cid:54) = c over Z M = Z q − corresponds to the homogeneous inequation x (cid:48) i − γ c y (cid:48) j (cid:54) = 0 of arity 2over F q ; indeed, we have x (cid:48) i − γ c y (cid:48) j (cid:54) = 0 iff x (cid:48) i (cid:54) = γ c y (cid:48) j iff γ x i (cid:54) = γ c + y j iff x i (cid:54) = c + y j modulo q − x i − y j (cid:54) = c modulo q −
1. The special modular constraints x i − z (cid:54) = c and y j − z (cid:54) = c have similar correspondence with homogeneous inequations x (cid:48) i − γ c z (cid:48) (cid:54) = 0 and y (cid:48) j − γ c z (cid:48) (cid:54) = 0, respectively. We canthus complete the construction of ϕ (cid:48) by inserting the constraints corresponding to the constraints of ϕ into ϕ (cid:48) ; in particular, we have | SAT( ϕ ) | = | SAT( ϕ (cid:48) ) | . The transformation from ϕ to ϕ (cid:48) is clearlycomputable in time poly( n, q ). It thus follows from Lemma 11 that, assuming n o ( n ) poly q solves a given q, , n + 1 , O ( qn polylog n ))-CSPinstance with the structure of a homogeneous inequation system over F q with q ≥ n + 1. (cid:3) Homogeneous sum-inequation systems of arity three.
We now proceed to look at ho-mogeneous inequation systems with {− , , } -coefficients on the variables; that is, we establishunder sum -inequationsystem of low arity. Bipartiteness in the input of the reduction will again be serendipitous inachieving low arity. In particular, bipartiteness will enable us to reduce to a system of homoge-neous sum-inequations of arity three whose solvability in relation to the original system can beestablished via the existence of Sidon sets.For an Abelian group A , we say that a subset S ⊆ A is a Sidon set if for any x, y, z, w ∈ S ofwhich at least three are different, it holds that x + y (cid:54) = z + w . An Abelian group is elementary Abelian if all of its nontrivial elements have order p for a prime p . The additive group of a finitefield F q is elementary Abelian. Lemma 13 (Existence of Sidon sets; Babai and S´os [2, Corollary 5.8]) . Elementary Abelian groupsof order q have Sidon sets of size q / o (1) . We are now ready for the main result of this section.
Lemma 14 (Hardness of homogeneous sum-inequation systems of arity three under . Assuming
ETH, there is no deterministic algorithm that in time n o ( n ) poly q solves a given ( q, , n + q ) , O ( q polylog q )) -CSP instance with the structure of a homogeneous sum-inequationsystem over F q with q ≥ n o (1) .Proof. We proceed via Lemma 10. Let ϕ be a bipartite (cid:98)√ n (cid:99) , , n, O ( n polylog n ))-CSP instance.Without loss of generality—by padding with extra variables constrained to unique values—wemay assume that the variables of ϕ are x , x , . . . , x n , y , y , . . . , y n and every constraint of ϕ hassupport of the form ( x i , y j ) for some i, j = 1 , , . . . , n . Furthermore, by relabeling of the domainsas necessary, we can assume that all variables x i and y j have domain { , , . . . , d } with d = (cid:98)√ n (cid:99) .Let us construct a homogeneous sum-inequation system ϕ (cid:48) over F q with q ≥ n as follows. In-troduce the variables x (cid:48) , x (cid:48) , . . . , x (cid:48) n , y (cid:48) , y (cid:48) , . . . , y (cid:48) n , s (cid:48) , s (cid:48) , . . . , s (cid:48) d , t (cid:48) , t (cid:48) , . . . , t (cid:48) d , r (cid:48) , r (cid:48) , . . . , r (cid:48) q − d , and v (cid:48) , v (cid:48) , . . . , v (cid:48) q , each taking values over F q , into ϕ (cid:48) . In total there are thus 2( n + q ) variables.We introduce six different types of homogeneous sum-inequations into ϕ (cid:48) . Let g : { , , . . . , d } →{ , , . . . , q } be an arbitrary but fixed injective map.First, inequations of type (i) force the q variables s (cid:48) , s (cid:48) , . . . , s (cid:48) d , t (cid:48) , t (cid:48) , . . . , t (cid:48) d , r (cid:48) , r (cid:48) , . . . , r (cid:48) q − d totake pairwise distinct values; this can be forced with q ( q − / q variables v (cid:48) , v (cid:48) , . . . , v (cid:48) q to take pairwise distinct values;this can be forced with q ( q − / a, b ∈ { , , . . . , d } , we force the equality s (cid:48) a + t (cid:48) b = v (cid:48) g ( a,b ) by introducing q − s (cid:48) a + t (cid:48) b − v (cid:48) k (cid:54) = 0—let us call these inequations of type (iii)—oneinequation for each k ∈ { , , . . . , q } \ { g ( a, b ) } .Fourth, inequations of type (iv) force the n variables x (cid:48) i to take values in the set of values ofthe variables s (cid:48) , s (cid:48) , . . . , s (cid:48) d ; together with (i), this can be forced with homogeneous sum-inequations x (cid:48) i − t (cid:48) b (cid:54) = 0 and x (cid:48) i − r (cid:48) (cid:96) (cid:54) = 0 for all i = 1 , , . . . , n , b = 1 , , . . . , d , and (cid:96) = 1 , , . . . , q . Fifth, inequations of type (v) force the n variables y (cid:48) j to take values in the set of values of thevariables t (cid:48) , t (cid:48) , . . . , t (cid:48) d ; together with (i), this can be forced with homogeneous sum-inequations y (cid:48) j − s (cid:48) a (cid:54) = 0 and y (cid:48) j − r (cid:48) (cid:96) (cid:54) = 0 for all j = 1 , , . . . , n , b = 1 , , . . . , d , and (cid:96) = 1 , , . . . , q .Sixth, for each constraint with support ( x i , y j ) in ϕ for some i, j = 1 , , . . . , n , and letting P ⊆ { , , . . . , d } be the set of permitted values for the constraint, introduce the homogeneoussum-inequations x (cid:48) i + y (cid:48) j − v (cid:48) k (cid:54) = 0 for each k ∈ { , , . . . , q } \ g ( P ); let us call these inequations oftype (vi).This completes the transformation from ϕ to ϕ (cid:48) , which is clearly computable in time poly( n, q ).We observe that ϕ (cid:48) has domain size q , arity 3, 2( n + q ) variables, and O ( q polylog q ) constraints.Next we claim that for all large enough q we have | SAT( ϕ (cid:48) ) | = f ( q, d ) · | SAT( ϕ ) | for a positive-integer-valued function f ( q, d ) of the parameters q, d . Indeed, let f ( q, d ) be the total numberof solutions to the system of inequations consisting of the variables s (cid:48) , s (cid:48) , . . . , s (cid:48) d , t (cid:48) , t (cid:48) , . . . , t (cid:48) d , r (cid:48) , r (cid:48) , . . . , r (cid:48) q − d , v (cid:48) , v (cid:48) , . . . , v (cid:48) q and all the inequations of types (i), (ii), and (iii). Recalling that q ≥ n o (1) ≥ d o (1) , from Lemma 13 we have that for all large enough q the additive group of F q contains a Sidon set of size 2 d . Assign each element of this Sidon set to exactly one of the variables s (cid:48) , s (cid:48) , . . . , s (cid:48) d , t (cid:48) , t (cid:48) , . . . , t (cid:48) d to conclude that the sums s (cid:48) a + t (cid:48) b are distinct for all a, b = 1 , , . . . , d .Assign the remaining variables to distinct values in one of the ( q − d )!( q − d )! possible ways toconclude that f ( q, d ) ≥
1. Fix one of the f ( q, d ) solutions. Inequations of type (iv) are by definitionsatisfied if and only if for all i = 1 , , . . . , n we have that x (cid:48) i takes a value in the set of values for s (cid:48) , s (cid:48) , . . . , s (cid:48) d . Similarly, inequations of type (v) are by definition satisfied if and only if for all j = 1 , , . . . , n we have that y (cid:48) j takes a value in the set of values for t (cid:48) , t (cid:48) , . . . , t (cid:48) d . Consider any suchassignment to x (cid:48) i and y (cid:48) j for i, j = 1 , , . . . , n . Suppose that x (cid:48) i = s (cid:48) a and y (cid:48) j = t (cid:48) b for a, b = 1 , , . . . , d .Then, x (cid:48) i + y (cid:48) j = s (cid:48) a + t (cid:48) b = v (cid:48) g ( a,b ) since inequations of type (iii) are satisfied. Suppose now ϕ hasa constraint with support ( x i , y j ) and permitted values P ⊆ { , , . . . , d } . By construction, wehave that the inequations of type (vi) originating from this constraint are satisfied if and only if ( a, b ) ∈ P . Thus, we have | SAT( ϕ (cid:48) ) | = f ( q, d ) · | SAT( ϕ ) | as claimed.To reach a contradiction, suppose that there is a deterministic algorithm that in time n o ( n ) poly q solves a given q, , n + q ) , O ( q polylog q ))-CSP instance with the structure of a homogeneoussum-inequation system over F q with q ≥ n o (1) . Let ϕ be a bipartite (cid:98)√ n (cid:99) , , n, O ( n polylog n ))-CSP instance and take q = n o (1) . First, use the assumed algorithm to the system of inequationsconsisting of the variables s (cid:48) , s (cid:48) , . . . , s (cid:48) d , t (cid:48) , t (cid:48) , . . . , t (cid:48) d , r (cid:48) , r (cid:48) , . . . , r (cid:48) q − d , v (cid:48) , v (cid:48) , . . . , v (cid:48) q and all the in-equations of types (i), (ii), and (iii). The algorithm returns f ( q, d ) as the solution. Then, construct ϕ (cid:48) from ϕ and use the algorithm on ϕ (cid:48) to get | SAT( ϕ (cid:48) ) | as the solution. Divide by f ( q, d ) to obtain | SAT( ϕ ) | . Since the total running time is n o ( n ) , we obtain a contradiction to Lemma 10. (cid:3) We are now ready to complete our proofs of Theorem 1 and Theorem 2.2.7.
Proof of Theorem 1.
We will rely on Lemma 12 and Theorem 5. Let ϕ be q, , n +1 , O ( qn polylog n ))-CSP instance with the structure of a homogeneous inequation system over F q with q = 3 n + 1. Take k = 2 n + 1 and construct a k × m matrix G ∈ F k × mq so that each columnof G corresponds to a unique homogeneous inequation of ϕ ; in particular, every column of G hasat most two nonzero entries. For all x ∈ F kq we have that xG has full support if and only if x ∈ SAT( ϕ ). Theorem 5 with d = 1 thus implies that ( − ρ ( G ) T G (1 − q,
0) = | SAT( ϕ ) | . Since m = O ( qn polylog n ), we have m = k O (1) . Furthermore, q = k O (1) . An algorithm that computesthe Tutte polynomial T G in time k o ( k ) would thus enable us to compute | SAT( ϕ ) | in time n o ( n ) poly q and thus contradict Lemma 12 under (cid:3) Proof of Theorem 2.
Fix an arbitrary prime power q . We will rely on Lemma 14 andTheorem 5. Let ϕ be a q, , n + q ) , O ( q polylog q ))-CSP instance with the structure of ahomogeneous sum-inequation system over F q with q = q d = n o (1) . Construct a k × m matrix G ∈ F k × mq with k = 2( n + q ) so that each column of G correspondsto a unique sum-inequation of ϕ ; in particular, every column of G has at most three nonzeroentries. Recalling Lemma 6 and the construction in Sect. 1.3, extend G elementwise from F q to F q = F q d to obtain ¯ G ∈ F k × mq . For all ¯ x ∈ F kq we have that ¯ x ¯ G has full support if and only if¯ x ∈ SAT( ϕ ). Theorem 5 and Lemma 6 thus imply that ( − ρ ( G ) T G (1 − q d ,
0) = | SAT( ϕ ) | . Since m = O ( q polylog n ), we have m = k O (1) . An algorithm that computes the Tutte polynomial T G in time k o ( k ) would thus enable us to compute | SAT( ϕ ) | in time n o ( n ) poly q and thus contradictLemma 14 under (cid:3) An upper bound for the general case
This section proves our first upper-bound result, Theorem 3. Let F be a field and let M ∈ F k × m be a k × m matrix with columns indexed by a set E with | E | = m given as input. Our task is tocompute the Tutte polynomial T M ( x, y ) in coefficient form.3.1. Least generators and prefix-dependent partitioning.
We start with preliminaries to-wards Theorem 3. Let us assume that the set E is totally ordered. For two distinct subsets A, B ⊆ E , we say that A is size-lexicographically lesser than B and write A < B if either | A | < | B | or both | A | = | B | and the minimum element of ( A \ B ) ∪ ( B \ A ) belongs to A .For a set S ⊆ E , let us write L ( S ) for the size-lexicographically least subset of S such that ρ ( L ( S )) = ρ ( S ). We say that L ( S ) is the least generator set for S ; indeed, M [ L ( S )] generatesthe column space of M [ S ]. Furthermore, we observe that | L ( S ) | = ρ ( L ( S )); indeed, otherwise wewould have | L ( S ) | > ρ ( L ( S )) = ρ ( S ), which would mean that there would exist an e ∈ L ( S ) with ρ ( L ( S ) \ { e } ) ≥ ρ ( L ( S )) = ρ ( S ), in which case L ( S ) \ { e } would contradict the size-lexicographicleastness of L ( S ). In particular, L ( S ) is an independent set.For an independent set I ⊆ E , let us say that an element f ∈ E is I -prefix-dependent if M [ f ] isin the column span of M [ { e ∈ I : e < f } ]. Let us write P ( I ) for the set of all I -prefix-dependentelements of E . We observe that given I as input, P ( I ) can be computed in poly( k, m ) operationsin F . Lemma 15 (Prefix-dependent partitioning) . For all S ⊆ E it holds that L ( S ) ⊆ S ⊆ L ( S ) ∪ P ( L ( S )) , where the union is disjoint.Proof. Let us first observe that the union must be disjoint; indeed, every element of P ( L ( S ))depends on one or more of elements of L ( S ), and L ( S ) is independent. The inclusion L ( S ) ⊆ S isimmediate by the definition of L ( S ). Next, observe that S ⊆ L ( S ) ∪ P ( L ( S )) holds trivially when S is the empty set, so let us assume S is nonempty. Consider an arbitrary f ∈ S . If f ∈ L ( S ), weare done. So suppose that f / ∈ L ( S ). Since M [ L ( S )] generates the column space of M [ S ], we havethat M [ f ] depends on M [ K ] for some f / ∈ K ⊆ L ( S ). Take the size-lexicographically least such K . If e < f holds for all e ∈ K , we have f ∈ P ( L ( S )) and we are done. So suppose that there isan e ∈ K with f < e . By size-lexicographic leastness of K , M [ f ] is not in the span of M [ K \ { e } ];that is, M [ K ∪ { f } \ { e } ] is independent, and thus must generate the same space as M [ K ]. Since K ⊆ L ( S ) and f ∈ S \ L ( S ), it follows that L ( S ) ∪ { f } \ { e } contradicts the size-lexicographicleastness of L ( S ), and the lemma follows. (cid:3) Computing the Tutte polynomial via least generator sets.
This section completes ourproof of Theorem 3. The key idea in our algorithm is now to implement the contribution of eachset S ⊆ E to the Tutte polynomial through the least generator set L ( S ) and the associated prefix-dependent residual R = S \ L ( S ) ⊆ P ( L ( S )) enabled by Lemma 15. Indeed, L ( S ) is independent,which enables us to work over only the independent sets I of M , each of which has size at most k . More precisely, let us write (cid:0)
E(cid:96) (cid:1) for the set of all (cid:96) -element subsets of E . From the definition (1) ofthe Tutte polynomial and Lemma 15, we immediately have T M ( x, y ) = (cid:88) S ⊆ E ( x − k − ρ ( S ) ( y − | S |− ρ ( S ) = k (cid:88) (cid:96) =0 (cid:88) I ∈ ( E(cid:96) ) ρ ( I )= (cid:96) ( x − k − (cid:96) (cid:88) R ⊆ P ( I ) ( y − (cid:96) + | R |− (cid:96) = k (cid:88) (cid:96) =0 (cid:88) I ∈ ( E(cid:96) ) ρ ( I )= (cid:96) ( x − k − (cid:96) y | P ( I ) | , (3)where the last equality follows from the Binomial Theorem. It follows from (3) that we can compute T M ( x, y ) by iterating over the subsets of E of size at most k , using at most poly( m, k ) arithmeticoperations in F in each iteration. When m = k O (1) and F is a finite field, Theorem 3 follows sincethere are at most km k = k O ( k ) such subsets and each arithmetic operation in F q can be implementedin time polylog q (cf. [32]). (cid:3) An upper bound for weight at most two
This section proves Theorem 4. Let us assume that the field F has q elements. Furthermore,let us assume that every column of the given input M ∈ F k × m has at most two nonzero elements;without loss of generality we may assume that M has no all-zero columns. Let us index the set ofrows of M by a set V with | V | = k and the set of columns by a set E with | E | = m .4.1. Multigraphs and the two possible ranks in the connected case.
Our strategy is toderive counting recurrences for the coefficients of the Tutte polynomial using a multigraph repre-sentation of M . Indeed, the pair ( V, E ) together with M naturally defines a multigraph G withvertex set V and edge set E such that each edge e ∈ E is either (i) a loop at vertex v ∈ V if theonly nonzero entry at column e of M is m ve or (ii) an edge joining two distinct vertices v, w ∈ V if the nonzero entries at column e of M are m ve and m we .To compute the Tutte polynomial T M ( x, y ) in coefficient form, it is immediate from (1) that itsuffices to have available the following coefficients. For r = 0 , , . . . , k and s = 0 , , . . . , m , definethe coefficient(4) τ r,s = (cid:12)(cid:12)(cid:8) S ⊆ E : ρ ( S ) = r , | S | = s (cid:9)(cid:12)(cid:12) . Our approach on computing the coefficients τ r,s will be based on the structure of the multigraphs( V, S ) with vertex set V and edge set S ⊆ E . Towards this end, for a nonempty subset U ⊆ V , itwill be convenient to write S [ U ] for the set of all edges e ∈ S incident only to vertices in U . Supposenow that U ⊆ V is the vertex set of a connected component of ( V, S ). Then, it is immediate that S [ U ] is the edge set of this connected component, and well-known that the rank of the submatrix M [ S [ U ]] is either | U | − | U | . To see the latter, first observe that M [ S [ U ]] has at most | U | nonzero rows, so the rank is at most | U | . Next, observe that the multigraph ( U, S [ U ]) is connected,so it has a spanning tree of | U | − M [ S [ U ]] in this topological order of rows—for each arc, use the head to zeroout the tail—leaves a reduced echelon form with at least | U | − M [ S [ U ]] is at least | U | −
1, and hence either | U | − | U | . We proceed to derive counting recurrences that distinguish between these two possible ranks and perform dynamicprogramming over vertex sets of connected components.4.2. Preliminaries: Counting subgraphs by the number of components and edges.
Forease of exposition, let us first derive a counting recurrence for spanning subgraphs that does notdistiguish between the ranks but explicitly tracks the number of connected components and thenumber of edges. We emphasize that this recurrence is known and due to Bj¨orklund et al. [5]. Fora multigraph with vertex set U ⊆ V and edge set S ⊆ E [ U ], let us write c ( U, S ) for the number ofconnected components in (
U, S ).For nonempty U ⊆ V , d = 1 , , . . . , k , and s = 0 , , . . . , m , define(5) α d,s ( U ) = (cid:12)(cid:12)(cid:8) S ⊆ E [ U ] : c ( U, S ) = d , | S | = s (cid:9)(cid:12)(cid:12) . That is, α d,s ( U ) counts the number of U -spanning subgraphs of G with exactly d connected com-ponents and s edges. We observe that α d,s ( U ) = 0 unless both d ≤ | U | and s ≤ | E [ U ] | . From (5)it is thus immediate that α ,s ( U ) + α ,s ( U ) + . . . + α | U | ,s ( U ) = (cid:18) | E [ U ] | s (cid:19) . Put othewise, the connected case d = 1 can be solved via the disconnected cases d = 2 , , . . . , | U | by(6) α ,s ( U ) = (cid:18) | E [ U ] | s (cid:19) − α ,s ( U ) − . . . − α | U | ,s ( U ) . The disconnected cases d = 2 , , . . . , | U | can in turn can be solved via the cases W (cid:40) U . Indeed,let us observe that(7) α d,s ( U ) = 1 d s (cid:88) t =0 (cid:88) ∅(cid:54) = W (cid:40) U α ,t ( W ) α d − ,s − t ( U \ W ) . To justify (7), observe that an arbitrary d -component subgraph with s edges and vertex set U hasexactly d choices for the vertex set W of a connected component; this connected component withvertex set W has t edges for exactly one choice of t = 0 , , . . . , s , leaving s − t edges and the vertexset U \ W for the other d − W and thesubgraph on U \ W are independent of each other.4.3. Partitioning the connected case by rank via hyperplane sieving.
We now extend therecurrence (5) to distinguish between the ranks | U | − | U | in the connected case α ,s ( U ). Thatis, we will partition the α ,s ( U ) sets S ⊆ E [ U ] into two classes:(i) the sets S for which M [ S ] has full rank | U | , and(ii) the sets S for which M [ S ] has rank | U | −
1; that is, a rank-deficiency of one from full rank.From the Rank–Nullity Theorem, we know that the null space of a matrix has dimension one ifthe matrix has a rank deficiency of one from full rank, whereas the null space is trivial if thematrix has full rank. Hence, we observe that case (ii) occurs if and only if every column of thematrix M [ S ] belongs to a hyperplane (cid:80) v ∈ V h ( v ) x v = 0 defined by a not-identically-zero function h : V → F that is unique up to multiplication by a nonzero scalar. Moreover, since the multigraph( U, S ) is connected, we observe that the support H = { v ∈ V : h ( v ) (cid:54) = 0 } must contain the set U ;indeed, otherwise by connectedness there exists an edge in e ∈ S that joins a vertex w ∈ H with avertex w ∈ U \ H , which is a contradiction since then (cid:80) v ∈ V h ( v ) m ve = h ( w ) m w e + h ( w ) m w e = h ( w ) m w e (cid:54) = 0 and thus the column M [ e ] does not lie in the hyperplane defined by h . Accordingly,we may assume that in case (ii) the hyperplane is defined by a function h : U → F \ { } that isunique up to multiplication by a nonzero scalar. Our strategy is now to count the case (ii) by sieving over all possible functions h : U → F \ { } ,restricting (5) accordingly for each choice of h , and finally to compensate for the overcount bydividing with the number q − F . Towards this end, for nonempty U ⊆ V , h : U → F \ { } , and S ⊆ E [ U ], define the h - restriction of S by(8) S h = (cid:26) e ∈ S : (cid:88) v ∈ U h ( v ) m ve = 0 (cid:27) . We obtain the h -restricted version of (5) by defining, for d = 1 , , . . . , k and s = 0 , , . . . , m ,(9) α hd,s ( U ) = (cid:12)(cid:12)(cid:8) S ⊆ E [ U ] h : c ( U, S ) = d , | S | = s (cid:9)(cid:12)(cid:12) . We observe that α hd,s ( U ) = 0 unless both d ≤ | U | and s ≤ | E [ U ] h | . From (9) it is immediate that α h ,s ( U ) + α h ,s ( U ) + . . . + α h | U | ,s ( U ) = (cid:18) | E [ U ] h | s (cid:19) . Similarly to (6), the connected case d = 1 can be solved via the disconnected cases d = 2 , , . . . , | U | by(10) α h ,s ( U ) = (cid:18) | E [ U ] h | s (cid:19) − α h ,s ( U ) − . . . − α h | U | ,s ( U ) . Similarly to (7), the disconnected cases d = 2 , , . . . , | U | can in turn can be solved via the cases W (cid:40) U . For nonempty W ⊆ U and h : U → F \ { } , let us write h W for the restriction of h to W .We have(11) α hd,s ( U ) = 1 d s (cid:88) t =0 (cid:88) ∅(cid:54) = W (cid:40) U α h W ,t ( W ) α h U \ W d − ,s − t ( U \ W ) . We are now ready to split into the cases (i) and (ii). Since h : U → F \ { } is unique up tomultiplication by a nonzero scalar, for nonempty U ⊆ V and s = 0 , , . . . , m , we have that case (ii)is counted by(12) β (ii) s ( U ) = 1 q − (cid:88) h : U → F \{ } α h ,s ( U ) . Case (i) is thus counted by(13) β (i) s ( U ) = α ,s ( U ) − β (ii) s ( U ) . Counting by rank and number of edges via connected components.
Let us next usethe coefficients β (i) s ( U ) and β (ii) s ( U ) to derive a recurrence for the coefficients τ r,s in (4). Let us write c (i) ( U, S ) and c (ii) ( U, S ) for the number of components of type (i) and (ii) in (
U, S ), respectively.For nonempty U ⊆ V , d (i) = 0 , , . . . , k , d (ii) = 0 , , . . . , k , and s = 0 , , . . . , m , define(14) σ d (i) ,d (ii) ,s ( U ) = (cid:12)(cid:12)(cid:8) S ⊆ E [ U ] : c (i) ( U, S ) = d (i) , c (ii) ( U, S ) = d (ii) , | S | = s (cid:9)(cid:12)(cid:12) . We observe that σ d (i) ,d (ii) ,s ( U ) = 0 unless both 1 ≤ d (i) + d (ii) ≤ | U | and s ≤ | E [ U ] | . Since eachcomponent of type (ii) contributes a rank-deficiency of one, from (14) and (4) we observe that(15) τ r,s = k (cid:88) d (i) =0 σ d (i) ,k − r,s ( V ) , so it suffices to have a recurrence for computing the coefficients (14). Towards this end, let U ⊆ V be nonempty. For d (i) = 0 , , . . . , | U | , d (ii) = 0 , , . . . , | U | , and s = 0 , , . . . , | E [ U ] | , we have (16) σ d (i) ,d (ii) ,s ( U ) = β (i) s ( U ) if d (i) = 1 and d (ii) = 0; β (ii) s ( U ) if d (i) = 0 and d (ii) = 1; d (i) (cid:80) st =0 (cid:80) ∅(cid:54) = W (cid:40) U β (i) t ( W ) σ d (i) − ,d (ii) ,s − t ( U \ W ) if d (i) ≥ d (i) , d (ii) ≥ d (ii) (cid:80) st =0 (cid:80) ∅(cid:54) = W (cid:40) U β (ii) t ( W ) σ d (i) ,d (ii) − ,s − t ( U \ W ) if d (ii) ≥ d (i) , d (ii) ≥ . Indeed, the multigraph (
U, S ) for an arbitrary S ⊆ E [ U ] with | S | = s splits uniquely into d (i) and d (ii) connected components of types (i) and (ii), respectively. When d (i) + d (ii) = 1, thisconnected component is unique and enumerated either by β (i) s ( U ) or by β (ii) s ( U ). When d (i) ≥ d (i) , d (ii) ≥
1, there are exactly d (i) choices for the vertex set W of a connected component of type (i);this connected component with vertex set W has t edges for exactly one choice of t = 0 , , . . . , s ,leaving s − t edges and the vertex set U \ W for the other d (i) − d (ii) components of type (ii). When d (ii) ≥ d (i) , d (ii) ≥
1, there are exactly d (ii) choices forthe vertex set W of a connected component of type (ii); this connected component with vertex set W has t edges for exactly one choice of t = 0 , , . . . , s , leaving s − t edges and the vertex set U \ W for the other d (ii) − d (i) components of type (i).4.5. Fast evaluation of the recurrences.
This section completes the proof of Theorem 4. Byassumption, we have m = k O (1) . Recall also that we write q for the number of elements in the finitefield F . It remains to show that we can compute the coefficients σ r,s ( V ) = τ r,s for r = 0 , , . . . , k and s = 0 , , . . . , m in time and space q k k O (1) .Following Bj¨orklund et al. [5], we recall that in time 2 k k O (1) we can compute the coefficients α d,s ( U ) in (5) for all nonempty U ⊆ V , d = 1 , , . . . , k , and s = 0 , , . . . , m . The computationproceeds one level (cid:96) = 1 , , . . . , k at a time, where at level (cid:96) we solve for all the coefficients α d,s ( U )with | U | = (cid:96) . The base case (cid:96) = 1 with α ,s ( U ) = (cid:0) | E [ U ] | s (cid:1) is immediate. For (cid:96) ≥
2, we assume thevalues at all the previous levels 1 , , . . . , (cid:96) − s = 0 , , . . . , m , we apply fast subset convolution [4] on (7) for each t = 0 , , . . . , s using the already computed values to obtain the disconnected cases d = 2 , , . . . , (cid:96) for all U ⊆ V with | U | = (cid:96) . Then, for each U ⊆ V with | U | = (cid:96) and s = 0 , , . . . , m , we solve for the connectedcase d = 1 using (6). Since m = k O (1) , this takes 2 k k O (1) time in total. Since there are k levels, wehave that all the coefficients α d,s ( U ) can be computed in 2 k k O (1) ≤ q k k O (1) total time.Next, let us study the h -restricted coefficients α hd,s ( U ) in (9). First, we observe from the BinomialTheorem that there are exactly q k = ( q − k = (cid:80) k(cid:96) =0 (cid:0) k(cid:96) (cid:1) ( q − (cid:96) k − (cid:96) functions h : U → F \ { } with U ⊆ V . Accordingly and with foresight, let us work with the following one-to-onecorrespondence. For nonempty U ⊆ V , identify a function h : U → F \ { } with the nonzero vector¯ h ∈ F V ∼ = F k defined for all v ∈ V by(17) ¯ h v = (cid:40) h ( v ) if v ∈ U ;0 otherwise . In particular, the domain U of h is exactly the support of ¯ h . Thus, we can write ¯ α d,s (¯ h ) = α hd,s ( U )and accordingly view ¯ α d,s : F k → Z as a function that assigns an integer value ¯ α d,s (¯ h ) to each¯ h ∈ F k , with the tacit convention that the all-zero vector is assigned to zero.To compute the values of ¯ α d,s on each nonzero vector ¯ h ∈ F k , let us again proceed one level (cid:96) = 1 , , . . . , k at a time, where at level (cid:96) we solve for all the values ¯ α d,s (¯ h ) where ¯ h has exactly (cid:96) nonzero entries. The base case (cid:96) = 1 with ¯ α ,s (¯ h ) = (cid:0) | E [ U ] h | s (cid:1) is immediate. For (cid:96) ≥
2, we assumethe values at all the previous levels 1 , , . . . , (cid:96) − follows. Introduce an arbitrary total order ≤ into F with the property that 0 ∈ F is the minimumelement in this order. Partially order F k by taking the direct product of k copies of ( F , ≤ ). Thispartial order is a lattice with q k elements, ( q − k of which are join-irreducible. In particular,this enables us to compute the join-product of two functions ¯ φ, ¯ ψ : F k → Z in q k +1 k O (1) arithmeticoperations using fast M¨obius inversion [6]. More precisely, for two vectors ¯ f , ¯ g ∈ F k , define the join ¯ f ∨ ¯ g ∈ F k to be the element-wise ≤ -maximum of ¯ f and ¯ g . The join-product ¯ φ ∨ ¯ ψ : F k → Z isdefined for all h ∈ F k by(18) ( ¯ φ ∨ ¯ ψ )(¯ h ) = (cid:88) ¯ f, ¯ g ∈ F k : ¯ f ∨ ¯ g =¯ h ¯ φ ( ¯ f ) ¯ ψ (¯ g ) . For a function ¯ φ : F k → Z and (cid:96) = 0 , , . . . , k , define the weight (cid:96) part of ¯ φ to be the function[ ¯ φ ] (cid:96) : F k → Z defined for all ¯ h ∈ F k by(19) [ ¯ φ ] (cid:96) (¯ h ) = (cid:40) ¯ φ (¯ h ) if ¯ h has exactly (cid:96) nonzero entries;0 otherwise . From the correspondence (17), the definitions (18) and (19), as well as the recurrence (11), we thusobserve that for d = 2 , , . . . , k and s = 0 , , . . . , m we have(20) (cid:2) ¯ α d,s (cid:3) (cid:96) = 1 d (cid:96) − (cid:88) j =1 s (cid:88) t =0 (cid:2)(cid:2) ¯ α ,t (cid:3) j ∨ (cid:2) ¯ α d − ,s − t (cid:3) (cid:96) − j (cid:3) (cid:96) . In particular, using fast join products [6] on (20), we can solve for the disconnected cases d =2 , , . . . , k for all s = 0 , , . . . , m , h : U → F \ { } and U ⊆ V with | U | = (cid:96) in total time q k +1 k O (1) .We can thus solve the connected case d = 1 via (10) to achieve total time q k +1 k O (1) at level (cid:96) .Since there are k levels, we achieve total time q k +1 k O (1) to compute all the values α hd,s ( U ) andhence all the values β (i) s ( U ) and β (ii) s ( U ) via (13) and (12). Finally, we solve for the coefficients τ r,s in (4) using (15) and the recurrence (16) for the coefficients σ d (i) ,d (ii) ,s in (14). In particular, therecurrence (16) can be evaluated in time 2 k k O (1) using fast subset convolution [5]. Thus, the entirealgorithm runs in time q k +1 k O (1) . This completes the proof of Theorem 4. (cid:3) Acknowledgments
We thank the anonymous reviewers of an earlier version of this manuscript for their usefulremarks and questions that led to Theorem 4.
References [1] M. Aguiar and S. Mahajan.
Topics in Hyperplane Arrangements , volume 226 of
Mathematical Surveys andMonographs . American Mathematical Society, Providence, RI, 2017.[2] L. Babai and V. T. S´os. Sidons sets in groups and induced subgraphs of Cayley graphs.
Europ. J. Combinatorics ,6:101–114, 1985.[3] N. Biggs.
Algebraic Graph Theory . Cambridge Mathematical Library. Cambridge University Press, Cambridge,second edition, 1993.[4] A. Bj¨orklund, T. Husfeldt, P. Kaski, and M. Koivisto. Fourier meets M¨obius: fast subset convolution. In D. S.Johnson and U. Feige, editors,
Proceedings of the 39th Annual ACM Symposium on Theory of Computing, SanDiego, California, USA, June 11-13, 2007 , pages 67–74. ACM, 2007.[5] A. Bj¨orklund, T. Husfeldt, P. Kaski, and M. Koivisto. Computing the Tutte polynomial in vertex-exponentialtime. In , pages 677–686. IEEE Computer Society, 2008.[6] A. Bj¨orklund, T. Husfeldt, P. Kaski, M. Koivisto, J. Nederlof, and P. Parviainen. Fast zeta transforms for latticeswith few irreducibles.
ACM Trans. Algorithms , 12(1):4:1–4:19, 2016.[7] C. Brand, H. Dell, and M. Roth. Fine-grained dichotomies for the Tutte plane and Boolean
Algorithmica ,81(2):541–556, 2019. [8] T. H. Brylawski. A decomposition for combinatorial geometries. Trans. Amer. Math. Soc. , 171:235–282, 1972.[9] H. H. Crapo. The Tutte polynomial.
Aequationes Math. , 3:211–229, 1969.[10] H. H. Crapo and G.-C. Rota.
On the Foundations of Combinatorial Theory: Combinatorial geometries . TheM.I.T. Press, Cambridge, Mass.-London, preliminary edition, 1970.[11] R. Curticapean. Block interpolation: A framework for tight exponential-time counting complexity.
Inf. Comput. ,261(Part):265–280, 2018.[12] M. Cygan, F. V. Fomin, A. Golovnev, A. S. Kulikov, I. Mihajlin, J. Pachocki, and A. Socala. Tight lower boundson graph embedding problems.
J. ACM , 64(3):18:1–18:22, 2017.[13] H. Dell, T. Husfeldt, D. Marx, N. Taslaman, and M. Wahlen. Exponential time complexity of the permanentand the Tutte polynomial.
ACM Trans. Algorithms , 10(4):21:1–21:32, 2014.[14] A. Dimca.
Hyperplane Arrangements . Universitext. Springer, Cham, 2017. An introduction.[15] G. E. Farr. Tutte-Whitney polynomials: some history and generalizations. In
Combinatorics, Complexity, andChance , volume 34 of
Oxford Lecture Ser. Math. Appl. , pages 28–52. Oxford Univ. Press, Oxford, 2007.[16] J. Flum and M. Grohe.
Parameterized Complexity Theory . Texts in Theoretical Computer Science. An EATCSSeries. Springer-Verlag, Berlin, 2006.[17] F. V. Fomin, D. Lokshtanov, I. Mihajlin, S. Saurabh, and M. Zehavi. Computation of Hadwiger number andrelated contraction problems: Tight lower bounds. In A. Czumaj, A. Dawar, and E. Merelli, editors, , volume 168 of
LIPIcs , pages 49:1–49:18. Schloss Dagstuhl - Leibniz-Zentrum f¨urInformatik, 2020.[18] C. Godsil and G. Royle.
Algebraic Graph Theory , volume 207 of
Graduate Texts in Mathematics . Springer-Verlag,New York, 2001.[19] L. A. Goldberg and M. Jerrum. Inapproximability of the Tutte polynomial.
Inform. and Comput. , 206(7):908–929, 2008.[20] R. Impagliazzo and R. Paturi. Complexity of k -SAT. In Proceedings of the 14th Annual IEEE Conference onComputational Complexity, Atlanta, Georgia, USA, May 4-6, 1999 , pages 237–240. IEEE Computer Society,1999.[21] R. Impagliazzo, R. Paturi, and F. Zane. Which problems have strongly exponential complexity?
J. Comput.Syst. Sci. , 63(4):512–530, 2001.[22] F. Jaeger, D. L. Vertigan, and D. J. A. Welsh. On the computational complexity of the Jones and Tuttepolynomials.
Math. Proc. Cambridge Philos. Soc. , 108(1):35–53, 1990.[23] L. Kowalik and A. Socala. Assigning channels via the meet-in-the-middle approach. In R. Ravi and I. L. Gørtz,editors,
Algorithm Theory - SWAT 2014 - 14th Scandinavian Symposium and Workshops, Copenhagen, Denmark,July 2-4, 2014. Proceedings , volume 8503 of
Lecture Notes in Computer Science , pages 282–293. Springer, 2014.[24] R. Lidl and H. Niederreiter.
Finite Fields , volume 20 of
Encyclopedia of Mathematics and its Applications .Addison-Wesley Publishing Company, Advanced Book Program, Reading, MA, 1983. With a foreword by P. M.Cohn.[25] P. Orlik and H. Terao.
Arrangements of Hyperplanes , volume 300 of
Grundlehren der Mathematischen Wis-senschaften [Fundamental Principles of Mathematical Sciences] . Springer-Verlag, Berlin, 1992.[26] J. Oxley.
Matroid Theory , volume 21 of
Oxford Graduate Texts in Mathematics . Oxford University Press, Oxford,second edition, 2011.[27] P. Traxler. The time complexity of constraint satisfaction. In M. Grohe and R. Niedermeier, editors,
Param-eterized and Exact Computation, Third International Workshop, IWPEC 2008, Victoria, Canada, May 14-16,2008. Proceedings , volume 5018 of
Lecture Notes in Computer Science , pages 190–201. Springer, 2008.[28] W. T. Tutte. A ring in graph theory.
Proc. Cambridge Philos. Soc. , 43:26–40, 1947.[29] W. T. Tutte. The dichromatic polynomial. In
Proceedings of the Fifth British Combinatorial Conference (Univ.Aberdeen, Aberdeen, 1975) , pages 605–635, 1976.[30] A. Vardy. The intractability of computing the minimum distance of a code.
IEEE Trans. Inform. Theory ,43(6):1757–1766, 1997.[31] D. Vertigan. Bicycle dimension and special points of the Tutte polynomial.
J. Combin. Theory Ser. B , 74(2):378–396, 1998.[32] J. von zur Gathen and J. Gerhard.
Modern Computer Algebra . Cambridge University Press, Cambridge, thirdedition, 2013.[33] D. J. A. Welsh.
Matroid Theory . Academic Press [Harcourt Brace Jovanovich, Publishers], London-New York,1976. L. M. S. Monographs, No. 8.[34] D. J. A. Welsh.
Complexity: Knots, Colourings and Counting , volume 186 of