26
Some hard families of parameterised counting problems * Mark Jerrum and Kitty Meeks School of Mathematical Sciences, Queen Mary University of London {m.jerrum,k.meeks}@qmul.ac.uk January 2014 Abstract We consider parameterised subgraph-counting problems of the fol- lowing form: given a graph G, how many k-tuples of its vertices have a given property? A number of such problems are known to be #W[1]- complete; here we substantially generalise some of these existing re- sults by proving hardness for two large families of such problems. We demonstrate that it is #W[1]-hard to count the number of k-vertex subgraphs having any property where the number of distinct edge- densities of labelled subgraphs that satisfy the property is o(k 2 ). In the special case that the property in question depends only on the number of edges in the subgraph, we give a strengthening of this re- sult which leads to our second family of hard problems. 1 Introduction Parameterised counting problems were introduced by Flum and Grohe in [6]. Much previous research has focussed on problems of the following form: Input: An n-vertex graph G =(V,E). Parameter: k. * Research supported by EPSRC grant “Computational Counting” 1

Some hard families of parameterised counting … hard families of parameterised counting problems ... 2Hsuch that G[U] ˘=H; and Uis colourful under !gj: ... k. Question: How many

Embed Size (px)

Citation preview

Page 1: Some hard families of parameterised counting … hard families of parameterised counting problems ... 2Hsuch that G[U] ˘=H; and Uis colourful under !gj: ... k. Question: How many

Some hard families of parameterised countingproblems ∗

Mark Jerrum and Kitty MeeksSchool of Mathematical Sciences, Queen Mary University of London

{m.jerrum,k.meeks}@qmul.ac.uk

January 2014

Abstract

We consider parameterised subgraph-counting problems of the fol-lowing form: given a graph G, how many k-tuples of its vertices have agiven property? A number of such problems are known to be #W[1]-complete; here we substantially generalise some of these existing re-sults by proving hardness for two large families of such problems. Wedemonstrate that it is #W[1]-hard to count the number of k-vertexsubgraphs having any property where the number of distinct edge-densities of labelled subgraphs that satisfy the property is o(k2). Inthe special case that the property in question depends only on thenumber of edges in the subgraph, we give a strengthening of this re-sult which leads to our second family of hard problems.

1 Introduction

Parameterised counting problems were introduced by Flum and Grohe in [6].Much previous research has focussed on problems of the following form:

Input: An n-vertex graph G = (V,E).Parameter: k.

∗Research supported by EPSRC grant “Computational Counting”

1

Page 2: Some hard families of parameterised counting … hard families of parameterised counting problems ... 2Hsuch that G[U] ˘=H; and Uis colourful under !gj: ... k. Question: How many

Question: How many (labelled) k-vertex subsets of V induce graphs witha given property?

All existing results concerning the complexities of solving such prob-lems exactly show that specific problems of this kind are #W[1]-complete(and thus are unlikely to be solvable in time f(k)nO(1) for any functionf)1, including the problems of counting the number of k-vertex cliques (p-#Clique [6]), paths (p-#Path [6]), cycles (p-#Cycle [6]), matchings(p-#Matching [1]), and connected subgraphs (p-#Connected InducedSubgraph [8]). Additionally, Chen, Thurley and Weyer [3] showed that it is#W[1]-complete to count the number of induced subgraphs isomorphic to agiven graph from the class C (p-#Induced Subgraph Isomorphism(C))whenever C contains arbitrarily large graphs. However, even consideringthese examples, the number of problems known to be complete for the pa-rameterised complexity class #W[1] as a whole remains relatively small.

In this paper, we add to his collection of hard parameterised countingproblems by giving two conditions, either of which is sufficient to guaranteethat a subgraph counting problem of this kind is #W[1]-complete. The tworesulting families of hard parameterised subgraph counting problems containa few of the special cases already known to be hard (including p-#InducedSubgraph Isomorphism(C)) but are defined in a very general way and soinclude many problems whose complexity status was not previously known.

The precise formulation of our results makes use of the general model forparameterised subgraph counting problems introduced in [8] and described inSection 1.4 below, but informally we show that counting labelled subgraphswith property Φ is #W[1]-complete in each of the following situations:

1. Dk = {|E(H)| : |V (H)| = k and Φ is true for H} satisfies |Dk| = o(k2).

2. Φ is defined by a collection of o(k2) sub-intervals of {0, . . . ,(k2

)}, such

that Φ is true for H if and only if the number of edges in H lies in oneof these intervals.

The first class of problems includes those of counting k-vertex subgraphswhich are planar, or have treewidth at most t (for any fixed t), as any sub-graph with either of these properties has o(k2) edges; it also includes theproblem of counting the number of regular k-vertex subgraphs, as there are

1See Section 1.2 for definitions of concepts from parameterised complexity.

2

Page 3: Some hard families of parameterised counting … hard families of parameterised counting problems ... 2Hsuch that G[U] ˘=H; and Uis colourful under !gj: ... k. Question: How many

only k possible edge-densities for a regular graph on k-vertices. Problemsthat belong to the second class but not the first include, for example, count-ing all k-vertex subgraphs with edge-density at least α, where alpha is someconstant in [0, 1] that does not depend on k.

The proofs of our results will use ideas from Ramsey theory. This field ofextremal graph theory has previouly been exploited to prove hardness resultsfor parameterised counting problems, for example in [3]. In this paper, weneed a stronger Ramsey theoretic result, and to this end we derive a lowerbound on the total number of k-vertex cliques and independent sets thatmust be present in any n-vertex graph (if n is sufficiently large comparedwith k).

The rest of the paper is organised as follows. In the remainder of thissection, we introduce our key notation and definitions, mention the mainideas we will use from the theory of parameterised complexity, prove ourRamsey theoretic result, and finally give a formal definition of the model forsubgraph counting problems. In Section 2, we define a pair of closely relatedconstructions which form the basis of our later reductions, and demonstratethe important properties of these constructions. Section 3 then contains theproofs of our #W[1]-hardness results.

1.1 Notation and definitions

Given a graph G = (V,E), and a subset U ⊂ V , we write G[U ] for thesubgraph of G induced by the vertices of U . For any k ∈ N, we write [k]as shorthand for {1, . . . , k}, and V (k) for the set of all subsets of V of sizeexactly k. A permutation on [k] is a bijection [k]→ [k]. We denote by G thecomplement of G, that is G = (V,E ′) where E ′ = V (2) \ E. If A,B ⊂ V , weset E(A,B) = {uv ∈ E : u ∈ A, v ∈ B}.

Two graphs G and H are isomorphic, written G ∼= H, if there exists abijection θ : V (G)→ V (H) so that, for all u, v ∈ V (G), we have θ(u)θ(v) ∈E(H) if and only if uv ∈ E(G); θ is said to be an isomorphism from G toH. An automorphism on G is an isomorphism from G to itself. We writeaut(G) for the number of automorphisms of G.

If G is coloured by some colouring ω : V → [k], we say that a subsetU ⊂ V is colourful (under ω) if, for every i ∈ [k], there exists exactly onevertex u ∈ U such that ω(u) = i; note that can only be achieved if U ∈ V (k).

We will be considering labelled graphs, where a labelled graph is a pair(H, π) such that H is a graph and π : [|H|]→ V (H) is a bijection. We write

3

