diff --git "a/4dAzT4oBgHgl3EQfuv2o/content/tmp_files/2301.01696v1.pdf.txt" "b/4dAzT4oBgHgl3EQfuv2o/content/tmp_files/2301.01696v1.pdf.txt" new file mode 100644--- /dev/null +++ "b/4dAzT4oBgHgl3EQfuv2o/content/tmp_files/2301.01696v1.pdf.txt" @@ -0,0 +1,2917 @@ +Parameterised and Fine-grained Subgraph +Counting, modulo 2∗ +Leslie Ann Goldberg +University of Oxford +Marc Roth +University of Oxford +Abstract +Given a class of graphs H, the problem ⊕Sub(H) is defined as follows. The input is a graph H ∈ H +together with an arbitrary graph G. The problem is to compute, modulo 2, the number of subgraphs +of G that are isomorphic to H. The goal of this research is to determine for which classes H the +problem ⊕Sub(H) is fixed-parameter tractable (FPT), i.e., solvable in time f(|H|) · |G|O(1). +Curticapean, Dell, and Husfeldt (ESA 2021) conjectured that ⊕Sub(H) is FPT if and only if the +class of allowed patterns H is matching splittable, which means that for some fixed B, every H ∈ H +can be turned into a matching (a graph in which every vertex has degree at most 1) by removing at +most B vertices. +Assuming the randomised Exponential Time Hypothesis, we prove their conjecture for (I) all +hereditary pattern classes H, and (II) all tree pattern classes, i.e., all classes H such that every +H ∈ H is a tree. +We also establish almost tight fine-grained upper and lower bounds for the case of hereditary +patterns (I). +2012 ACM Subject Classification Theory of computation → Problems, reductions and completeness; +Mathematics of computing → Discrete mathematics +Keywords and phrases modular counting, parameterised complexity, fine-grained complexity, sub- +graph counting +Acknowledgements We want to thank Radu Curticapean, Holger Dell and Thore Husfeldt for +insightful discussions on an early draft of this work. +1 +Introduction +The last two decades have seen remarkable progress in the classification of subgraph counting +problems: Given a small pattern graph H and a large host graph G, how often does H occur +as a subgraph if G? Since it was discovered that subgraph counts from small patterns reveal +global properties of complex networks [25, 26], subgraph counting has also found several +applications in fields such as biology [1, 32] genetics [34], phylogeny [24], and data mining [35]. +Moreover, the theoretical study of subgraph counting and related problems has led to many +deep structural insights, establishing both new algorithmic techniques and tight lower bounds +under the lenses of fine-grained and parameterised complexity theory [18, 15, 9, 13, 12, 5, 3]. +Without any additional restrictions, the subgraph counting problem is infeasible. The +complexity class #W[1] is the parameterised complexity class analgous to NP (see Section 2 +for more detail). Under standard assumptions, problems that are #W[1]-hard are not fixed- +parameter tractable (FPT). However, the canonical complete problem for #W[1], the problem +of counting k-cliques, corresponds to the special case of the subgraph counting problem +∗ For the purpose of Open Access, the authors have applied a CC BY public copyright licence to any +Author Accepted Manuscript version arising from this submission. All data is provided in full in the +results section of this paper. +arXiv:2301.01696v1 [cs.CC] 4 Jan 2023 + +2 +Parameterised and Fine-grained Subgraph Counting, modulo 2 +where H is a clique of size k. This problem cannot be solved in time f(k) · no(k) for any +function f unless the Exponential Time Hypothesis (ETH) fails [7, 8]. Due to this hardness +result, the research focus in this area shifted to the question: Under which restrictions on the +patterns H and the hosts G is algorithmic progress possible? More precisely, under which +restrictions can the problem be solved in time f(|H|) · |G|O(1), for some computable function +f? Instances that can be solved within such a run time bound are called fixed-parameter +tractable (FPT); allowing a potential super-polynomial overhead in the size of the pattern +|H| formalises the assumption that H is assumed to be (significantly) smaller than G. +If only the patterns are restricted, then the situation if fully understood. Formally, given +a class H of patterns, the problem #Sub(H) asks, given as input a graph H ∈ H and an +arbitrary graph G, to compute the number of subgraphs of G that are isomorphic to H. +Following initial work by Flum and Grohe [18] and by Curticapean [10], Curticapean and +Marx [13] proved that, under standard assumptions, #Sub(H) is FPT if and only if H has +bounded matching number, that is, if there is a positive integer B such that the size of +any matching in any graph in H is at most B. They also proved that all FPT cases are +polynomial-time solvable. +In stark contrast, almost nothing is known for the decision version Sub(H). Here, the +task is to correctly decide whether there is a copy of H ∈ H in G, rather than to count +the copies. It is known that Sub(H) is FPT whenever H has bounded treewidth (see e.g. +[19, Chapter 13]), and it is conjectured that those are all FPT cases. However, resolving +this conjecture belongs to the “most infamous” open problems in parameterised complexity +theory [17, Chapter 33.1] +1.1 +Counting Modulo 2 +To interpolate between the fully understood realm of (exact) counting and the barely +understood realm of decision, Curticapean, Dell and Husfeldt proposed the study of counting +subgraphs, modulo 2 [11]. Formally, they introduced the problem ⊕Sub(H), which expects +as input a graph H ∈ H and an arbitrary graph G, and the goal is to compute modulo 2 the +number of subgraphs of G isomorphic to H. +The study of counting modulo 2 received significant attention from the viewpoint of +classical and structural complexity theory. For example, one way to state Toda’s Theorem [33] +is PH ⊆ P⊕P, implying that counting satisfying assignments of a CNF, modulo 2, is at least +as hard as the polynomial hierarchy. Another example is the quest to classify the complexity +of counting modulo 2 the homomorphisms to a fixed graph, which was very recently resolved +by Bulatov and Kazeminia [6]. +In their work [11], Curticapean, Dell and Husfeldt proved that the problem of counting +k-matchings modulo 2, that is, the problem ⊕Sub(H) where H is the class of all 1-regular +graphs, is fixed-parameter tractable, where the parameter k is |H|. Since the exact counting +version of this problem is #W[1]-hard [10], their result provides an example where counting +modulo 2 is strictly easier than exact counting (subject to complexity assumptions). The +complexity class ⊕W[1] can be defined via the complete problem of counting k-cliques +modulo 2. Crucially, ⊕W[1]-hard problems are not fixed-parameter tractable, unless the +randomised ETH (rETH) fails. Curticapean et al. [11] proved that counting k-paths modulo +2 is ⊕W[1]-hard. Since finding a k-path in a graph G is fixed-parameter tractable via colour- +coding [2], this hardness result provides an example where counting modulo 2 is strictly +harder than decision (subject to complexity assumptions). Combining those observations, +it appears that counting subgraphs modulo 2 may lie strictly in between the complexity of +decision and the complexity of exact counting. + +L. A. Goldberg and M. Roth +3 +A matching is a graph whose degree is at most 1. The matching-split number of a graph +H is the minimum size of a set S ⊆ V (H) such that H \ S is a matching. A class of graphs +H is called matching splittable if there is a positive integer B such that the matching-split +number of any H ∈ H is at most B. For example, the class of all matchings is matching +splittable while the class of all cycles is not. Curticapean, Dell and Husfeldt extended their +FTP algorithm for counting k-matchings modulo 2 to obtain an FPT algorithm for ⊕Sub(H) +for any matching-splittable class H. On this basis, they then made the following conjecture. +▶ Conjecture 1 ([11]). ⊕Sub(H) is FPT if and only if H is matching splittable. +A class H of graphs is called hereditary if it is closed under vertex removal. Intriguingly, +if Conjecture 1 is true, then the FPT criterion for counting subgraphs modulo 2 (⊕Sub(H)) +would coincide with the polynomial-time criterion for finding subgraphs (Sub(H)) for hered- +itary pattern classes H as established by Jansen and Marx. +▶ Theorem 2 ([23]). Let H be a hereditary class of graphs and assume P ̸= NP. Then +Sub(H) is solvable in polynomial time if and only if H is matching splittable. +Jansen and Marx also conjecture that the condition of H being hereditary can be removed. +▶ Conjecture 3 ([23]). Sub(H) is solvable in polynomial time if and only if H is matching +splittable. +Conjectures 1 and 3 have the remarkable consequence that ⊕Sub(H) is FPT if and only +if Sub(H) is solvable in polynomial time. In the current work we establish this consequence +for all hereditary pattern classes. +1.2 +Our Contributions +We resolve Conjecture 1 for all hereditary classes H, as well as for every class H consisting +only of trees. +▶ Theorem 4. Let H be a hereditary class of graphs. If H is matching splittable, then +⊕Sub(H) is fixed-parameter tractable. +Otherwise, the problem is ⊕W[1]-complete and, +assuming rETH, cannot be solved in time f(|H|) · |G|o(|V (H)|/ log |V (H)|) for any function f. +▶ Theorem 5. Let T be a recursively enumerable class of trees. If T is matching splittable, +then ⊕Sub(T ) is fixed-parameter tractable. Otherwise ⊕Sub(T ) is ⊕W[1]-complete. +In order to prove our classifications, we adapt the by-now-standard technique for ana- +lysing subgraph counting problems established by Curticapean, Dell and Marx [12]. Let +#Sub(H → G) denote the number of subgraphs of a graph G that are isomorphic to a +graph H and let #Hom(F → G) denotes the number of homomorphisms (edge-preserving +mappings) from a graph F to a graph G. Given a graph H, there is a function aH from +graphs to rationals with finite support such that the following holds for any graph G: +#Sub(H → G) = +� +F +aH(F) · #Hom(F → G) , +(1) +where the sum is over all (isomorphism types of) graphs. Since aH has finite support, +aH(F) = 0 for all but finitely-many graphs F. Thus, equation (1) allows us to express the +solution to the exact counting problem as a finite linear combination of homomorphism counts. +In a nutshell, the framework of [12] states that computing the function G �→ #Sub(H → G) + +4 +Parameterised and Fine-grained Subgraph Counting, modulo 2 +is hard to compute if and only if there is a graph F of high treewidth with aH(F) ̸= 0. +This translates the complexity of (exact) subgraph counting to the purely combinatorial +problem of understanding the coefficients aH. One might hope that this strategy transfers +to counting modulo 2 as well. Unfortunately, this is not possible as Equation (1) might +not be well-defined if arithmetic is done modulo 2. The reason for this is the fact that the +coefficients aH(F) are of the form µ(F, H) × |Aut(H)|−1, where µ(F, H) is an integer, and +Aut(H) is the automorphism group of the graph H [12]. Thus there is, a priori, no hope +to extend the framework to counting modulo 2 for pattern graphs with an even number of +automorphisms. In fact, according to Curticapean, Dell and Husfeldt [11], the absence of a +comparable framework for counting modulo 2 is one of the main challenges for establishing +the hardness part of Conjecture 1, and it is the main reason why the reductions in [11] use +more classical, gadget-based reductions. +In this work, we solve the problem of patterns with an even number of automorphisms +by considering a colourful intermediate problem. More concretely, we will equip each edge +of the pattern H with a distinct colour and show that it will be sufficient to consider only +automorphisms that preserve the colours. If H has no isolated vertices, then this is only +the trivial automorphism. Formally, the coloured approach will be based on the notion of +so-called fractured graphs introduced by Peyerimhoff et al. [29]. +In what follows (Section 2), we will first introduced all required notions and previous +results. In Section 3, we will prove the classification for hereditary pattern classes (Theorem 4). +On a technical level, this proof can be considered a warm-up for the significantly harder +challenge of establishing the classification for trees (Theorem 5), which we prove in Section 4. +2 +Preliminaries +Let f : A1 × A2 → B be a function. For each a1 ∈ A1 we write f(a1, ⋆) : A2 → B for the +function that maps a2 ∈ A2 to f(a1, a2). +Graphs in this work are undirected and without self loops. A homomorphism from a +graph H to a graph G is a mapping ϕ from the vertices V (H) of H to the vertices V (G) +of G such that for each edge e = {u, v} ∈ E(H) of H, the image ϕ(e) = {ϕ(u), ϕ(v)} is an +edge of G. A homomorphism is called an embedding if it is injective. We write Hom(H → G) +and Emb(H → G) for the sets of homomorphisms and embeddings, respectively, from H +to G. An embedding ϕ ∈ Emb(H → G) is called an isomorphism if it is bijective and +{u, v} ∈ E(H) ⇔ {ϕ(u), ϕ(v)} ∈ E(G). We say that H and G are isomorphic, denoted by +H ∼= G, if an isomorphism from H to G exists. A graph invariant ι is a function from graphs +to rationals such that ι(H) = ι(G) for each pair of isomorphic graphs H and G. +A subgraph of G is a graph G′ with V (G′) ⊆ V (G) and E(G′) ⊆ E(G). We write +Sub(H → G) for the set of all subgraphs of G that are isomorphic to H. Given a subset of +vertices S ⊆ V (G) of a graph G, we write G[S] for the graph induced by S, that is, G[S] has +vertices S and edges {{u, v} ⊆ S | {u, v} ∈ E(G)}. +We denote by tw(G) the treewidth of the graph G. Since we will rely on treewidth purely +in a black-box manner, we omit the technical definition and refer the reader to [14, Chapter +7]. +Given any graph invariant ι (such as treewidth) and a class of graphs G, we say that +ι is bounded in G if there is a non-negative integer B such that, for all G ∈ G, ι(G) ≤ B. +Otherwise we say that ι is unbounded in G. +Given a graph H = (V, E), a splitting set of H is a subset of vertices S such that every +vertex in H[V \S] has degree at most 1. The matching-split number of H is the minimum size + +L. A. Goldberg and M. Roth +5 +v +vB1 vB2 +Figure 1 Illustration of the construction of a fractured graph from [29]. The left picture shows +a vertex v of a graph Q with incident edges EQ(v) = { , , , , , }. The right picture shows the +splitting of v in the construction of the fractured graph Q +♯ +σ for a fracture σ satisfying that the +partition σv contains two blocks B1 = { , , }, and B2 = { , , }. +of a splitting set of H. A class of graphs H is called matching splittable the matching-split +number of H is bounded. +2.1 +Colour-Preserving Homomorphisms and Embeddings +A homomorphism c from a graph G to a graph Q is sometimes called a “Q-colouring” of G. +A Q-coloured graph is a pair consisting of a graph G and a homomorphism c from G to Q. +Note that the identity function idQ on V (Q) is a Q-colouring of Q. If a homomorphism c +from G to Q is vertex surjective, then we call (G, c) a surjectively Q-coloured graph. +▶ Definition 6 (cE). A Q-colouring c of a graph G induces a (not necessarily proper) +edge-colouring cE : E(G) → E(Q) given by cE({u, v}) = {c(u), c(v)}. +Notation: Given a Q-coloured graph (G, c) and a vertex u ∈ V (Q), we will use the +capitalised letter U to denote the subset of vertices of G that are coloured by c with u, that +is, U := c−1(u) ⊆ V (G). +Given two Q-coloured graphs (H, cH) and (G, cG), we call a homomorphism ϕ from H +to G colour-preserving if for each v ∈ V (H) we have cG(ϕ(v)) = cH(v). We note the +special case in which Q = H and cH is the identity idQ; then the condition simplifies to +cG(ϕ(v)) = v. A colour-preserving embedding of (H, cH) in (G, cG) is a vertex injective colour- +preserving homomorphism from (H, cH) to (G, cG). We write Hom((H, cH) → (G, cG)) and +Emb((H, cH) → (G, cG)) for the sets of all colour-preserving homomorphisms and embeddings, +respectively, from (H, cH) to (G, cG). +Let k be a positive integer, let H be a graph with k edges, and let (G, γ) be a pair +consisting of a graph G and a function that maps each edge of G to one of k distinct colours. +We refer to γ as a “k-edge colouring” of G. For example, in most of our applications we will fix +a graph Q with k edges and a Q-colouring c of G and we will take γ to be the edge-colouring +cE from Definition 6. We write ColSub(H → (G, γ)) for the set of all subgraphs of G that +are isomorphic to H and that contain each of the k edge colours precisely once. +2.2 +Fractures and Fractured Graphs +In this work, we will crucially rely on and extend the framework of fractured graphs as +introduced in [29]. +▶ Definition 7 (Fractures). Let Q be a graph. For each vertex v of Q, let EQ(v) be the set +of edges of Q that are incident to v. A fracture of Q is a tuple ρ = (ρv)v∈V (Q), where for +each vertex v of Q, ρv is a partition of EQ(v). + +6 +Parameterised and Fine-grained Subgraph Counting, modulo 2 +Note that a fracture describes how to split (or how to fracture) each vertex of a given +graph: for each vertex v, create a vertex vB for each block B in the partition ρv; edges +originally incident to v are made incident to vB if and only if they are contained in B. We +call the resulting graph the fractured graph H +♯ +ρ; a formal definition is given in Definition 8, +a visualisation is given in Figure 1. +▶ Definition 8 (Fractured Graph Q +♯ +ρ). Given a graph Q, we consider the matching MQ +containing one edge for each edge of Q; formally, +V (MQ) := +� +e={u,v}∈E(Q) +{ue, ve} +and +E(MQ) := {{ue, ve} | e = {u, v} ∈ E(Q)}. +For a fracture ρ of Q, we define the graph Q +♯ +ρ to be the quotient graph of MQ under +the equivalence relation on V (MQ) which identifies two vertices ve, wf of MQ if and only if +v = w and e, f are in the same block B of the partition ρv of EQ(v). We write vB for the +vertex of Q +♯ +ρ given by the equivalence class of the vertices ve (for which e ∈ B) of MQ. +▶ Definition 9 (Canonical Q-colouring cρ). Let Q be a graph and let ρ be a fracture of Q. +The canonical Q-colouring of the fractured graph Q +♯ +ρ maps vB to v for each v ∈ V (Q) and +block B ∈ ρv, and is denoted by cρ. +Observe that cρ is the identity in V (Q) if ρ is the coarsest fracture (that is, each partition +ρv only contains one block, in which case Q +♯ +ρ = Q). +2.3 +Parameterised and Fine-grained Computation +A parameterised computational problem is a pair consisting of a function P : Σ∗ → {0, 1} and +a computable parameterisation κ : Σ∗ → N. A fixed-parameter tractable (FPT) algorithm for +(P, κ) is an algorithm that computes P and runs, on input x ∈ Σ∗, in time f(κ(x)) · |x|O(1) +for some computable function f. We call (P, κ) fixed-parameter tractable (FPT) if an FPT +algorithm for (P, κ) exists. +A parameterised Turing-reduction from (P, κ) to (P ′, κ′) is an FPT algorithm for (P, κ) +that is equipped with oracle access to P ′ and for which there is a computable function g such +that, on input x, each oracle query y satisfies κ′(y) ≤ g(κ(x)). We write (P, κ) ≤fpt +T (P ′, κ′) +if a parameterised Turing-reduction from (P, κ) to (P ′, κ′) exists. This guarantees that +fixed-parameter tractability of (P ′, κ′) implies fixed-parameter tractability of (P, κ). For a +more comprehensive introduction, we refer the reader the standard textbooks [14] and [19]. +Counting modulo 2 and the rETH +The lower bounds in this work will rely on the hardness of the parameterised complexity +class ⊕W[1], which can be considered a parameterised equivalent of ⊕P. Following [11], we +define ⊕W[1] via the complete problem ⊕Clique: Given as input a graph G and a positive +integer k, the goal is to compute the number of k-cliques in G modulo 2, i.e., to compute +⊕Sub(Kk → G). The problem is parameterised by k. A parameterised problem (P, κ) is +called ⊕W[1]-hard if ⊕Clique ≤fpt +T (P, κ), and it is called ⊕W[1]-complete if, additionally, +(P, κ) ≤fpt +T ⊕Clique. +Modifications of the classical Isolation Lemma (see e.g. [4] and [36]) yield a randomised +parameterised Turing reduction from finding a k-clique to computing the parity of the +number of k-cliques. In combination with existing fine-grained lower bounds for finding a +k-clique [7, 8], it can then be shown that ⊕Clique cannot be solved in time f(k) · |G|o(k) +for any function f, unless the randomised Exponential Time Hypothesis fails: + +L. A. Goldberg and M. Roth +7 +▶ Definition 10 (rETH, [22]). The randomised Exponential Time Hypothesis (rETH) asserts +that 3-SAT cannot be solved by a randomised algorithm in time exp o(n), where n is the +number of variables of the input formula. +As an immediate consequence, the rETH implies that ⊕W[1]-hard problems are not fixed- +parameter tractable. +For the lower bounds in this work, we won’t reduce from ⊕Clique directly, but instead +from the following, more general problem: +▶ Definition 11 (⊕cp-Hom). Let H be a class of graphs. The problem ⊕cp-Hom(H) has +as input a graph H ∈ H and a surjectively H-coloured graph (G, c). The goal is to compute +⊕Hom((H, idH) → (G, c)). The problem is parameterised by |H|. +The following lower bound was proved independently in [27, 29] and [11]. +▶ Theorem 12. Let H be a recursively enumerable class of graphs. If the treewidth of H is +unbounded then ⊕cp-Hom(H) is ⊕W[1]-hard and, assuming the rETH, it cannot be solved +in time f(|H|) · |G|o(tw(H)/ log tw(H)) for any function f. +Next is the central problem in this work. +▶ Definition 13 (⊕Sub). Let H be a class of graphs. The problem ⊕Sub(H) has as input +a graph H ∈ H and a graph G. The goal is to compute ⊕Sub(H → G). The problem is +parameterised by |H|. +For example, writing K for the set of all complete graphs, the problem ⊕Sub(K) is +equivalent to ⊕Clique. +Complexity Monotonicity and Inclusion-Exclusion +Throughout this work, we will rely on two important tools introduced in [29]. For the sake +of being self-contained, we encapsulate them below in individual lemmas. +The first tool is an adaptation of the so-called Complexity Monotonicity principle to +the realm of fractured graphs and modular counting (see [29, Sections 4.1 and 6.3] for a +detailed treatment and for a proof). Intuitively, the subsequent lemma states that evaluating, +modulo 2, a linear combination of colour-prescribed homomorphism counts from fractured +graphs, is as hard as evaluating its hardest term with an odd coefficient. +▶ Lemma 14 ([29]). There is a deterministic algorithm A and a computable function f such +that the following conditions are satisfied: +1. A expects as input a graph Q and a Q-coloured graph (G, c). +2. A is equipped with oracle access to a function +(G′, c′) �→ +� +ρ +a(ρ) · ⊕Hom((Q +♯ +ρ, cρ) → (G′, c′)) +mod 2 , +where the sum is over all fractures of Q and a is a function from fractures of Q to integers. +3. Each oracle query (G′, c′) is of size at most f(|Q|) · |G|. +4. A computes ⊕Hom((Q +♯ +ρ, cρ) → (G, c)) for each fracture ρ with a(ρ) ̸= 0 mod 2. +5. The running time of A is bounded by f(|Q|) · |G|O(1). +The second tool is a standard application of the inclusion-exclusion principle (see e.g. [29, +Sections 4.2 and 6.3]). It will be used in the final steps of our reductions to remove the +colourings. + +8 +Parameterised and Fine-grained Subgraph Counting, modulo 2 +▶ Lemma 15 ([29]). There is a deterministic algorithm A that satisfies the following condi- +tions: +1. A expects as input a graph H with k edges, a graph G and a k-edge colouring γ of G. +2. A is equipped with oracle access to the function ⊕Sub(H → ⋆), and each oracle query G′ +satisfies |G′| ≤ |G|. +3. A computes ⊕ColSub(H → (G, γ)). +4. The running time of A is bounded by 2|H| · |G|O(1). +3 +Classification for Hereditary Graph Classes +In this section, we will completely classify the complexity of ⊕Sub(H) for hereditary classes. +Let us start by restating the classification theorem. +▶ Theorem 4. Let H be a hereditary class of graphs. If H is matching splittable, then +⊕Sub(H) is fixed-parameter tractable. +Otherwise, the problem is ⊕W[1]-complete and, +assuming rETH, cannot be solved in time f(|H|) · |G|o(|V (H)|/ log |V (H)|) for any function f. +The proof of Theorem 4 is split in four cases, which stem from a structural property of +non matching splittable hereditary graph classes H due to Jansen and Marx [23]. For the +statement, we need to consider the following classes: +Fω is the class of all complete graphs. +Fβ is the class of all complete bipartite graphs. +FP2 is the class of all P2-packings, that is, disjoint unions of paths with two edges.1 +FK3 is the class of all triangle packings, that is, disjoint unions of the complete graph of +size 3. +▶ Theorem 16 (Theorem 3.5 in [23]). Let H be a hereditary class of graphs. If H is not +matching splittable then at least one of the following are true: (1.) Fω ⊆ H, (2.) Fβ ⊆ H, +(3.) FP2 ⊆ H, or (4.) FK3 ⊆ H. +Thus, it suffices to consider cases 1. - 4. to prove Theorem 4. We start with the easy +cases of cliques and bicliques; they follow implicitly from previous works [11, 16, 27] and we +only include a proof for completeness. Note that a tight bound under rETH is known for +those cases: +▶ Lemma 17. Let H be a hereditary class of graphs. If Fω ⊆ H or Fβ ⊆ H then ⊕Sub(H) +is ⊕W[1]-hard and, assuming rETH, cannot be solved in time f(|H|) · |G|o(|V (H)|) for any +function f. +Proof. If Fω ⊆ H then ⊕W[1]-hardness follows immediately from the fact that ⊕Clique +is the canonical ⊕W[1]-complete problem [11]. For the rETH lower bound, we can reduce +from the problem of deciding the existence of a k-clique via a (randomised) reduction using a +version of the Isolation Lemma due to Williams et al. [36, Lemma 2.1]. This reduction does +not increase k or the size of the host graph and is thus tight with respect to the well-known +lower bound for the clique problem due to Chen et al. [7, 8]: Deciding the existence of a +k-clique in an n-vertex graph cannot be done in time f(k) · no(k) for any function f, unless +ETH fails. Our lower bound under rETH follows since the reduction is randomised. +1 To avoid confusion, we remark that [23] uses P3 to denote the path of two edges (and three vertices). +In the current work, it will be more convenient to use the number of edges of a path as index. + +L. A. Goldberg and M. Roth +9 +If Fβ ⊆ H, then the claim holds by [16, Theorem 5], which established the problem of +counting, modulo 2, the induced copies of a k-by-k-biclique in an n-vertex bipartite graph +to be ⊕W[1]-hard and not solvable in time f(k) · no(k) for any function f, unless rETH +fails. Since a copy of a biclique (with at least one edge) in a bipartite graph must always be +induced, the claim follows. This concludes the proof of Lemma 17. +◀ +The more interesting cases are FP2 ⊆ H and FK3 ⊆ H. One reason for this is that, in +contrast to cliques and bicliques, the decision version of those instances are fixed-parameter +tractable. Hence a reduction from the decision version via e.g. an isolation lemma does not +help. In other words, establishing hardness for those cases requires us to rely on the full +power of counting modulo 2. More precisely, we will rely on the framework of fractures +graphs (see Section 2). Both cases can be considered simpler applications of the machinery +used in the later sections, so we will present all steps in great detail. While this might seem +unnecessary given the simplicity of the constructions, we hope that it enables the reader to +make themselves familiar with the general reduction strategies which will be used throughout +the later sections of this work. +3.1 +Triangle Packings +The goal of this subsection is to establish hardness of ⊕Sub(FK3). To this end, let ∆ be an +infinite computable class of cubic bipartite expander graphs, and let Q = {L(H) | H ∈ ∆} +where L(H) is constructed as follows: Each v ∈ V (H) becomes a triangle with vertices vx, +vy, and vz corresponding to the three neighbours x, y, and z of v. Finally, for every edge +{u, v} ∈ E(H) we identify vu and uv. In fact, L(H) is just the line graph of H: Every edge of +H becomes a vertex in L(H), and two vertices of L(H) are made adjacent if and only if the +corresponding edges in H are incident. Since all H ∈ ∆ are bipartite (and thus triangle-free), +we can easily observe the following.2 +▶ Observation 18. The mapping v �→ (vx, vy, vz) is a bijection from vertices of H to triangles +in L(H). +We also consider the fracture of L(H) that splits L(H) back into |V (H)| triangles; consider +Figure 2 for an illustration. +▶ Definition 19 (τ(H)). Let H ∈ ∆ and recall that each vertex w of L(H) is obtained by +identifying vu and uv for some edge {u, v} ∈ E(H). Moreover, w has four incident edges +ex, ey, ea, eb, to vx, vy, ua, ub, respectively, where x, y, u are the neighbours of v in H and +v, a, b are the neighbours of u in H. We define τ(H)w := {{ex, ey}, {ea, eb}}, and we proceed +similar for all vertices of L(H). +Next, we use that tw(L(H)) = Ω(tw(H)) (see e.g. [21]). Moreover, tw(L(H)) ≤ |V (L(H))| +since the treewidth of a graph is always bounded by the number of its vertices. Additionally, +|V (L(H))| = |E(H)| by construction. Since the graphs in ∆ are cubic, we further have that +|E(H)| = Θ(|V (H)|) for H ∈ ∆. We combine those bounds with the fact that expander +graphs have treewidth linear in the number of vertices (see e.g. [20]); therefore ∆ and thus +Q have unbounded treewidth. Putting these facts together, we obtain the following. +▶ Fact 20. Q has unbounded treewidth and tw(L(H)) = Θ(|V (L(H))|) = Θ(|V (H)|) for +H ∈ ∆. +2 Observation 18 is also an immediate consequence of Whitney’s Isomorphism Theorem implying that a +triangle of a line graph corresponds to either a claw or to a triangle in its primal graph. + +10 +Parameterised and Fine-grained Subgraph Counting, modulo 2 +We are now able to establish hardness of ⊕Sub(FK3). The proof will heavily rely on the +transformation from edge-coloured subgraphs to homomorphisms established in [29]. +▶ Lemma 21. The problem ⊕Sub(FK3) is ⊕W[1]-hard. Furthermore, on input kK3 and G, +the problem cannot be solved in time f(k) · |G|o(k/ log k) for any function f, unless rETH fails. +Proof. We reduce from ⊕cp-Hom(Q), which, by Fact 20 and Theorem 12, is ⊕W[1]-hard +and for L(H) ∈ Q, it cannot be solved in time f(|L(H)|) · |G|o(|V (L(H))|/ log |V (L(H))|), unless +rETH fails. +Let L and (G, c) be an input instance to ⊕cp-Hom(Q). Recall that ∆ is computable — +that is, there is an algorithm that takes a graph H and determines whether it is in ∆. Thus, +there is an algorithm that takes input L ∈ Q and finds a graph H ∈ ∆ with L = L(H). The +run time of this algorithm depends on |L| but clearly not on (G, c). Let k = |V (H)| and +note that |E(L(H))| = 3k, since, by construction, each vertex v of H becomes a triangle of +L(H). We consider the graph G as a 3k-edge-coloured graph, coloured by cE. That is, each +edge e = {x, y} of G is assigned the colour cE(e) = {c(x), c(y)} which is an edge of L (see +Figure 2 for an illustration). +Now, for any L-coloured graph (G′, c′) recall that ColSub(kK3 → (G′, c′ +E)) is the set of +subgraphs of G′ that are isomorphic to kK3 and that include each edge colour (each edge of +L) precisely once. We will see later that ⊕ColSub(kK3 → (G′, c′ +E)) can be computed using +our oracle for ⊕Sub(FK3) using the principle of inclusion and exclusion. +It was shown in [29, Lemma 4.1] that there is a unique function a such that for every +L-coloured graph (G′, c′) we have3 +#ColSub(kK3 → (G′, c′ +E)) = +� +ρ +a(ρ) · Hom(L +♯ +ρ → (G′, c′)) . +(2) +where the sum is over all fractures of L. Additionally, it was shown in [29, Corollary 4.3] +that +a(⊤) = +� +ρ∈F(kK3,L) +� +w∈V (L) +(−1)|ρw|−1 · (|ρw| − 1)! , +(3) +where ⊤ is the fracture in which each partition consists only of one block (that is, L +♯ +⊤ = L), +and F(kK3, L) is the set of all fractures ρ of L such that L +♯ +ρ ∼= kK3. However, note that, +by Observation 18, there is only way to fracture L into k disjoint triangles, and this fracture +is given by τ(H). Thus, (3) simplifies to +a(⊤) = +� +w∈V (L) +(−1)|τ(H)w|−1 · (|τ(H)w| − 1)! , +(4) +which is odd since each partition of τ(H) consists of precisely two blocks (so in fact the +expression in (4) is (−1)|V (L)|). +Note that the algorithm for ⊕cp-Hom(Q) is supposed to compute ⊕Hom((L, idL) → (G, c)) +which is equal to ⊕Hom(L +♯ +⊤ → (G, c⊤)). Since a(⊤) is odd, we can invoke Lemma 14 to +recover this term by evaluating the entire linear combination (2), that is, by evaluating +the function ⊕ColSub(kK3 → ⋆). More concretely, this means that we need to compute +⊕ColSub(kK3 → (G′, c′ +E)) for some L-coloured graphs (G′, c′) of size at most f(|L|) · |G| for +3 In the language of [29], Equation (2) is obtained by choosing Φ as the property of being isomorphic +to kK3. + +L. A. Goldberg and M. Roth +11 +Figure 2 (Top:) A cubic bipartite graph H ∈ ∆, its line graph L(H), and the fractured graph +induced by τ(H). (Below:) An L(H)-coloured graph (G, c); emphasised in distinct colours is the +edge-colouring cE of G induced by the mapping {u, v} �→ {c(u), c(v)}. Additionally we depict an +element S ∈ ColSub(kK3 → (G, cE)), that is, a subgraph of G isomorphic to kK3 that contains each +edge colour of G precisely once. + +12 +Parameterised and Fine-grained Subgraph Counting, modulo 2 +some computable function f (see 3. in Lemma 14). This can easily be done using Lemma 15 +since we have oracle access to the function ⊕Sub(kK3 → ⋆). We emphasise that, by condition +2. of Lemma 15, each oracle query ˆG satisfies | ˆG| ≤ |G′|, where (G′, c′) is the L-coloured +graph for which we wish to compute ⊕ColSub(kK3 → (G′, c′ +E)). Since |(G′, c′)| ≤ f(|L|) · |G|, +we obtain that | ˆG| ≤ f(|L|) · |G| as well. +Since, by Fact 20, k = Θ(|kK3|) = Θ(|V (L)|) = Θ(tw(L)), our reduction yields ⊕W[1]- +hardness and transfers the conditional lower bound under rETH as desired. +◀ +3.2 +P2-packings +Next we establish hardness for the case of P2-packings. The strategy will be similar in spirit +to the construction for triangle packings; however, rather then identifying a unique fracture +for which the technique applies, we will encounter an odd number of possible fractures in the +current section. +Let ∆ be a computable infinite class of 4-regular expander graphs, and let Q be the class +of all subdivisions of graphs in ∆, that is Q = {H2 | H ∈ ∆}, where H2 is obtained from H +by subdividing each edge once. +We start by establishing an easy but convenient fact on the treewidth of the graphs in Q. +▶ Lemma 22. Q has unbounded treewidth and tw(H2) = Θ(|V (H)|) for H ∈ ∆. +Proof. As in Section 3.1, tw(H) = Θ(|V (H)|) for H ∈ ∆, since expanders have treewidth +linear in the number of vertices. Since H is a minor of H2, and since taking minors cannot +increase treewidth (see [14, Exercise 7.7]), we thus have that tw(H2) = Ω(|V (H)|)). Finally, +we have tw(H2) ≤ |V (H2)| since the treewidth is at most the number of vertices, and +|V (H2)| = O(|V (H)|) since H is 4-regular. In combination, we obtain tw(H2) = Θ(|V (H)|) +for H ∈ ∆. Note that this also implies that Q has unbounded treewidth (as ∆ is infinite). +◀ +For what follows, given a subdivision H2 of a graph H, it will be convenient to assume +that V (H2) = V (H) ∪ SE, where SE = {se | e ∈ E(H}) is the set of the subdivision vertices. +▶ Definition 23 (Odd Fractures). Let H ∈ ∆ and let τ be a fracture of H2. We say that τ is +odd if the following two conditions are satisfied: +1. For each s ∈ SE the partition τs consists of two singleton blocks. +2. For each v ∈ V (H) the partition τv consists of two blocks of size 2. +Consider Figure 3 for a depiction of an odd fracture. +The following two lemmas are crucial for our construction. +▶ Lemma 24. Let H ∈ ∆. The number of odd fractures of H2 is odd. +Proof. The first condition in Definition 23 leaves only one choice for subdivision vertices. +Let us thus consider a vertex v ∈ V (H) = V (H2) \ SE. Since H is 4-regular, there are 4 +incident edges to v. Now note that there are precisely 3 partitions of a 4-element set with two +blocks of size 2. Thus the total number of odd fractures of H2 is 3|V (H)|, which is odd. +◀ +▶ Lemma 25. Let H ∈ ∆, let k = 2|V (H)| and let τ be a fracture of H2 such that τv consists +of at most 2 blocks for each v ∈ V (H2). Then H2 +♯ +τ ∼= kP2 if and only if τ is odd. +Proof. First observe that |E(H2)| = 2|E(H)| = 4|V (H)| = 2k. Thus the number of edges of +H2 +♯ +τ is equal to 2k (for each fracture τ of H2), which is also equal to the number of edges +of kP2. + +L. A. Goldberg and M. Roth +13 +Figure 3 (Top:) Subdividing a 4-regular expander in ∆ depicted by the neighbourhood of an +individual vertex. (Centre:) Illustrations of odd fractures (Definition 23). For each non-subdivision +vertex, there are only three ways to satisfy 2. in Definition 23. This observation is used in Lemma 24 to +show that the number of odd fractures is a power of 3. (Bottom:) Elements of ColSub(kP2 → (G, cE)) +inducing fractures of H2 such that each partition has at most two blocks. Lemma 25 shows that +those are precisely the odd fractures of H2. + +14 +Parameterised and Fine-grained Subgraph Counting, modulo 2 +Thus, H2 +♯ +τ is isomorphic to kP2 if and only if each connected component of H2 +♯ +τ is +a path of length 2. It follows immediately by Definition 23 that τ being odd implies that +H2 +♯ +τ consists only of disjoint P2. It thus remains to show the other direction. +Assume for contradiction that there is a subdivision vertex s ∈ SE of H2 such that τs +consists of only one block (recall that s has degree 2, thus τs either consists of two singleton +blocks, or of one block of size 2). Let e = {u, v} ∈ E(H) be the edge corresponding to s, that +is, s was created by subdividing e. Since H2 +♯ +τ is a union of P2, we can infer that τv and τu +contain a singleton block (otherwise we would have created a connected component which is +not isomorphic to P2). Now recall that both u and v have degree 4, since H is 4-regular. We +obtain a contradiction as follows: By assumption of the lemma, we know that τv and τu can +have at most two blocks. Since we have just shown that both contain a singleton block, it +follows that both τv and τu contain one further block of size 3. However, a block of size 3 +yields a vertex of degree 3 in the fractured graph H2 +♯ +τ, contradicting the fact that H2 +♯ +τ +consists only of disjoint P2. +Thus we have established that, for each s ∈ SE, the partition τs consists of two singleton +blocks. Given this fact, the only way for H2 +♯ +τ being a disjoint union of P2 is that each +partition τv, for v ∈ V (H) = V (H2) \ SE, consists of two blocks of size 2. +◀ +We are now able to prove our hardness result. +▶ Lemma 26. The problem ⊕Sub(FP2) is ⊕W[1]-hard. Furthermore, on input kP2 and G, +the problem cannot be solved in time f(k) · |G|o(k/ log k) for any function f, unless rETH fails. +Proof. We reduce from ⊕cp-Hom(Q), which, by Lemma 22 and Theorem 12, is ⊕W[1]-hard +and for H′ ∈ Q, it cannot be solved in time f(|H′|) · |G|o(|V (H′)|/ log |V (H′)|), unless rETH +fails. +Let H′ and (G, c) be an input instance to ⊕cp-Hom(Q). There is an algorithm that +takes as input a graph H′ ∈ Q and finds a graph H ∈ ∆ with H′ = H2 — this is basically +2-colouring. The run time of this algorithm depends on |H′| but clearly not on (G, c). Let +k = 2|V (H)| and note that |E(H2)| = 2|E(H)| = 4|V (H)| = 2k. We consider the graph G +as a 2k-edge-coloured graph, coloured by cE. That is, each edge e = {x, y} of G is assigned +the colour cE(e) = {c(x), c(y)} which is an edge of H′ = H2. +Now, for any H2-coloured graph (G′, c′) recall that ColSub(kP2 → (G′, c′ +E)) is the set of +subgraphs of G′ that are isomorphic to kP2 and that include each edge colour (each edge of +H2) precisely once. We will see later that ⊕ColSub(kP2 → (G′, c′ +E)) can be computed using +our oracle for ⊕Sub(FP2) using the principle of inclusion and exclusion. +It was shown in [29, Lemma 4.1] that there is a unique function a such that, for every +H2-coloured graph (G′, c′), +#ColSub(kP2 → (G′, c′ +E)) = +� +ρ +a(ρ) · Hom(H2 +♯ +ρ → (G′, c′)) . +(5) +where the sum is over all fractures of H2. As in Section 3.1 from [29, Corollary 4.3] we know +that +a(⊤) = +� +ρ∈F(kP2,H2) +� +w∈V (H2) +(−1)|ρw|−1 · (|ρw| − 1)! , +(6) +where ⊤ is the fracture in which each partition consists only of one block and F(kP2, H2) is +the set of all fractures ρ of H2 such that H2 +♯ +ρ ∼= kP2. +Our next goal is to show that a(⊤) = 1 mod 2. First, suppose that a fracture ρ contains +a partition ρw with at least three blocks. Then (|ρw| − 1)! = 0 mod 2. Thus such fractures + +L. A. Goldberg and M. Roth +15 +do not contribute to a(⊤) if arithmetic is done modulo 2. Next, note that if, for each w, the +partition ρw contains at most 2 blocks, then +� +w∈V (H2) +(−1)|ρw|−1 · (|ρw| − 1)! = 1 +mod 2. +Let Odd(kP2, H2) be the set of all fractures ρ of H2 such that H2 +♯ +ρ ∼= kP2 and each +partition of ρ consists of at most 2 blocks. Our analysis then yields a(⊤) = |Odd(kP2, H2)| +mod 2. Finally, Lemma 25 states that Odd(kP2, H2) is precisely the set of odd fractures, and +Lemma 24 thus implies that |Odd(kP2, H2)| = 1 mod 2. Consequently, a(⊤) = 1 mod 2 as +well, and we have achieved the goal. +Next we can proceed similarly to the case of triangle packings. As in that case, the goal +is to compute ⊕Hom((H2, idH2) → (G, c))) which is equal to ⊕Hom((H2 +♯ +⊤, c⊤) → (G, c)). +Since a(⊤) is odd, we can invoke Lemma 14 to recover this term by evaluating the entire +linear combination (5), that is, if we can evaluate the function ⊕ColSub(kP2 → ⋆). This can +be done by using Lemma 15. Each call to the oracle is of the form ⊕Sub(kP2 → ˆG) where +| ˆG| is bounded by f(k) · |G|. +Now recall that k ∈ Θ(|V (H)|). By Lemma 22, we thus have k = Θ(tw(H2)). Hence our +reduction yields ⊕W[1]-hardness and transfers the conditional lower bound under rETH as +desired. +◀ +We can now conclude the treatment of hereditary pattern classes by proving Theorem 4, +which we restate for convenience. +▶ Theorem 4. Let H be a hereditary class of graphs. If H is matching splittable, then +⊕Sub(H) is fixed-parameter tractable. +Otherwise, the problem is ⊕W[1]-complete and, +assuming rETH, cannot be solved in time f(|H|) · |G|o(|V (H)|/ log |V (H)|) for any function f. +Proof. The fixed-parameter tractability result was shown in [11]. For the hardness result, +using the fact that H is not matching splittable and Theorem 16 we obtain four cases. +If H contains all cliques or all bicliques, then hardness follows from Lemma 17. +If H contains all triangle packings, then hardness follows from Lemma 21. +If H contains all P2-packings, then hardness follows from Lemma 26. +Since the case distinction is exhaustive, the proof is concluded. +◀ +4 +Classification for Trees +Our overall goal is to prove Theorem 5, which we restate for convenience: +▶ Theorem 5. Let T be a recursively enumerable class of trees. If T is matching splittable, +then ⊕Sub(T ) is fixed-parameter tractable. Otherwise ⊕Sub(T ) is ⊕W[1]-complete. +We start by introducing some terminology for trees which will be used in the remainder +of this section. +▶ Definition 27 (2-paths). A 2-path of length a of a tree T is a path x0, x1, . . . , xa such that +deg(x0) ̸= 2, deg(x1) = · · · = deg(xa−1) = 2 and deg(xa) ̸= 2. +Next we introduce rays, which are restricted 2-paths that will be crucial in our analysis. + +16 +Parameterised and Fine-grained Subgraph Counting, modulo 2 +▶ Definition 28 (source, ray, degL,a, degL, and degNL). Let T be a tree. A source of T is any +vertex with degree greater than 2. A ray of length a of T is a 2-path x0, x1, . . . , xa such that +deg(x0) > 2 and deg(xa) = 1. We call x0 the source of the ray. Given a vertex s of degree +at least 3, we write degL,a(s) for the number of rays of length a with source s. We set +degL(s) := +� +a +degL,a(s) . +Finally, we set degNL(s) := deg(s) − degL(s). +Next, we introduce parameters Fa,b, Sc and Cd. Our goal is then to show that, for every +non-matching-splittable class of trees, at least one of those two parameters is unbounded. +▶ Definition 29 (Forks and Fa,b). Let a, b be positive integers. A source s of a tree T is +called an a-b-fork if degNL(s) = 1 and one of the following is true +a ̸= b and degL,a(s), degL,b(s) > 0. +a = b and degL,a(s) > 1. +The a-b-fork number of T, denoted by Fa,b(T) is the maximum size of an independent set +containing only a-b-forks. Finally, we say that a class of trees T has unbounded fork number +if for every positive integer B there are positive integers a and b and a tree T ∈ T such that +Fa,b(T) ≥ B. +▶ Definition 30 (Stars and Sc). A star of size k > 1 in a tree T is a collection of k distinct +rays that have a common source s. For a positive integer c ≥ 3, a c-star of size k in a tree T +is a collection of k distinct rays of length c that have a common source s. +The c-star number of a tree T, denoted by Sc(T) is the maximum size of a c-star in +T. Finally, we say that a class of trees T has unbounded star number if for every positive +integer B there exists c ≥ 3, and a tree T ∈ T such that Sc(T) ≥ B. +▶ Definition 31 (C-gadgets and Cd). A C-gadget4 of order d and length k in a tree T is a +path x0, . . . , xk such that one of the following is true for each inner vertex xi ∈ {1, . . . , k −1}: +(i) +deg(xi) = 2, that is N(xi) = {xi−1, xi+1}, or +(ii) +xi is a source and every neighbour v ∈ N(xi)\{xi−1, xi+1} is contained in a ray of length +at most d from xi to a leaf. +The Cd-number of a tree T, denoted by Cd(T) is the length of the longest C-gadget of order d. +Finally, we say that a class of trees T has unbounded C-number if there exists d > 0 such +that for every positive integer B, and a tree T ∈ T such that Cd(T) ≥ B. +Note that the ordering of the quantifiers in the definition of the Cd-number is different from +the ordering in the definition of the c-star-number. This is due to technical reasons which +are important for the proof of Lemma 32. +▶ Lemma 32. Let T be a class of trees. If T is not matching splittable, then T has either +unbounded fork number, unbounded star number, or unbounded C-number. +Proof. We can assume that there is an overall bound d on the length of 2-paths in trees in +T : Otherwise, T already has unbounded C-number (see (i) in Definition 31)). Hence the +length of every ray in any tree in T is bounded by d as well. Thus +T has unbounded fork number if and only if for every positive integer B there are +a, b ∈ {1, . . . , d} and a tree T ∈ T such that Fa,b(T) ≥ B. +4 C stands for caterpillar, the shape of which resembles the structure of a C-gadget. + +L. A. Goldberg and M. Roth +17 +T has unbounded C-number if and only if Cd is unbounded in T (see Definition 31)). +T has unbounded star number if and only if for every positive integer s there is a +c ∈ {3, . . . , d} and a tree T ∈ T such that Sc(T) ≥ s. +We split the proof into two cases. +Case 1. T has unbounded diameter. +In Case 1, we show that T has unbounded fork number or unbounded C-number. If Cd +is unbounded in T then T has unbounded C-number and we are done so assume that there +is a constant h such that Cd(T) ≤ h for every T ∈ T . +Now let B be a positive integer. We show that there are a, b ∈ {1, . . . , d} and T ∈ T +with Fa,b(T) ≥ B. To this end, we use the premise that T has unbounded diameter. Let +k > (h + 2)(Bd2 + 1) be a positive integer, and let T ∈ T be such that there is a path +P = s, p0, . . . , pk, t in T. Observe that the deletion of all edges in P decomposes T into a +family of disjoint subtrees. We write Ti for the subtree that contains pi. Now decompose P +into segments P1, P2, . . . of length h + 2. Note that a segment Pj = pj0, . . . , pjh+2 yields a +C-gadget of order d and length > h if and only if Tji is either a star or an isolated vertex for +each i ∈ {1, . . . , h + 1}. +Since no such C-gadgets exist by assumption, we obtain that each segment Pj of the path +P contains a vertex pij such that Tij is neither a star nor an isolated vertex. +Assume that Tij is rooted at pij. Since Tij is neither an isolated vertex nor a star, there +must be a (proper) descendant vij of pij (in Tij) such that vij is an (aij, bij)-fork for some +aij, bij ∈ {1, . . . , d}. Now note that there are at most d2 pairs of integers in {1, . . . , d}. Since +we have at least one fork for every segment and since there are at least ⌊k/(h + 2)⌋ > Bd2 + 1 +segments, we thus obtain by the pigeon-hole principle that there is a pair a, b ∈ {1, . . . , d} +such that, for at least B segments Pij, the node vij is an (a, b)-fork in Tij and thus also in +T. Since those forks are pairwise non-adjacent, we obtain, as desired, that the (a, b)-fork +number of T is at least B, concluding Case 1. +Case 2. T has bounded diameter. +Let D be the assumed upper bound on the diameter of trees in T . If T has unbounded +star number then we are finished. Assume instead that T has bounded star number. Then +there is a positive integer s such that for all c ∈ {3, . . . , d} and every tree T ∈ T , Sc(T) < s. +We will show that T has unbounded fork number. Consider any positive integer B. We will +show that there are a, b ∈ {1, . . . , d} and T ∈ T with Fa,b(T) ≥ B. +Let k > (D+1)(Bd2 +1)(d2s+1) be a positive integer. Since T is not matching splittable, +there is a tree T ∈ T whose matching-split number is at least k. Note that T is not a +path since every path with matching-split number at least k has length greater than k > D, +contradicting the bound on the diameter. +Now fix any vertex r of T as the root. Given a vertex v of T, we write Tv for the subtree +rooted at v (assuming that r is the overall root). We call v a rooted fork if Tv is a star — +observe that each rooted fork must indeed be a fork. Let f be the number of rooted forks. +Similar to the argument in Case 1, if f > Bd2 + 1, then by the pigeon-hole principle there +are a, b ∈ {1, . . . , d} such that Fa,b(T) ≥ B. +Hence assume for contradiction that f ≤ Bd2 + 1. Let R be the set of all rays of T and +recall that each ray in R is, by definition, a 2-path of the form R = x0, . . . , xd′ for d′ ≤ d, +where deg(x0) > 2 and xd′ is a leaf. We call a ray R long if d′ ≥ 3. Note that the source of +every ray must either be a rooted fork, or it must lie on a path from the root r to one of the +rooted forks. +Let T ′ be the subtree of T induced by all vertices that lie on paths between r and a +rooted fork (including r and all rooted forks). Since there are f rooted forks and the depth + +18 +Parameterised and Fine-grained Subgraph Counting, modulo 2 +of T is bounded by D, |V (T ′)| ≤ (D + 1)f ≤ (D + 1)(Bd2 + 1). +Consider a vertex v of T ′. Assume for contradiction that v is the source of > ds long +rays (in T). Recall that for all c ∈ {3, . . . , d} we have that Sc(T) < s. Recall further that +each long ray has length d′ for some 3 ≤ d′ ≤ d. Thus we obtain a contradiction by the +pigeon-hole principle. +Now let S be the set containing all vertices of T ′ and all vertices of long rays. Noting +that each long ray has length at most d, and that the source of each long ray must be a +vertex of T ′ by construction, we can use the observation that each vertex of T ′ is the source +of at most ds long rays to (generously) bound +|S| ≤ |V (T ′)| + |V (T ′)| · d · ds . +Note further that T[V (T) \ S] consists only of isolated edges and vertices: The only vertices +in V (T) \ S are non-source vertices of rays of length < 3, the sources of which are in T ′. +Thus, S is a splitting set. Finally, recalling that |V (T ′)| ≤ (D + 1)f ≤ (D + 1)(Bd2 + 1), we +have +|S| ≤ |V (T ′)| + |V (T ′)| · d · ds ≤ (D + 1)(Bd2 + 1)(d2s + 1) , +contradicting the fact that the matching-split number of T is strictly larger than (D + +1)(Bd2 + 1)(d2s + 1). This concludes Case 2, and hence the proof. +◀ +In the next three subsections, we will prove hardness of ⊕Sub(T ) for non-matching- +splittable T in each of the three cases given by Lemma 32. +4.1 +Unbounded C-number +For our hardness proof, it will be useful to find a proper sub-gadget of a C-gadget in a tree. +▶ Definition 33 (Strong C-gadgets, junctions, and closedness). Let C = x0, . . . , xL be a +C-gadget of order d and length L in a tree T. We call C a strong C-gadget with k junctions +if there are integers 0 = i0 < i1 < · · · < ik < ik+1 = L such that +(I) +for all j ∈ {0, . . . , k}, ij+1 − ij > 2d, and +(II) +for all j ∈ {1, . . . , k}, xij is the source of a ray Rj of length d that does not contain one of +the neighbours xij−1 and xij+1 of xij. The vertices xi1, . . . , xik are called the junctions. +Finally, a strong C-gadget is called closed if neither xi1 nor xik are forks.5 +Consider the bottom part of Figure 4 for a visualisation. We start with the following lemma +which establishes the existence of a strong C-gadget with many junctions inside a long enough +C-gadget. +▶ Lemma 34. Let T be a tree such that the longest 2-path in T has length d ≥ 1, and let +k be a positive integer. Then there exists L > 0 (only depending on k and d) such that +the following is true: If T contains an C-gadget of order d and length L, then there exists +1 ≤ d′ ≤ d such that T contains a strong C-gadget of order d′ with at least k junctions. +Proof. Let f(x) = x/(k + 1) − 2d − 1 and let L be large enough such that f d(L) > d. Let +Hd = x0, . . . , xL be a C-gadget of order d and length L in T. +Let d′ = d. Note that Hd′ is a C-gadget of order d′ and length at least L = f d−d′(L) in +T. For each graph Hd′ with d′ ≥ 1 we will either +5 The condition of being closed rules out the special case in which x0 or xL are leaves of T. More generally +it rules out the case where there is a ray from x1 including x0 or from xk including xL. + +L. A. Goldberg and M. Roth +19 +(1) construct a strong C-gadget with k junctions with order d′, or +(2) find a subsequence Hd′−1 of Hd′ that is an C-gadget of order d′ − 1 of length at least +f d−(d′−1)(L). +If we ever do (1) we are finished. If from d′ = 1 we do (2) then we find a 2-path of length at +least f d(L) > d, which is a contradiction. +Here is how we proceed from Hd′ = y0, . . . , yℓ. We set i0 = 0. Then iteratively, for each +j ∈ {1, . . . , k} we will either construct Hd′−1 as in (2) or we find ij ∈ {ij−1 + 2d + 1, . . . , ℓ} +such that yij is the source of a length-d′ ray that does not contain yij − 1 or yij + 1. If we +succeed in defining i1, . . . , ik, ik+1 in this way then y0, . . . , yik+1 is a strong C-gadget with k +junctions of order d′ so (1) is satisfied. +Let us now make this argument rigorous; again, assume that Hd′ = y0, . . . , yℓ is a C- +gadget of order d′ and length ℓ ≥ f d−d′(L). Set i0 = 0 and, starting with j = 0, proceed +iteratively as follows: +1. Let Sj be the set of all indices i ∈ {ij−1 + 2d + 1, . . . , ℓ} such that yi is the source of a +length-d′ ray that does not contain yi−1 and yi+1. +2. If Sj = ∅ then set stop = j and terminate. Otherwise, set ij = min Sj and j ← j + 1, and +go back to 1. +We now distinguish two cases: If stop ≥ k + 1, then we found indices i0, . . . , ik+1 such +that ˆHd′ := y0, . . . , yik+1 is a strong hardness gadget of order d′ with k junctions; hence we +achieved (1) and we are done. Otherwise we have stop < k + 1. Let Ij := {ij, . . . , ij+1 − 1} +for all 0 ≤ j < stop, and let Istop = {istop, . . . , ℓ}. By the pigeon-hole principle, at least one +of those intervals, say Ij′, has size at least ℓ/(stop + 1) ≥ ℓ/(k + 1). Now, by construction of +our iterative procedure above, we find that the sub-interval {ij′ + 2d + 1, . . . , ij′+1 − 1} ⊆ Ij′ +contains no index i such that yi is the source of a length-d′ ray that does not contain yi−1 +and yi+1. Thus, the subsequence Hd′−1 := yij′+2d+1, . . . , yij′+1−1 constitutes a C-gadget +of order d′ − 1. Furthermore, Hd′−1 has length at least ℓ/(k + 1) − 2d − 1 = f(ℓ). Since +ℓ ≥ f d−d′(L), and since f is monotonically increasing, we find that f(ℓ) ≥ f d−(d′−1)(L). +Hence we achieved (2) and we can conclude this case as well. +◀ +Now, by removing the first and the last junction, we can also ensure the existence of a +closed strong C-gadget +▶ Corollary 35. Let T be a tree such that the longest 2-path in T has length d ≥ 1, and +let k be a positive integer. Then there exists L > 0 (only depending on k and d) such that +the following is true: If T contains an C-gadget of order d and length L, then there exists +1 ≤ d′ ≤ d such that T contains a closed strong C-gadget of order d′ with at least k junctions. +Proof. Use Lemma 34 with k + 2 rather than k and observe that every strong C-gadget with +k + 2 junctions also yields a closed strong C-gadget with k junctions by removing i1 and +ik+2 from the list of indices. Since xi1 and xik+2 must have degree at least 3 (they are inner +vertices of a C-gadget and they are junctions), we obtain that neither xi2 and xik+1 can be +forks of T. +◀ +4.1.1 +Constructions of Q and ˆG +For the scope of this subsection, to avoid notational clutter, we assume the following are +given: +Positive integers k and d. + +20 +Parameterised and Fine-grained Subgraph Counting, modulo 2 +A tree T that contains a closed strong C-gadget H = x0, . . . , xℓ of order d with k junctions +xi1, . . . , xik. Additionally, for each j ∈ [k], we fix a ray Rj = xij, r1 +j, . . . , rd +j of length d, +the source of which is xij and which does not contain one of the neighbours xij−1 and +xij+1 — note that the Rj must exist as the xij are junctions. +A k-vertex cubic graph ∆ containing a Hamiltonian cycle v1, . . . , vk, v1. +We emphasise that the set of edges of ∆ not contained in the Hamilton cycle must +constitute a perfect matching, that is, a set of k/2 pairwise non-incident edges. This must +be satisfied since ∆ is cubic. +▶ Definition 36. The core of H, denoted by C(H), contains the subsequence xi1, xi1+1, . . . , xik−1, xik +and the vertices of the rays Rj, that is +C(H) := {xi1, xi1+1, . . . , xik−1, xik} ∪ +k� +j=1 +V (Rj) . +▶ Definition 37 (Q(∆, T, H) and τQ). Set ℓj := ij+1 − ij. The graph Q = Q(∆, T, H) is +obtained from ∆ as follows: +1. The edge {vk, v1} is deleted. +2. For each j ∈ {1, . . . , k − 1} the edge {vj, vj+1} is replaced by a path of length ℓj: +Pj = vj, u1 +j, . . . , uℓj−1 +j +, vj+1 , +where the ut +j are fresh vertices. +3. Each edge e = {vi, vj} not contained on the Hamilton cycle, i.e., j /∈ {i − 1, i + 1}, is +replaced by a path Pi,j of length 2d: +Pi,j = vi, w1 +i , . . . , wd−1 +i +, m(e), wd−1 +j +, . . . , w1 +j, vj , +where the wt +i and wt +j are fresh vertices. +Finally τ = τ(∆, T, H) is a fracture of Q defined as follows: For each m(e), the partition +τm(e) contains two singleton blocks, and for all remaining vertices v of Q the partition τv +only contains one block. +Since ∆, T and H are fixed in this subsection, to avoid notational clutter, we just write Q +and τ, rather than Q(∆, T, H) and τ(∆, T, H). +It turns out that Q is isomorphic to a quotient graph of T[C(H)] obtained by identifying +the endpoints of the rays Ri and Rj for every {vi, vj} ∈ E(∆) with j /∈ {i − 1, i + 1}. This +induces a homomorphism from T[C(H)] to Q that will be useful in the construction of ˆG; +hence we explicitly define this mapping below: +▶ Definition 38 (γ). We define a function γ : C(H) → V (Q) as follows. +1. We map the sequence xi1, xi1+1, . . . , xik−1, xik in C(H) to the sequence v1, . . . , vk in Q. +More precisely, for each j ∈ {1, . . . , k − 1} and t ∈ {1, . . . , ℓj − 1}, we set γ(xij) := vj +and γ(xij+t) := ut +j. +2. For each edge e = {vi, vj} of ∆ with j /∈ {i − 1, i + 1}, we map V (Ri) and V (Rj) to the +path Pi,j. More precisely, for each t ∈ {1, . . . , d − 1} we set γ(rt +i) := wt +i and γ(rt +j) = wt +j. +Furthermore, we set γ(rd +i ) := m(e) =: γ(rd +j ). (Note that the images of the sources of the +rays Ri and Rj are already set in 1.) +▶ Observation 39. The function γ is an edge-bijective homomorphism from T[C(H)] to Q. +Let us provide the induced egde-bijection explicitly: + +L. A. Goldberg and M. Roth +21 +▶ Definition 40. (E′, γE) Define E′ := E(T[C(H)]), that is, E′ ⊆ E(T) contains all +edges on the sub-path xi1, . . . , xik of H and all edges of the rays R1, . . . , Rk. We write +γE : E′ → E(Q) for the edge-bijection from E′ to E(Q) induced by the homomorphism γ. +Now let (G, c) be a Q-coloured graph. We state the following fact explicitly, since it will +be crucial in our construction: +▶ Observation 41. Let (G, c) be a Q-coloured graph. The mapping cE ◦ γ−1 +E +is a map from +E(G) to E′. +Our goal is to construct a graph ˆG = ˆG(G, c, T, H) from G, and an edge-colouring ˆγ : +E( ˆG) �→ E(T) whose range is E(T) such that +⊕Emb((Q +♯ +τ, cτ) → (G, c)) = ⊕ColSub(T → ( ˆG, ˆγ)), +that is, the number of colour-preserving embeddings from the fractured graph Q +♯ +τ to (G, c) +is equal, modulo 2, to the number of subgraphs of ˆG that are isomorphic to T and that +contain each edge-colour in E(T) precisely once. +For what follows, let V (R) := ∪k +j=1V (Rj) be the set of all vertices of the rays R1, . . . , Rk. +We are now able to define ˆG = ˆG(G, c, T, H); the construction is illustrated in Figure 4. +The definition uses the function cE introduced in Definition 6 and the functions γ and γE +introduced in Definitions 38 and 40, respectively. It also uses the mapping cE ◦ γ−1 +E +from +E(G) to E′ (see Observation 41). +▶ Definition 42 ( ˆG(G, c, T, H), ˆγ(G, c, T, H)). Let (G, c) be a Q-coloured graph. The pair +( ˆG, ˆγ) = ( ˆG(G, c, T, H), ˆγ(G, c, T, H)) is an edge-coloured graph constructed as follows, where +the co-domain of ˆγ is E(T): +(A) +The graph ˆG contains G as a subgraph. For each e ∈ E(G), define ˆγ(e) = γ−1 +E (cE(e)). +(B) +The vertex set of ˆG is the union of V (G) and V (T) \ C(H). +(C) +Pairs of vertices in V (T) \ C(H) are connected by an edge in ˆG if and only if they are +adjacent in T. For each such edge e, ˆγ(e) = e. +(D) +The remaining edges of ˆG are defined as follows. For each edge e ∈ E(T) that connects a +vertex z ∈ V (T) \ C(H) to a vertex y ∈ C(H) there are corresponding edges in ˆG. These +edges connect z to all vertices g ∈ V (G) such that c(g) = γ(y) For each such edge e′ in ˆG, +ˆγ(e′) = e. +Observe that for each element Tcol ∈ ColSub(T → ( ˆG, ˆγ)) the induced subgraph +Tcol[G] := Tcol[V (Tcol) ∩ V (G)] +of Tcol is an edge-colourful subgraph in G, that is, Tcol[G] contains precisely one edge per +edge-colour of G under the edge colouring ˆγ hence it contains precisely one edge per edge- +colour of G under cE. As shown in Section 3 in the full version [30] of [31], Tcol[G] thus +induces a fracture ρ = ρ(Tcol) of Q: Two edges {v, w} and {v, y} of Q are in the same block +in the partition ρv corresponding to vertex v of Q if and only if the edges of Tcol[G] that are +coloured γ−1 +E ({v, w}) and γ−1 +E ({v, y}) are adjacent. In what follows, we show that ρ must +always be equal to τ(∆, T, H) (see Definition 37). +▶ Lemma 43. For every Tcol ∈ ColSub(T → ( ˆG, ˆγ)) we have that ρ(Tcol) = τ(∆, T, H). +Proof. To avoid notational clutter, we set ρ := ρ(Tcol) and τ := τ(∆, T, H). Let T1 and T2 +be the subtrees of T attached to the ends of the C-gadget H as shown in the bottom part of +Figure 4. + +22 +Parameterised and Fine-grained Subgraph Counting, modulo 2 +Figure 4 (Below): The tree T containing a closed strong C-gadget of order d; the green dashed +lines are rays of length d. (Left): The construction of ˆG = ˆG(G, c, T, H); note that the removal of +the vertices and edges coloured blue yields G (see Definition 42), and note that G is Q-coloured as +depicted. (Right): The graphs ∆ and Q = Q(∆, T, H); we assume in the picture that {v2, vk−1} is +an edge of ∆. +We first give an overall intuition of the proof; consider Figure 5 for an illustration. Since +Tcol is isomorphic to T, there must be a (unique) path connecting T1 and T2 in ˆG (recall + +L. A. Goldberg and M. Roth +23 +that, since Tcol is edge-colourful and since every edge in T1 and T2 has a different colour — +see (C) in Definition 42 — Tcol must contain all edges in T1 and T2). We claim that this +path must follow the outer cycle in ˆG, in which case the designated rays in R of length d +at the junctions must follow the inwards direction and thus induce τ. To see why the path +connecting T1 and T2 must follow the outer cycle, first recall that Vj is the subset of V (G) +coloured by c with vj. Then recall that the path between Vj and Vj+1 along the outer cycle +in ˆG has length ℓj ≥ 2d + 1. Hence the designated rays in R cannot be used to cover all +edge colours in the path between Vj and Vj+1. +We next provide a rigorous argument. Let +S := V (T1) ∪ V (T2) ∪ {x0, . . . , xi1−1} ∪ {xik+1, . . . , xk+1}. +Note that S is a subset of V (T) \ V (H) hence it is a subset of V (T) and of V ( ˆG). +We first claim that every fork and every ray of length > d of T must be fully contained +in the subgraph of T induced by S. This claim follows from the definition of closed strong +C-gadgets. In particular, the condition of being closed implies that neither xi1 nor xik is a +fork. +As a consequence, every fork and every ray of length greater than d of Tcol must be +contained in the subgraph of ˆG induced by S as well. Additionally, this implies that none of +the vertices in Tcol[G] can be a fork or the source of a ray of length > d in Tcol — otherwise, +Tcol would have either more forks or more rays of length > d than T, contradicting the fact +that Tcol and T are isomorphic. +Recall that V1, . . . , Vk denote the subsets of vertices of G that are coloured by c with +v1, . . . , vk. Now let P be the (unique) path P in Tcol that connects T1 with T2. Then, starting +with V1 and ending with Vk, the path P must pass through a sequence of colour classes +V1 = Vj1, Vj2, . . . , Vjt = Vk of G. The following claim formalises the idea that this sequence +must correspond to the Hamilton cycle v1, . . . , vk in ∆. +Claim: +We have t = k and Vji = Vi for each i ∈ [k]. +Before proving the claim, we show that it implies the lemma. Since, from the claim, P +must follow the outer cycle, the fracture ρ = ρ(Tcol) induced by Tcol must split the inner +paths of length 2d (otherwise Tcol would contain a cycle). However, since there are no sources +or rays of length greater than d outside of S in Tcol, ρ must split all of the inner length-2d +paths at the central vertex m(e). Furthermore, it cannot split additional vertices since this +would disconnect Tcol. Thus, ρ is the fracture τ, concluding the proof. ■ +To conclude the proof, we now prove the claim. Note first that P cannot pass through +any of the colour classes Vi more than once as this would cause Tcol to use an edge-colour +multiple times. Next assume for contradiction that P misses some colour class Va for some +a ∈ [2, k − 1] (i.e., we assume that t < k). Since Tcol is a connected tree containing all of the +edge colours in Q there must be an index ji ̸= a and a vertex u ∈ Vji ∩ P such that Tcol +contains a (unique) path Pu from u to a vertex w ∈ Va. In order to get the contradiction, +root Tcol at u. Construct a subtree Tcol(u) of Tcol as follows: For each neighbour x of u +except the ancestor of w on the path from u, we delete x and all of its descendants. Observe +that the edge colours of Tcol(u) are disjoint from the edge-colours of P and that V (Tcol(u)) +is disjoint from S. Now, if Tcol(u) is a path, then (using that ℓi > 2d), we obtain that u is +the source of a ray in Tcol of length greater than d, contradicting the fact that every ray of +length > d of Tcol is in the subgraph of ˆG induced by S. Otherwise, Tcol(u) contains a fork, +contradicting the fact that all forks of Tcol are in the subgraph of ˆG induced by S. +Having established that t = k and that no Vi is visited more than once, it remains to +show that P visits the colour classes in the correct order, that is Vji = Vi for each i ∈ [k]. + +24 +Parameterised and Fine-grained Subgraph Counting, modulo 2 +Figure 5 Illustration of Lemma 43: The only possibility for an edge-colourful copy of T to be +embedded in ˆG is depicted in red. +Assume for contradiction that this is not the case, which allows us to set +m := min{i ∈ [k] | Vji ̸= Vi} − 1 . +Note that m ≥ 1 since j1 = 1. Let zm ∈ Vm ∩ P and zm+1 ∈ Vm+1 ∩ P and recall that G +contains colour classes U 1 +m, . . . , U ℓm−1 +m +corresponding to the path +Pm = vm, u1 +m, . . . , uℓm−1 +m +, vm+1 + +L. A. Goldberg and M. Roth +25 +in Q (see Definition 37). Let us now define the subtrees Tcol(m) and Tcol(m + 1): +For Tcol(m) we root Tcol at zm and for each neighbour x of zm in Tcol, we delete x and all +of its descendants unless x ∈ U 1 +m. +For Tcol(m + 1) we root Tcol at zm+1 and for each neighbour x of zm+1 in Tcol, we delete +x and all of its descendants unless x ∈ U ℓm−1 +m +. +Note that at least one of Tcol(m) and Tcol(m + 1) must have depth greater than d (if rooted +at zm and zm+1, respectively), since ℓm > 2d and Tcol is edge-colourful with respect to ˆγ, +that is, we have to make sure that we cover all of the edge colours +{vm, u1 +m}, {u1 +m, u2 +m}, . . . , {uℓm−1 +m +, vm+1} +Finally, regardless of which one of the two subtrees has depth greater than d, we will find +either a fork, or the source of a ray of length greater than d outside of the set S, yielding +the desired contradiction and concluding the proof of the claim, and hence the proof of the +lemma. +◀ +We are now able to prove the main lemma of this subsection. +▶ Lemma 44. ⊕Emb((Q +♯ +τ, cτ) → (G, c)) = ⊕ColSub(T → ( ˆG, ˆγ)). +Proof. We start with the following claim from [30]. +Claim: A colour-preserving embedding ϕ ∈ Emb((Q +♯ +τ, cτ) → (G, c)) is uniquely defined +by its image (which is a subgraph of (G, c)). +For convenience, we provide a proof of the claim: Consider in image (G′, c′) of ϕ where G′ +is a subgraph of G and c′ = c |V (G′). Let e = {u, v} be an edge of G′ Then c′(e) = {c(u), c(v)} +is an edge of Q since c is a Q-colouring. Recall that Q +♯ +τ is Q-coloured by the function +cτ that maps wB to w for each w ∈ V (Q) and block B ∈ τw. Now recall the definition +of fractured graphs (Definition 8) and let B1 and B2 be the blocks of τc(u) and τc(v) that +contain c(e). Then, since ϕ is an embedding, it maps c(u)B1 to u and c(v)B2 to v. Since Q +does not have isolated vertices, continuing this process over all edges of G′ defines ϕ. This +concludes the proof of the claim. ■ +By the claim, it is sufficient to construct a bijection b from elements in ColSub(T → ( ˆG, ˆγ)) +to subgraphs (G′, c′) that are images of embeddings in Emb((Q +♯ +τ, cτ) → (G, c)). Given +Tcol ∈ ColSub(T → ( ˆG, ˆγ)) we set b(Tcol) := (Tcol[G], c(Tcol)) where c(Tcol) is the colouring of +vertices of Tcol[G] which agrees with ˆγ on the edges of Tcol[G]. In the rest of the proof, we +show that b is the desired bijection. +First, we have to show that for all Tcol, (Tcol[G], c(Tcol)) is the image of an embedding in +Emb((Q +♯ +τ, cτ) → (G, c)). To this end, recall that Tcol[G] induces a fracture ρ = ρ(Tcol) of Q. +By the definition of ρ, Tcol[G] and Q +♯ +ρ are isomorphic and this isomorphism preserves the +colours so cρ agrees with ˆγ on the edges of Q +♯ +ρ. This implies that cρ and c(Tcol) are the +same. So (Tcol[G], c(Tcol)) is the image of an embedding in Emb((Q +♯ +ρ, cρ) → (G, c)). Finally, +Lemma 43 guarantees that ρ = τ. +Second, we will show that b is injective. To this end, let Tcol1 ̸= Tcol2 ∈ ColSub(T → ( ˆG, ˆγ)). +Since Tcol1 and Tcol2 must both fully contain V (T) \ C(H), and since both are edge-colourful +(see Definition 42), the only possibility for Tcol1 and Tcol2 not being equal is that they disagree +on G, that is, Tcol1[G] ̸= Tcol2[G]. This proves b to be injective. +Finally, we will show that b is surjective: Given any (G′, c′) that is the image of an +embedding ϕ ∈ Emb((Q +♯ +τ, cτ) → (G, c)), we construct Tcol(G′, c′) ∈ ColSub(T → ( ˆG, ˆγ)) +with b(Tcol(G′, c′)) = (G′, c′) as follows. Observe first that G′ is isomorphic to T[C(H)] since + +26 +Parameterised and Fine-grained Subgraph Counting, modulo 2 +Q +♯ +τ is, by definition of τ, isomorphic to T[C(H)]: Splitting the inner paths of length 2d in +Q at their central vertices yields precisely T[C(H)]. Then Tcol(G′, c′) is obtained by adding +the remainder of T to (G′, c′): +1. We add to (G′, c′) all vertices in V (T) \ C(H) (see (B) in Definition 42). +2. We add all edges between vertices in V (T) \ C(H) that are present in ˆG (see (C) in +Definition 42). +3. Finally, we connect a vertex in z in V (T) \ C(H) with a vertex w in G′ if and only if z +and w are connected in ˆG (see (D) in Definition 42). +The resulting subgraph Tcol(G′, c′) of ˆG is clearly edge-colourful and isomorphic to T, +concluding the proof. +◀ +We are now able to establish hardness of ⊕Sub(T ) in case of unbounded C-number. +▶ Lemma 45. Let T be a recursively enumerable class of trees of unbounded C-number. +Then ⊕Sub(T ) is ⊕W[1]-hard. +Proof. Assume first that T contains trees with 2-paths of unbounded length. In this case +we reduce from the problem of counting k-cycles, modulo 2, which was shown ⊕W[1]-hard +in [11]. In the first step, this problem reduces to the problem of counting s-t-paths of length +k, modulo 2 as shown in Lemma 5.2 in the full version [28] of [27]. In the second and final +step, we can easily reduce from the problem of counting s-t-paths of length k, modulo 2, to +⊕Sub(T ), as shown in Figure 6: Concretely, let (G, s, t, k) be a problem instance. Since T +contains trees with 2-paths of unbounded length, we can find, in time only depending on k, +a tree T in T containing a 2-path x0, x1, . . . , xk+1, xk+2 of length k + 2. Let furthermore T1 +and T2 be the subtrees of T as depicted in Figure 6. We construct a graph G′ from G in two +steps as follows: First, we add fresh vertices x0 and xk+2 and edges {x0, s} and {t, xk+2}. +Second, we add T1 and T2 and identify their roots with x0 and xk+2, respectively. The +construction is depicted in Figure 6 as well. Now let A be the set of subgraphs of G′ that are +isomorphic to T and that contain all edges of T1 and T2. It is easy to see that the cardinality +of A is equal to the number of s-t-paths of length k in G. Thus it suffices to compute |A| +mod 2, using an oracle for ⊕Sub(T ). This can be achieved by a simple application of the +inclusion-exclusion principle: Setting S = E(T1) ∪ E(T2), we have +|A| = +� +J⊆S +(−1)|J| · #Sub(T → G′ \ J) , +(7) +where G′ \ J is the graph obtained from G′ by deleting all edges in J. We can conclude the +reduction by observing that the number of terms in (7) only depends on T and thus on k, +and that our oracle to ⊕Sub(T ) allows us to evaluate (7) modulo 2. +For the remainder of the proof we can thus assume that the length of any 2-path in any +tree in T is bounded by a constant d. Since T has unbounded C-number, we obtain that the +trees in T contain C-gadgets of order d of unbounded length. By Corollary 35 we obtain +that for any positive integer k, there is a value d′ in the range 1 ≤ d′ ≤ d such that there is +a tree Tk in T which contains a strong C-gadget of order d′ with k junctions. +Let C be a class of cubic Hamiltonian graphs of unbounded treewidth. Assume w.l.g. +that, for each k, the class C contains at most one graph with k vertices; otherwise we just +keep one k-vertex graph with the largest treewidth among all k-vertex graphs in C. For each +∆ ∈ C set T∆ := T|V (∆)|, that is T∆ is contained in T and contains a strong C-gadget H∆ +with at least |V (∆)| junctions. Recall Definition 37 and set +Q := {Q(∆, T∆, H∆) | ∆ ∈ C} . + +L. A. Goldberg and M. Roth +27 +Observe that Q(∆, T∆, H∆) contains as minor the graph obtained from ∆ by removing one +edge. Since the removal of a single edge can decrease the treewidth only by a constant, and +since treewidth is minor-monotone, we have that Q has unbounded treewidth. +By Theorem 12 the problem ⊕cp-Hom(Q) is therefore ⊕W[1]-hard. Thus it suffices to +show that +⊕cp-Hom(Q) ≤fpt +T ⊕Sub(T ) . +In the first step, we reduce the computation of ⊕Hom((Q, idQ) → ⋆) to the computation +of ⊕Emb((Q +♯ +τ, cτ) → ⋆); here, τ is the fracture defined in Definition 37. To this end, it was +shown in [29] that +⊕Emb((Q +♯ +τ, cτ) → ⋆) = +� +ρ≥τ +µ(τ, ρ) · ⊕Hom((Q +♯ +ρ, cρ) → ⋆) , +(8) +where the relation “≥” and the Möbius function µ are over the lattice of fractures. We +omit introducing these objects in detail, since we only require that the coefficient of the +term ⊕Hom((Q +♯ +⊤, c⊤) → ⋆) (which is equal to ⊕Hom((Q, idQ) → ⋆)) in the above linear +combination was shown in [29] to be equal to +� +v∈V (Q) +(−1)|τv|−1 · (|τv| − 1)! . +Since each partition τv has at most two blocks, the above term is odd. Thus, by Lemma 14, we +can evaluate the term ⊕Hom((Q +♯ +⊤, c⊤) → ⋆) if we can evaluate the entire linear combination, +that is, if we can evaluate ⊕Emb((Q +♯ +τ, cτ) → ⋆). It thus remains to show how we can evaluate +⊕Emb((Q +♯ +τ, cτ) → ⋆) using our oracle for ⊕Sub(T ). +To this end, we use Lemma 44: Given any Q = Q(∆, T∆, H∆)-coloured graph (G, c) +for which we want to compute ⊕Emb((Q +♯ +τ, cτ) → (G, c)), we first construct ( ˆG, ˆγ) as in +Definition 42. Then Lemma 44 yields that +⊕Emb((Q +♯ +τ, cτ) → (G, c)) = ⊕ColSub(T∆ → ( ˆG, ˆγ)). +Finally, by Lemma 15 we can compute ⊕ColSub(T∆ → ( ˆG, ˆγ)) in FPT time using an +oracle for ⊕Sub(T∆ → ⋆). Since the size of T∆ only depends on Q, and since, with input Q +we can find T∆ (recall that T is recursively enumerable) this yields indeed a parameterised +Turing-reduction and the proof is concluded. +◀ +4.2 +Unbounded Star Number +We will use the same strategy as in Subsection 4.1: Given a tree T with large star number, +we start with a properly chosen cubic graph ∆, and we construct a graph Q depending on ∆ +and T which contains ∆ as a minor. Then we show that for any Q-coloured graph (G, c), +we can construct an edge-coloured graph ( ˆG, ˆγ) such that ⊕ColSub(T → ( ˆG, ˆγ)) is equal to +⊕Emb((Q +♯ +τ, cτ) → (G, c)) for a particular fracture τ. +To this end, let T be a tree with star number (at least) 6k for some positive integer k. By +definition of the star number, there is a d ≥ 3 such that T contains a vertex s which is the +source of 6k rays R1, . . . , R6k of length precisely d. For each i ∈ [6k], let Ri = s, r1 +i , . . . , rd +i . +Furthermore, let Ts be the subtree of T obtained by deleting the vertices r1 +i , . . . , rd +i for each +i ∈ [6k]; consider Figure 7 for an illustration. + +28 +Parameterised and Fine-grained Subgraph Counting, modulo 2 +Figure 6 Reduction from counting s-t-paths of length k, modulo 2, in a graph G to counting +copies of a tree T with a 2-path of length at least k + 2. +Figure 7 A tree with Sd(T) ≥ 6k. +▶ Definition 46 (Q). Let ∆ be cubic graph on k vertices. We obtain Q from ∆ by substituting +each vertex v by a gadget depicted in Figure 8. Afterwards, we connect the gadgets as follows: +If {v, x} is an edge of ∆, then we identify the vertex vx in the gadget of v and the vertex xv +in the gadget of x. +▶ Observation 47. ∆ is a minor of Q. +The fracture τ of Q that we will be interested in is defined as follows; Figure 9 depicts +the fractured graph Q +♯ +τ. +▶ Definition 48 (τ). Let Q be the graph defined in Definition 46. +For each edge {v, x} of ∆, the graph Q contains a vertex vx(= xv), which has degree 2. +We let τvx be the partition consisting of 2 singleton blocks. +For each vertex v of ∆, the vertices v3 and v5 have degree 2 in Q. We let τv3 and τv5 be +the partitions consisting of 2 singleton blocks. +For each vertex v of ∆, the vertices v2, v4 and v6 have degree 3 in Q. For each i ∈ {2, 4, 5} +we let τvi be the partition consisting of one block of size 2 corresponding to the edges +incident to vi from the left and the right, and one block of size 1 corresponding to the +edge incident to vi from below. + +L. A. Goldberg and M. Roth +29 +Figure 8 The construction of Q; the vertices v1, . . . , v6 on the gadget of v are emphasized. +Figure 9 Illustration of the fractured graph Q +♯ +τ via fracturing the vertex gadgets. +For all other vertices u of Q, we let τu be the partition consisting only of one block. +Analogously to the notion of a core in the case of unbounded C-number, we will identify +a specific subgraph of the tree T and we will use it to define the graph ˆG later. +▶ Definition 49 (V ′). Let V ′ be the vertex subset of T defined as follows: +V ′ := +� +� � +i∈[6k] +V (Ri) +� +� \ {s} . +Furthermore, we set E′ := E(T[V ′]). +Observe that T[V ′] is a (disjoint) union of 6k paths of length d − 1, where the vertices of +the i-th path are r1 +i , . . . , rd +i . Observe further that V (T) = V (Ts) ˙∪V ′ and that +E(T) = E′ ˙∪ E(Ts) ˙∪ {{s, r1 +i } | i ∈ [6k]} . +(9) +Next, note that the edges of Q can be decomposed into 6k paths, each of length d − 1: +There are k vertices of ∆. For each vertex v ∈ V (∆) the graph Q contains, by definition, a +gadget corresponding to v, the edges of which can be decomposed into 6 paths P 1 +v , . . . , P 6 +v +of length d − 1 (formally, the fractured graph Q +♯ +τ yields precisely this decomposition; see +Figure 9). Additionally, for each v ∈ V (∆) and i ∈ [6], the first vertex of P i +v is chosen to be +vi as depicted in Figure 8. + +30 +Parameterised and Fine-grained Subgraph Counting, modulo 2 +▶ Definition 50 (γ, γE). We define a function γ : T[V ′] → V (Q) as follows. Recall that T[V ′] +is the union 6k paths P ′ +j := r1 +j, . . . , rd +j for j ∈ [6k]. Fix any bijection b : [6k] → V (∆) × [6]. +Then γ maps P ′ +j to P i +v, where b(j) = (v, i). In particular, we enforce that the first vertices +of the paths are mapped onto each other, that is, γ(r1 +j) := vi. Additionally, we define +γE : E′ → E(Q) by mapping e to γ(e). +▶ Observation 51. The function γ is an edge-bijective homomorphism from T[V ′] to Q. +Specifically, γE is a bijection. +Now let (G, c) be a Q-coloured graph. We state the following explicitly, since it will be +crucial in our reduction. +▶ Observation 52. Let (G, c) be a Q-coloured graph. The mapping cE ◦ γ−1 +E +is a map from +E(G) to E′. +Let us now construct a graph ˆG from a Q-coloured graph G; an illustration is provided +in Figure 10. +▶ Definition 53 (( ˆG, ˆγ)). Let (G, c) be a Q-coloured graph. The graph ˆG is an edge-coloured +graph, with colouring ˆγ : E( ˆG) → E(T), constructed as follows: +(A) +The graph ˆG contains G as a subgraph. For each e ∈ E(G) we set ˆγ(e) = γ−1 +E (cE(e)). +(B) +The vertex set of ˆG is the union of V (G) and V (Ts), and pairs of vertices in V (Ts) are +connected by an edge in ˆG if and only they are adjacent in T. For each such edge e, +ˆγ(e) = e. +(C) +The remaining edges of ˆG are defined as follows. For each edge e = {s, r1 +j} ∈ E(T), we +connect s to all vertices in G that are coloured (by c) with γ(r1 +j) (see Definition 50), and +for each of those newly added edges e′ we set ˆγ(e′) := e +Observe that ˆγ colours the edges of ˆG with E(T); the cases (A), (B), and (C) correspond, +respectively, to the sets E′, E(Ts) and {{s, r1 +i } | i ∈ [6k]} (see Equation (9)). Similarly to +the case of unbounded C-gadgets, for each element Tcol ∈ ColSub(T → ( ˆG, ˆγ)) the induced +subgraph +Tcol[G] := Tcol[V (Tcol) ∩ V (G)] +of Tcol is an edge-colourful subgraph in G, that is, Tcol[G] contains precisely one edge per +edge-colour of G under the edge colouring ˆγ hence it contains precisely one edge per edge- +colour of G under cE. As shown in Section 3 in the full version [30] of [31], Tcol[G] thus +induces a fracture ρ = ρ(Tcol) of Q: Two edges {v, w} and {v, y} of Q are in the same block +in the partition ρv corresponding to vertex v of Q if and only if the edges of Tcol[G] that are +coloured γ−1 +E ({v, w}) and γ−1 +E ({v, y}) are adjacent. In what follows, we show that ρ must +always be equal to τ(∆, T, H) (see Definition 48). +▶ Lemma 54. For every Tcol ∈ ColSub(T → ( ˆG, ˆγ)) we have that ρ(Tcol) = τ. +Proof. Let Tcol ∈ ColSub(T → ˆG, ˆγ). Since Tcol must include each of the edge colours given +by ˆγ (precisely) once, we have that Tcol must fully contain Ts. Note that Ts fully contains T +except for 6k rays of length d, and the only way to attach those rays in ˆG is via the vertex s. +Now consider the subgraph Tcol[G + s] of Tcol defined as follows: +Tcol[G + s] := Tcol[(V (Tcol) ∩ V (G)) ∪ {s}] . +Since Tcol includes all edge colours given by ˆγ, we have that s must have degree 6k in +Tcol[G + s]: By (C) in Definition 53, the vertex s must be connected (within Tcol[G + s]) to +one vertex in each of the colour classes Vi = c−1(vi) for v ∈ V (∆) and i ∈ [6]. Additionally, +this implies the following: + +L. A. Goldberg and M. Roth +31 +Figure 10 The construction of ˆG. The graph G within ˆG is depicted in black. + +32 +Parameterised and Fine-grained Subgraph Counting, modulo 2 +▶ Observation 55. Tcol[G + s] is isomorphic to the d-stretch of K1,6k with s at the centre. +In the remainder of the proof, we will show that the only way for Tcol to (colourfully) +embed the 6k rays of length d is as depicted in Figure 11. Note that this will conclude the +proof since the induced fracture of the depicted embedding is τ. +Hence we proceed with proving the claim. We first consider, for each edge {v, x} ∈ E(∆), +the vertex vx = (xv) of Q (see Definition 46 and Figure 8). The vertex vx has two neighbours +nv and nx in Q, where nv denotes the neighbour in the gadget of v and nx denotes the +neighbour in the gadget of x. Recall that we write Vx = c−1(vx), Nv = c−1(nv), Nx = +c−1(nx) ⊆ V (G) for their colour class within G (and thus within ˆG). Since Tcol is edge- +colourful, it must contain precisely one edge ev between Vx and Nv and one edge ex between +Vx and Nx (see (A) in Definition 53). Now observe that every vertex in Vx has distance (at +least) d to s within ˆG. This has two crucial consequences: +First, the endpoints of ev and ex inside Vx cannot be equal: Otherwise, they could not be +part of a ray of length precisely d with source s, and this would contradict the previous +observation that Tcol[G + s] is isomorphic to the d-stretch of K1,6k with s at the centre +(Observation 55). +Hence, second, the endpoints of ev and ex inside Vx both have degree 1. Consequently, +they must be the endpoints of two of the rays of length d. However, the only way for this +to be true is them each being connected to s as depicted in Figure 11; in all other cases, +Tcol[G + s] cannot be isomorphic to the d-stretch of K1,6k with s at the centre. +The second consequence implies that the edge colours corresponding to the edges in the paths +P 2 +v , P 4 +v , and P 6 +v are covered for each v (recall that Tcol must include each edge colour precisely +once). Thus, the only possibility to include the remaining edge colours corresponding to the +paths P 1 +v , P 3 +v , and P 5 +v while keeping Tcol[G + s] being isomorphic to the d-stretch of K1,6k, is +to embed, for each gadget, the remaining 3 rays of length d as depicted in Figure 11. This +concludes the proof. +◀ +We are now able to prove the main lemma of this section. +▶ Lemma 56. ⊕Emb((Q +♯ +τ, cτ) → (G, c)) = ⊕ColSub(T → ( ˆG, ˆγ)). +Proof. Thanks to Lemma 54, the proof is similar to the proof of Lemma 44: Colour- +preserving embeddings in Emb((Q +♯ +τ, cτ) → (G, c)) are uniquely identified by their image, +and a bijection b from ColSub(T → ( ˆG, ˆγ)) to images of colour-preserving embeddings in +Emb((Q +♯ +τ, cτ) → (G, c)) is given by b : Tcol �→ Tcol[G]. +◀ +Similarly to the proof in Section 4.1, Lemma 56 is sufficient for hardness. +▶ Lemma 57. Let T be a recursively class of trees of unbounded star number. Then ⊕Sub(T ) +is ⊕W[1]-hard. +Proof. The proof is almost identical to the proof of Lemma 45, with the exception that we +use Q, τ, ˆG, and ˆγ as defined in the current section, and that we rely on Lemma 56 for the +identity +⊕Emb((Q +♯ +τ, cτ) → (G, c)) = ⊕ColSub(T → ( ˆG, ˆγ)). +The remainder of the proof transfers verbatim. +◀ + +L. A. Goldberg and M. Roth +33 +Figure 11 Illustration of the unique way to colourfully embed T into ˆG. The induced fracture +is τ. + +34 +Parameterised and Fine-grained Subgraph Counting, modulo 2 +4.3 +Unbounded Fork number +We will rely on the same high-level strategy as the one that we used when the C-number +or star number was unbounded: Given a tree T with large a-b-fork number, we start +with a properly chosen cubic graph ∆, and we construct a graph Q which depends on T +and ∆, and which contains ∆ as a minor. Afterwards, we show that for any Q-coloured +graph (G, c) we can construct an edge-coloured graph ( ˆG, ˆγ) where the co-domain of ˆγ is +E(T) such that #ColSub(T → ( ˆG, ˆγ)) is equal (modulo 2) to #Emb((Q +♯ +τ, cτ) → (G, c)) for +a particular fracture τ of Q. However, proving this equality will be more involved than +it was in the previous cases: In Sections 4.1 and 4.2, we were able to prove, implicitly, +that #ColSub(T → ( ˆG, ˆγ)) = #Emb((Q +♯ +τ, cτ) → (G, c)), that is, we were able to establish +equality, rather than equality modulo 2. In the current case, we are not able to prove equality +and must therefore rely on parity arguments, which makes the case slightly more involved. +We start by fixing the following: +Positive integers k, a and b with a ≤ b and k ≥ 2. +A tree T with Fa,b(T) ≥ 2k. By definition of forks (Definition 29), T contains designated +sources s1 +1, s2 +1, . . . , s1 +k, s2 +k such that for each (i, j) ∈ [k] × [2], the source sj +i is the source of +two (distinct) rays Fa(i, j) of length a and Fb(i, j) of length b. Additionally degNL(sj +i) = 1. +We assume w.l.o.g. that the designated sources are ordered by their leaf-degrees, that is +degL(s1 +1) ≥ degL(s2 +1) ≥ · · · ≥ degL(s1 +k) ≥ degL(s2 +k) . +(10) +Consider Figure 12 for an illustration of T, its designated sources, and the rays Fa(i, j) +and Fb(i, j). +A k-vertex bipartite cubic graph ∆ with vertices V (∆) = {v1, . . . , vk}. +A proper 3-edge-colouring C : E(∆) → {s, m, ℓ} of ∆.6 +We first note that, since there are at least 2k ≥ 4 sources in T, any pair of distinct sources +must not be adjacent: Otherwise, the tree T would either be disconnected, or one of the +sources would have degNL at least 2, both of which is a contradiction. +▶ Observation 58. For any distinct pair (i, j) ̸= (i′, j′) we have that sj +i and sj′ +i′ are not +adjacent in T. +Next, we define the graph Q. +▶ Definition 59 (Q). The graph Q is obtained from ∆ and C via substituting vi by the +gadget depicted in Figure 13 for each i ∈ [k]. Afterwards, for every edge e = {vi, vj} of ∆ we +identify the vertex coloured with C(e) in the gadget of vi with the vertex coloured with C(e) +in the gadget of vj. +While Definition 59 will be useful in our proofs, we note the following easier equivalent +way to define Q. +▶ Observation 60. The graph Q is obtained from ∆ and C by substituting each edge of +colour s (of ∆) with a path of length 2a, each edge of colour m with a path of length 2b, and +each edge of colour ℓ with a path of length 2(a + b). Consequently, ∆ is a minor of Q. +The fracture τ of Q that we will be interested in is defined as follows; Figure 14 depicts +the fractured graph Q +♯ +τ. +6 That is, C(e1) ̸= C(e2) whenever e1 ̸= e2 share a vertex. Note that every cubic bipartite graph has a +3-edge-colouring by Hall’s Theorem. + +L. A. Goldberg and M. Roth +35 +Figure 12 A tree T with Fa,b(T) ≥ 2k. Note that the parents of the sj +i are not necessarily +distinct. The rays Fa(i, j) and Fb(i, j) are depicted in red. +v1 +i +v2 +i +a +ℓ +b +s +a +m +b +Figure 13 A vertex gadget in the construction of Q in Definition 59. A dashed line labelled with +a (resp. b) depicts a path of length a (resp. b). + +36 +Parameterised and Fine-grained Subgraph Counting, modulo 2 +Figure 14 The fractured graph Q +♯ +τ. Note that the illustration only depicts the fracturing of a +single vertex gadget. +▶ Definition 61 (τ). Let Q be the graph defined in Definition 59. +For each edge e = {vi, vj} of ∆, there is a vertex C(e) ∈ {s, m, ℓ} of degree 2 that connects +the gadgets of vi and vj. We let τC(e) be the partition consisting of two singleton blocks. +For each vertex vi of ∆, the gadget of vi in Q contains the vertex v1 +i of degree 3 which is +connected to s via a path of length a, to m via a path of length b, and to ℓ via a path of +length a + b. Let es, em, and eℓ be the first edges on those paths. We set +τvi = {{es, em}, {eℓ}} . +For all other vertices u of Q, we let τu be the partition consisting only of one block. +Next we identify specific substructures of T that will be necessary in the construction of ˆG. +▶ Definition 62. Recall that sj +i with (i, j) ∈ [k] × [2] are the designated sources of T. +T ′ is the graph obtained from T by deleting, for each (i, j) ∈ [k] × [2], the designated +source sj +i as well as all rays with source sj +i. +For each (i, j) ∈ [k] × [2], pj +i is the neighbour of sj +i which is not contained in a ray. Note +that pj +i is unique by definition of forks. Note that pj +i ∈ V (T ′) and that the pj +i are not +necessarily pairwise distinct. +For each (i, j) ∈ [k] × [2], dj +i = degL(sj +i) − 2, that is, dj +i is the number of rays with source +sj +i minus 2. Note that dj +i ≥ 0 since each sj +i is the source of Fa(i, j) and Fb(i, j). +F := +� +(i,j)∈[k]×[2] +(Fa(i, j) ∪ Fb(i, j)) , that is, F is the subset of V (T) that contains the +vertices of the rays Fa(i, j) and Fb(i, j) (which includes sj +i) for each (i, j) ∈ [k] × [2]. +E′ := E(T[F]). +An illustration of these notions is given in Figure 12. + +L. A. Goldberg and M. Roth +37 +Observe that T[F] is a disjoint union of 2k paths of length a + b. Specifically, for each +(i, j) ∈ [k] × [2] it contains the path +F j +i := T[Fa(i, j) ∪ Fb(i, j)] . +It turns out that Q is isomorphic to a quotient graph of T[F], since for each vertex vi of ∆, +the vertex gadget of vi decomposes into two paths of length a + b. In fact, this decomposition +is given by the fractured graph Q +♯ +τ (see Figure 14). Formally, we have the following: +▶ Observation 63. T[F] ∼= Q +♯ +τ ∼= 2kPa+b. +Similarly to the previous two cases, we introduce functions γ and γE which we will need +for defining the edge-colours of ˆG. +▶ Definition 64 (γ, γE). We define a function γ : F → V (Q) as follows: +1. For each i ∈ [k], γ maps F 1 +i to the (a + b)-path in the gadget of vi from s to m, such that +γ(s1 +i ) = v1 +i . +2. For each i ∈ [k], γ maps F 2 +i to the (a + b)-path in the gadget of vi from v1 +i to ℓ, such that +γ(s2 +i ) = v2 +i . +Furthermore, we write γE : E′ → E(Q) by setting γE({x, y}) := {γ(x), γ(y)}. +Note that the definition of γE is well-defined since γ is a homomorphism by Observation 63. +Concretely, γ can be viewed as the composition of an isomorphism from T[F] to Q +♯ +τ and +the Q-colouring cτ of Q +♯ +τ (see Definition 9). Furthermore, γE is clearly a bijection. Hence, +similarly to the previous sections, we point out the following: +▶ Observation 65. Let (G, c) be a Q-coloured graph. The mapping cE ◦ γ−1 +E +is a map from +E(G) to E′. +We are now able construct a graph ˆG from a Q-coloured graph G; an illustration is +provided in Figure 15. +▶ Definition 66 (( ˆG, ˆγ)). Let (G, c) be a Q-coloured graph. The pair ( ˆG, ˆγ) is an edge-coloured +graph constructed as follows, where the co-domain of ˆγ is E(T). +(A) +The graph ˆG contains G as a subgraph. For each e ∈ E(G), define ˆγ(e) = γ−1 +E (cE(e)). +(B) +The vertex set of ˆG is the union of V (G) and V (T) \ F. +(C) +Pairs of vertices in V (T)\F are connected by an edge in ˆG if and only if they are adjacent +in T. For each such edge e, we set ˆγ(e) = e. +(D) +The remaining edges of ˆG are defined as follows. For each edge e ∈ E(T) that connects a +vertex z ∈ V (T) \ F to a vertex y ∈ F there are corresponding edges in ˆG. These edges +connect z to all vertices g ∈ V (G) such that c(g) = γ(y) For each such edge e′ in ˆG, +ˆγ(e′) = e. +In (D), the only edges in T connecting z ∈ V (T) \ F to a vertex y ∈ F satisfy that y is one +of the designated sources sj +i, and z is either pj +i ∈ V (T ′) or z is contained in one of the dj +i +rays with source sj +i that are not Fa(i, j) or Fb(i, j) (see Definition 62). +Similarly to the other cases, for each element Tcol ∈ ColSub(T → ( ˆG, ˆγ)) the induced +subgraph Tcol[G] := Tcol[V (Tcol) ∩ V (G)] of Tcol is an edge-colourful subgraph in G. Also, +Tcol[G] induces a fracture ρ = ρ(Tcol) of Q as follows. First, recall that G is Q-coloured by c, +and that G is contained in ˆG (see (A) in Definition 66). Next note that Tcol[G] is a subgraph +of G that contains each edge colour in the image of cE ◦ γ−1 +E +precisely once. Since γE is a +bijection from E′ to E(Q), we can thus equivalently view Tcol[G] as a subgraph of G that +contains each edge colour in the image of cE precisely once. This fact allows us to define +ρ(T ) in terms of the function cE as follows. + +38 +Parameterised and Fine-grained Subgraph Counting, modulo 2 +Figure 15 The graph ˆG. Depicted in the centre is the part of G (within ˆG) that is coloured with +the vertices of the i-th vertex gadget of Q. Depicted in black are the subtree T ′ of T (left), and, +as dashed lines, the inner edges of the d1 +i + d2 +i rays incident to s1 +i and s2 +i (right) — here, the inner +edges are those that are not incident to the sources s1 +i and s2 +i . Each edge of ˆG fully contained in the +black part has a unique colour w.r.t. ˆγ (see Definition 66 (C)). Pairs consisting of remaining edges +have the same colour (w.r.t. ˆγ) if and only if they are depicted with the same colour. + +L. A. Goldberg and M. Roth +39 +Figure 16 Illustration of the condition that yields invalid trees at (i, 1) (below) and (i, 2) (above). +Edges contained in E′ are coloured red. +▶ Definition 67 (ρ(Tcol)). Let Tcol be an element of ColSub(T → ( ˆG, ˆγ)). +The fracture +ρ = ρ(Tcol) of Q is defined as follows. Two edges {v, w} and {v, y} of Q are in the same +block in the partition ρv corresponding to vertex v of Q if and only if the edges of Tcol[G] that +are coloured by cE with {v, w} and {v, y} are incident. +With ( ˆG, ˆγ) defined, we can finally state formally the goal of this section. Recall that +(G, c) is a Q-coloured graph. +▶ Lemma 68. Suppose that |c−1(v)| is odd for each v ∈ V (Q). Then ⊕ColSub(T → ( ˆG, ˆγ)) = +⊕Emb((Q +♯ +τ, cτ) → (G, c)). +The proof requires some additional set-up. In particular, we need the condition that +|c−1(v)| is odd to deal with the case in which what we call “invalid trees” arise. To this +end, recall that V j +i = c−1(vj +i ) denotes the set of vertices in G that are coloured by c with vj +i . +Since G is a subgraph of ˆG (see Definition 66), we slightly abuse notation and write V j +i also +for the subset of vertices in ˆG corresponding to V j +i in G. +▶ Definition 69. Let Tcol ∈ ColSub(T → ( ˆG, ˆγ)) and let (i, j) ∈ [k] × [2]. We call Tcol invalid +at (i, j) if the following two conditions are met: +(I) +Tcol contains precisely two vertices x and y in V j +i . +(II) +x is adjacent to pj +i and not incident in Tcol to any edge coloured with a colour in E′ (see +Definition 66 (A)). +Otherwise Tcol is called valid at (i, j). We call Tcol an invalid tree if there exists a pair +(i, j) ∈ [k] × [2] such that Tcol is invalid at (i, j). Otherwise, we call Tcol a valid tree. We +write ColSubval(T → ( �G, ˆγ)) for the set of all valid Tcol in ColSub(T → ( �G, �γ)). +Consider Figure 16 for an illustration of Definition 69. +▶ Lemma 70. Suppose that |c−1(v)| is odd for each v ∈ V (Q). Then the number of invalid +trees Tcol ∈ ColSub(T → ( ˆG, ˆγ)) is even. + +40 +Parameterised and Fine-grained Subgraph Counting, modulo 2 +Proof. For the proof, given two tuples (i, j) and (i′, j′) in [k] × [2] we write (i′, j′) < (i, j) +if (i′, j′) is lexicographically smaller than (i, j). +Write T (i, j) for the set of all Tcol ∈ +ColSub(T → ( ˆG, ˆγ)) that are invalid at (i, j) but valid on all pairs (i′, j′) < (i, j). We will +prove that T (i, j) is even for all (i, j) ∈ [k] × [2]; this is sufficient for the lemma to hold. +Hence fix (i, j), let Tcol ∈ T (i, j), and let x and y be as in Definition 69. Since V j +i = c−1(vj +i ) +and for j ∈ [2], vj +i is a vertex of Q, the assumption in the statement of the lemma implies that +|V j +i | is odd. Since x and y are distinct vertices in V j +i , V j +i contains additional vertices other +than x and y. Fix a vertex x′ ∈ V j +i \ {x, y}. Obtain T ′ +col from Tcol by deleting x (including +edges incident to x) and by adding x′ and the edge {x′, u} for every u that was adjacent to +x — this is well-defined since x is not incident to any edge coloured with a colour in E′, and +by construction of ˆG (see Definition 66 (C) and (D)) whenever {x, u} ∈ E( ˆG) is an edge not +coloured with a colour in E′, then {x′, u} ∈ E( ˆG) for every x′ ∈ V j +i . Additionally, {x, u} +and {x′, u} have the same edge-colour. Hence, clearly, T ′ +col an edge-colourful subgraph of ˆG +that is isomorphic to Tcol (and thus to T). For this reason, we obtain that T ′ +col ∈ T (i, j). +More generally, the observation that T ′ +col ∈ T (i, j) allows us to define an equivalence +relation on T (i, j): Let Tcol and T ′ +col be elements of T (i, j), and let x and x′ be the vertices +in Tcol and T ′ +col that satisfy (II) in Definition 69. We set Tcol and T ′ +col to be equivalent if and +only if one can obtained from the other by switching x with x′ as defined above. The size of +one equivalence class is precisely |V j +i | − 1 = |c−1(vj +i )| − 1, which is even by the premise of +the lemma. +◀ +For the proof of Lemma 68, we need to establish some facts about rays and 2-paths of +elements Tcol ∈ ColSubval(T → ( ˆG, ˆγ)), which are those Tcol ∈ ColSub(T → ( ˆG, ˆγ)) that are +valid. We encapsulate these facts in the next section. +4.3.1 +The Proof of Lemma 68 +We first note that, thanks to Lemma 70, it suffices to prove that +#ColSubval(T → ( ˆG, ˆγ)) = #Emb((Q +♯ +τ, cτ) → (G, c)) . +This requires some preparation. We first fix the following objects (recall the definitions of +2-path, Definition 27 and ray, Definition 28). +Tcol is an element of ColSubval(T → ( ˆG, ˆγ)) +Tcol[G] is the graph obtained from Tcol[V (Tcol)∩V (G)] with isolated vertices removed. (In +fact, our proof will show that, for valid trees Tcol ∈ ColSubval(T → ( ˆG, ˆγ)), the induced +subgraph Tcol[V (Tcol) ∩ V (G)] cannot have isolated vertices. However, at the current +point of the proof, it is easiest to just remove them.) +For any positive integer t, Rt is the set of length-t rays in T. Pt is the set of length-t +2-paths in T that are not rays. +For any positive integer t, Rt +col is the set of length-t rays in Tcol and Pt +col is the set of +2-paths in Tcol that are not rays. Note that |Rt| = |Rt +col| and |Pt| = |Pt +col| for all t since +T and Tcol are isomorphic. +We will also rely on the following notion of external rays and 2-paths. +▶ Definition 71. A 2-path P of Tcol is called external if the following two conditions are +satisfied. +Except for the endpoints, none of the vertices of P is contained in V (G). +P does not contain an edge of G. + +L. A. Goldberg and M. Roth +41 +Definition 71 applies whether or not P is a ray. The following lemmas establish that all +2-paths of Tcol of length greater than b must be external. +▶ Lemma 72. Suppose that t is an integer that is greater than b. Suppose that, for all t′ > t, +every 2-path in Rt′ +col ∪ Pt′ +col is external. Then every 2-path in Rt +col ∪ Pt +col is external. +Proof. We first construct a bijection f from Rt to Rt +col. +We will use this bijection to +argue that every ray in Rt +col is external. In order to define the bijection, consider a ray +R = r0, r1, . . . , rt in Rt. Since t > b ≥ a, R is not one of the designated rays Fa(i, j) and +Fb(i, j). If r0 is not among the designated sources sj +i, then, by the construction of ˆG, R +is contained in T ′ and thus R ∈ Rt +col. In this case R is external and we set f(R) := R. +Alternatively, suppose that r0 = sj +i for some i and j. Then R must be one of the dj +i black +rays in Figure 12 (see Definition 62). By the construction of ˆG and the fact that Tcol is +edge-colourful, there is a vertex x ∈ V j +i such that Tcol contains the path x, r1, . . . , rt. In +Tcol, as in T, the vertices r1, . . . , rt−1 have degree 2 and the vertex rt has degree 1. Vertex +x cannot have degree 1 in Tcol since this would disconnect Tcol. Also, vertex x x cannot +have degree 2: To see this, assume for contradiction that x has degree 2. Then there is an +integer t′ > t and a ray R′ ∈ Rt′ +col the last vertices of which are x, r1, . . . , rt. Since x is not an +endpoint of the ray and since x ∈ V (G), the ray R′ is not external, contradicting the premise +of the lemma. Hence x has degree at least 3 and therefore f(R) := x, r1, . . . , rt is an external +ray of Tcol. The function f is injective by construction. Since Tcol and T are isomorphic, +|Rt| = |Rt +col| and thus f is a bijection. Since the image of f only contains external rays, we +have shown that every element of Rt +col is external. +Every ray in the image of f has the property that its degree-1 endpoint is not contained +in V (G). Since the image of f is Rt +col, we obtain +(∗) Every ray in Rt +col has the property that its degree-1 endpoint is not contained in V (G). +To complete the proof, we show that every 2-path in Pt +col is external. Following the same +strategy that we used before, we construct a bijection g from Pt to Pt +col. Every 2-path in +the range of g is external, so we will conclude that every element of Pt is external. In order +to define the bijection, consider a 2-path P = p0, . . . , pt in Pt. If neither of the endpoints +of P is among the designated sources sj +i, then P is contained in T ′ and thus P ∈ Pt. In +this case, P is external and we set g(P) := P. If exactly one endpoint of P is among the +designated sources, say p0 = sj +i, then there is a vertex x ∈ V j +i such that x, p1, . . . , pt is a +path in Tcol. The vertices p1, . . . , pt−1 have degree 2 in Tcol (as in T) and the vertex pt has +degree at least 3. +If x has degree 1 in Tcol, the ray R = pt, . . . , p1, x is in Tcol, and its degree-1 endpoint x +is in V (G), contradicting (∗). Hence x cannot have degree 1 in Tcol. Similarly, x cannot +have degree 2, since this would create a 2-path longer than t in Tcol that is not external, +which contradicts the premise of the lemma. +Hence x has degree at least 3, and thus +g(P) := x, p1, . . . , pt is an external 2-path in Pt +col. +For the last case, suppose that both endpoints of P are among the designated sources, +say p0 = sj +i and pt = sj′ +i′ . Then there are x and y in, respectively, V j +i and V j′ +i′ such that +x, p1, . . . , pt−1, y is a path in Tcol. Again, p1, . . . , pt−1 must all have degree 2 in Tcol as well. +We show that both x and y have degree at least 3 in Tcol: If both have degree 1, then +Tcol is disconnected. If one of them has degree 1 and the other one has degree at least 3, +then we created a ray of length t whose degree-1 endpoint in in V (G), contradicting (∗). +If one has degree 1 and the other one has degree 2, then we found a ray longer than t +which is not external, contradicting the premise of the lemma. If one has degree 2 and +the other has degree at least 2, then there is a non-external 2-path longer than t, again + +42 +Parameterised and Fine-grained Subgraph Counting, modulo 2 +contradicting the premise of the lemma. Thus, as desired, both must have degree at least 3. +Therefore, g(P) := x, p1, . . . , pt−1, y is an external 2-path in Pt +col. The function g is injective +by construction. Since Tcol and T are isomorphic, |Pt| = |Pt +col| and thus g is a bijection. +Since the image of g only contains external 2-paths, we have shown that every element of +Pt +col is external, concluding the proof. +◀ +▶ Lemma 73. Suppose that t is an integer that is greater than b. Then every 2-path in +Rt +col ∪ Pt +col is external. +Proof. Let tmax be the maximum integer for which Rtmax ∪ Ptmax is nonempty. Let Φt be the +proposition “t ≤ b or every 2-path in Rt +col ∪ Pt +col is external”. +We will show by induction on tmax−t that Φt holds. The base case arises when tmax−t = 0, +so t = tmax. If tmax ≤ b then Φt is satisfied. Otherwise, for each t′ > t, the set Rt′ +col ∪ Pt′ +col is +empty and we can invoke Lemma 72 to conclude that Φt holds. +For the induction step, consider t such that tmax − t ≥ 1. By the induction hypothesis, +Φt′ holds for all t′ ∈ {t + 1, . . . , tmax}. If t ≤ b then Φt holds. Otherwise, for all t′ > t > b, +we know from Φt′ that every 2-path in Rt′ +col ∪ Pt′ +col is external. We can then apply Lemma 72 +to conclude that every 2-path in Rt +col ∪ Pt +col is external. +◀ +Before proceeding with the proof of Lemma 68, we provide an overview of the central +steps of the proof. Recall that it suffices to prove that +#ColSubval(T → ( ˆG, ˆγ)) = #Emb((Q +♯ +τ, cτ) → (G, c)) +and that we have a fixed an element Tcol of ColSubval(T → ( ˆG, ˆγ)) and proved various +properties about it. +(1) Our goal is to show that Tcol is embedded in ˆG in the following manner (see Figure 17). +For each (i, j) ∈ [k] × [2], Tcol contains a ray Ra(i, j) of length a and a ray Rb(i, j) of +length b; those rays correspond to the designated rays Fa(i, j) and Fb(i, j) in T (recall +that T and Tcol are isomorphic.) +a. T ′ is part of Tcol. +b. For every i ∈ [k] and j ∈ [2], the vertices pj +i in T ′ is connected to a vertex wj +i of G +with c(wj +i ) = vj +i = γ(sj +i). In Tcol, the vertex wj +i is the source of dj +i rays other than +Ra(i, j) and Rb(i, j). The vertices of these dj +i rays are not in T ′ and are not in G. +The edge colours of the edges in these rays in ˆγ are the same as the edge-names in T +(see Definition 66 (C)). +c. The length-a ray Ra(i, 1) is a path in Tcol from w1 +i to the vertex ua(i, 1) of G with +some colour c(ua(i, 1)) (a vertex of Q). This colour c(ua(i, 1)) corresponds to the +vertex “s” in the gadget of the vertex vi of ∆ (see Definition 59 and Figure 13). +d. The length-b ray Rb(i, 1) is a path in Tcol from w1 +i to the vertex ub(i, 1) of G with +some colour c(ub(i, 1)) (a vertex of Q). This colour c(ub(i, 1)) corresponds to the +vertex “m” in the gadget of the vertex vi of ∆ (see Definition 59 and Figure 13). +e. The length-b ray Rb(i, 2) is a path in Tcol from w2 +i to the vertex ub(i, 2) of G with +some colour c(ub(i, 2)) (a vertex of Q). This colour c(ub(i, 2)) corresponds to the +vertex “ℓ” in the gadget of the vertex vi of ∆ (see Definition 59 and Figure 13). +f. The length-a ray Ra(i, 2) is a path in Tcol from w2 +i to the vertex ua(i, 2) ̸= w1 +i of G +with some colour c(ua(i, 2)) = γ(s1 +i ) = v1 +i (recall that the colour is a vertex of Q). +g. For every edge e = {vi, vi′} in ∆, ua(i, 1) ̸= ua(i′, 1), ub(i, 1) ̸= ub(i′, 1) and ub(i, 2) ̸= +ub(i′, 2). + +L. A. Goldberg and M. Roth +43 +(2) We now make some observations about the fracture ρ = ρ(Tcol) from Definition 67, given +that Tcol is embedded in ˆG as described in Item (1). +The definition of Q (Definition 59) tells us that, for every edge e = {vi, vi′} in ∆, +there is a degree-2 vertex y of Q that connects the gadgets of vi and vi′. Vertex y +corresponds to the vertex C(e) ∈ {s, m, ℓ} in the two gadgets. Suppose without loss of +generality that C(e) = s. The other cases are similar. From (1c) the colour C(e) = s +is the same as c(ua(i, 1)) and c(ua(i′, 1)). From (1b) c(w1 +i ) = v1 +i and c(w1 +i′) = v1 +i′. +Since Tcol is colourful and the embedding is as in (1), the edges of the ray from w1 +i to +ua(i, 1) have different edge colours to the ray from w1 +i′ to ua(i′, 1). Thus, the edge in +G in the first ray that is adjacent to ua(i, 1) (call it ei) has a different colour from the +edge n G in the second ray that is adjacent to ua(i′, 1) (call it ei′). Concretely, we +have cE(ei) = {s, x} and cE(ei′) = {s, x′} where x and x′ are the neighbours of s (in +Q) in the gadgets of vi and vi′, respectively. By (1g) we have ua(i, 1) ̸= ua(i′, 1) and +thus, by definition of ρ (Definition 67), ρy consists of two singleton blocks. Similar +arguments show that ρ coincides with τ (see Definition 61) at every vertex of Q that +corresponds to vertex “s”, “ℓ” or “m” in any gadget corresponding to any vertex vi +of ∆. +We now continue with the vertices v1 +i for i ∈ [k] of Q. See Figure 13 for the gadget +containing v1 +i in Q and Figure 17 for the graph ˆG. We will use “s”, “ℓ” and “m” as +the names of these vertices in the gadget containing v1 +i . The vertex v1 +i has degree +3 and is connected to s via a path of length a, to m via a path of length b and to +ℓ via a path of length a + b. Let ys, ym, and yℓ be the successors of v1 +i on those +paths, that is, the edges incident to v1 +i in Q are es := {v1 +i , ys}, em := {v1 +i , ym}, an +eℓ := {v1 +i , yℓ}. Now, by (1c) and (1d), the edges of Tcol that are coloured (by cE) with +es and em are {w1 +i , ra} and {w1 +i , rb}, where ra and rb are the successors of w1 +i on the +rays Ra(i, 1) and Rb(i, 1), respectively. Furthermore, by (1f), the edge of Tcol that +is coloured (by cE) with eℓ is {ua(i, 2), ˆr} where ˆr is the vertex in the ray Ra(i, 2) +that is adjacent to ua(i, 2). Since ua(i, 2) ̸= w1 +i (by (1f)), the edge {ua(i, 2), ˆr} is not +incident to either {w1 +i , ra} or {w1 +i , rb}. Thus ρv1 +i = {{es, em}, {eℓ}} which coincides +with τv1 +i by Definition 61. So τ and ρ coincide at vertex v1 +i . +Next are the vertices v2 +i for i ∈ [k] (see Figure 13). This case is easy. If Tcol is +embedded as described in (1) (see Figure 17), then, for each i ∈ [k], there is only one +vertex of Tcol which is coloured by c with colour v2 +i . This vertex is w2 +i . Thus every +edge of Tcol whose edge colour includes v2 +i is incident to w2 +i . Hence ρv2 +i only consists +of one block, which coincides with τv2 +i by Definition 61. +Finally, every remaining vertex of Q (see Figure 13) has degree 2. Let y be such a +vertex and let y1 and y2 be the neighbours of y. Then the edges of Tcol coloured by cE +with {y, y1} and {y, y2} must be successive edges on one of the rays Ra(i, 1), Rb(i, 1), +Ra(i, 2), or Rb(i, 2). So these successive edges are both incident to the vertex of the +ray that is coloured y by c. Thus ρy only consists of one block, which coincides with +τy. +Since we have shown that the fractures ρ and τ coincide at every vertex of Q, we conclude +that ρ = τ. +(3) We next explain why it is useful to have ρ = τ. +Recall that our goal is to prove +that #ColSubval(T → ( ˆG, ˆγ)) = #Emb((Q +♯ +τ, cτ) → (G, c)) and that Tcol is an element +of ColSubval(T → ( ˆG, ˆγ)). Our method will be to show that the function β defined by + +44 +Parameterised and Fine-grained Subgraph Counting, modulo 2 +β(Tcol) = Tcol[G] is a bijection from ColSubval(T → ( ˆG, ˆγ)) to Emb((Q +♯ +τ, cτ) → (G, c)). +It will turn out that this implies that the embedding ρ coincides with τ. +(4) In order to prove Item (1) we will proceed as follows. +(i) We show that all 2-paths (including rays) of Tcol are external, except for 2k rays of +length b and 2k rays of length a. Note that we already established this claim for +2-paths of lengths greater than b in Lemma 73. +(ii) Then we show that Tcol contains two degree-1 vertices in each of the vertex sets L +and M of G (within ˆG) — see Figure 17, recalling that, for each vertex gadget, the +sets L and M denote the vertex subsets of G that are coloured by c with ℓ and m. +The point of this is that we will also prove that Tcol has two degree-1 vertices in S +(Item 4iv) — this will split off the part of Tcol corresponding to a single gadget, so +we will only have to study the embedding of Tcol within each gadget. We prove +the claim about L and M by using the fact that Tcol is isomorphic to T and that +all 2-paths longer than b are external. This implies that if vi and vi′ are the two +vertices of ∆ sharing this gadget then the 2-paths between V 2 +i and V 2 +i′ are covered +by two rays in Tcol, both of which end in L. +(iii) We next show that the degree-1 vertices in (4ii) are the endpoints of 2k rays of +length b. We have already seen that for each of the k gadgets the endpoints of +these rays are in L and M. For the i’th gadget, the sources are in V 1 +i and V 2 +i If +b > a then we show that all remaining 2-paths of length b and also all 2-paths with +lengths in a + 1, . . . , b − 1 are external. The proof of this claim relies on the same +arguments as the proof of Lemma 73. +(iv) Next, we show that for each gadget, Tcol contains two degree-1 vertices in S — see +Figure 17. The proof uses the fact that all 2-paths longer than a that are not +covered by (4iii) are external. +(v) We next show that the degree-1 vertices in (4iv) are the endpoints of 2k rays of +length a. We have already seen that for each of the k gadgets the endpoints of +these rays are in S. For the i’th gadget, the source is in V 1 +i . +(vi) The remaining details of the proof rely on the fact that the tree Tcol is valid. +We now provide the proof in detail; for convenience, we also restate the lemma. +▶ Lemma 68. Suppose that |c−1(v)| is odd for each v ∈ V (Q). Then ⊕ColSub(T → ( ˆG, ˆγ)) = +⊕Emb((Q +♯ +τ, cτ) → (G, c)). +Proof. We will prove that for any Tcol ∈ ColSubval(T → ( ˆG, ˆγ)), Item (1) of the proof overview +holds. +Using this fact and the argument from Item (2) of the proof overview, we conclude that +for any Tcol ∈ ColSubval(T → ( ˆG, ˆγ)), ρ(Tcol) = τ. +Recall that every edge-colourful subgraph of G induces a fracture of Q. +Let G′ be an element of Emb((Q +♯ +τ, cτ) → (G, c)). +This means that G′ is an edge- +colourful subgraph of G that induces τ. We wish to see how G′ can be extended to some +Tcol +′ ∈ ColSubval(T → ( ˆG, ˆγ)). We know from Item (1) that any Tcol +′′ ∈ ColSubval(T → ( ˆG, ˆγ)) +can only be embedded in ˆG in one way, so G′ can only be extended in one way. The details +are as follows. We claim that there is only one possible extension because T ′ has to be +included and item (b) of (1) ensures that, for each j ∈ [2], the vertex pj +i is connected to wj +i . +The rest of (1) shows the unique way to include the rays, so the extension is unique. +Let β be the function from ColSubval(T → ( ˆG, ˆγ)) that maps any element Tcol to Tcol[G]. +Note that Tcol[G] ∈ Emb((Q +♯ +τ, cτ) → (G, c)) since ρ(Tcol) = τ and ρ(Tcol) is a function of + +L. A. Goldberg and M. Roth +45 +Figure 17 An embedding Tcol of T in ˆG that yields the fracture τ. We will show that this is the +only way to embed T in ˆG in such a way that each edge-colour is used precisely once. Note that +dashed lines depict paths in Tcol, and solid lines depict edges in Tcol. +Tcol[G]. Let β′ be the function that maps an element of Emb((Q +�� +τ, cτ) → (G, c)) to its unique +extension in ColSubval(T → ( ˆG, ˆγ)). Note that β◦β′ and β′◦β are both the identity. Therefore +β is a bijection and |ColSubval(T → ( ˆG, ˆγ))| = |Emb((Q +♯ +τ, cτ) → (G, c))|.The lemma follows +from Lemma 70. +To finish the proof, we will fix Tcol ∈ ColSubval(T → ( ˆG, ˆγ)) and we will show that Item (1) +of the proof overview holds. Part (a) of (1) is trivial since Tcol is edge-colourful so it contains +T ′. The first sentence of (b) is also trivial. We will next focus on (c)–(g), noting along the +way when the rest of (b) is proved. +Recall from Definition 59 that, for each i ∈ [k], the graph Q contains +for each vertex vj such that ∆ has an edge e = {vi, vj} with C(e) = m, a path Pi,j of +length 2b from v1 +i to v1 +j , and +for each vertex vj such that ∆ has an edge e = {vi, vj} with C(e) = ℓ, a path Pi,j of +length 2b from v2 +i to v2 +j . + +46 +Parameterised and Fine-grained Subgraph Counting, modulo 2 +Recall from Definition 6 that cE maps edges of G to edges of Q. Furthermore, G is a +subgraph of ˆG, see Definition 66 (A). Let Tcol(i, j) be the subgraph of Tcol[G] induced by +edges e of G such that cE(e) is in the path Pi,j +By construction, Tcol(i, j) is the union of some number of paths. We will next argue that +it is the union of exactly two disjoint length-b paths: +If Tcol(i, j) has more than two components then at least one component is disconnected +from T ′ in Tcol, contradicting the fact that Tcol is a tree. +If Tcol(i, j) is a single path then it is contained in a 2-path of length at least 2b. Since +this 2-path contains an edge in G, it is not external (Definition 71). This contradicts +Lemma 73. +If Tcol(i, j) is the union of exactly two disjoint paths, one of which has length larger +than b then this larger 2-path is contained in a 2-path that is not external contradicting +Lemma 73 +What we have shown is that T(i, j) consists of two length-b paths. For some t ∈ {1, 2}, +one of these paths is from V t +i and the other is from V t +j . To be more precise and to fix the +notation for t = 1, we have now shown that, for each i ∈ [k], Tcol[G] contains a path Rb(i, 1) +of length b that starts at a vertex w1 +i ∈ V 1 +i . We refer to the other end of this path as ub(i, 1). +The vertex ub(i, 1) has degree 1 and is contained in M (i.e., in c−1(m)). We next argue that +w1 +i has degree at least 3 in Tcol. (See Figure 18.) +If w1 +i has degree 1 in Tcol then Tcol is disconnected, contradicting the fact that it is a tree. +If w1 +i has degree 2 in Tcol, then Tcol has a ray of length at least b + 1 that is not external, +which is again a contradiction. +By the same reasoning, Tcol contains a ray Rb(i, 2) of length b that starts at a vertex w2 +i ∈ V 2 +i +and ends at a vertex ub(i, 2). The ray Rb(i, 2) is contained in Tcol[G]. +We have just finished parts (d) and (e) of (1) and the part of (g) that concerns length b. +So what we have shown corresponds to Figure 18. We would now like to prove parts (c) and +(f) but unfortunately these are more difficult because we have to show where the rays with +lengths between a and b are embedded so that we can argue about where the length-a rays +are embedded. +Define ˆR := �k +i=1{Rb(i, 1), Rb(i, 2)}. Recall that k, a, and b are positive integers with +a ≤ b and k ≥ 2 and that T has Fa,b(T) ≥ 2k and Tcol ∼= T. Also, Rb +col is the set of length-b +rays in Tcol and Rb is the set of length-b rays in T. (See Figure 12.) Using the notation that +we have established, we will prove the following claims. +Claim 1: Let P ∈ (Rb +col \ ˆR) ∪ Pb +col. If a < b then P is external. +We prove Claim 1 for the case where P ∈ Rb +col \ ˆR. The other case is similar but easier. +Observe that |Rb| ≥ 2k since Fa,b(T) ≥ 2k. So Rb can be partitioned as follows +Rb[S] is the set of the 2k length-b rays Fb(i, j) whose sources are s1 +1, . . . , s2 +k and which +are depicted as red dashed lines in Figure 12. +Rb[T] = Rb \ Rb[S] contains the remaining rays of length b. +Our goal is to show that all rays in Rb +col \ ˆR are external. To do this, we first show that +|Rb[T]| = |Rb +col \ ˆR| and we then provide an injection from Rb[T] to Rb +col \ ˆR in which all +elements of the range are external rays. +To show that |Rb[T]| = |Rb +col \ ˆR|, first note that |Rb| = |Rb +col| because T and Tcol are +isomorphic. We further have |Rb[S]| = | ˆR| = 2k. +We next define the (injective) map from Rb[T] to Rb +col\ ˆR . For any ray R = r0, r1, . . . , rb ∈ +Rb[T] we proceed as follows. + +L. A. Goldberg and M. Roth +47 +Figure 18 Illustration of the embedding of Tcol after the rays of length b are analysed. Solid +lines depict edges, dashed lines depict paths, and dash-dotted lines depict sequences of edges (the +identification of the endpoints of which we have not yet been determined). Note that both Rb(i, 1) +and Rb(i, 2) must be of length b. Except for those two rays, the identification of endpoints of +the remaining edges that are incident to G (within ˆG) has not been determined yet either; this is +depicted by the dotted circles inside the colour classes. The fracture ρ induced by Tcol will depend +on the identification of the edges of Tcol, both endpoints of which lie in G. The goal is to show that +the endpoints have to be identified precisely as depicted in Figure 17. + +48 +Parameterised and Fine-grained Subgraph Counting, modulo 2 +If r0 is not among the designated sources sj +i, then R is fully contained in T ′ (see Figure 12) +and thus R is a ray in Tcol. We map R to itself. Note that R is external since it is fully +contained in T ′. +Otherwise, r0 = sj +i and R is one of the rays depicted as black dashed lines in Figure 12. +Since Tcol is edge-colourful, and by construction of ˆG, Tcol contains a path R′ = x, r1, . . . , rb +where x ∈ V j +i . (See Figure 15.) If x has degree 1 in Tcol then Tcol is disconnected, which +is not true. If x has degree 2 in Tcol then Tcol has a non-external ray which is longer +than b, which is also a contradiction by Lemma 73. Thus, x has degree at least 3 in Tcol, +and R′ is an external ray. We map R to R′. +This concludes the proof of Claim 1 for the case where P ∈ Rb +col \ ˆR. ■ +Claim 2: Suppose that there is an integer t′ such that a < t′ < b. Suppose that P ∈ Rt′ +col∪Pt′ +col. +Then P is external. +In order to explain the proof of Claim 2, recall that we have established the following +facts about 2-paths in Tcol in Lemma 73 and Claim 1. +Every 2-path of length greater than b is external. +Every 2-path of length b is either a ray in ˆR or is external. +With those 2-paths covered, the proof of Claim 2 is analogous to the proof of Lemma 73. ■ +Using Claims 1 and 2 we will now prove parts (c) and (f) of (1). For each 2-path whose +length is larger than a, we have already shown that it is in ˆR or we have shown that it is +external. In order to prove (c) we will show that, for each edge {vi, vi′} of ∆ with colour s, +the sequence of edges in Tcol between V 1 +i and V 1 +i′ is the union of two disjoint length-a rays. +This is formalised as follows. +Note that for each edge {vi, vj} of ∆ coloured by the 3-edge-colouring C with s, there is +a path Pi,j of length 2a from v1 +i to v1 +j . Recall that cE maps edges of G to edges of Q. We +write Tcol(i, j) for the subgraph of Tcol[G] induced by edges e of G such that cE(e) is in the +path Pi,j. By construction, Tcol(i, j) is the union of some number of paths. We will next +argue that it is the union of exactly two disjoint length-a paths: +If Tcol(i, j) has more than two components then at least one component is disconnected +from T ′ in Tcol, contradicting the fact that Tcol is a tree. +If Tcol(i, j) is a single path then it is contained in a 2-path of length at least 2a. Since +this 2-path contains an edge in G, it is not external (Definition 71). Additionally, it is +not included in ˆR. This contradicts the aforementioned fact that each 2-paths of length +at least a + 1 is external or included in the set ˆR. +If Tcol(i, j) is the union of exactly two disjoint paths, one of which has length larger +than a, then this larger path yields a contradiction similarly to the previous case. +What we have shown is that T(i, j) consists of two length-a paths. One of these paths +is from V 1 +i and the other is from V 1 +j . To be more precise and to fix the notation, we have +now shown that, for each i ∈ [k], Tcol[G] contains a path Ra(i, 1) of length a that starts at a +vertex ˆw1 +i ∈ V 1 +i . We refer to the other end of this path as ua(i, 1). The vertex ua(i, 1) has +degree 1 and is contained in S (i.e., in c−1(s)). So we have established Part (c) of item (1). +Consider Figure 19 for an illustration of all the information we gathered so far. (The vertices +labelled zj +i and the edge set Ea +i in the figure will be discussed below). +To finish the proof of item (1) we will show part (f) and the rest of part (b). We take these +together. Recall that for every i ∈ [k] there is a path P a +i = v1 +i , y1, . . . , ya−1, v2 +i of length a in +Q from v1 +i to v2 +i . Since Tcol is edge-colourful, it includes each of the colours of the edges on +this path exactly once — these colours are γ−1 +E ({v1 +i , y1}),γ−1 +E ({y1, y2}), . . . ,γ−1 +E ({ya−1, v2 +i }). + +L. A. Goldberg and M. Roth +49 +Figure 19 Depiction of the embedding of Tcol as established after Claim 2 (in the proof of +Lemma 68). +Solid lines depict edges, dashed lines depict paths, and dash-dotted lines depict +sequences of edges (the identification of the endpoints of which has not yet been determined). Note +that we have not yet determined how the endpoints inside of the colour classes V 1 +i and V 2 +i are +identified either; this is depicted by the dotted circles inside these colour classes. Proving that +the embedding of Tcol is as depicted in Figure 17 requires us to show that all endpoints in V 2 +i are +identified, and that all endpoints in V 1 +i , except for x1 +i , are identified. + +50 +Parameterised and Fine-grained Subgraph Counting, modulo 2 +Under the edge colouring cE, the same edges of Tcol are coloured with the colours {v1 +i , y1}, +{y1, y2}, . . . , {ya−1, v2 +i }. +Let e1, . . . , ea be the edges of Tcol with those colours; we write Ea +i for this set of edges +(as is depicted in Figure 19). We let x1 +i be the vertex of Tcol which is contained in V 1 +i and +incident to e1, and we let x2 +i be the vertex of Tcol which is contained in V 2 +i and incident to ea. +Let z1 +i and z2 +i be the vertices of Tcol in V 1 +i and V 2 +i that are adjacent to p1 +i and p2 +i — those +vertices are depicted in Figure 19 and we point out that, a priori, x1 +i might be equal to to z1 +i +and x2 +i might be equal to z2 +i . +Claim 3: There are no vertices in V (Tcol) ∩ V 1 +i other than z1 +i , x1 +i , w1 +i , ˆw1 +i and vertices in +the d1 +i rays. +To prove Claim 3, assume for contradiction that z is such a vertex. Recall that V 1 +i is an +independent set (because vertices in V 1 +i all receive the same colour under c.) Since Tcol is +connected, z has a neighbour outside of V 1 +i but all of the edge colours incident to V 1 +i are +already used. ■ +The proof of the following claim is similar. +Claim 4: There are no vertices in V (Tcol) ∩ V 2 +i other than z2 +i , x2 +i , w2 +i , and vertices in the d2 +i +rays. ■ +Claim 5: Both z1 +i and z2 +i have degree at least 3 in Tcol. We prove the claim for z1 +i ; an +analogous argument applies for z2 +i . Assume first for contradiction that z1 +i has degree 1. Since +Tcol is connected, Claim 2.5 implies that |V (Tcol)∩V 1 +i | = 2 so x1 +i = w1 +i = ˆw1 +i and the depicted +vertices in the d1 +i rays are also identified with this vertex. By Definition 69, Tcol is invalid, +giving a contradiction. +Now assume for contradiction that z1 +i has degree 2. We consider two subcases: +z1 +i is identical to x1 +i . Then Tcol is disconnected, which yields a contradiction. +z1 +i is identical to w1 +i or ˆw1 +i . This is an immediate contradiction since sources cannot have +degree 2 (recall that we already established Ra(i, 1) and Rb(i, 2) to be rays). +zi is incident to the first edges of one of the additional d1 +i outgoing paths. However, in +this case, Tcol can only be connected if there is precisely one further vertex of Tcol in V 1 +i +that is incident to all outgoing edges not covered by z1 +i . However, in this case, Tcol is an +invalid tree, yielding the desired contradiction. +Since the three cases above are exhaustive, the proof of Claim 5 is concluded. ■ +Next we need the following property: +Claim 6: Let t be a positive integer. If t < a then each ray in Rt +col is external. +For the proof, recall that |Rt| = |Rt +col| since T and Tcol are isomorphic. Note that each +ray R of length t of T is either fully contained in T ′, or it is one of the dj +i black rays for some +(i, j) ∈ [k] × [2]. (See Figure 12) If R is fully contained in T ′, then R is also contained in +Rt +col and it is external. +If R = r0, r1, . . . , rt is one of the dj +i black rays, then Tcol contains a path R′ = y0, r1, . . . , rt +for some y0 ∈ V j +i . Suppose that y0 has degree at least 3 in Tcol. Then, as in Claim 1, R′ is +then an external ray, and we are finished. We next consider the case where y0 has degree 1 +or 2 in Tcol. +If the degree is 1, then Tcol is disconnected, leading to a contradiction. If the degree is 2, +then y0 ̸= zj +i by Claim 5. Thus, the only way for Tcol not being disconnected is y0 = xj +i and +Tcol[Ea +i ] is a path. However, then we obtained a ray of length at least a + t which is neither +external, nor in the set ˆR. Thus, we obtain a contradiction by either Claim 2 (a + t < b), or +by Claim 1 (a + t = b), or by Lemma 73 (a + t > b). This concludes the proof of Claim 6. ■ + +L. A. Goldberg and M. Roth +51 +Next, observe that Tcol cannot connect z1 +i and z2 +i via a path within G, that is, via a path +containing the edges Ea +i : Otherwise Tcol would contain a cycle since p1 +i and p2 +i are connected +by a path within T ′. We will see that z1 +i and z2 +i are sources of Tcol. +Let S be the set of all sources of T. Consider the multi-set of leaf-degrees of T +degL(S) := {{degL(s) | s ∈ S}} . +Let Scol be the set of all sources of Tcol and let degL(Scol) be the muti-set of leaf-degrees Tcol. +Since Tcol and T are isomorphic, the multi-sets degL(S) and degL(Scol) are equal. +Suppose that s ∈ S is a source of T not among the designated sources sj +i. Then s is +contained in T ′, and it is also a source of Tcol. Since all of the zj +i have degree at least 3 in +Tcol (by Claim 5), they cannot be part of further rays with source s in Tcol so s has the same +leaf-degree in T and in Tcol. +We next show that for each i ∈ [k], the set V 1 +i ∪ V 2 +i contains at least 2 sources of Tcol: +Either z1 +i is a source or it is connected by a 2-path within Tcol[G] to another source. However, +the only vertices reachable in Tcol[G] from z1 +i that can have degree at least 3 are contained in +V 2 +i . Similarly, either x2 +i is a source or it is connected by a 2-path within Tcol[G] to a source +in V 1 +i . We have already seen that z1 +i cannot be connected to z2 +i within Tcol[G]. Thus the +sources reachable from z1 +i and z2 +i within Tcol[G] must be distinct, and we have shown that +for each i ∈ [k], the set V 1 +i ∪ V 2 +i contains at least 2 sources of Tcol. +Since Tcol and T have the same number of sources, and since 2k sources of T are not +contained in T ′, we have thus shown that for each i ∈ [k], the set V 1 +i ∪ V 2 +i contains precisely +2 sources of Tcol; let us denote those 2 sources by ˆz1 +i and ˆz2 +i . +Now, consider the following subsets of S and Scol: +S′ := {s1 +1, s2 +1, . . . , s1 +k, s2 +k} is the set of designated sources. +S′ +col := {ˆz1 +1, ˆz2 +1, . . . , ˆz1 +k, ˆz2 +k} is the set of sources of Tcol in G (within ˆG). +Since we already know that degL(S \ S′) = degL(Scol \ S′ +col) (those are the sources in T ′), we +require degL(S′) = degL(S′ +col) for T and Tcol to be isomorphic. +What follows is the final claim within the proof of this lemma. +Claim 7: For all i ∈ [k], the following five conditions are satisfied: +{z1 +i , z2 +i } = {ˆz1 +i , ˆz2 +i }, that is, z1 +i and z2 +i are the two sources in V 1 +i ∪ V 2 +i . +Tcol contains precisely 2 vertices in V 1 +i : One is z1 +i and one is x1 +i . +x1 +i has degree 1. Further, z1 +i , w1 +i , ˆw1 +i and all the endpoints of the d1 +i rays are the same. +Tcol contains precisely 1 vertex in V 2 +i . Further, z2 +i , x2 +i , w2 +i and all endpoints of the d2 +i +rays are the same. +Tcol[Ea +i ] is a ray with source z2 +i (= x2 +i = w2 +i ). +Before proving Claim 7, we point out that (1b) and (1f) follow immediately from Claim +7; see Figure 17 and observe that Tcol[Ea +i ] becomes the ray Ra(i, 2), and x1 +i becomes the +endpoint ua(i, 2) of Ra(i, 2) for each i ∈ [k]. Thus the proof of this lemma is concluded if +Claim 7 is proved, which is done below: +We first show that {z1 +i , z2 +i } = {ˆz1 +i , ˆz2 +i } for each i ∈ [k]. Let Φ = � +s∈S′ degL(s) and +Φcol = � +s∈S′ +col degL(s). Observe that degL(S′) = degL(S′ +col) implies Φ = Φcol. +We start by observing that +degL(ˆz1 +i ) + degL(ˆz2 +i ) ≤ (d1 +i + 2) + (d2 +i + 1) + 2. +There are d1 +i rays from V 1 +i and also Ra(i, 1) and Rb(i, 1). There are d2 +i rays from V 2 +i and +also Rb(i, 2). There is also Ea +i which could form two rays. + +52 +Parameterised and Fine-grained Subgraph Counting, modulo 2 +We next show that Ea +i cannot form two rays. Assume for contradiction that is does. +Since Tcol is connected, z1 +i , w1 +i , ˆw1 +i , x1 +i and all the endpoints of the d1 +i rays are identical, +and z2 +i , w2 +i , x2 +i and all the endpoints of the d2 +i rays are identical. +Now, if Tcol[Ea +i ] would be the disjoint union of two rays of length less than a with sources +z1 +i and z2 +i then those rays are non-external rays of length less than a, contradicting Claim +6. We have now shown +degL(ˆz1 +i ) + degL(ˆz2 +i ) ≤ (d1 +i + 2) + (d2 +i + 2) . +(11) +Next, note that by definition of the dj +i (see Figure 12), the following holds: +(d1 +i + 2) + (d2 +i + 2) = degL(s1 +i ) + degL(s2 +i ) +(12) +We have now shown that +degL(ˆz1 +i ) + degL(ˆz2 +i ) ≤ degL(s1 +i ) + degL(s2 +i ). +Finally, we will show that z1 +i and z2 +i are sources to finish the first bullet point. +Consider z1 +i , and recall that is has degree at least 3 by Claim 5, and assume for contradic- +tion that it is not a source of Tcol. Then z1 +i = x1 +i , and Tcol[Ea +i ] is a path, and x2 +i is source +(since it is the only vertex in V (Tcol) ∩ V 2 +i that might have degree at least 3, except for +z2 +i ). Note that this also implies that z2 +i is a source. Thus {ˆz1 +i , ˆz2 +i } = {x2 +i , z2 +i }. In this +case, we have +degL(ˆz1 +i ) + degL(ˆz2 +i ) ≤ d2 +i + 1 < degL(s1 +i ) + degL(s2 +i ) . +Consequently, using (11) and (12), we have Φcol < Φ, which is a contradiction. Thus z1 +i +is a source of Tcol, and a similar argument shows that z2 +i is a source of Tcol as well. +We now prove the remaining items. In what follows, using the previous bulleted item, we +can assume that w.l.o.g. ˆz1 +i = z1 +i and ˆz2 +i = z2 +i for all i ∈ [k]. First, recall that we ordered +the sj +i by their leaf-degrees, that is +degL(s1 +1) ≥ degL(s2 +1) ≥ · · · ≥ degL(s2 +k) ≥ 2 . +If x1 +1 were equal to z1 +1, then Tcol can only be connected if there is only one vertex in V 1 +1 , +that is, all edges incident to V 1 +1 are in fact incident to z1 +1. However, in that case, we have +degL(z1 +1) = degL(s1 +1) + 1 (by construction of ˆG), and thus the multi-sets cannot be equal +anymore. Hence x1 +1 ̸= z1 +1. +If x1 +1 had degree 2, then there would have been a ray of length at least a+1 that originates +in V 2 +1 (otherwise Tcol would have been disconnected). However, this ray would neither +be external, nor among the rays in ˆR, contradicting either Lemma 73 or the previous +sequence of claims. Finally, if x1 +1 had degree at least 3, then Tcol would have contained +more sources than T, which also yields a contradiction. +This shows that x1 +1 has degree 1. However, this implies that Tcol can only contain one vertex +in V 2 +i ; otherwise Tcol would be disconnected. Note that we have just proved the remaining +items of Claim 7 for i = 1. Additionally, we have shown that degL(z1 +1) = degL(s1 +1) and +degL(z2 +1) = degL(s2 +1) Hence we can remove those two numbers from the multi-sets and +continue recursively with i = 2. This concludes the proof of Claim 7, and thus the proof +of the overall lemma. +◀ +We are now ready to conclude the case for trees of unbounded fork number. + +L. A. Goldberg and M. Roth +53 +▶ Lemma 74. Let T be a recursively enumerable class of trees of unbounded fork number. +Then ⊕Sub(T ) is ⊕W[1]-hard. +Proof. We proceed similarly to Lemma 44. However, we have to take care of some subtleties. +First, we start with a class C of cubic bipartite graphs of unbounded treewidth. Next, we +wish to rely on Lemma 68 to obtain the identity +⊕Emb((Q +♯ +τ, cτ) → (G, c)) = ⊕ColSub(T → ( ˆG, ˆγ)), +where τ is the fracture defined in Definition 61. Unfortunately, Lemma 68 only yields the +above identity if, for each v ∈ V (Q), |c−1(v)| is odd, that is, each colour class of vertices of +G has odd cardinality. However, this property can easily be achieved. Let (G′, c′) be the +Q-coloured graph obtained from (G, c) by adding to each even colour class one fresh isolated +vertex. Since Q +♯ +τ does not have isolated vertices, this operation does not change the number +of colour-preserving embeddings. In combination with Lemma 68 we thus obtain +⊕Emb((Q +♯ +τ, cτ) → (G, c)) = ⊕Emb((Q +♯ +τ, cτ) → (G′, c′)) = ⊕ColSub(T → ( ˆG′, ˆγ)). +From here on, we can proceed analogously to the proof of Lemma 44. +◀ +4.4 +The Dichotomy Theorem for Trees +We are now able to prove Theorem 5, i.e., an exhaustive and explicit parameterised complexity +classification for counting trees modulo 2: +▶ Theorem 5. Let T be a recursively enumerable class of trees. If T is matching splittable, +then ⊕Sub(T ) is fixed-parameter tractable. Otherwise ⊕Sub(T ) is ⊕W[1]-complete. +Proof. The fixed-parameter tractability result, as well as the fact that ⊕Sub(T ) is always +contained in ⊕W[1] were both shown in [11]. Hence, it remains to prove ⊕W[1]-hardness if +T is not matching splittable. +By Lemma 32 each class T of trees that is not matching splittable has unbounded +C-number, unbounded star number, or unbounded fork number. Finally, each of these three +cases yields ⊕W[1]-hardness as established by Lemmas 44, 56, and 74. +◀ +References +1 +Noga Alon, Phuong Dao, Iman Hajirasouliha, Fereydoun Hormozdiari, and S. Cenk Sahinalp. +Biomolecular network motif counting and discovery by color coding. Bioinformatics, 24(13):i241– +i249, 2008. doi:10.1093/bioinformatics/btn163. +2 +Noga Alon, Raphael Yuster, and Uri Zwick. Color-coding. J. ACM, 42(4):844–856, 1995. +doi:10.1145/210332.210337. +3 +Suman K. Bera, Lior Gishboliner, Yevgeny Levanzov, C. Seshadhri, and Asaf Shapira. Counting +subgraphs in degenerate graphs. J. ACM, 69(3):23:1–23:21, 2022. doi:10.1145/3520240. +4 +Andreas Björklund, Holger Dell, and Thore Husfeldt. The parity of set systems under random +restrictions with applications to exponential time problems. +In Magnús M. Halldórsson, +Kazuo Iwama, Naoki Kobayashi, and Bettina Speckmann, editors, Automata, Languages, +and Programming - 42nd International Colloquium, ICALP 2015, Kyoto, Japan, July 6-10, +2015, Proceedings, Part I, volume 9134 of Lecture Notes in Computer Science, pages 231–242. +Springer, 2015. doi:10.1007/978-3-662-47672-7\_19. +5 +Marco Bressan. Faster algorithms for counting subgraphs in sparse graphs. Algorithmica, +83(8):2578–2605, 2021. doi:10.1007/s00453-021-00811-0. + +54 +Parameterised and Fine-grained Subgraph Counting, modulo 2 +6 +Andrei A. Bulatov and Amirhossein Kazeminia. Complexity classification of counting graph +homomorphisms modulo a prime number. In Stefano Leonardi and Anupam Gupta, editors, +STOC ’22: 54th Annual ACM SIGACT Symposium on Theory of Computing, Rome, Italy, +June 20 - 24, 2022, pages 1024–1037. ACM, 2022. doi:10.1145/3519935.3520075. +7 +Jianer Chen, Benny Chor, Mike Fellows, Xiuzhen Huang, David W. Juedes, Iyad A. Kanj, +and Ge Xia. Tight lower bounds for certain parameterized NP-hard problems. Inf. Comput., +201(2):216–231, 2005. doi:10.1016/j.ic.2005.05.001. +8 +Jianer Chen, Xiuzhen Huang, Iyad A. Kanj, and Ge Xia. +Strong computational lower +bounds via parameterized complexity. J. Comput. Syst. Sci., 72(8):1346–1367, 2006. doi: +10.1016/j.jcss.2006.04.007. +9 +Yijia Chen, Marc Thurley, and Mark Weyer. Understanding the Complexity of Induced +Subgraph Isomorphisms. +In Proceedings of the 35th International Colloquium on Auto- +mata, Languages and Programming (ICALP), pages 587–596. Springer, 2008. doi:10.1007/ +978-3-540-70575-8\_48. +10 +Radu Curticapean. Counting matchings of size k is w[1]-hard. In Fedor V. Fomin, Rusins +Freivalds, Marta Z. Kwiatkowska, and David Peleg, editors, Automata, Languages, and +Programming - 40th International Colloquium, ICALP 2013, Riga, Latvia, July 8-12, 2013, +Proceedings, Part I, volume 7965 of Lecture Notes in Computer Science, pages 352–363. +Springer, 2013. doi:10.1007/978-3-642-39206-1\_30. +11 +Radu Curticapean, Holger Dell, and Thore Husfeldt. Modular counting of subgraphs: Match- +ings, matching-splittable graphs, and paths. In Petra Mutzel, Rasmus Pagh, and Grzegorz +Herman, editors, 29th Annual European Symposium on Algorithms, ESA 2021, September 6-8, +2021, Lisbon, Portugal (Virtual Conference), volume 204 of LIPIcs, pages 34:1–34:17. Schloss +Dagstuhl - Leibniz-Zentrum für Informatik, 2021. doi:10.4230/LIPIcs.ESA.2021.34. +12 +Radu Curticapean, Holger Dell, and Dániel Marx. Homomorphisms are a good basis for +counting small subgraphs. In Proceedings of the 49th Annual ACM SIGACT Symposium on +Theory of Computing (STOC), pages 210–223. ACM, 2017. doi:10.1145/3055399.3055502. +13 +Radu Curticapean and Dániel Marx. Complexity of counting subgraphs: Only the boundedness +of the vertex-cover number counts. In 55th IEEE Annual Symposium on Foundations of +Computer Science, FOCS 2014, Philadelphia, PA, USA, October 18-21, 2014, pages 130–139. +IEEE Computer Society, 2014. doi:10.1109/FOCS.2014.22. +14 +Marek Cygan, Fedor V. Fomin, Lukasz Kowalik, Daniel Lokshtanov, Dániel Marx, Marcin +Pilipczuk, Michal Pilipczuk, and Saket Saurabh. Parameterized Algorithms. Springer, 2015. +doi:10.1007/978-3-319-21275-3. +15 +Víctor Dalmau and Peter Jonsson. The complexity of counting homomorphisms seen from the +other side. Theoret. Comput. Sci., 329(1-3):315–323, 2004. doi:10.1016/j.tcs.2004.08.008. +16 +Julian Dörfler, Marc Roth, Johannes Schmitt, and Philip Wellnitz. Counting induced subgraphs: +An algebraic approach to #w[1]-hardness. Algorithmica, 84(2):379–404, 2022. doi:10.1007/ +s00453-021-00894-9. +17 +Rodney G. Downey and Michael R. Fellows. Fundamentals of Parameterized Complexity. +Texts in Computer Science. Springer, 2013. doi:10.1007/978-1-4471-5559-1. +18 +Jörg Flum and Martin Grohe. The parameterized complexity of counting problems. SIAM J. +Comput., 33(4):892–922, 2004. doi:10.1137/S0097539703427203. +19 +Jörg Flum and Martin Grohe. +Parameterized Complexity Theory. +Texts in Theoretical +Computer Science. An EATCS Series. Springer, 2006. doi:10.1007/3-540-29953-X. +20 +Martin Grohe and Dániel Marx. On tree width, bramble size, and expansion. J. Comb. Theory, +Ser. B, 99(1):218–228, 2009. doi:10.1016/j.jctb.2008.06.004. +21 +Daniel J. Harvey and David R. Wood. The treewidth of line graphs. J. Comb. Theory, Ser. B, +132:157–179, 2018. doi:10.1016/j.jctb.2018.03.007. +22 +Russell Impagliazzo and Ramamohan Paturi. On the complexity of k-sat. J. Comput. Syst. +Sci., 62(2):367–375, 2001. doi:10.1006/jcss.2000.1727. + +L. A. Goldberg and M. Roth +55 +23 +Bart M. P. Jansen and Dániel Marx. Characterizing the easy-to-find subgraphs from the +viewpoint of polynomial-time algorithms, kernels, and turing kernels. In Piotr Indyk, editor, +Proceedings of the Twenty-Sixth Annual ACM-SIAM Symposium on Discrete Algorithms, +SODA 2015, San Diego, CA, USA, January 4-6, 2015, pages 616–629. SIAM, 2015. doi: +10.1137/1.9781611973730.42. +24 +Oleksii Kuchaiev, Tijana Milenković, Vesna Memišević, Wayne Hayes, and Nataša Pržulj. +Topological network alignment uncovers biological function and phylogeny. Journal of the +Royal Society Interface, 7(50):1341–1354, 2010. doi:10.1098/rsif.2010.0063. +25 +R. Milo, S. Shen-Orr, S. Itzkovitz, N. Kashtan, D. Chklovskii, and U. Alon. +Network +Motifs: Simple Building Blocks of Complex Networks. Science, 298(5594):824–827, 2002. +doi:10.1126/science.298.5594.824. +26 +Ron Milo, Shalev Itzkovitz, Nadav Kashtan, Reuven Levitt, Shai Shen-Orr, Inbal Ayzenshtat, +Michal Sheffer, and Uri Alon. Superfamilies of evolved and designed networks. Science, +303(5663):1538–1542, 2004. doi:10.1126/science.1089167. +27 +Norbert Peyerimhoff, Marc Roth, Johannes Schmitt, Jakob Stix, and Alina Vdovina. Paramet- +erized (modular) counting and cayley graph expanders. In Filippo Bonchi and Simon J. Puglisi, +editors, 46th International Symposium on Mathematical Foundations of Computer Science, +MFCS 2021, August 23-27, 2021, Tallinn, Estonia, volume 202 of LIPIcs, pages 84:1–84:15. +Schloss Dagstuhl - Leibniz-Zentrum für Informatik, 2021. doi:10.4230/LIPIcs.MFCS.2021.84. +28 +Norbert Peyerimhoff, Marc Roth, Johannes Schmitt, Jakob Stix, and Alina Vdovina. Paramet- +erized (modular) counting and cayley graph expanders. CoRR, abs/2104.14596, 2021. URL: +https://arxiv.org/abs/2104.14596, arXiv:2104.14596. +29 +Norbert Peyerimhoff, Marc Roth, Johannes Schmitt, Jakob Stix, Alina Vdovina, and Philip +Wellnitz. Parameterized Counting and Cayley Graph Expanders. SIAM J. Discrete Math., to +appear. +30 +Marc Roth, Johannes Schmitt, and Philip Wellnitz. Detecting and Counting Small Subgraphs, +and Evaluating a Parameterized Tutte Polynomial: Lower Bounds via Toroidal Grids and +Cayley Graph Expanders. CoRR, abs/2011.03433, 2020. arXiv:2011.03433. +31 +Marc Roth, Johannes Schmitt, and Philip Wellnitz. Detecting and Counting Small Subgraphs, +and Evaluating a Parameterized Tutte Polynomial: Lower Bounds via Toroidal Grids and +Cayley Graph Expanders. In Nikhil Bansal, Emanuela Merelli, and James Worrell, editors, +48th International Colloquium on Automata, Languages, and Programming, ICALP 2021, July +12-16, 2021, Glasgow, Scotland (Virtual Conference), volume 198 of LIPIcs, pages 108:1–108:16. +Schloss Dagstuhl - Leibniz-Zentrum für Informatik, 2021. doi:10.4230/LIPIcs.ICALP.2021. +108. +32 +Benjamin Schiller, Sven Jager, Kay Hamacher, and Thorsten Strufe. StreaM – A Stream-Based +Algorithm for Counting Motifs in Dynamic Graphs. In Proceedings of the 2nd International +Conference on Algorithms for Computational Biology (AlCoB), pages 53–67. Springer Interna- +tional Publishing, 2015. doi:10.1007/978-3-319-21233-3_5. +33 +Seinosuke Toda. PP is as hard as the polynomial-time hierarchy. SIAM J. Comput., 20(5):865– +877, 1991. doi:10.1137/0220053. +34 +Ngoc Hieu Tran, Kwok Pui Choi, and Louxin Zhang. Counting motifs in the human interactome. +Nature communications, 4(1):1–8, 2013. doi:10.1038/ncomms3241. +35 +Charalampos E. Tsourakakis, Jakub Pachocki, and Michael Mitzenmacher. Scalable motif- +aware graph clustering. In Proceedings of the 26th International Conference on World Wide +Web (WWW), page 1451–1460, 2017. doi:10.1145/3038912.3052653. +36 +Virginia Vassilevska Williams, Joshua R. Wang, Richard Ryan Williams, and Huacheng Yu. +Finding four-node subgraphs in triangle time. In Piotr Indyk, editor, Proceedings of the Twenty- +Sixth Annual ACM-SIAM Symposium on Discrete Algorithms, SODA 2015, San Diego, CA, +USA, January 4-6, 2015, pages 1671–1680. SIAM, 2015. doi:10.1137/1.9781611973730.111. +