Graph Homomorphism Polynomials: Algorithms and Complexity
GGraph Homomorphism Polynomials: Algorithms and Complexity
Balagopal Komarath ∗ Anurag Pandey † C. S. Rahul ‡ November 17, 2020
Abstract
We study homomorphism polynomials, which are polynomials that enumerate all homomor-phisms from a pattern graph H to n -vertex graphs. These polynomials have received a lot ofattention recently for their crucial role in several new algorithms for counting and detecting graphpatterns, and also for obtaining natural polynomial families which are complete for algebraiccomplexity classes VBP , VP , and VNP . We discover that, in the monotone setting, the formulacomplexity, the ABP complexity, and the circuit complexity of such polynomial families areexactly characterized by the treedepth, the pathwidth, and the treewidth of the pattern graphrespectively.Furthermore, we establish a single, unified framework, using our characterization, to collectseveral known results that were obtained independently via different methods. For instance,we attain superpolynomial separations between circuits, ABPs, and formulas in the monotonesetting, where the polynomial families separating the classes all correspond to well-studiedcombinatorial problems. Moreover, our proofs rediscover fine-grained separations between thesemodels for constant-degree polynomials. The characterization additionally yields new space-timeefficient algorithms for several pattern detection and counting problems. ∗ [email protected] , Saarland University, Saarland Informatics Campus, Germany † [email protected] , Max-Planck Institut f¨ur Informatik, Saarland Informatics Campus, Germany ‡ [email protected] , BITS Pilani – Dubai Campus, UAE a r X i v : . [ c s . CC ] N ov Introduction
This work is a culmination of exploration of four themes in combinatorics, algorithm design, andalgebraic complexity – graph algorithms, homomorphism polynomials, graph parameters, andmonotone computations. While each of these themes are of independent interest, a strong interplayamong them has become quite apparent in the recent years, and has lead to several new advancementsin algorithms and complexity.The first theme is of graph algorithms , where the algorithms that are relevant to this work arethose corresponding to pattern detection and counting. Loosely speaking, in such problems, welook for the “presence” of a graph H , called the pattern graph in another graph G , called the hostgraph . The notions of presence of one graph in another graph that have been the most prevalentare subgraph isomorphism, induced subraph isomorphism, and homomorphism. In detection andcounting algorithms for subgraph isomorphism (resp. induced subgraph isomorphism), we want todetect and count subgraphs (resp. induced subraphs) of an n -vertex host graph which is isomorphic to the pattern graph. Whereas, while looking for the occurrence of the pattern graph in the hostgraph, if we relax the mapping to allow multiple vertices in the pattern graph to be mapped toa single vertex in the host graph, while preserving the edge relations, we get a homomorphism ofthe pattern graph in the host graph. When the notion is homomorphism, then we are interested indetecting and counting homomorphisms from the pattern graph to the host graph.All the above mentioned problems have found many applications, both in theory and practice.For instance, detecting and counting (induced) subgraph isomorphisms are used in extremal graphtheory in the study of dense graphs and quasirandom graphs [CGW89, Lov12, LS08], and inmany applications which boil down to analyzing real-world graphs. This includes finding proteininteractions in biomolecular networks [ADH +
08, MSOI + + +
06] for a survey). When boththe host graph and the pattern graph are parts of the input, then it can be shown that all thesepattern detection problems are NP -complete, since they generalize the CLIQUE problem, whereasthe corresponding counting problems are all known to be P -complete. On the other hand, inalmost all the real-world applications pointed above, we have a fixed pattern graph which we aretrying to detect or count in a given host graph. Thus, in this work, we focus on the setting whenthe pattern graph is a fixed graph, and the host graph is a part of the input, Here, since thepattern graph is of a fixed size, say its number of vertices is k , all the above problems can besolved using a trivial algorithm, based on exhaustive search, that runs in time O ( n k ) and space O (log( n )) where n is the number of vertices in the host graph. However, in almost all the real-worldapplications pointed above, the host graph is massive, and hence one desires faster algorithms,preferably linear or even sub-linear algorithms. Hence, there is a lot of interest and advancesin improving upon this trivial algorithm using ideas from combinatorics, algebraic circuits, andmachine learning (see [MP14] for a survey, also see [BKS18, LPH +
20] and references therein).In fact, these problems are also very interesting from the perspective of complexity theory. Forinstance, it is conjectured that the best known algorithms for variants of these pattern detectionand counting problems can not be further improved. If true, this would imply P (cid:54) = NP in arather strong way (see [LRR17, Mar10, Ros18, KR20]). Recently, it was discovered by Curticapean, In this paper, the pattern graph and the host graph are always simple, undirected graphs. homomorphism polynomials , corresponds to one of the most successful waysby which progress has been made towards homomorphism problems, and hence towards (induced)subgraph isomorphism problems too. For a pattern graph H and a host graph G , the homomorphismpolynomial is the polynomial whose monomials enumerate homomorphisms from H to G . Forusing homomorphism polynomials for obtaining new algorithms for the above graph problems for apattern graph H , it suffices to consider the homomorphism polynomial from H to K n , the cliqueon n vertices. Thus, we call the homomorphism polynomial from H to K n as the homomorphismpolynomial of H (see Definition 6 for a formal definition). It turns out that efficient arithmeticcircuit (see Section 2 for definition) constructions of homomorphism polynomials can be used toobtain almost all known better algorithms for detecting induced subgraph isomorphisms as well (See[BKS18], also [KKM00, KLL13, FKLL15a, WWWY15]). Therefore, the study of homomorphismpolynomials is a crucial area of study within graph pattern detection and counting. Homomorphismpolynomials also turned out to be extremely useful in algebraic complexity theory in the quest forfinding natural complete polynomial families for the complexity class VP (the algebraic complexityanalog of P . See [Sap15]). Homomorphism polynomials yield polynomial families that are completefor important algebraic complexity classes such as VBP , VP , and VNP through a single framework,simply by considering different pattern graphs [DMM +
16, MS18, CLV19], making it important notonly from the perspective of algorithm design, but also from the perspective of complexity theory.Homomorphism polynomials are thus the central focus of this work too.In our third theme, that is of graph parameters , the parameters relevant to this work aretreewidth, pathwidth, and treedepth of graphs. Treewidth, loosely speaking, is a measure of how fara graph is from being a tree; similarly the pathwidth measures how far a graph is from being a path;and treedepth measures how far a graph is from being a star (see Section 2 for definitions). Theconnection between the parameters treewidth and pathwidth and counting homomorphisms wasfirst explored in [DST02] (also see [BKS18, MS18]), where it is shown that when H has boundedtreewidth, then there are small-sized arithmetic circuits for homomorphism polynomials, whereaswhen H has small pathwidth, then the corresponding homomorphism polynomials have small-sized algebraic branching programs (ABPs, defined in Section 2). These improved constructions for circuitsand ABPs are one of the main source of advancement in finding improved algorithms for these patterndetection and counting problems [BKS18, KKM00, KLL13, FKLL15a, WWWY15]. The connectionbetween the subgraph isomorphism problem and treedepth has also been explored in the context ofBoolean computational models in [LRR17] and [KR20], where they discuss treewidth and treedepthbased upper bounds and lower bounds for counting subgraph isomorphisms for Boolean circuitsand formulas. In the context of parameterized counting complexity of these problems, a strongerconnection between treewidth and the complexity of counting homomorphisms was established byDalmau and Jonsson [DJ04] who showed a dichotomy theorem stating that when the pattern graphhas bounded treewidth, then we can count homomorphisms in polynomial time, otherwise, we canshow VP , VBP , and VNP too. More specifically, thecomplete polynomials for VP and VBP were homomorphism polynomials corresponding to specificpattern graphs of bounded treewidth and bounded pathwidth respectively. Thus, one sees that in thecontext of these pattern detection and counting problems, and in the homomorphism polynomialsof interest, these graph parameters of the pattern graph ubiquitously pop up over and over again2s the crucial complexity parameters. This made us wonder, to what extent do these parametersdictate the complexity of these problems and, in particular, the homomorphism polynomials.Towards this, the starting point of our work is the observation that all the improved arithmeticcircuit constructions of homomorphism polynomials based on treewidth and pathwidth, do notuse any negative constants in the circuit. This brings us to our final theme, that is, of monotonecomputation .In the Boolean setting, monotone computations refer to computations that do not involvenegation operation, the NOT gate. Similarly, in the algebraic setting for computing polynomials,monotone arithmetic circuits correspond to circuits that do not use negative constants or subtractiongate, that is, there is no cancellation involved in the circuit. Monotone computations are interestingfor three main reasons. First reason is that monotone operations have favorable stability propertieswith respect to rounding errors [Sch76]. Secondly, an improved monotone circuit, since it doesnot use any cancellations and hence algebraic identities, requires combinatorial insights, and oftenleads to interesting combinatorial algorithms for the problem at hand. Such constructions oftenreveal interesting combinatorial insights about the problem. For instance, Grenet’s monotonealgebraic branching program construction of the permanent polynomial [Gre12]. Finally, theweakness of monotone models resulting from the lack of cancellations, makes them significantlyeasier to understand. As a consequence, monotone computations are much better understood, bothin the Boolean and the algebraic setting, and hence have been used as a starting point towardsunderstanding the general model. Indeed, we know exponential lower bounds as well as separationsbetween important complexity classes when we restrict ourselves to the monotone setting, in contrastto the embarrassingly poor understanding that we have in the general setting. In particular, Schnorr[Sch76] showed an exponential lower bound for the clique polynomial, which happens to be aspecial case of homomorphism polynomial, where the pattern graph is a clique. Moreover, we knowsuperpolynomial separations between complexity classes mVF and mVBP [Sni80], mVBP and mVP [HY16], and finally, very recently, between mVP and mVNP [Yeh19]. None of these separationsare settled in the non-monotone setting. Moreover, the best known circuit lower bound in thenon-monotone setting is just Ω( n log n ) [BS83]. Thus, apart from the special interests in algorithmsbased on improved monotone circuits, from the perspective of lower bounds too, it makes sense tofirst study monotone models, as a first step towards getting lower bounds for the general model.Many times, the best upper bounds also first come in the monotone setting. For instance, the bestknown upper bound for the permanent polynomial for ABPs is a monotone construction [Gre12].In fact, for our central problem of interest, that is, computing homomorphism polynomial, in a lotof settings, the best known upper bounds are still those via monotone constructions .This motivated us to pursue the concrete question of whether these treewidth and pathwidthbased improved monotone arithmetic circuits for homomorphisms polynomials can further beimproved, and to what extent would these graph parameters dictate it. The answer that wediscovered turns out to be conceptually quite satisfying, and settles the problem completely. mVF , mVBP and mVP refer to the class of polynomial families computable by poly-sized monotone arithmeticformulas, monotone algebraic branching programs, and monotone arithmetic circuits, respectively. mVNP refers to themonotone analog of the complexity class VNP . We can get the O ( n ω ) upper bound corresponding to the pattern graphs with treewidth = 2 [CDM17], and O ( n kω/ ) for all k -vertex graphs [NP85], where ω is the exponent of matrix multiplication For large pattern graphswith treewidth >
2, the monotone constructions are the best known. .1 Our contributions In this work, we fully solve the question of monotone complexity of homomorphism polynomials byshowing that they are completely determined by the aforementioned graph parameters.For arithmetic circuits, we discover that the treewidth of the pattern graph exactly determinesthe monotone complexity of its homomorphism polynomial, by establishing that the treewidth basedupper bound in [DST02, MS18, BKS18] is also a lower bound.
Theorem 1.
The monotone arithmetic circuit complexity of homomorphism polynomial for a patterngraph H is Θ( n tw ( H )+1 ) , where tw ( H ) is the treewidth of H . In the case of algebraic branching programs, we find that the pathwidth of the pattern graph is theparameter controlling the monotone complexity of its homomorphism polynomial, again by provinga lower bound that exactly matches the pathwidth based upper bound in [DST02, MS18, BKS18].
Theorem 2.
The monotone ABP complexity of homomorphism polynomial for a pattern graph H is Θ( n pw ( H )+1 ) , where pw ( H ) is the pathwidth of H . Finally, for monotone formulas, it is the treedepth of the pattern graph which governs thecomplexity of its homomorphism polynomial.
Theorem 3.
The monotone formula complexity of homomorphism polynomial for a pattern graph H is Θ( n td ( H ) ) , where td ( H ) is the treedepth of H . Hence, we resolve the question of monotone complexity of homomorphism polynomials com-pletely by showing that treewidth, pathwidth and treedepth exactly characterize the complexity ofhomomorphism polynomials for arithmetic circuits, ABPs, and arithmetic formulas respectively.This also answers the conceptual question raised earlier asking to what extent do these graphparameters dictate the complexity of these homomorphism polynomials.
Remark . It is worth noting that in the Boolean setting, while there are known upper bounds andlower bounds based on these graph parameters for circuits and formulas for (colored) subgraphisomorphism problem, there is still an asymptotic gap between the upper bound and the correspondinglower bounds in these Boolean models (see [LRR17, KR20]). Moreover, our lower bound techniquesare very different from those in the Boolean models.The characterization, in addition to giving several new lower bounds, in particular, also allowsus to collect, through a unified framework, several classical and recent results for the monotonecomplexity of polynomials, obtained independently using different methods, over several decades.This is simply because the above theorems imply that for every family of pattern graph with hightreewidth, pathwidth, or treedepth, the corresponding homomorphism polynomial family will havehigh circuit complexity, ABP complexity, or formula complexity, respectively. From the algorithmicperspective, the formula upper bounds on homomorphism polynomials allows us to discover efficientspace-time algorithms for several variants of pattern detection and counting. • As a first example, applying Theorem 1 and Theorem 2 in very special cases, we reproducethe superpolynomial separation between arithmetic circuits and algebraic branching programs,first discovered by Hrubes and Yehudayoff [HY16]. • In the same spirit, we also manage to reattain the superpolynomial separation betweenalgebraic branching programs and arithmetic formulas in the monotone setting, using simpleapplications of Theorem 2 and Theorem 3. This was previously known as a consequence of aresult by Snir [Sni80]. 4
Our characterization, in particular, also rediscovers the fine-grained separations betweenall these models for constant-degree polynomials. That is, for every constant d , we get apolynomial family such that it is computable by linear-sized monotone arithmetic circuits,but any monotone ABP computing it must be of size at least n d . Analogously, for everyconstant d , we get a polynomial family computable by linear-sized monotone ABP but anymonotone arithmetic formula computing it must be of size at least n d . Earlier, such fine-grainedseparations could be obtained by applying the results of [Sni80] and [HY16] together. • Another simple application of Theorem 1 yields an exponential lower bound against monotonearithmetic circuits for the clique polynomial CL n,n , which enumerates all cliques of size n ina 2 n -vertex clique, first proved by Schnorr [Sch76, Theorem 4.4]. • The formula upper bound for homomorphism polynomial yields algorithms for countinghomomorphisms that run in time O ( n k − ) and space O (log ( n )) for all patterns except cliques.This also implies better algorithms for counting subgraph isomorphisms and detecting inducedsubgraph isomorphisms using some observations made in [BKS18]. Prior to this, an algorithmthat runs in O ( n . k + o ( k ) ) time for counting subgraph isomorphism was known [CDM17].This, however, uses polynomial space in its execution. For a related problem, that is, detectingcolored subgraph isomorphisms, such efficient space-time algorithms followed as a consequenceof small-sized treedepth based Boolean formulas (see [KR20]).
For our lower bound techniques used in proving Theorem 1, 2 and 3, it turns out that it is easier towork with the so-called colored subgraph isomorphism polynomials instead of the homomorphismpolynomials. So, we first show that for proving lower bounds for homomorphism polynomials, it issufficient to consider the colored subgraph isomorphism polynomial. We establish this by provingthat for fixed-size pattern graphs (say, the number of vertices is k ), their complexity is the same inall the three models that we consider, arithmetic circuits, ABPs, and formulas (see Lemma 1).Now, for the lower bound in Theorem 1, we successfully answer the question – in how manymonomial computations can a single gate participate? Our main technical contribution is to establishthat the answer to this question is dictated by the treewidth of the pattern graph (proof of Theorem4). For this we start with an arbitrary monomial computation (more precisely, parse trees, discussedin Section 2) in an arbitrary circuit computing the polynomial and use it carefully to construct theso-called tree decomposition (Definition 9) of the pattern graph H . Then, if the number of verticesin H is k , and its treewidth is tw ( H ), we argue that a gate can participate in the computation of atmost n k − tw ( H ) − monomials. We show this by using a weakness of monotone computation that,due to the absence of cancellations, any circuit computing a polynomial cannot compute an invalidsubmonomial at any intermediate gate along the way. This weakness is exploited in almost allknown monotone lower bounds, and dates back to Jerrum and Snir [JS82].For proving the lower bounds in Theorem 2 and 3 for formulas and ABPs, we are able to use thesame framework as above. Instead of constructing a tree decomposition using the parse trees, weconstruct a path decomposition (Definition 9) in case of ABPs, and an elimination tree (Definition10) in case of formulas. Using the similar weakness of monotone computation, we conclude that thenumber of monomials whose computation a gate can participate in is upper bounded by n k − pw ( H ) − in case of ABPs, and by n k − td ( H ) in case of formulas, where pw ( H ) and td ( H ) denote the pathwidthand the treedepth of H respectively. an invalid submonomial is a monomial m which does not divide any of the monomial of the target polynomial
5o obtain the upper bounds claimed in Theorem 1, 2 and 3, we note that the upper bounds forcircuits and ABPs that were already known are both monotone constructions, and they go via thetree decomposition and the path decomposition of the pattern graph in case of circuits and ABPsrespectively [DST02, BKS18, MS18]. We give the formula upper bound using the elimination treeof the pattern graph. A treedepth based monotone formula upper bound is folklore in the Booleansetting. We believe that our formula construction in the arithmetic formula uses similar ideas.To prove the separation between monotone complexity classes, we observe that pattern graphswith high pathwidth but low treewidth yield superpolynomial separation between circuits and ABPs(discussed in Theorem 7), whereas pattern graphs with high treedepth but low pathwidth givesuperpolynomial separation between ABPs and formulas (described in Theorem 8). For the firstseparation, we use a tree as the pattern graph, whereas for the second separation, we use pathas the pattern graph. For an exponential lower bound on the clique polynomial, we simply applyTheorem 1 in combination with the fact that the treewidth of a clique on n vertices is n − n k − time (see Theorems 10, 11 and 12). Comparison with previous techniques:
As mentioned above, a lot of monotone lower bounds(eg. [JS82, HY16]) at their core, use that due to the lack of cancellation, any circuit (resp. ABPor formula) computing a polynomial cannot compute an invalid submonomial at any intermediategate along the way. The central idea behind all the lower bounds that use this weakness is toargue, depending on the polynomials they are working with, that certain gates cannot participatein the computation of too many monomials. It is here that we differ from the known lowerbound proofs. Since we are working with homomorphism polynomials, we needed something abouthomomorphism polynomials that help us argue about it. Here, our main conceptual contributionto the proof technique is a method to construct a tree decomposition (resp. path decompositionand elimination forest) for the pattern graph from a parse tree associated with a monomial in thecorresponding homomorphism polynomial. From the perspective of proving superpolynomial lowerbounds, comparing it with [HY16, Sni80, Sch76], the key difference between the previous techniquesand ours is that all our hard polynomials come from a single framework, that is, from homomorphismpolynomials corresponding to various classes of pattern graphs. We find it conceptually satisfying.For ABPs, Fournier, Malod, Szusterman, and Tavenas [FMST19] gave a rank-based lower boundmethod for the monotone setting, inspired by [Nis91] given in the non-commutative setting. However,in their models, the edge labels are homogeneous linear forms, which makes their method unsuitablefor the tight lower bounds that we were looking for.Finally, an approach that seems different from all these aforementioned approaches, includingours, is the one given by Schnorr [Sch76]. which also gave an exponential lower bound on the cliquepolynomial [Sch76, Theorem 4.4]. We show in Section 3 that his approach also falls short of provingthe lower bound that matches the upper bound. In fact, unlike Schnorr’s lower bound techniques,our proofs at a very high level, follow an abstract argument that can be shown to always give theoptimal lower bound on the number of addition gates (see Theorem 9).It is worth mentioning that our lower bounds, like many other previous lower bounds, dependonly on the monomials present in the polynomials, and not on the corresponding coefficients. Onthe other hand, the proof of separation between monotone VP and VNP by Yehudayoff [Yeh19] wassensitive to coefficients too, which was crucial for the separation.6 rganization of the paper:
The rest of this paper is organized as follows: Section 2 states thedefinitions used in this paper. Section 3 proves the circuit lower bounds and Section 4 states thealgorithms.To simplify the presentation, we assume that the pattern graph is connected. The complexityfor a disconnected pattern is the maximum of the complexity of its connected components.
For basic notions in graph theory, we refer the readers to [Wes00, Die06]. We first give somedefinitions that set up our objects of computation and the models of computation.
Definition 1.
A polynomial over Q is called monotone if all its coefficients are non-negative.Compact representations of polynomials such as the following are usually used by algorithms. Definition 2. An arithmetic circuit over the variables x , . . . , x n is a rooted DAG where eachsource node (also called an input gate) is labeled by one of the variables x i or a constant a ∈ Q . Allother nodes (called gates) are labeled with either + (addition) or × (multiplication). The circuitcomputes a polynomial over Q [ x , . . . , x n ] in the usual fashion. The circuit is called monotone if allconstants are non-negative. The circuit is a skew circuit if for all × gates, at least one of the inputsis a variable or a constant. The circuit is a formula if all gates have out-degree at most one. The size of a circuit or skew circuit or formula is the number of edges in the circuit. The depth of acircuit is the number of gates in the longest path from the root to an input gate.Instead of skew circuits, a model that is equivalent in terms of power is usually studied inalgebraic complexity. Definition 3. An Algebraic Branching Program (ABP) is a DAG with a unique source node s anda unique sink node t . Each edge is labeled with a variable from x , . . . , x n or a constant a ∈ Q .Each path in the DAG from s to t corresponds to a term obtained by multiplying all the edge labelson that path. The polynomial computed by the ABP is the sum of all terms over all paths from s to t . The ABP is called monotone if all constants are non-negative. The size of the ABP is thenumber of edges.It is well-known that for any (monotone) polynomial, the size of the smallest (monotone) ABPand the size of the smallest (monotone) skew circuit are within constant factors of each other. Inthis paper, we will use the skew circuit definition in our proofs.In this paper, we look at families of polynomials ( p n ) n ≥ and the optimal size and depth ofthe models computing them. In this case, the size and depth are functions of n and we are onlyinterested in the asymptotic growth rate of these functions.For simplicity, when proving lower bounds, we assume that all non-input gates have exactly twoincoming edges (both may be from the same gate). This assumption doesn’t increase the size of thecircuit and may increase the depth by at most a logarithmic factor.The families of polynomials that we look at in this paper enumerate graph homomorphisms orcolored isomorphisms. We first define these notions. Definition 4.
For graphs H and G , a homomorphism from H to G is a function φ : V ( H ) (cid:55)→ V ( G )such that { i, j } ∈ E ( H ) implies { φ ( i ) , φ ( j ) } ∈ E ( G ). For an edge e = { i, j } in H , we use φ ( e ) todenote { φ ( i ) , φ ( j ) } . 7 efinition 5. Let H be a k -vertex graph where its vertices are labeled [ k ] and let G be a graphwhere each vertex has a color in [ k ]. Then, a colored isomorphism of H in G is a subgraph of G isomorphic to H such that all vertices in the subgraph have different colors and for each edge { i, j } in H , there is an edge in the subgraph between vertices colored i and j .Now, we are ready to define our main object of computation, the homomorphism polynomial. Definition 6.
For a pattern graph H on k vertices, the n th homomorphism polynomial for H is apolynomial on (cid:0) n (cid:1) variables x e where e = { u, v } for u, v ∈ [ n ]. Hom
H,n = (cid:88) φ (cid:89) e x φ ( e ) where φ ranges over all homomorphisms from H to K n and e ranges over all edges in H .Next, we define the colored isomorphism polynomial which would be crucial in our proofs. Thispolynomial enumerates all colored isomorphisms from a pattern to a host graph where there are n vertices of each color. This polynomial can be used to count colored isomorphisms in n -vertex hostgraphs by setting the variables corresponding to edges not in the host graph to 0. Definition 7.
For a pattern graph H on k vertices, the n th colored isomorphism polynomial for H is a polynomial on | E ( H ) | n variables x e where e = { ( i, u ) , ( j, v ) } for u, v ∈ [ n ] and { i, j } ∈ E ( H ). ColIso
H,n = (cid:88) u ,...,u k (cid:89) i,j x { ( i,u i ) , ( j,u j ) } where u , . . . , u k ∈ [ n ] and { i, j } ∈ E ( H ).We notice that the labeling of H does not affect the complexity of ColIso H . Given the polynomial ColIso H for some labeling of H and if ψ is a relabeling of H , then the polynomial ColIso H for thenew labeling can be obtained by the substitution x { ( i,u ) , ( j,v ) } (cid:55)→ x { ( ψ ( i ) ,u ) , ( ψ ( j ) ,v ) } .For our main proofs, we need a way to analyze how a monomial is being computed in a circuit,an ABP, or a formula. For this, we use the notion of parse trees. Definition 8.
Let g be a gate in a circuit C . A parse tree rooted at g is any rooted tree which canbe obtained by the following procedure, duplicating gates in C as necessary to preserve the treestructure.1. The gate g is the root of the tree.2. If there is a multiplication gate g in the tree, include all its children in the circuit as itschildren in the tree.3. If there is an addition gate g in the tree, pick an arbitrary child of g in the circuit and includeit in the tree.If the root gate of a parse tree is not mentioned, then it is assumed to be the output gate of thecircuit. A parse tree witnesses the computation of some term. We note that if C is a formula, thenany gate can occur at most once in any parse tree in C .Given a parse tree T that contains a gate g , we use T g to denote the subtree of T rooted at g . The tree obtained by removing T g from T is called the tree outside T g in T . Note that we canreplace T g in T with any parse tree rooted at g to obtain another parse tree. Similarly, if we havetwo parse trees T and T (cid:48) that both contain the same multiplication gate g from the circuit, then8e can replace the left or right subtree of T g with the left or right subtree of T (cid:48) g to obtain anotherparse tree. This is because both the left and right child of g in both parse trees are the same andtherefore we can apply the aforementioned replacement.Now, we define the graph parameters most crucial to our work. They are the parameters thatturn out to exactly characterize the complexity of the above polynomial families in the models ofcomputations defined above. Definition 9. A tree decomposition of H is a tree where each vertex (called a bag ) in the tree is asubset of vertices of H . This tree must satisfy two properties.1. For every edge { i, j } in H , there must be at least one bag in the tree that contains both i and j .2. For any vertex i in H , the subgraph of the tree decomposition induced by all bags containing i must be a subtree. This subtree is called the subtree induced by i .The size of a tree decomposition is the size of the largest bag minus one. The treewidth of H isthe size of a smallest tree decomposition of H .A tree decomposition is called a path decomposition if it is a path. The pathwidth of H is thesize of a smallest path decomposition. Definition 10.
For a connected graph H , an elimination tree of H is a rooted, directed tree thatcan be constructed by arbitrarily picking a vertex u in H and adding edges from the roots ofelimination trees of connected components of H − u to the root vertex labeled u . In particular, if H is a single vertex, then the elimination tree of H is the same single vertex graph.The depth of an elimination tree is the number of vertices in the longest path from a leaf to theroot. The treedepth of H is the depth of the smallest depth elimination tree of H .We note that for any graph H , its elimination tree contains exactly | V ( H ) | vertices. All edgesin the tree are directed towards the root and the vertices of the tree are uniquely labeled with thevertices of H . If T is an elimination tree for the connected graph H , then all edges in H are betweenvertices that are in an ancestor-descendant relationship in T .We now state some basic facts about treewidth, pathwidth, and treedepth. We combine thesefacts with the lower bounds in Section 3 to obtain, for any constant k , constant-degree polynomialfamilies having linear size circuits (ABPs resp.) but requiring Ω( n k ) size ABPs (formulas resp.),thus giving us a fine-grained separation between these models. Note that, for constant-degreepolynomials, such polynomial factor separations are the best one could ask for between formulas,ABPs, and circuits, since all constant-degree polynomials are computable by polynomial-sizedformulas. Moreover, we use these facts to obtain superpolynomial separations between these modelsfor high degree polynomials. Fact 1.
For all graphs H , we have tw ( H ) ≤ pw ( H ) ≤ td ( H ) − . Fact 2.
For any p ≥ , there is a tree X k on k = 2 p +1 − vertices that have pathwidth p . Fact 3.
All paths have pathwidth 1 and the k -vertex path has treedepth (cid:100) log ( k + 1) (cid:101) . In this section, we prove Theorems 1, 2 and 3. thus achieving our main result, that is, the exactcharacterization for the monotone complexity of homomorphism polynomials.9e first briefly show the limitation of Schnorr’s approach [Sch76] which also serves as a warmup to better familiarize the reader with the homomorphism polynomials before we go into our mainproofs.Schnorr [Sch76] introduced a technique to prove monotone arithmetic circuit lower bounds forpolynomials. A separating set for a polynomial p is a set of monomials in p such that for any twomonomials s and t in the separating set, there does not exist a monomial m of p such that m divides the product st . Schnorr showed that the size of a separating set lower bounds the size of themonotone arithmetic circuit computing the polynomial. Using this, he showed that Hom K k requiresmonotone arithmetic circuits of size n k . We now show that there are pattern graphs for which wecannot prove optimal lower bounds using Schnorr’s approach. Proposition 1.
Any separating set for
Hom P ,n has size at most n for sufficiently large n .Proof. First note that a homomorphic image of a P will either be another P or an edge ( P ),and consequently, the monomials of Hom P ,n will correspond to either a P or an edge. Thus, anyseparating set B for Hom P ,n contains monomials that correspond to either P or edges. Partition B into B (set of P ’s) and B (set of edges). If two P ’s intersect, then their union must containa different P . If two edges intersect, then their union must contain a P . The product of twomonomials that correspond to these intersecting P ’s or edges would be divisible by the monomialthat corresponds to the new P . This shows that B and B contain at most n/ n/ Hom P must have (cid:0) n (cid:1) size becauseall variables are present in the polynomial. But, this lower bound is not very interesting. Below, weshow that there are patterns with non-trivial monotone lower bounds where Schnorr’s approachfails. Proposition 2.
Any separating set for
Hom C ,n has size at most n for sufficiently large n .Proof. Since the homomorphic image of a C can either be a C , a P , or a P , the monomialsin Hom C ,n , and subsequently in any separating set, can only contain monomials that correspondto C , P , or P . Now, by the argument in Proposition 1, it remains only to consider monomialsthat correspond to C . We claim that any separating set can contain at most (cid:0) n (cid:1) such monomials.Observe that for any x, y ∈ [ n ], the set can contain at most one C where x and y appear asdiagonally opposite vertices. If there are two of them, then there is another C in the graph obtainedby taking the union of those two C ’s. The product of two such monomials would be divisible bythe monomial corresponding to this new C .In the rest of this section, we establish optimal lower bounds on the monotone circuit complexityof all homomorphism polynomials. Lemma 1.
For any pattern H , both the homomorphism polynomial for H and the colored isomor-phism polynomial for H have the same monotone arithmetic circuit complexity, monotone ABPcomplexity, and monotone formula complexity.Proof. First, we show how to obtain a circuit that computes
ColIso H from one that computes Hom H . We introduce new variables w e for each e ∈ E ( H ). Let C be a circuit that computes Hom H over the vertex set [ k ] × [ n ]. We substitute x { ( i,u ) , ( j,v ) } with x { ( i,u ) , ( j,v ) } w { i,j } for all i, j, u, v if { i, j } ∈ E ( H ). Otherwise, we set the variable to 0. Let C (cid:48) be the resulting circuit. We thencompute ∂ | E ( H ) | ∂w e ...∂w e | E ( H ) | C (cid:48) using the sum and product rule for partial derivatives. Then, we set10 e = 0 for all e . The partial differentiation ensures that all monomials must have at least one edgeof each color. Setting w e = 0 ensures that all monomials can only have at most one edge of eachcolor. Therefore, the remaining monomials contain each edge in H exactly once. These are exactlythose homomorphisms that correspond to colored isomorphisms. For each colored isomorphism,there are | aut ( H ) | ways to relabel the vertices of H to obtain the same edge set. So we divide by | aut ( H ) | to obtain Hom H exactly. Each partial differentiation increases the size of the circuit atmost by a factor of 3. Therefore, if C has size s , the final circuit has size at most c | E ( H ) | s for someconstant c .For the other direction, given a circuit that computes ColIso H , we can replace each x { ( i,u ) , ( j,v ) } with x { u,v } if u (cid:54) = v and 0 otherwise. The circuit now computes Hom H because the monomialcorresponding to the homomorphism φ is generated by the corresponding colored isomorphism i (cid:55)→ ( i, φ ( i )). Also, every colored isomorphism on vertices ( i, u i ) for 1 ≤ i ≤ k corresponds to ahomomorphism to K n as long as u i (cid:54) = u j for { i, j } ∈ E ( H ).Notice that both constructions preserve monotonicity and yield a monotone ABP when theoriginal circuit is a monotone ABP.A straightforward application of the sum and product rule to compute the partial derivativedoes not necessarily yield a formula from a formula. While computing the partial derivative, wehave to compute both f and ∂f /∂x for every sub-formula f . If f = g + h for some formulas g and h , then we can simply compute ∂f /∂x = ∂g/∂x + ∂h/∂x without using any sub-formulamore than once. When the formula f = gh for some formulas g and h , we have to compute ∂f /∂x = g∂h/∂x + h∂g/∂x . Therefore, we are using g and h twice, once for computing f andonce for computing ∂f /∂x . We can convert the resulting circuit into a formula by duplicating thesub-formulas g and h . For general formulas, this leads to a quadratic blowup in size. But, formonotone formulas computing constant-degree polynomials, we show that the size increases only bya constant factor when duplicating sub-formulas in this fashion.First, we eliminate all gates in the formula that computes 0 and replace all gates that computea constant by an input gate labeled with that constant. We call a multiplication gate f trivial if f = ag for some constant a and sub-formula g . In this case, we have ∂f /∂x = a∂g/∂x . Therefore,we do not have to make a copy of the non-constant sub-formula g . We make a copy of the input gate a here. But, we do not have to make additional copies of this input gate a later for any trivial gateencountered on the path from f to root. This is because f is not a constant and therefore it must bethe other input to the trivial gate that is constant. We claim that if the monotone formula computesa polynomial of degree at most d , for any gate g , there are at most d non-trivial multiplication gateson the path from g to the root gate. This is because each non-trivial gate increases the degree by atleast one and no cancellations can occur in a monotone formula. Therefore, we can compute thepartial derivative using at most d + 2 copies of each gate in the original formula. Since the degree ofthe polynomials we are differentiating is at most 2 | E ( H ) | and we perform | E ( H ) | differentiations,the final formula has size O (cid:0) (2 | E ( H ) | + 2) | E ( H ) | s (cid:1) if the original formula has size s .From now on, we can use either ColIso H or Hom H to prove our results. For a pattern graph H , we say that an edge { i, j } or a vertex i in H is present in a monomial over the variables of thecolored isomorphism polynomial if there is a variable x { ( i,u ) , ( j,v ) } for some u and v in that monomial.In our proofs, we restrict our attention to the multiplication gates and the input gates in parsetrees. This is because our proofs consider the computation of individual monomials separately andin this case, the addition gates play no role in the computation as all of them have exactly one childin the parse tree. Theorem 4 (Theorem 1 restated) . The monotone circuit complexity of
Hom H is Θ (cid:0) n tw ( H )+1 (cid:1) . roof. The upper bound is already known (See [DST02], [BKS18]).Let H be of treewidth t . For proving the lower bound, we consider the n th colored isomorphismpolynomial for H (See Definition 7). Consider any monomial m on the vertices ( i, u i ) for 1 ≤ i ≤ k and its associated parse tree. We assume without loss of generality that both sides of anymultiplication gate computes a non-constant term (If they compute a constant, it has to be 1and we can simply ignore this subtree). We build a tree decomposition of H from this tree in abottom-up fashion. In this tree decomposition, each gate is associated with one or two bags in thedecomposition. Exactly one of these bags is designated as the root bag of that gate.An example of this construction is shown in Figure 1 where the 4-vertex cycle is the pattern.1. For an input gate x { ( i,u ) , ( j,v ) } . Add the bag { i, j } as a leaf of the tree decomposition. Forexample, in Figure 1, the input gate labeled x { (1 ,u ) , (2 ,v ) } is associated with the bag { , } .2. For a multiplication gate g . Let A and B be the contents of the root bags of its left and rightsubtrees. Add a bag containing A ∪ B as the parent of those roots. For example, in Figure 1,the gate g is associated with a bag containing { , , } .3. If at any gate, there are vertices ( i, u ) such that the monomial computed at that gate includesall edges incident on ( i, u ). Then add a new bag that excludes exactly all such vertices fromthe current root bag and add it as a parent of the current root bag. This new bag is nowconsidered the root bag associated with the gate g . For example, in Figure 1, we observe thatat gate g , all edges incident on the vertex (2 , v ) are included and therefore we add a new bagthat removes 2 and make it the root bag associated with g .The result is a tree decomposition of H . All edges of H are covered because all edges of H mustbe present in the monomial. Since a vertex is forgotten only after all edges incident on it have beenmultiplied, the subgraph of the tree decomposition induced by any vertex in H is a subtree.We consider some gate g in the parse tree that is associated with a bag that contains at least t + 1 vertices. In the following proof, we only consider the case where the bag contains exactly t + 1 vertices. If there are more than t + 1 vertices, then we get a better lower bound. We assumewithout loss of generality that these vertices are 1 , . . . , t + 1. We now claim that the gate g can onlybe present in parse trees of monomials m (cid:48) such that m (cid:48) contains vertices ( i, u i ) for 1 ≤ i ≤ t + 1.Suppose for contradiction there is a monomial m (cid:48) with a parse tree T (cid:48) that contains g and hasvertex ( i, v i ) where v i (cid:54) = u i for some such i . Let T be the parse tree for m . There are two cases:1. The vertex i is forgotten at a bag associated with g : This means that both left and rightsubtrees of T g compute monomials that contain ( i, u i ). Now if T (cid:48) contains ( i, v i ) on the leftsubtree of T (cid:48) g , then replace right subtree of T (cid:48) g with right subtree of T g . Else, the tree T (cid:48) contains ( i, v i ) on the right subtree of T (cid:48) g or outside T (cid:48) g . In both cases we replace the leftsubtree of T (cid:48) g with the left subtree of T g .2. Vertex i is not forgotten at a bag associated with g : This means that ( i, u i ) appears in atleast one of the subtrees of T g and outside T g in T . In T (cid:48) , if ( i, v i ) appears in T (cid:48) g , then replacethe tree T g with T (cid:48) g in T . Otherwise, the vertex ( i, v i ) must appear outside T (cid:48) g in T (cid:48) . In thiscase, replace T (cid:48) g with T g in T (cid:48) .All these new parse trees yield monomials that contain both ( i, u i ) and ( i, v i ). A contradiction.Therefore, at most n k − t − monomials of the polynomial can contain g in its parse tree. Since thereare n k monomials, this gives the required lower bound.12 }{1,3} {1,3} {1,3}{1,3,4}{1,2,3}{1,2} {2,3} {3,4} {1,4}fg hfg h x {(1, u),(2, v)} x {(2, v), (3,w)} x {(3,w), (4,x)} x {(1, u),(4, x)} Figure 1: Tree decompositions from parse trees: The pattern is C and u, v, w, x ∈ [ n ] Theorem 5 (Theorem 2 restated) . The monotone ABP complexity of
Hom H is Θ (cid:0) n pw ( H )+1 (cid:1) .Proof. The upper bound is already known (See [DST02], [BKS18]).For the lower bound, we modify the proof of Theorem 4 to obtain a path decomposition instead.We consider the parse tree and start building the path decomposition from a deepest input gate.An example of this construction is shown in Figure 2 where the 4-vertex cycle is the pattern.1. For the chosen deepest input gate with label x { ( i,u ) , ( j,v ) } , add { i, j } as a leaf bag. For example,in Figure 2, we choose the input gate labeled x { (1 ,u ) , (2 ,v ) } as the deepest input gate. A bagcontaining { , } is added corresponding to this gate.2. For a gate that multiplies x { ( i,u ) , ( j,v ) } . Add i and j to the root bag of the other sub-tree andmake it the new root. For example, in Figure 2, the gate g multiplies x { (3 ,w ) , (4 ,x ) } and we add4 to the root bag of the gate h to obtain a bag containing { , , } .3. If there are vertices i in H such that all edges incident of i have been multiplied into themonomial, add a new parent bag that forgets all such vertices. This is the new root bagcorresponding to the gate. For example, in Figure 2, we observe that at gate g , all edgesincident on 3 have been multiplied into the monomial and therefore we add a new parent bagthat removes 3 and make this new bag the root bag of g .13t is easy to see that the resulting tree is a path. The same proof as for Theorem 4 shows thatthis is a path decomposition and that we can find for any parse tree for any monomial m , a gate g in the parse tree for m such that at most n k − p − monomials contain g in its parse tree where p isthe pathwidth of the pattern. The lower bound follows. fgh {}{1,3}{1,3,4}{1,2,3}{1,2}{1,4}{1,4}fgh {(1, u),(2, v)} x {(2, v),(3, w)} x {(3, w),(4, x)} x {(1, u),(4, x)} x Figure 2: Path decompositions from parse trees: The pattern is C and u, v, w, x ∈ [ n ] Theorem 6 (Theorem 3 restated) . The monotone formula complexity of
Hom H is Θ (cid:0) n td ( H ) (cid:1) .Proof. We first prove the upper bound . Let T be an elimination tree of depth d for H . We showhow to construct a formula of size n d for ColIso H (cid:48) in a bottom-up fashion where H (cid:48) is the graphobtained from T by adding all possible edges { i, j } where i is an ancestor of j in T . The polynomial ColIso H can be obtained by setting extra variables in this polynomial to 1.Let i be the label of a node in T such that the path from root to i is labeled i , . . . , i p and thechildren of i are labeled (cid:96) , . . . , (cid:96) s . We use the notation ( i j , u j ) j where j ∈ [ p ] to denote the p pairs( i , u ) , . . . , ( i p , u p ). We construct the formula: f { ( i j ,u j ) j } i = (cid:88) u (cid:18)(cid:0)(cid:89) j x { ( i j ,u j ) , ( i,u ) } (cid:1) (cid:89) t f { ( i,u ) , ( i j ,u j ) j } (cid:96) t (cid:19) where j ∈ [ p ] and t ∈ [ s ]. We believe this construction is already known as folklore. But we present it here since we use it in our algorithms.
14e use induction on the height of the node i in the elimination tree to prove the size upperbound. We claim that the formula that corresponds to such a node has size O ( n i ) (constants hiddenby the O notation depend only on H ). For the base case, if i is a leaf node, this formula has size O ( n ). If i has depth c in T , then this formula has size O ( n ) × O ( n c − ) = O ( n c ) by the inductionhypothesis.If { i, j } is not an edge in H , then we set all x { ( i,u ) , ( j,v ) } to 1 in the formula. The formulacorresponding to the root node in T is the required polynomial. To prove this, consider the coloredsubgraph isomorphism containing the vertices ( i, u i ) for 1 ≤ i ≤ k . This monomial has the parsetree obtained by setting the variable u in the outermost summation for each f ∗ i to u i . For theother direction, the parse tree obtained by setting u to u i in the outermost summation of each f ∗ i generates the monomial that corresponds to the colored subgraph isomorphism on vertices ( i, u i ).We now prove the lower bound. Let d be the treedepth of H . We consider a parse tree fora monomial m in a formula computing ColIso H and build an elimination tree for H from it. Anexample of this construction is shown in Figure 3 where the 4-vertex path is the pattern. Weassociate a set of rooted trees with each gate g as follows: If the gate g is the lowest gate in the parsetree such that all edges incident on vertices i , . . . , i r are present in the monomial computed at g ,then make i the parent of all roots of trees from the children of g . Now, make i j +1 the parent of i j for 1 ≤ j ≤ r −
1. We call the vertices i , . . . , i r to be associated with g . If there are no such verticesfor a gate g , then the forest associated with g is simply the union of the forests of its children. Westart with empty forests initially. For any edge { i, j } ∈ E ( H ), the gates that corresponds to i and j in this tree must belong to the path from the input gate for this edge to the root. This shows thatthis tree is an elimination tree for H .In Figure 3, the input gate labeled z is such that the only edge incident on (1 , u ) is alreadymultiplied in at z . Therefore, we associate the vertex 1 with z and the set of trees associated with z is just the one-vertex tree 1. Also, at gate f , we have multiplied in all edges incident on (3 , w )and therefore, we associate 3 with f . Also, note that this vertex 3 is the parent of the roots ofelimination trees from g and h .For proving the lower bound, we consider some gate g in the parse tree of m such that g isassociated with a leaf at a depth of at least d in the elimination tree. We can assume that the depthis exactly d . If it is more, then we obtain a better lower bound. Let this vertex be d . Assume withoutloss of generality that 1 , . . . , d are the vertices on the path from the root to d in the eliminationtree. Let (1 , u ) , . . . , ( d, u d ) be the corresponding vertices in m . We claim that any monomial m (cid:48) for which g appears in its parse tree must also have vertices u j of color j for 1 ≤ j ≤ d .Suppose for contradiction that there is a monomial m (cid:48) with g in its parse tree and m (cid:48) has vertex( i, v i ) where u i (cid:54) = v i for some 1 ≤ i ≤ d . Let g (cid:48) be the gate in T such that i is associated with g (cid:48) .Notice that g (cid:48) must be an ancestor of g ( g (cid:48) could be the same as g ). Let T (cid:48) be the parse tree for m (cid:48) .Then, the tree T (cid:48) must contain g (cid:48) as well because it contains g and in a formula there is a uniquepath from any gate to the root. There are two cases:1. The gate g (cid:48) is an input gate: In this case, u i = v i because a monomial cannot have twodifferent vertices of the same color and ( i, u i ) is present in g (cid:48) .2. The gate g (cid:48) is a multiplication gate: In this case, the vertex ( i, u i ) must appear in bothsubtrees of T g (cid:48) . If the vertex ( i, v i ) appears in the right (left) subtree of T (cid:48) g (cid:48) , then we replacethe left (right) subtree of T (cid:48) g (cid:48) with the left (right) subtree of T g (cid:48) . Otherwise, the vertex ( i, v i )appears outside T (cid:48) g (cid:48) in T (cid:48) . In this case, we replace the subtree T (cid:48) g (cid:48) with the subtree T g (cid:48) .In all cases, we obtain a monomial that contains both vertices ( i, u i ) and ( i, v i ). A contradiction.Therefore, at most n k − d monomials of the polynomial can contain the gate g in their parse tree.15ince there are a total of n k monomials, the lower bound follows.In Figure 3, we can infer using the above argument that the input gate z can be a part of parsetrees of at most n different monomials. fg hz 3 412121 4zg hf {(1,u), (2,v)} x {(2,v), (3,w)} x {(3,w), (4,x)} x Figure 3: Elimination trees from parse trees: The pattern is P and u, v, w, x ∈ [ n ]We show how to use our characterizations to prove superpolynomial separations between variousmonotone models. The polynomials are not based on fixed pattern graphs but a natural extensionof our polynomials to patterns that grow in size with the host graph. Theorem 7. (Compare [HY16, Theorem 1, Proposition 13])
For any p ≥ and n = 2 p +1 − ,there is a polynomial family of degree n − on n − n variables such that the family has linear sizemonotone circuits but require n log ( n +1) size monotone ABPs.Proof. The n th polynomial in the family is simply ColIso X n . The upper bound follows from thefact that X n (See Fact 2) is a tree and the construction in [DST02] (See also [BKS18]). The lowerbound follows from the fact that pw ( X n ) = log ( n + 1). This is slightly better than the separationshown by Hrubes and Yehudayoff [HY16] because for the polynomial family they use to obtainthis separation, they only show super-linear circuit upper bounds and the constant factor in theexponent in the lower bound is worse. Theorem 8. (See [Sni80, Theorem 3.2])
For n ≥ , there is a polynomial family of degree n − on n − n variables such that the family has linear size monotone ABPs but require n (cid:100) log ( n +1) (cid:101) sizemonotone formulas. roof. The n th polynomial in the family is simply ColIso P n . The upper bound follows from thefact that P n has pathwidth 1 and the construction in [DST02] (See also [BKS18]). The lowerbound follows from the fact that td ( P n ) = (cid:100) log ( n + 1) (cid:101) . We note that Snir [Sni80] used the samepolynomial by looking at IMM although he only considered one entry of
IMM n,n × n . The polynomial IMM n,n × n is the (1 , th entry of the matrix obtained by multiplying n matrices of order n × n whereeach entry of each matrix is a fresh variable. The polynomial ColIso P n is the sum of all entries.We now do an analysis of lower bound techniques that work by showing that a “large” numberof monomials have to be distributed across a “large” number of addition gates. We also show thatunlike Schnorr’s method, we can always lower bound the number of addition gates in a monotonecircuit using such an approach. The following proof is an adaptation of the corresponding proof forBoolean circuits [Sar]. Theorem 9.
Let p be a polynomial such that any monotone circuit C computing it must have s addition gates. Then, we prove that given C , we can construct a bijection b : X (cid:55)→ G , where X is aset of s monomials in p and G is the set of all addition gates in C and each monomial is mapped toan addition gate in some parse tree for the monomial.Proof. Suppose that C is optimal, i.e., has exactly s addition gates. Construct a bipartite graphwhere one side is the set of all addition gates in C and the other side is the set of all monomials in p . Add edge { g, m } if and only if g appears in some parse tree for m . Now, a bijection b can beconstructed from a matching of size s in this graph. By Hall’s theorem, the only way this can fail toexist is if there are k addition gates such that only k − m , . . . , m k − ). If k = 1, then this means there is an unused addition gatein the circuit. This contradicts the assumption that C is optimal. Otherwise, remove these k gatesfrom C . The polynomial computed by this new circuit is p − (cid:80) k − i =1 c i m i for some constants c i . But (cid:80) k − i =1 c i m i can be computed using k − p . This new circuit has only s − k + k − s − C .Therefore, one can always build a lower bound proof by constructing the set of monomials X and an appropriate function b from an arbitrary optimal circuit for the given polynomial. However,unlike Schnorr’s method, this approach is not very concrete. The method used to come up with X and b may vary considerably depending on the polynomial. In this section, we obtain algorithms for subgraph isomorphism problems that are simultaneouslytime and space-efficient. All algorithms follow from theorems in Bl¨aser, Komarath, and Sreenivasaiah[BKS18] and the observation that all constructions in the previous section can be performed inlogarithmic space. Evaluating the formulas for homomorphism polynomials require only O (log ( n ))space because they are logarithmic depth and all values are polynomially bounded. We note thatfast matrix multiplication based algorithms yield better running times for all problems consideredin this section. However, such algorithms use polynomial space. Algorithms that do not use fastmatrix multiplication, called combinatorial algorithms, are also widely studied (See [VW09, FLR + Fact 4.
All graphs other than K k on k or fewer vertices has treedepth at most k − . heorem 10. For any k -vertex pattern graph H other than K k , there is a combinatorial algorithmthat runs in time O (cid:0) n k − (cid:1) and space O (log ( n )) that computes the number of subgraphs isomorphicto the pattern graph in a given n -vertex host graph.Proof. The key idea is that the number of subgraphs isomorphic to H can be expressed as a linearcombination of the number of homomorphisms of H and patterns on fewer than k vertices. Moredetails can be found in Theorem 7.3 of [BKS18]. Theorem 11.
For any k -vertex pattern graph H other than K k , there is a combinatorial algorithmthat runs in time O (cid:0) n k − (cid:1) and space O (log ( n )) that decides whether the pattern graph appears asan induced subgraph in a given n -vertex host graph.Proof. The key idea is that the number of induced subgraphs isomorphic to H can be expressed asa linear combination of the number of subgraphs isomorphisms from k -vertex supergraphs of H .We can compute all of these numbers except for K k in the given time and space. The coefficient ofthe number of subgraphs isomorphisms of K k in this linear combination is always a number greaterthan 1. Therefore, by choosing a suitable prime p , we can count the number of induced subgraphsisomorphic to H modulo p in the given time and space. The induced subgraph isomorphismproblem randomly reduces to this problem using a simple reduction that only takes linear time andlogarithmic space. More details can be found in Corollary 7.6 of [BKS18].We prove a theorem that connects algorithms that count induced subgraph isomorphisms forany k -vertex pattern to algorithms that count k -cliques. The motivation behind this theorem is thequestion posed by [FKLL15b] asking whether some induced patterns are easier than others. Theorem 12.
If there is a k vertex pattern graph such that we can count the number of inducedsubgraph isomorphisms from the pattern to a given n vertex host graph in time t ( n ) and space s ( n ) ,then we can count the number of k -cliques in a given n vertex host graph in time O ( t ( n ) + n k − ) and space O ( s ( n ) + log ( n )) .Proof. The number of induced subgraph isomorphisms for any k -vertex pattern H can be expressedas a linear combination of the number of subgraph isomorphisms of k -vertex supergraphs of H . Wecan compute every number in the linear combination except the number of subgraph isomorphismsof K k in O ( n k − ) time and O (log ( n )) space. Given that we can also count the number of inducedsubgraph isomorphisms of H in t ( n ) time and s ( n ) space, the result follows. More details can befound in Theorem 7.5 of [BKS18]. References [ADH +
08] Noga Alon, Phuong Dao, Iman Hajirasouliha, Fereydoun Hormozdiari, andS¨uleyman Cenk Sahinalp. Biomolecular network motif counting and discovery bycolor coding. In
Proceedings 16th International Conference on Intelligent Systems forMolecular Biology (ISMB), Toronto, Canada, July 19-23, 2008 , pages 241–249, 2008.[BB02] C. Borgelt and M. R. Berthold. Mining molecular fragments: finding relevant substruc-tures of molecules. In , pages 51–58, 2002.[BCL +
06] Christian Borgs, Jennifer Chayes, L´aszl´o Lov´asz, Vera T S´os, and Katalin Vesztergombi.Counting graph homomorphisms. In
Topics in discrete mathematics , pages 315–371.Springer, 2006. 18BKS18] Markus Bl¨aser, Balagopal Komarath, and Karteek Sreenivasaiah. Graph patternpolynomials. In Sumit Ganguly and Paritosh K. Pandya, editors, , volume 122 of
LIPIcs , pages18:1–18:13. Schloss Dagstuhl - Leibniz-Zentrum f¨ur Informatik, 2018.[BS83] Walter Baur and Volker Strassen. The complexity of partial derivatives.
Theor.Comput. Sci. , 22:317–330, 1983.[CDM17] Radu Curticapean, Holger Dell, and D´aniel Marx. Homomorphisms are a good basisfor counting small subgraphs. In Hamed Hatami, Pierre McKenzie, and Valerie King,editors,
Proceedings of the 49th Annual ACM SIGACT Symposium on Theory ofComputing, STOC 2017, Montreal, QC, Canada, June 19-23, 2017 , pages 210–223.ACM, 2017.[CGW89] F. R. K. Chung, R. L. Graham, and R. M. Wilson. Quasi-random graphs.
Combina-torica , 9(4):345–362, 1989.[CLV19] Prasad Chaugule, Nutan Limaye, and Aditya Varre. Variants of homomorphismpolynomials complete for algebraic complexity classes. In
Computing and Combina-torics - 25th International Conference, COCOON 2019, Xi’an, China, July 29-31,2019, Proceedings , volume 11653 of
Lecture Notes in Computer Science , pages 90–102.Springer, 2019.[Die06] R. Diestel.
Graph Theory . Electronic library of mathematics. Springer, 2006.[DJ04] V´ıctor Dalmau and Peter Jonsson. The complexity of counting homomorphisms seenfrom the other side.
Theoret. Comput. Sci. , 329(1-3):315–323, 2004.[DMM +
16] Arnaud Durand, Meena Mahajan, Guillaume Malod, Nicolas de Rugy-Altherre, andNitin Saurabh. Homomorphism polynomials complete for VP.
Chic. J. Theor. Comput.Sci. , 2016, 2016.[DST02] Josep D´ıaz, Maria J. Serna, and Dimitrios M. Thilikos. Counting h-colorings of partialk-trees.
Theor. Comput. Sci. , 281(1-2):291–309, 2002.[FKLL15a] Peter Floderus, Miroslaw Kowaluk, Andrzej Lingas, and Eva-Marta Lundell. Detectingand counting small pattern graphs.
SIAM J. Discrete Math. , 29(3):1322–1339, 2015.[FKLL15b] Peter Floderus, Miroslaw Kowaluk, Andrzej Lingas, and Eva-Marta Lundell. Inducedsubgraph isomorphism: Are some patterns substantially easier than others?
Theor.Comput. Sci. , 605:119–128, 2015.[FLR +
12] Fedor V. Fomin, Daniel Lokshtanov, Venkatesh Raman, Saket Saurabh, andB. V. Raghavendra Rao. Faster algorithms for finding and counting subgraphs.
J. Comput. Syst. Sci. , 78(3):698–706, 2012.[FMST19] Herv´e Fournier, Guillaume Malod, Maud Szusterman, and S´ebastien Tavenas. Non-negative Rank Measures and Monotone Algebraic Branching Programs. In ArkadevChattopadhyay and Paul Gastin, editors, ,volume 150 of
Leibniz International Proceedings in Informatics (LIPIcs) , pages 15:1–15:14, Dagstuhl, Germany, 2019. Schloss Dagstuhl–Leibniz-Zentrum fuer Informatik.19Gre12] Bruno Grenet. An upper bound for the permanent versus determinant problem, 2012.[HY16] Pavel Hrubes and Amir Yehudayoff. On isoperimetric profiles and computational com-plexity. In , pages 89:1–89:12, 2016.[JS82] Mark Jerrum and Marc Snir. Some exact complexity results for straight-line computa-tions over semirings.
J. ACM , 29(3):874–897, July 1982.[KKM00] Ton Kloks, Dieter Kratsch, and Haiko M¨uller. Finding and counting small inducedsubgraphs efficiently.
Inf. Process. Lett. , 74(3-4):115–121, 2000.[KLL13] Miroslaw Kowaluk, Andrzej Lingas, and Eva-Marta Lundell. Counting and detectingsmall subgraphs via equations.
SIAM J. Discrete Math. , 27(2):892–909, 2013.[KR20] Deepanshu Kush and Benjamin Rossman. Tree-depth and the formula complexity ofsubgraph isomorphism.
CoRR , abs/2004.13302, 2020.[KZY13] Xiangnan Kong, Jiawei Zhang, and Philip S. Yu. Inferring anchor links acrossmultiple heterogeneous social networks. In
Proceedings of the 22nd ACM InternationalConference on Information & Knowledge Management , CIKM ’13, page 179–188, NewYork, NY, USA, 2013. Association for Computing Machinery.[Lov12] L´aszl´o Lov´asz.
Large networks and graph limits , volume 60 of
American MathematicalSociety Colloquium Publications . American Mathematical Society, Providence, RI,2012.[LPH +
20] Xin Liu, Haojie Pan, Mutian He, Yangqiu Song, Xin Jiang, and Lifeng Shang. Neuralsubgraph isomorphism counting. In
Proceedings of the 26th ACM SIGKDD Interna-tional Conference on Knowledge Discovery & Data Mining , KDD ’20, page 1959–1969,New York, NY, USA, 2020. Association for Computing Machinery.[LRR17] Yuan Li, Alexander A. Razborov, and Benjamin Rossman. On the ac0 complexity ofsubgraph isomorphism.
SIAM J. Comput. , 46(3):936–971, 2017.[LS08] L´aszl´o Lov´asz and Vera T. S´os. Generalized quasirandom graphs.
J. Combin. TheorySer. B , 98(1):146–163, 2008.[Mar10] D´aniel Marx. Can you beat treewidth?
Theory Comput. , 6:85–112, 2010.[MP14] D´aniel Marx and Michal Pilipczuk. Everything you always wanted to know aboutthe parameterized complexity of subgraph isomorphism (but were afraid to ask).In Ernst W. Mayr and Natacha Portier, editors, , volume 25 of
LIPIcs , pages 542–553. Schloss Dagstuhl - Leibniz-Zentrum f¨ur Informatik, 2014.[MS18] Meena Mahajan and Nitin Saurabh. Some complete and intermediate polynomials inalgebraic complexity theory.
Theory Comput. Syst. , 62(3):622–652, 2018.[MSOI +
02] R. Milo, S. Shen-Orr, S. Itzkovitz, N. Kashtan, D. Chklovskii, and U. Alon. Networkmotifs: Simple building blocks of complex networks.
Science , 298(5594):824–827, 2002.20Nis91] Noam Nisan. Lower bounds for non-commutative computation. In
Proceedings of theTwenty-Third Annual ACM Symposium on Theory of Computing , STOC ’91, page410–418, New York, NY, USA, 1991. Association for Computing Machinery.[NP85] Jaroslav Neˇsetˇril and Svatopluk Poljak. On the complexity of the subgraph problem.
Commentationes Mathematicae Universitatis Carolinae , 026(2):415–419, 1985.[Ros18] Benjamin Rossman. Lower bounds for subgraph isomorphism. In
Proceedings of theInternational Congress of Mathematicians—Rio de Janeiro 2018. Vol. IV. Invitedlectures , pages 3425–3446. World Sci. Publ., Hackensack, NJ, 2018.[Sap15] Ramprasad Saptharishi. A survey of lower bounds in arithmetic circuit complexity.
Github survey , 2015.[Sar] Jayalal Sarma. Personal communication.[Sch76] C.P. Schnorr. A lower bound on the number of additions in monotone computations.
Theoretical Computer Science , 2(3):305 – 315, 1976.[Sni80] Marc Snir. On the size complexity of monotone formulas. In Jaco de Bakker and Janvan Leeuwen, editors,
Automata, Languages and Programming , pages 621–631, Berlin,Heidelberg, 1980. Springer Berlin Heidelberg.[VW09] Virginia Vassilevska and Ryan Williams. Finding, minimizing, and counting weightedsubgraphs. In
Proceedings of the Forty-First Annual ACM Symposium on Theoryof Computing , STOC ’09, page 455–464, New York, NY, USA, 2009. Association forComputing Machinery.[Wes00] Douglas B. West.
Introduction to Graph Theory . Prentice Hall, 2 edition, September2000.[WWWY15] Virginia Vassilevska Williams, Joshua R. Wang, Richard Ryan Williams, and HuachengYu. Finding four-node subgraphs in triangle time. In Piotr Indyk, editor,
Proceedingsof the Twenty-Sixth Annual ACM-SIAM Symposium on Discrete Algorithms, SODA2015, San Diego, CA, USA, January 4-6, 2015 , pages 1671–1680. SIAM, 2015.[Yeh19] Amir Yehudayoff. Separating monotone vp and vnp. In
Proceedings of the 51st AnnualACM SIGACT Symposium on Theory of Computing , STOC 2019, page 425–429, NewYork, NY, USA, 2019. Association for Computing Machinery.[ZW86] J. Zhang and G. Wu. Targeting social advertising to friends of users who haveinteracted with an object associated with the advertising, Dec. 15 2010. US PatentApp. 12/968,786.[ZYL +
17] Huan Zhao, Quanming Yao, Jianda Li, Yangqiu Song, and Dik Lun Lee. Meta-graphbased recommendation fusion over heterogeneous information networks. In