Page 4: Some hard families of parameterised counting … hard families of parameterised counting problems ... 2Hsuch that G[U] ˘=H; and Uis colourful under !gj: ... k. Question: How many

L(k) for the set of all labelled graphs on k vertices. Given a graph G = (V,E)and a k-tuple of vertices (v1, . . . , vk), G[v1, . . . , vk] denotes the labelled graph(H, π) where H = G[{v1, . . . , vk}] and π(i) = vi for each i ∈ [k]. If H is a setof labelled graphs, we set HH = {(H ′, π′) ∈ H : H ′ ∼= H}.

Given two graphs G and H, a strong embedding of H in G is an injectivemapping θ : V (H)→ V (G) such that, for any u, v ∈ V (H), θ(u)θ(v) ∈ E(G)if and only if uv ∈ E(H). We denote by #StrEmb(H,G) the number ofstrong embeddings of H in G. If H is a class of labelled graphs, we set

#StrEmb(H, G) =

|{θ : [k]→ V (G) : θ is injective and ∃(H, π) ∈ H such that

θ(i)θ(j) ∈ E(G) ⇐⇒ π(i)π(j) ∈ E(H)}|.

If G is also equipped with a k-colouring ω, where |V (H)| = k, we write#ColStrEmb(H,G, ω) for the number of strong embeddings of H in G suchthat the image of V (H) is colourful under ω. Similarly, we set

#ColStrEmb(H, G, ω) =

|{θ : [k]→ V (G) : θ is injective, ∃(H, π) ∈ H such that

θ(i)θ(j) ∈ E(G) ⇐⇒ π(i)π(j) ∈ E(H),

and θ([k])is colourful under ω}|.

We can alternatively consider unlabelled embeddings of H in G. In thiscontext we write #SubInd(H,G) for the number of subsets U ∈ V (G)(|H|)

such that G[U ] ∼= H. Note that #SubInd(H,G) = #StrEmb(H,G)/ aut(H).If H is a class of labelled graphs, we set

#SubInd(H, G) = |{U ⊆ V (G) : ∃(H, π) ∈ H such that G[U ] ∼= H}|.

Once again, we can also consider the case in which G is equipped with ak-colouring ω. In this case #ColSubInd(H,G, ω) is the number of colourfulsubsets U such that G[U ] ∼= H, and

#ColSubInd(H, G, ω) = |{U ⊆ V (G) : ∃(H, π) ∈ H such that G[U ] ∼= H,

and U is colourful under ω}|.

Finally, we write #ColCliquek(G,ω) as shorthand for #ColSubInd(Kk, G, ω),where Kk denotes a clique on k vertices.

4

Page 5: Some hard families of parameterised counting … hard families of parameterised counting problems ... 2Hsuch that G[U] ˘=H; and Uis colourful under !gj: ... k. Question: How many

1.2 Parameterised Counting Complexity

In this section, we introduce key notions from parameterised counting com-plexity, which we will use in the rest of the paper.

To understand the complexity of parameterised counting problems, Flumand Grohe [6] introduce two kinds of reductions between such problems.

Definition. Let (Π, κ) and (Π′, κ′) be parameterised counting problems.

1. An fpt parsimonious reduction from (Π, κ) to (Π′, κ′) is an algorithmthat computes, for every instance I of Π, an instance I ′ of Π′ in timef(k) · |I|c such that κ′(I ′) ≤ g(κ(I)) and

Π(I) = Π′(I ′)

(for computable functions f, g : N→ N and a constant c ∈ N). In thiscase we write (Π, κ) ≤fpt

pars (Π′, κ′).

2. An fpt Turing reduction from (Π, κ) to (Π′, κ′) is an algorithm A withan oracle to Π′ such that

(a) A computes Π,

(b) A is an fpt-algorithm with respect to κ, and

(c) there is a computable function g : N → N such that for all oraclequeries “Π′(y) =?” posed by A on input x we have κ′(y) ≤ g(κ(x)).

In this case we write (Π, κ) ≤fptT (Π′, κ′).

Using these notions, Flum and Grohe introduce a hierarchy of parame-terised counting complexity classes, #W[t], for t ≥ 1; this is the analogue ofthe W-hierarchy for parameterised decision problems. In order to define thishierarchy, we need some more notions related to satisfiability problems.

The definition of levels of the hierarchy uses the following problem.

p-#WDψ

Input: A structure A and k ∈ N.Parameter: k.Question: How many relations S ⊆ As of cardinality |S| = k are suchthat A |= ψ(S) (where A is the universe of A)?

5

Page 6: Some hard families of parameterised counting … hard families of parameterised counting problems ... 2Hsuch that G[U] ˘=H; and Uis colourful under !gj: ... k. Question: How many

If Ψ is a class of first-order formulas, then p-#WD-Ψ is the class of allproblems p-#WDψ where ψ ∈ Ψ. The classes of first-order formulas Σt andΠt, for t ≥ 0, are defined inductively. Both Σ0 and Π0 denote the class ofquantifier-free formulas, while, for t ≥ 1, Σt is the class of formulas

∃x1 . . . ∃xiψ,

where ψ ∈ Πt−1, and Πt is the class of formulas

∀x1 . . . ∀xiψ,

where ψ ∈ Σt−1. We are now ready to define the classes #W[t], for t ≥ 1.

Definition ([6, 7]). For t ≥ 1, #W [t] is the class of all parameterised count-ing problems that are fpt parsimonious reducible to p-#WD-Πt.

Just as it is considered to be very unlikely that W[1] = FPT, it is veryunlikely that there exists an algorithm running in time f(k)nO(1) for anyproblem that is hard for the class #W[1]; hardness of a problem can beshown using either of the forms of reductions defined above. One useful#W[1]-complete problem which we will use in our reductions is the following:

p-#Multicolour CliqueInput: A graph G = (V,E), and a k-colouring f of G.Parameter: k.Question: How many k-vertex cliques in G are colourful with respectto f?

This problem can easily be shown to be #W[1]-hard (along the same linesas the proof of the W[1]-hardness of Multicolour Clique in [5]) by meansof a reduction from p-#Clique, shown to be #W[1]-hard in [6].

1.3 Ramsey theory

To show that our constructions have the desired properties, we will exploitsome Ramsey theoretic results. First of all, we will use the following boundon Ramsey numbers which follows immediately from a result of Erdos andSzekeres [4]:

6

Page 7: Some hard families of parameterised counting … hard families of parameterised counting problems ... 2Hsuch that G[U] ˘=H; and Uis colourful under !gj: ... k. Question: How many

Theorem 1.1. Let k ∈ N. Then there exists R(k) < 2k such that any graphon n ≥ R(k) vertices contains either a clique or independent set on k vertices.

We will also need the following easy corollary of this result.

Corollary 1.2. Let G = (V,E) be an n-vertex graph, where n ≥ 2k. Thenthe number of k-vertex subsets U ⊂ V such that U induces either a clique orindependent set in G is at least

(2k − k)!

(2k)!

n!

(n− k)!.

Proof. We shall say that the subset X ∈ V (k) is interesting if X induceseither a clique or an independent set in G. By Ramsey’s Theorem, we knowthat every subset U ⊂ V with |U | = 2k must contain at least one interestingsubset.

The number of subsets of V of size exactly 2k is(n2k

). Moreover, the

number of such sets to which any given k-vertex subset can belong is(n−k2k−k

).

