In this section we turn to non-monotone properties and illustrate that Theorem 1 itself is a useful criterion when it comes to establishing \(\#{{\mathrm {W[1]}}}\)-hardness of \(\#{{\mathsf {IndSub}}}(\varPhi )\). Recall that, given a prime q and a subset \({\mathcal {Q}}\) of \(\{0,\ldots ,q-1\}\), the property \({{\mathsf {Mod}}}[q,{\mathcal {Q}}]\) holds on a graph H if and only if \(\left( \#E(H)~ \mathsf {mod} ~q\right) \in {\mathcal {Q}}\). Note that \({{\mathsf {Mod}}}[q,{\mathcal {Q}}]\) generalizes the property of having an even (or odd) number of edges as investigated in [16]. It turns out that any non-trivial modularity constraint with respect to a prime induces \(\#{{\mathrm {W[1]}}}\)-hardness.
Lemma 22
Letqbe a prime number and\({\mathcal {Q}} \subseteq \{0,1,\ldots , q-1\}\)a subset which is neither empty nor the full set. Then for\(\varPhi ={{\mathsf {Mod}}}[q,{\mathcal {Q}}]\)and sufficiently large integersn, the sum\(\sum _{A \in {{{\mathsf {E}}}}^\varPhi _k} (-1)^{\#A}\)is non-vanishing for some\(k \in [n,n+2]\).
Proof
In the case \(q=2\) all terms in the sum \(\sum _{A \in {{{\mathsf {E}}}}^\varPhi _k} (-1)^{\#A}\) have the same sign, so clearly the sum is never zero for \(k \ge 1\). Thus we can assume \(q \ge 3\).
For \(a=0,1,\ldots , q-1\) denote
$$\begin{aligned} S_a(m)=\sum _{j \equiv a ~\mathsf {mod}~ q} (-1)^j \binom{m}{j} . \end{aligned}$$
Given \(n \ge 1\) the complete graph on n vertices has \(m=\binom{n}{2}\) edges and the number of subgraphs G with j edges is exactly \(\binom{m}{j}\). Thus if we define
$$\begin{aligned} S_{\mathcal {Q}}(m) = \sum _{a \in {\mathcal {Q}}} S_a(m) \end{aligned}$$
(25)
then we need to show that for n sufficiently large there is \(k \in \{n,n+1,n+2\}\) such that \(S_{\mathcal {Q}}(m) \ne 0\) for \(m=\binom{k}{2}\).
The crucial point we are going to use is that the functions \(S_a(m)\) satisfy a simple recursion. Indeed
$$\begin{aligned} S_a(m+1)&= \sum _{j \equiv a ~\mathsf {mod}~ q} (-1)^j \binom{m+1}{j} \\&= \sum _{j \equiv a ~\mathsf {mod}~ q} (-1)^j \binom{m}{j} + (-1)^j \binom{m}{j-1} \\&= S_a(m) - S_{a-1}(m), \end{aligned}$$
where it is understood that \(S_{-1}(m)=S_{q-1}(m)\). Let \(\mathbf {S} = (S_0, S_1, \ldots , S_{q-1})^T\), then expressing the recursion in matrix form we have
$$\begin{aligned} \mathbf {S}(m+1) = M \mathbf {S}(m),{\text { for }} M=\begin{pmatrix} 1 &{} 0 &{} \ldots &{} 0 &{} -1\\ -1 &{} 1 &{} &{} 0 &{} 0 \\ 0 &{} \ddots &{} \ddots &{} &{} \vdots \\ 0 &{} \ldots &{} -1&{}1 &{} 0\\ 0 &{} \ldots &{} 0&{}-1 &{} 1 \end{pmatrix}. \end{aligned}$$
(26)
In particular, we have
$$\begin{aligned} \mathbf {S}(m) = M^m \mathbf {S}(0),{{\text { with }}} \mathbf {S}(0) = (1,0, \ldots , 0)^T. \end{aligned}$$
(27)
Fortunately, it turns out to be easy to diagonalize the matrix M: for the q-th root of unity \(\omega =\exp (2 \pi i/q)\) we have that the vectors
$$\begin{aligned} v_b = \frac{1}{q} \begin{pmatrix} 1 \\ \omega ^b \\ \vdots \\ \omega ^{b (q-1)} \end{pmatrix},{\text { for }} b = 0,1, \ldots , q-1 \end{aligned}$$
are eigenvectors of M for the eigenvalues \(\lambda _b = 1-\omega ^{-b}\). Moreover, we have that \(\mathbf {S}(0)=v_0 + v_1 + \ldots + v_{q-1}\) is the sum of all these eigenvectors. Combining \(M v_b = \lambda _b v_b\) with Eq. (27) we obtain
$$\begin{aligned} \mathbf {S}(m) = M^m \sum _{b=0}^{q-1} v_b=\sum _{b=0}^{q-1} \lambda _b ^m v_b = \frac{1}{q} \sum _{b=0}^{q-1} (1-\omega ^{-b})^m \begin{pmatrix} 1 \\ \omega ^b \\ \vdots \\ \omega ^{b (q-1)} \end{pmatrix}. \end{aligned}$$
(28)
The desired number \(S_{\mathcal {Q}}(m)\) is obtained by summing the components of this vector corresponding to \({\mathcal {Q}} \subset \{0,1,\ldots , q-1\}\) and we obtain
$$\begin{aligned} S_{\mathcal {Q}}(m) = \frac{1}{q} \sum _{b=0}^{q-1} (1-\omega ^{-b})^m \left( \sum _{a \in {\mathcal {Q}}} \omega ^{b a}\right) . \end{aligned}$$
(29)
Now clearly the term for \(b=0\) vanishes. As for the terms with \(b \ne 0\) we see then that \(\omega ^b\) is again a primitive q-th root of unity. We claim that \(\sum _{a \in {\mathcal {Q}}} \omega ^{b a}\) is then nonzero. Indeed, otherwise the number \(\omega ^b\) is a zero of the polynomial \(P_{\mathcal {Q}}(z)=\sum _{a \in {\mathcal {Q}}} z^a\).
In general it is true that a polynomial \(P \in {\mathbb {Q}}[z]\) satisfies \(P(\omega ^b)=0\) iff P is of the form \(P(z)=Q(z) \varPhi _q(z)\) with \(\varPhi _q(z)=z^{q-1}+ z^{q-2} + \ldots + z + 1\) the qth cyclotomic polynomial and \(Q \in {\mathbb {Q}}[z]\) any polynomial. For this reason, the polynomial \(\varPhi _q\) is called the minimal polynomial of \(\omega ^b\).
Returning to the situation above we see that the polynomial \(P_{\mathcal {Q}}\) is of degree at most \(q-1\). Now if \(P_{\mathcal {Q}}(\omega ^b)=0\) then we could write \(P_{\mathcal {Q}}(z)=Q(z) \varPhi _p(z)\) and by degree considerations we would need to have Q of degree 0, i.e. a constant. But since we assumed that \({\mathcal {Q}}\) is not the empty set or the full set \(\{0,1, \ldots , q-1\}\), the polynomial \(P_{\mathcal {Q}}\) is not a rational multiple of \(\varPhi _q\). This gives a contradiction.
Now we need to find arguments to show \(S_{\mathcal {Q}}(m) \ne 0\) for suitable m, which we will later specialize to be of the form \(m=\binom{k}{2}\). First, for large m we claim that among the terms \((1-\omega ^{-b})^m\) the ones with \(b_{\pm }=(q \pm 1)/2\) dominate the others in absolute value. Denote \(z_{\pm } = 1-\omega ^{-b_{\pm }}\) then we illustrate this in Fig. 2 for \(q=5\).
To continue, from the isosceles triangle in Fig. 2 one checks that \(z_{\pm }\) are positive multiples of primitive 4q-th roots of unity. Indeed, since \(\omega ^{-b_-} = \exp (- 2 \pi (q-1)/2q)\), the angle of this triangle at the point 1 is \(2 \pi (q-1)/2q\) and therefore the two identical smaller angles in the triangle are
$$\begin{aligned} \frac{1}{2} \left( \pi - 2 \pi \frac{q-1}{2q} \right) = \frac{1}{2} \pi \left( 1-\frac{q-1}{q} \right) = \frac{1}{2q} \pi = \frac{2 \pi }{4 q}. \end{aligned}$$
On the other hand, since they are complex conjugate, one sees that combining the two terms for \(b=b_{\pm }\) in the sum (29) we obtain
$$\begin{aligned} \frac{1}{q} \left( z_+^m \left( \sum _{a \in {\mathcal {Q}}} \omega ^{b_+ a}\right) + z_-^m \left( \sum _{a \in {\mathcal {Q}}} \omega ^{b_- a}\right) \right) = \frac{2}{q} {\text {Re}} z_-^m \left( \sum _{a \in {\mathcal {Q}}} \omega ^{b_- a}\right) . \end{aligned}$$
Now observe that the absolute value of the term \(t_m=z_-^m ( \sum _{a \in {\mathcal {Q}}} \omega ^{b_- a})\) diverges exponentially to infinity and dominates all terms for \(b \ne b_{\pm }\) in the sum (29). Moreover, the argument of \(t_m\) (as a complex number) takes exactly 4q different values \(\theta _1, \ldots , \theta _{4 q}\), using that \(z_-\) is a multiple of a 4q-th root of unity. Then we claim that for all m such that \(t_m\) is not pure imaginary, its real part still dominates the other summands in (29). Indeed, we have the explicit estimate
$$\begin{aligned} |{\text {Re}} t_m| \ge c |t_m|,{\text { for }}c = \min (|\cos (\theta _i)| : i=1, \ldots , 4q{\text { with }}\cos (\theta _i) \ne 0 ). \end{aligned}$$
But recall that \(|t_m|\) diverges exponentially with a base \(|z_{\pm }|\). The finitely many other terms in the sum (29) also have absolute value that is exponential in m but with strictly smaller base. Thus for m large, the term \(c |t_m|\) dominates the combination of all the other summands.
As a conclusion from the claim we must show that for n large, the term \(t_m\) is not pure imaginary for \(m=\binom{k}{2}\) for some \(k \in \{n,n+1,n+2\}\). But assume that \(t_{\binom{n}{2}}\) is imaginary, i.e. \({\text {arg}}(t_{\binom{n}{2}})=\pm \pi /2\). Then since \(\binom{n+1}{2} - \binom{n}{2} =n\) and thus \(t_{\binom{n+1}{2}} = t_{\binom{n}{2}} z_-^n\), we have
$$\begin{aligned} {\text {arg}}(t_{\binom{n+1}{2}}) = {\text {arg}}(t_{\binom{n}{2}}) + n {\text {arg}}(z_-) = \pm \frac{\pi }{2} + n \frac{\pi }{2 q}. \end{aligned}$$
Now for most n this will already no longer be of the form \(\pi /2 + \ell \pi \) and so \(t_{\binom{n+1}{2}}\) is not imaginary. In the unlucky case that 2q|n, we see by the same procedure that then \(t_{\binom{n+2}{2}}\) is not imaginary. In any case, we have found a suitable k. \(\square \)
For the second non-monotone property, let F be a connected graph. Then the property \({{\mathsf {Iso}}}[F]\) holds on a graph H if and only if H contains an isolated subgraph that is isomorphic to F.
Lemma 23
LetFbe a connected (unlabeled) graph onfvertices. Then for\(\varPhi ={{\mathsf {Iso}}}[F]\)the sum\(S_k=\sum _{A \in {{{\mathsf {E}}}}^\varPhi _k} (-1)^{\#A}\)is non-vanishing exactly for\(k\ge f\)and\(k \equiv 0,1\)modf.
Proof
Fix \(k\ge f\) and let \({\mathcal {F}}\) be the set of subgraphs of the complete graph \(K_k\) isomorphic to F. For \(F_i \in {\mathcal {F}}\) let \(A_{F_i}\) be the set of graphs on the vertices [k] containing \(F_i\) as an isolated subgraph, i.e. a connected component. Then we are interested in the sum
$$\begin{aligned} S_k = \sum _{G \in \bigcup A_{F_i}} (-1)^{\#E(G)}. \end{aligned}$$
We compute it via inclusion-exclusion to be
$$\begin{aligned} S_k = \sum _{l \ge 1} (-1)^{l+1} \sum _{F_{i_1}, \ldots , F_{i_l} \in {\mathcal {F}}} \sum _{G \in A_{F_{i_1}} \cap \ldots \cap A_{F_{i_l}}} (-1)^{\#E(G)} \end{aligned}$$
(30)
Note that in the above sum, the graphs \(F_{i_1}, \ldots , F_{i_l}\) are assumed pairwise distinct elements of \({\mathcal {F}}\).
For any \(l \ge 1\), we see that the intersection \(A_{F_{i_1}} \cap \ldots \cap A_{F_{i_l}}\) is empty if the graphs \(F_{i_j}\) are not pairwise vertex-disjoint. Indeed, if two of them share the same vertex there can be no graph containing both of them as isolated subgraphs. On the other hand, if all \(F_{i_j}\) are vertex-disjoint, the intersection \(A_{F_{i_1}} \cap \ldots \cap A_{F_{i_l}}\) is just the set of graphs containing all of the \(F_{i_j}\) as isolated subgraphs (here we use F connected). We can understand this set very explicitly: F has f vertices, so there are \(k-lf\) vertices not contained in any \(F_{i_j}\) and between those we have full freedom to put edges or not. The total number of possibilities is \(2^{\binom{k-lf}{2}}\). Moreover, we can explicitly calculate the sum appearing above as
$$\begin{aligned} \sum _{G \in A_{F_{i_1}} \cap \ldots \cap A_{F_{i_l}}} (-1)^{\#E(G)} = {\left\{ \begin{array}{ll} (-1)^{l \cdot \#E(F)},&{}{\text { for }}k-lf=0,1\\ 0,&{}{\text { for }}k-lf \ge 2. \end{array}\right. } \end{aligned}$$
This is because for \(k-lf \ge 2\) and two vertices \(v,w \in [k] {\setminus } \bigcup _{j=1}^l V(F_{i_j})\) the operation of flipping the edge v, w gives a bijective map from \(A_{F_{i_1}} \cap \ldots \cap A_{F_{i_l}}\) to itself flipping the parity of the number of edges.
Going back to (30) let us first treat the special case \(f=1\), i.e. F is an isolated vertex. Then all terms for \(1 \le l \le k-2\) vanish and we are left with
$$\begin{aligned} S_k = (-1)^{k-1+1} k + (-1)^{k+1} = (-1)^k (k-1){\text { for }}k \ge 2, S_1 = 1. \end{aligned}$$
This never vanishes, proving the theorem.
Now assume \(f \ge 2\). Then we see that all summands for \(1 \le l < \lfloor k/f \rfloor =l_0\) vanish. Writing \(k=l_0 f + a\) with \(0 \le a \le f-1\) we note that for \(a \ge 2\) the remaining summands for \(l=l_0\) also vanish. On the other hand, for \(a=0,1\) the summands for \(l=l_0\) all have the same sign \((-1)^{l+1} (-1)^{l \cdot \#E(F)}\) and there is at least one nonzero summand like this. Thus the sum does not vanish for k of this form.
In fact we can compute \(S_k\) to be
$$\begin{aligned} S_k = (-1)^{l+1} (-1)^{l \cdot \#E(F)} \frac{k!}{(f!)^{l_0} l_0!} \left( \frac{f!}{\#{{\mathsf {Aut}}}(F)} \right) ^{l_0} \end{aligned}$$
in the cases \(a=0,1\). Indeed, the factor \(\frac{k!}{(f!)^{l_0} l_0!}\) describes the number of possibilities to choose an unordered collection of \(l_0\) sets of size f among the k vertices. For each of these sets there are \(\frac{f!}{\#{{\mathsf {Aut}}}(F)}\) possibilities to put a graph isomorphic to F on the vertices of this set, by the Orbit Stabilizer theorem. \(\square \)
Now Lemmas 22 and 23 tell us that for the properties \(\varPhi ={{\mathsf {Mod}}}[q,{\mathcal {Q}}], {{\mathsf {Iso}}}[F]\) the set of k such that \(\sum _{A \in {{{\mathsf {E}}}}^\varPhi _k} (-1)^{\#A} \ne 0\) is dense. Hence Theorem 6 follows by Corollary 13.