Thus, in order for every U ∈ V (2k) to contain at least one interesting subset,the number of interesting subsets must be at least(

n2k

)(n−k2k−k

) =

n!(2k)!(n−2k)!

(n−k)!(2k−k)!(n−2k)!

=(2k − k)!

(2k)!

n!

(n− k)!,

as required.

1.4 The Model

The classes of counting problems we consider fall within the scope of thegeneral model introduced in [8]; this model describes parameterised countingproblems in which the goal is to count labelled subgraphs with particularproperties. We repeat the definition here for completeness, before extendingit to colourful subgraph counting problems (which we will need for interme-diate stages in our reductions).

Let Φ be a family (φ1, φ2, . . .) of functions φk : {0, 1}(k2) → {0, 1}, such

that the function mapping k 7→ φk is computable. Let (i1, . . . , i(k2)

) be a fixed

7

Page 8: Some hard families of parameterised counting … hard families of parameterised counting problems ... 2Hsuch that G[U] ˘=H; and Uis colourful under !gj: ... k. Question: How many

ordering of all pairs in [k](2). For any labelled graph (H, π) we define

φk(H, π) = φk(e(H,π)i1

, e(H,π)i2

, . . . , e(H,π)i(k2)

),

where e(H,π){j,l} ∈ {0, 1} and e{j,l} = 1 if and only if π(j)π(l) ∈ E(H). For any

k, we write Hφkfor the set {(H, π) ∈ L(k) : φk(H, π) = 1}.

The general problem is then defined as follows.

p-#Induced Subgraph With Property(Φ)Input: A graph G = (V,E) and an integer k.Parameter: k.Question: What is the cardinality of the set {(v1, . . . , vk) ∈ V k :φk(G[v1, . . . , vk]) = 1}?

A property Φ is said to be symmetric if the value of φk(H, π) dependsonly on the graph H and not on the labelling of the vertices; this correspondsto “unlabelled” graph problems, such as p-#clique. A related problem forsymmetric properties was also defined in [8]:

p-#Induced Unlabelled Subgraph With Property(Φ)Input: A graph G = (V,E) and k ∈ N.Parameter: k.Question: What is the cardinality of the set {{v1, . . . , vk} ∈ V (k) :φk(G[v1, . . . , vk]) = 1}?

For any symmetric property Φ, the output of p-#Induced SubgraphWith Property(Φ) is exactly k! times the output of p-#Induced Un-labelled Subgraph With Property(Φ).

These problems were shown to lie in #W[1] in [8]:

Proposition 1.3 ([8]). For any Φ, the problem p-#Induced SubgraphWith Property(Φ) belongs to #W[1]. If Φ is symmetric, then the sameis true for p-#Induced Unlabelled Subgraph With Property(Φ).

We also define a multicolour version of this problem; it is straightforwardto verify that this variant also lies in the class #W[1] for every property Φ.

p-#Multicolour Induced Subgraph with Property(Φ)Input: A graph G = (V,E), an integer k and colouring f : V → [k].

8

Page 9: Some hard families of parameterised counting … hard families of parameterised counting problems ... 2Hsuch that G[U] ˘=H; and Uis colourful under !gj: ... k. Question: How many

Parameter: k.Question: What is the cardinality of the set {(v1, . . . , vk) ∈ V k :φk(G[v1, . . . , vk]) = 1 and {f(v1), . . . , f(vk)} = [k]}?

We make the following simple observation regarding the complexitiesof p-#Multicolour Induced Subgraph with Property(Φ) and p-#Induced Subgraph With Property(Φ).

Lemma 1.4. For any family Φ, we have p-#Multicolour InducedSubgraph with Property(Φ) ≤fpt

T p-#Induced Subgraph WithProperty(Φ).

Proof. We give an fpt Turing reduction from p-#Multicolour InducedSubgraph with Property(Φ) to p-#Induced Subgraph With Prop-erty(Φ), using an inclusion-exclusion method. Let G, with colouring f , bethe k-coloured graph in an instance of p-#Multicolour Induced Sub-graph with Property(Φ).

Suppose we have an oracle to p-#Induced Subgraph With Prop-erty(Φ), so for any G′ = (VG′ , EG′) and k ∈ N we can obtain the cardinalityof the set

XG′ = {(v1, . . . , vk) ∈ V kG′ : φk(G

′[v1, . . . , vk]) = 1}

in constant time. Our goal is to compute the cardinality of the set

Y = {(v1, . . . , vk) ∈ V k : φk(G[v1, . . . , vk]) = 1 and

{f(v1), . . . , f(vk)} = [k]}.

It is clear that, if for each I ⊆ [k] we set

NI = |{(v1, . . . , vk) ∈ V k : φk(G[v1, . . . , vk]) and {f(v1), . . . , f(vk)} ⊆ I}|,

then the cardinality of Y can be written as

|Y | =∑I⊆[k]

(−1)k−|I|NI .

But for any I ⊂ [k], we have

NI = |XG[f−1(I)]|,

9

Page 10: Some hard families of parameterised counting … hard families of parameterised counting problems ... 2Hsuch that G[U] ˘=H; and Uis colourful under !gj: ... k. Question: How many

that is, NI is equal to the number of tuples of vertices in G which satisfyφk and are such that all the vertices have colours from I. Thus we cancompute each of the 2k values of NI for I ⊆ [k] in time nO(1) using anoracle call, and the parameter for each oracle call is exactly k. This gives anfpt Turing reduction from p-#Multicolour Induced Subgraph withProperty(Φ) to p-#Induced Subgraph With Property(Φ).

2 The construction

In this section we describe a pair of closely related constructions, which willbe used for hardness reductions in Section 3. Both constructions take asinput two graphs G and H, where G is equipped with a k-colouring fG, andH contains either a clique or independent set on k vertices; the two differentconstructions correspond to these two possibilities for H. We begin in Section2.1 by describing the constructions in both cases, and then in Section 2.2 weprove a number of key facts about the two constructions.

2.1 Definition of the construction

As explained above, we give two slightly different constructions dependingon whether H contains a clique or an independent set on k vertices. Webegin with the former case.

H contains a clique

In this case we assume that there exists a set U ∈ V (H)(k) that induces aclique in H. We now define a new graph, constr(G, fG, H, U), and a colouringfconstr(G,fG,H,U) of its vertices. Suppose that G = (VG, EG), and that H =(VH , EH); set V ′H = VH \ U . We then set

V (constr(G, fG, H, U)) = VG ∪ V ′H .

Without loss of generality we may assume that fG colours VG with colours[k]. Let fH : VH → [|V (H)|] be any colouring of VH which assigns a distinctcolour to each vertex, and which has the property that, for every u ∈ U ,fH(u) ∈ [k]. We will set E(constr(G, fG, H, U)) = EG ∪ E1 ∪ E2 where

E1 = {uv ∈ EH : u, v ∈ V ′H},

10

Page 11: Some hard families of parameterised counting … hard families of parameterised counting problems ... 2Hsuch that G[U] ˘=H; and Uis colourful under !gj: ... k. Question: How many

and

E2 = {vw : v ∈ VG, w ∈ V ′H , ∃u ∈ U such that

uw ∈ EH and fH(u) = fG(v)},

so constr(G, fG, H, U) contains all internal edges in G and H \ U , togetherwith edges from each vertex w in VG to the vertices in V ′H which are adjacent,in H, to the vertex of U assigned colour fG(w) by fH .

Finally, we define the colouring fconstr(G,fG,H,U) : V (constr(G, fG, H, U))→[|V (H)|] by setting

fconstr(G,fG,H,U)(v) =

{fH(v) if v ∈ V ′HfG(v) if v ∈ VG.

H contains an independent set

In this case we assume that there exists a set W ⊂ V (H) such that W inducesan independent set in H. The construction for this case is very similar, andin fact we can define our new graph constr(G, fG, H,W ) in terms of the firstconstruction given above.

Note that, as W induces an independent set in G, it must be that Winduces a clique in H. Thus we can apply the construction above to G andH to obtain a graph constr(G, fG, H,W ). We define constr(G, fG, H,W ) tobe the complement of this graph, that is

constr(G, fG, H,W ) = constr(G, fG, H,W ).

Once again, we equip our new graph with a colouring; in this case we set

fconstr(G,fG,H,W ) = fconstr(G,fG,H,W ),

so the colouring is in fact exactly the same as that used in the case that Hcontains a clique.

2.2 Properties of the construction

In this section we prove a number of important results about our construc-tions, which will be essential for the proofs in Section 3 below. We begin byproving the key property of our constructions; we consider first the case forconstr(G, fG, H, U).

11

Page 12: Some hard families of parameterised counting … hard families of parameterised counting problems ... 2Hsuch that G[U] ˘=H; and Uis colourful under !gj: ... k. Question: How many

Lemma 2.1. Let X be a colourful subset of constr(G, fG, H, U) with respectto fconstr(G,fG,H,U). Then the subgraph of constr(G, fG, H, U) induced by Xis isomorphic either to H or to a graph obtainable from H deleting one ormore edges from H[U ]. Moreover, the number of edges deleted is equal to thenumber of non-edges in constr(G, fG, H, U)[X ∩ VG].

Proof. We begin by defining a bijection θ from X to VH ; we will then arguethat in fact θ defines an isomorphism from constr(G, fG, H, U)[X] to a graphH ′, where either H ′ = H, or else H ′ can be obtained from H by deleting oneor more edges from H[U ]. The mapping θ is defined as follows:

θ(x) = f−1H (fconstr(G,fG,H,U)(x)),

so each vertex in x is mapped to the vertex of H that receives the same colourunder fH . Note that this is indeed a bijection since both fH and (since X iscolourful) fconstr(G,fG,H,U)|X are bijective.

In order to show that there exists some graph H ′ which satisfies theconditions of the lemma and is such that θ defines an isomorphism fromconstr(G, fG, H, U)[X] to H ′, it suffices to check that, for any two verticesx, y ∈ X such that at least one of θ(x) and θ(y) does not lie in U , we havexy ∈ E(constr(G, fG, H, U)) if and only if θ(x)θ(y) ∈ E(H).

Suppose first that both θ(x) and θ(y) lie in VH \U . Then, by definition ofthe colouring fconstr(G,fG,H,U), we must have x, y ∈ V ′H , and moreover θ(x) = xand θ(y) = y; thus it follows immediately from the construction that xy ∈E(constr(G, fG, H, U)) if and only if θ(x)θ(y) ∈ E(H).

Now suppose that θ(x) ∈ U , but θ(y) /∈ U . Then, as before, we seethat θ(y) = y. By definition of constr(G, fG, H, U), the edge xy belongs toE(constr(G, fG, H, U)) if and only if there is some vertex w ∈ U such thatwy ∈ E(H) and fH(w) = fG(x). However, it follows from the definitions ofθ and fconstr(G,fG,H,U) that fG(x) = fconstr(G,fG,H,U)(x) = fH(θ(x)), so xy ∈E(constr(G, fG, H, U)) if and only if there is a vertex w ∈ U such thatwy ∈ E(H) and fH(w) = fH(θ(x)). Since fH is injective, this is only possibleif in fact θ(x) = w, in other words xy ∈ E(constr(G, fG, H, U)) if and only ifθ(x)θ(y) ∈ E(H), as required.

Thus we see that there is indeed some suitable graph H ′ such that θdefines an isomorphism from constr(G, fG, H, U)[X] to H ′. The fact thatθ is an isomorphism from constr(G, fG, H, U)[X] to H ′ implies that, for allx, y ∈ X such that θ(x), θ(y) ∈ U , we have θ(x)θ(y) ∈ E(H ′) if and only ifxy ∈ E(constr(G, fG, H, U)). Since the vertices that map to U under θ are

12

Page 13: Some hard families of parameterised counting … hard families of parameterised counting problems ... 2Hsuch that G[U] ˘=H; and Uis colourful under !gj: ... k. Question: How many

precisely those in X ∩ VG, this implies that the number of edges in H ′[U ] isequal to the number of edges in constr(G, fG, H, U)[X ∩VG]; hence (as H[U ]is complete) the number of edges we must delete from H to obtain H ′ isprecisely equal to the number of non-edges in constr(G, fG, H, U)[X ∩ VG],as required.

It is now straightforward to derive the analogous result in the second case,for constr(G, fG, H,W ).

Lemma 2.2. Let X be a colourful subset of constr(G, fG, H,W ) with respectto fconstr(G,fG,H,W ). Then the subgraph of constr(G, fG, H,W ) induced by Xis isomorphic either to H or to a graph obtainable from H adding one ormore edges to H[W ]. Moreover, the number of edges added is equal to thenumber of edges in constr(G, fG, H,W )[X ∩ VG].

Proof. Suppose first that X is a colourful subset of constr(G, fG, H,W )under fconstr(G,fG,H,W ). It follows from Lemma 2.1 that the subgraph of

constr(G, fG, H,W ) induced by X is isomorphic either to H or to a graphobtainable from H by deleting one or more edge with both endpoints in W .Moreover, in this case the number of edges deleted is equal to the numberof non-edges in constr(G, fG, H,W )[X ∩VG]. The result follows immediatelyby taking complements.

We now use this pair of results to prove two further pairs of facts aboutour constructions. The first pair are easy corollaries.

Corollary 2.3. Let Hk be a collection of labelled graphs on k vertices, with(H, π) ∈ Hk. Suppose that U ∈ V (H)(k) induces a clique in H, and thatthere is no (H ′, π′) ∈ Hk such that H ′ can be obtained from H by deleting

one or more edges in U . Then, writing G = constr(G, fG, H, U), we have

#ColStrEmb(Hk, G, f eG) = #ColStrEmb(HHk , G, f eG).

Proof. By definition, we know that the image of any mapping that con-tributes to #ColStrEmb(Hk, G, f eG) must be a colourful subset of G withrespect to f eG; but by Lemma 2.1, since no labelled graph in Hk is isomorphicto a graph obtainable from H by deleting one or more edges in U , any suchsubset must in fact be isomorphic to H.

13

Page 14: Some hard families of parameterised counting … hard families of parameterised counting problems ... 2Hsuch that G[U] ˘=H; and Uis colourful under !gj: ... k. Question: How many

The same argument can be applied to give the corresponding result forconstr(G, fG, H,W ).

Corollary 2.4. Let Hk be a collection of labelled graphs on k vertices, with(H, π) ∈ Hk. Suppose that W ∈ V (H)(k) induces an independent set in H,and that there is no (H ′, π′) ∈ Hk such that H ′ can be obtained from H by

adding one or more edges in W . Then, writing G = constr(G, fG, H,W ), wehave

#ColStrEmb(Hk, G, f bG) = #ColStrEmb(HHk , G, f bG).

The final fact we prove about our constructions is that the number ofcolourful subsets of constr(G, fG, H, U) (respectively constr(G, fG, H,W )) in-ducing copies of H is equal to the number of colourful cliques in G.

Lemma 2.5. Suppose that U ∈ V (H)(k) induces a clique. Then

#ColCliquek(G, fG) = #ColSubInd(H, constr(G, fG, H, U), fconstr(G,fG,H,U)).

Proof. We begin by showing that every colourful subset in constr(G, fG, H, U)that induces a copy of H corresponds to a distinct colourful clique in G. Ob-serve that, by Lemma 2.1, any colourful subset X of constr(G, fG, H, U) mustinduce a graph H ′ that is either isomorphic to H or else is obtainable fromH by deleting some edges in H[U ]. Moreover, the number of non-edges ofconstr(G, fG, H, U)[X ∩ VG] is equal to the number of edges that must bedeleted from H to obtain H ′. Thus, if X in fact induces a copy of H, thenthere cannot be any non-edges in constr(G, fG, H, U)[X∩VG]; in other words,constr(G, fG, H, U)[X ∩ VG] is a clique. By definition of constr(G, fG, H, U),this means that X ∩ VG induces a clique in G. Note that, as X is a colourfulsubset of constr(G, fG, H, U) and colours from [k] only appear at verticesfrom VG under fconstr(G,fG,H,U), constr(G, fG, H, U)[X ∩ VG] must in fact bea colourful clique with respect to the colouring fG (as fconstr(G,fG,H,U) agreeswith fG on VG). Now, observe that all colourful subsets X must contain everyvertex in V ′H , and so distinct colourful subsets X and X ′ must have distinctintersections with VG. Thus every colourful subset of constr(G, fG, H, U) thatinduces a copy of H corresponds to a distinct colourful clique in G.

Now we show that every colourful clique in G corresponds to a distinctcolourful subset in constr(G, fG, H, U) that induces a copy of H. Suppose

14

Page 15: Some hard families of parameterised counting … hard families of parameterised counting problems ... 2Hsuch that G[U] ˘=H; and Uis colourful under !gj: ... k. Question: How many

that Y induces a colourful clique in G (with respect to the colouring fG).Observe that the set Y ∪ V ′H is colourful under fconstr(G,fG,H,U), so by Lemma2.1 we know that Y ∪ V ′H induces a graph H ′ that is either isomorphic to Hor to a subgraph of H obtained by deleting one or more edges from H[U ].Moreover, we know that the number of edges we must delete from H to obtainH ′ is equal to the number of non-edges in constr(G, fG, H, U)[(Y ∪V ′H)∩VG] =constr(G, fG, H, U)[Y ]. Since Y induces a clique in G, there are no non-edgesin constr(G, fG, H, U)[Y ], it must be that in fact Y ∪ V ′H induces a copy ofH in constr(G, fG, H, U). Finally, it is clear that distinct colourful cliques inG will give distinct colourful copies of H.

The corresponding result for constr(G, fG, H,W ) now follows easily.

Lemma 2.6. Suppose that H contains a k-vertex independent set W . Then

#ColCliquek(G, fG) = #ColSubInd(H, constr(G, fG, H,W ), fconstr(G,fG,H,W )).

Proof. It follows immediately from Lemma 2.5 that

#ColClique(G, fG) = #ColSubInd(H, constr(G, fG, H,W ), fconstr(G,fG,H,W )).

But it is clear, taking complements, that

#ColSubInd(H, constr(G, fG, H,W ), fconstr(G,fG,H,W ))

= #ColSubInd(H, constr(G, fG, H,W ), fconstr(G,fG,H,W ))

= #ColSubInd(H, constr(G, fG, H,W ), fconstr(G,fG,H,W )).

Thus

#ColClique(G, fG) = #ColSubInd(H, constr(G, fG, H,W ), fconstr(G,fG,H,W )),

as required.

3 Hardness results

In this section we prove our results about the hardness of certain classes ofparameterised subgraph counting problems. We begin in Section 3.1 withsome auxiliary results, then in Section 3.2 we consider the case in whichthe property holds for a decreasing proportion of the possible edge densities,before giving a stronger result in Section 3.3 for the special case in which theproperty depends only on the number of edges present in a subgraph.

15

Page 16: Some hard families of parameterised counting … hard families of parameterised counting problems ... 2Hsuch that G[U] ˘=H; and Uis colourful under !gj: ... k. Question: How many

3.1 Auxiliary results

We prove two key lemmas which will be used throughout the rest of thissection. We begin by relating the number of subsets that induce a copy ofa graph H to the number of strong embeddings of graphs from a class oflabelled graphs all isomorphic to H.

Lemma 3.1. Let H be a collection of labelled graphs, and (H, π) ∈ H alabelled k-vertex graph. Set

αH = |{σ : σ a permutation on [k], ∃(H, π′) ∈ HH such that

π′ ◦ σ−1 ◦ π−1 defines an automorphism on H}|.

Then, for any graph G,

#StrEmb(HH , G) = αH ·#SubInd(H,G),

Moreover, if G is equipped with a k-colouring f , then

#ColStrEmb(HH , G, f) = αH ·#ColSubInd(H,G, f).

Proof. Observe first that k-tuples whose elements form the set X ∈ V (k) canonly contribute to the quantity #StrEmb(HH , G) if in fact G[X] ∼= H. Wewill argue that each subset that induces a copy of H gives rise to exactly αHtuples that contribute to #StrEmb(HH , G).

Suppose that X is such a subset; without loss of generality we may writeX = {x1, . . . , xk} where the vertices are ordered so that

G[x1, . . . , xk] = (H, π). (1)

It is clear that there is a one-to-one correspondence between k-tupleswhose elements form the set X and permutations of [k]: we may regard thepermutation σ as corresponding to the tuple (xσ(1), . . . , xσ(k)). Observe thatthe tuple (xσ(1), . . . , xσ(k)) will contribute to the value of #StrEmb(HH , G)if and only if there exists some bijection π′ : [k]→ V (H) such that (H, π′) ∈HH and

G[xσ(1), . . . , xσ(k)] = (H, π′). (2)

So the tuple contributes if and only if, for every i, j ∈ [k], we have

xσ(i)xσ(j) ∈ E(G) ⇐⇒ π′(i)π′(j) ∈ E(H).

16

Page 17: Some hard families of parameterised counting … hard families of parameterised counting problems ... 2Hsuch that G[U] ˘=H; and Uis colourful under !gj: ... k. Question: How many

Note that, by (1), for any i, j ∈ [k] we have xσ(i)xσ(j) ∈ E(G) if and only ifπ(σ(i))π(σ(j)) ∈ E(H). Thus (2) is equivalent to the statement that, for alli, j ∈ [k],

π(σ(i))π(σ(j)) ∈ E(H) ⇐⇒ π′(i)π′(j) ∈ E(H),

which holds if and only if π′ ◦ σ−1 ◦ π−1 defines an automorphism on H.Hence the number of k-tuples drawn from X that contribute to the value of#StrEmb(HH , G) is exactly αH . Distinct subsets inducing H will give riseto disjoint sets of k-tuples, so we see that in fact

#StrEmb(HH , G, f) = αH ·#SubInd(H,G, f),

as required.Exactly the same reasoning can be applied if we restrict to subsets U that

are colourful, which gives the second part of the result.

Next we exploit the properties of our construction demonstrated in theprevious section to give a sufficient condition for a parameterised subgraph-counting problem to be #W[1]-complete.

Lemma 3.2. Let Φ be a family (φ1, φ2, . . .) of functions φk : {0, 1}(k2) →

{0, 1}, such that the function mapping k 7→ φk is computable. Suppose thereexists a computable function g such that, for each k′ ∈ N, there exists k ≤g(k′) and (H, π) ∈ Hφk

such that one of the following holds:

1. U ∈ V (H)(k′) induces a clique and there is no (H ′, π′) ∈ Hφksuch that

H ′ can be obtained from H by deleting edges with both endpoints in U ,or

2. W ∈ V (H)(k′) induces an independent set and there is no (H ′, π′) ∈ Hφk

such that H ′ can be obtained from H by adding edges with both endpointsin W .

Then p-#Induced Subgraph With Property(Φ) is #W[1]-completeunder fpt Turing reductions.

Proof. We prove this result by means of an fpt Turing reduction from p-#Multicolour Clique. Recall from Lemma 1.4 that, for any Φ, wehave p-#Multicolour Induced Subgraph with Property(Φ) ≤fpt

T

p-#Induced Subgraph With Property(Φ), so it suffices to prove that

17

Page 18: Some hard families of parameterised counting … hard families of parameterised counting problems ... 2Hsuch that G[U] ˘=H; and Uis colourful under !gj: ... k. Question: How many

p-#MulticolourClique ≤fptT p-#Multicolour Induced Subgraph

with Property(Φ).Suppose (G, fG) is an instance of p-#MulticolourClique, where G

is a graph and fG is a k′-colouring of the vertices of G. By assumption, wecan fix k ≤ g(k′) such that one of the two conditions in the statement of thelemma holds; let us also set

αH = |{σ : σ a permutation on [k], ∃(H, π′) ∈ HH such that

π′ ◦ σ−1 ◦ π−1 defines an automorphism on H}|.

Now, if we are in the first case (so there exists some (H, π) ∈ Hφksuch that

U ∈ V (H)(k′) induces a clique, and there is no (H ′, π′) ∈ Hφksuch that H ′

can be obtained from H by deleting edges with both endpoints in U), we

observe that, setting G = constr(G, fG, H, U),

#ColStrEmb(Hφk, G, f eG)

= #ColStrEmb(HHφk, G, f eG)

by Corollary 2.3

= αH ·#ColSubInd(H, G, f eG)

by Lemma 3.1

= αH ·#ColCliquek(G, fG)

by Lemma 2.5.

Similarly, if we are in the second case (so there exists (H, π) ∈ Hφksuch that

W ∈ V (H)(k′) induces an independent set, and there is no (H ′, π′) ∈ Hφk

such that H ′ can be obtained from H by adding edges with both endpointsin W ), we have, setting G = constr(G, fG, H,W ),

#ColStrEmb(Hφk, G, f bG)

= #ColStrEmb(HHφk, G, f bG)

by Corollary 2.4

= αH ·#ColSubInd(H, G, f bG)

by Lemma 3.1

= αH ·#ColCliquek(G, fG)

by Lemma 2.6.

18

Page 19: Some hard families of parameterised counting … hard families of parameterised counting problems ... 2Hsuch that G[U] ˘=H; and Uis colourful under !gj: ... k. Question: How many

Thus, to compute the number of colourful cliques in G under the colouringfG, it suffices to perform the following steps.

1. Identify a suitable value of k and a labelled graph (H, π) ∈ Hφk: this

can be done by exhaustive search in time bounded only by some com-putable function of k′, as we know there exists a suitable (H, π) ∈ Hφk

for some k ≤ g(k′).

2. Construct constr(G, fG, H, U), or constr(G, fG, H,W ), as appropriate:this can clearly be done in time polynomial in n and k ≤ g(k′).

3. Compute αH : this depends only on the graph H, so can be done intime bounded by some computable function of k′.

4. Perform a single oracle call to p-#Multicolour Induced Sub-graph with Property(Φ): note that the parameter value is at mostg(k′).

This therefore gives an fpt Turing reduction from p-#Multicolour Cliqueto p-#Multicolour Induced Subgraph with Property(Φ), as re-quired.

3.2 Properties that hold only for a decreasing propor-tion of the possible edge densities

Suppose that we fix a family Φ = (φ1, φ2, . . .) of functions φk : {0, 1}(k2) →

{0, 1}, such that the function mapping k 7→ φk is computable. For eachk ∈ N, let Dk = {|E(H)| : (H, π) ∈ Hφk

}, so |Dk| is informally the numberof distinct edge densities for which the property holds. We will show that if|Dk| = o(k) then p-#Induced Subgraph With Property(Φ) is #W[1]-complete.

We need one auxiliary result before giving our main hardness result.

Lemma 3.3. Let G be any graph, with a k′-colouring f , and let Hk be anon-empty collection of graphs on k vertices. Suppose that

r = |{d : ∃H ∈ Hk such that |E(H)| = d}|

satisfies

r ≤ 1(k−2k′−2

)(k′

2

) ((2k′ − k′)!(2k′)!

k!

(k − k′)!

).

19

Page 20: Some hard families of parameterised counting … hard families of parameterised counting problems ... 2Hsuch that G[U] ˘=H; and Uis colourful under !gj: ... k. Question: How many

Then there exists (H, π) ∈ Hk such that either

1. U ∈ V (H)(k) induces a clique and there is no (H ′, π′) ∈ Hφksuch that

H ′ can be obtained from H by deleting one or more edges with bothendpoints in U , or

2. W ∈ V (H)(k) induces an independent set and there is no (H ′, π′) ∈ Hφk

such that H ′ can be obtained from H by adding one or more edges withboth endpoints in W .

Proof. First recall from the corollary to Ramsey’s Theorem (Corollary 1.2)

that any graph on k vertices must contain at least (2k′−k′)!(2k′ )!

k!(k−k′)! subsets of k′

vertices, where each of these subsets induces either a clique or an independentset. Thus, as

r ≤ 1(k−2k′−2

)(k′

2

) ((2k′ − k′)!(2k′)!

k!

(k − k′)!

),

any graph on k vertices must contain at least

r

(k − 2

k′ − 2

)(k′

2

)such k′-vertex subsets.

Now, for each (H, π) ∈ Hk, let #Clique(H) denote the number of k′-cliques in H, and let

θHk(H, π) = max

(H′,π′)∈Hk

|E(H′)|=|E(H)|

#Clique(H ′).

We also setC = {θHk

(H, π) : (H, π) ∈ Hk}.

Observe that, if there is some (H, π) ∈ Hk such that H contains at leastone k′-clique U and, for all (H ′, π′) ∈ Hk, we have |E(H ′)| ≥ |E(H)|, thenit is clear that the first outcome in the statement of the lemma must hold(since, by edge-minimality, no labelled graph in Hφk

is isomorphic to anygraph obtainable by deleting edges from H). Thus we may assume fromnow on that every element (H, π) ∈ Hk with the minimum number of edgeshas #Clique(H) = 0; it follows that for any such (H, π) we in fact haveθHk

(H, π) = 0. Note that this implies we must have 0 ∈ C.

20

Page 21: Some hard families of parameterised counting … hard families of parameterised counting problems ... 2Hsuch that G[U] ˘=H; and Uis colourful under !gj: ... k. Question: How many

Similarly, if there is some (H, π) ∈ Hk such that H contains at leastone independent set W on k′ vertices and, for all (H ′, π′) ∈ Hk, we have|E(H ′)| ≤ |E(H)|, then it is clear that the second outcome in the statementof the lemma must hold (since, by edge-maximality, no labelled graph in Hφk

is isomorphic to any graph obtainable by adding edges to H). Thus we mayassume from now on that every edge-maximal element (H, π) ∈ Hk has noindependent set on k′ vertices and so, by choice of k, satisfies #Clique(H) ≥r(k−2k′−2

)(k′

2

). Thus C must contain an element x where x ≥ r

(k−2k′−2

)(k′

2

).

Hence we may assume that 0 ∈ C and that the maximum element in Cis at least r

(k−2k′−2

)(k′

2

); moreover, by definition of r and C, we know that C

contains at most r distinct values. Thus, if the elements of C are listed inorder, there is some pair of consecutive elements which differ by more than(k−2k′−2

)(k′

2

); in other words, there exists some integer s such that

1. s ∈ C, and

2. for s+ 1 ≤ t ≤ s+(k−2k′−2

)(k′

2

), t /∈ C.

Fix s ∈ N satisfying these two conditions. From now on we will say thata graph (H, π) ∈ Hk has “few” cliques if #Clique(H) ≤ s, and that it has“many” cliques if #Clique(H) > s +

(k−2k′−2

)(k′

2

). By the reasoning above, it

follows that, for every (H, π) ∈ H, at least one of the following must hold:

1. (H, π) has few cliques, or

2. θHk(H, π) > s +

(k−2k′−2

)(k′

2

), so there is some (H ′, π′) ∈ Hk such that

|E(H)| = |E(H ′)| and (H ′, π′) has many cliques.

Now, we fix an element (H, π) with as few edges as possible from thosegraphs inHk that contain many cliques (so (H, π) contains many cliques and,for any other (H ′, π′) that contains many cliques, |E(H)| ≤ |E(H ′)|). Thischoice of (H, π) implies that any element of Hk with strictly fewer edges thanH must contain few cliques.

Fix a set U ∈ V (H)(k) that induces a clique in H. Suppose that someelement (H ′, π′) is such that H ′ can be obtainable from H by deleting oneor more edges with both endpoints in U . Since we will then have |E(H ′)| <|E(H)|, it follows that H ′ contains few cliques. Hence there are at least(k−2k′−2

)(k′

2

)+1 more k′-cliques in H than in H ′; as these two graphs differ only

in edges that have both endpoints in U , it must be that each k′-clique in Hthat is not a k′-clique in H ′ intersects U in at least two vertices. But the

21

Page 22: Some hard families of parameterised counting … hard families of parameterised counting problems ... 2Hsuch that G[U] ˘=H; and Uis colourful under !gj: ... k. Question: How many

number of k′-vertex sets that intersect U in at least two vertices is at most(k′

2

)(k−2k′−2

), so it is not possible for

(k−2k′−2

)(k′

2

)+ 1 distinct k′-cliques in H each

to intersect U in at least two vertices, giving a contradiction.Thus we see that (H, π) must in fact satisfy the first outcome of the

lemma, completing the proof.

We are now ready to prove #W[1]-hardness for this class of problems.

Theorem 3.4. Let Φ be a family (φ1, φ2, . . .) of functions φk : {0, 1}(k2) →

{0, 1} that are not identically zero, such that the function mapping k 7→ φkis computable. Suppose that |Dk| = o(k2). Then p-#Induced SubgraphWith Property(Φ) is #W[1]-complete.

Proof. We exploit Lemma 3.2 to prove the result. Since |Dk| = o(k2), itfollows that, for any k′ ∈ N, there must exist some k such that

|Dk| ≤

((2k

′ − k′)!(k′ − 2)!(k′

2

)(2k′)!

)k(k − 1)

=1(

k−2k′−2

)(k′

2

) ((2k′ − k′)!(2k′)!

k!

(k − k′)!

).

Set g(k′) to be the least such k (and note that, by computability of themapping k 7→ φk, g is computable: we can perform an exhaustive search tofind a suitable k). Note that, for this value of k, Hφk

satisfies the condition ofLemma 3.3. Hence we know that there exists (H, π) ∈ Hφk

such that either

1. U ∈ V (H)(k) induces a clique and there is no (H ′, π′) ∈ Hφksuch that

H ′ can be obtained from H by deleting one or more edges with bothendpoints in U , or

2. W ∈ V (H)(k) induces an independent set and there is no (H ′, π′) ∈ Hφk

such that H ′ can be obtained from H by adding one or more edges withboth endpoints in W .

#W[1]-hardness now follows immediately from Lemma 3.2.

22

Page 23: Some hard families of parameterised counting … hard families of parameterised counting problems ... 2Hsuch that G[U] ˘=H; and Uis colourful under !gj: ... k. Question: How many

3.3 Properties that are defined by o(k2) intervals ofpermitted edge densities

In this section we give a strengthening of the above result for the specialcase in which the property Φ depends only on the number of edges in thesubgraph. In the following theorem, we will be considering integer intervals,that is sets of consecutive integers (e.g. {a, a+ 1, . . . , b}).

Theorem 3.5. Let Φ be a family (φ1, φ2, . . .) of functions φk : {0, 1}(k2) →

{0, 1}, such that the function mapping k 7→ φk is computable. For each k,let Ik = {I1, . . . , Ir} be a collection of disjoint integer intervals, where eachIi ⊂ {0, . . . ,

(k2

)}, ∅ 6=

⋃Ik 6= {0, . . . ,

(k2

)}, and |Ik| = o(k2). Suppose that

φk(H, π) = 1 if and only if |E(H)| ∈⋃Ik. Then p-#Induced Subgraph

With Property(Φ) is #W[1]-complete.

Proof. We claim that we may assume, without loss of generality, that |⋃Ik| ≤

12((k2

)+ 1). To see that this is indeed the case, suppose that in fact |

⋃Ik| ≥

12((k2

)+ 1), and consider the family Φ′ = (φ′1, φ

′2, . . .) of functions φ′k :

{0, 1}(k2) → {0, 1} defined by

φ′k = 1− φk.

Note that the mapping k 7→ φ′k is clearly computable by computabilityof k 7→ φk, and that there exists a collection I ′k of disjoint integer in-tervals, where each I ′i ⊂ {0, . . . ,

(k2

)}, ∅ 6=

⋃I ′k 6= {0, . . . ,

(k2

)}, |I ′k| =

o(k2) and⋃I ′k = {0, . . . ,

(k2

)} \

⋃Ik. Thus φ′k(H, π) = 1 if and only if

|E(H)| ∈⋃I ′k, and |

⋃I ′k| ≤ 1

2((k2

)+ 1). We will give an fpt-Turing reduc-

tion from p-#Induced Subgraph With Property(Φ′) to p-#InducedSubgraph With Property(Φ), demonstrating that it suffices to prove#W[1]-completeness in the case that |

⋃Ik| ≤ 1

2((k2

)+ 1).

To give this reduction, observe that, for any graph G,

#StrEmb(Hφ′k, G) =

∑(v1,...,vk)∈V (G)k

φ′k(G[v1, . . . , vk])

=

(n

k

)k!−

∑(v1,...,vk)∈V (G)k

φk(G[v1, . . . , vk])

=

(n

k

)k!−#StrEmb(Hφk

, G).

23

Page 24: Some hard families of parameterised counting … hard families of parameterised counting problems ... 2Hsuch that G[U] ˘=H; and Uis colourful under !gj: ... k. Question: How many

Thus it is clear that we can solve p-#Induced Subgraph With Prop-erty(Φ′) in polynomial time using a single oracle call to p-#Induced Sub-graph With Property(Φ), where the parameter value is the same for bothproblems; this completes the reduction.

Thus it suffices to prove #W[1]-hardness in the case that |⋃Ik| ≤ 1

2((k2

)+

1); we do this using Lemma 3.2. Since |Ik| = o(k2), it follows that, for anyk′ ∈ N, there exists k ∈ N such that (|Ik|+ 1)

(k′

2

)+ 1 < 1

2((k2

)+ 1); we define

g(k′) to be the least such k (note that under this definition the function g isclearly computable). In order to apply Lemma 3.2 to show #W[1]-hardness,it suffices to demonstrate that there exists (H, π) ∈ Hφk

which satisfies oneof the two conditions in the statement of Lemma 3.2.

Note that {0, . . . ,(k2

)} \⋃Ik must be expressible as the union of at most

|Ik|+ 1 disjoint integer intervals; hence, as

|{0, 1, . . . ,(k

2

)} \⋃Ik| ≥

1

2(

(k

2

)+ 1) ≥ (|Ik|+ 1)

(k′

2

)+ 1,

it follows that at least one of these integer intervals, J , must contain at least(k′

2

)+ 1 distinct integers.

Suppose first that 0 /∈ J . Then there exists some d1 ∈ {0, 1, . . . ,(k2

)}

such that d1 ∈⋃Ik but d1 + 1 ∈ J . Note that, as J contains at least(

k′

2

)+ 1 distinct integers, we must have d1 <

(k2

)−(k′

2

). Hence there is some

(H, π) ∈ Hφksuch that |E(H)| = d1 and H contains an independent set

W on k′ vertices. However, as there is no (H ′, π′) ∈ Hφkwith |E(H)| <

|E(H ′)| ≤ |E(H)| +(k′

2

), it is clear that there is no (H ′, π′) ∈ Hφk

whichcan be obtained from H by adding edges in W . Thus we satisfy the secondcondition of Lemma 3.2.

Now suppose that 0 ∈ J . Since⋃Ik 6= ∅, we must have

(k2

)/∈ J ,

and so there must exist some d2 ∈ {0, 1, . . . ,(k2

)} such that d2 ∈

⋃Ik but

d2−1 ∈ J . Note that, as J contains at least(k′

2

)+1 distinct integers, we must

have d2 >(k′

2

). Hence there is some (H, π) ∈ Hφk

such that |E(H)| = d2

and H contains a k′-clique U . However, as there is no (H ′, π′) ∈ Hφkwith

|E(H)| −(k′

2

)≤ |E(H ′)| < |E(H)|, it is clear that there is no (H ′, π′) ∈ Hφk

which can be obtained from H by deleting edges in U . Thus we satisfy thefirst condition of Lemma 3.2.

Hence we see that there must be some (H, π) ∈ Hφkwhich satisfies at

least one of the conditions of Lemma 3.2; this immediately implies the #W[1]-hardness of p-#Induced Subgraph With Property(Φ) in this case.

24

Page 25: Some hard families of parameterised counting … hard families of parameterised counting problems ... 2Hsuch that G[U] ˘=H; and Uis colourful under !gj: ... k. Question: How many

4 Conclusions and Open Problems

We have proved #W[1]-completeness for a range of parameterised subgraph-counting problems. In particular, we demonstrated that p-#Induced Sub-graph With Property(Φ) is #W[1]-complete whenever Φ is such thatone of the following holds:

• |{|E(H)| : (H, π) ∈ Hφk}| = o(k2), or

• φk(H, π) = 1 if and only if |E(H)| ∈⋃Ik, where Ik is a collection of

integer intervals contained in {0, . . . ,(k2

)} and |Ik| = o(k2).

These results extend some existing hardness results concerning parameterisedsubgraph-counting problems, and additionally include, for example, the prob-lems of counting planar subgraphs, subgraphs with treewidth at most t forany fixed t, and regular subgraphs, as well as the problem of counting k-vertexsubgraphs with at least d(k) edges, for any function d where 0 < d(k) <

(k2

).

A natural question arising from the second class of problems we consideris whether all properties that depend only on the number of edges in thesubgraph are in fact #W[1]-hard, or whether there might exist a fixed pa-rameter algorithm for some such problems that are not covered by our result,such as counting the number of k-vertex subgraphs having an even numberof edges.

It should be noted that the methods used to demonstrate hardness inthis paper are only applicable to problems p-#Induced Subgraph WithProperty(Φ) where p-#Multicolour Induced Subgraph with Prop-erty(Φ) is also #W[1]-hard. However, there are known examples of #W[1]-complete parameterised counting problems whose multicolour versions arein fact fixed parameter tractable, such as p-#Path, p-#Cycle and p-#Matching (the multicolour versions of these problems are all fixed pa-rameter tractable by [2], as they involve counting embeddings of graphs ofbounded treewidth). A challenge for future research, therefore, would be todevelop new kinds of constructions that can be used to show hardness ofproblems whose multicolour versions are fixed parameter tractable.

References

[1] Automata, Languages, and Programming (Fedor V. Fomin, Rsi Freivalds,Marta Kwiatkowska, and David Peleg, eds.), Lecture Notes in Computer

25

Page 26: Some hard families of parameterised counting … hard families of parameterised counting problems ... 2Hsuch that G[U] ˘=H; and Uis colourful under !gj: ... k. Question: How many

Science, vol. 7965, 2013.

[2] V. Arvind and Venkatesh Raman, Approximation algorithms for someparameterized counting problems, ISAAC 2002 (P. Bose and P. Morin,eds.), LNCS, vol. 2518, Springer-Verlag Berlin Heidelberg, pp. 453–464.

[3] Yijia Chen, Marc Thurley, and Mark Weyer, Understanding the complex-ity of induced subgraph isomorphisms, Automata, Languages and Pro-gramming (Luca Aceto, Ivan Damgrd, Leslie Ann Goldberg, Magnus M.Halldrsson, Anna Inglfsdttir, and Igor Walukiewicz, eds.), Lecture Notesin Computer Science, vol. 5125, Springer Berlin Heidelberg, 2008,pp. 587–596.

[4] P. Erdos and G. Szekeres, A combinatorial problem in geometry, Compo-sitio Math. 2 (1935), 464–470.

[5] M. Fellows, D. Hermelin, F. Rosamond, and S. Vialette, On the fixed-parameter intractability and tractability of multiple-interval graph prop-erties, Theoretical Computer Science 410 (2009), 53–61.

[6] J. Flum and M. Grohe, The parameterized complexity of counting prob-lems, SIAM Journal on Computing 33 (2004), no. 4, 892–922.

[7] , Parameterized complexity theory, Springer, 2006.

[8] Mark Jerrum and Kitty Meeks, The parameterised complexity of countingconnected subgraphs and graph motifs, arXiv.1308.1575v1 [cs.CC], August2013.

26