Target Set Selection in Dense Graph Classes

In this paper we study the Target Set Selection problem, a fundamental problem in computational social choice, from a parameterized complexity perspective. Here for a given graph and a threshold for each vertex the task is to find a set of active vertices that activates whole graph. A vertex becomes active if the number of activated vertices in its neighborhood is at least its threshold. We give two parameterized algorithms for a special case where each vertex has threshold set to half of its neighbors (the so called Majority Target Set Selection problem) for parameterizations by neighborhood diversity and twin cover number of the input graph. From the opposite side we give hardness proof for the Majority Target Set Selection problem when parameterized by (restriction of) the modular-width - a natural generalization of both previous structural parameters. Finally, we give hardness proof for the Target Set Selection problem parameterized by the neighborhood diversity when there is no restriction on the thresholds.


Introduction
We study the Target Set Selection problem (also called Dynamic Monopolies), using a notation according to Kempe et al. [18], from parameterized complexity perspective. Let G = (V, E) be a graph, S ⊆ V , and f : V → N be a threshold function. The activation process arising from the set S 0 = S is an iterative process with resulting sets S 0 , S 1 , . . . such that for i ≥ 0 where by N (v) we denote the set of vertices adjacent to v. Note that after at most n = |V | rounds the activation process has to stabilize -that is, S n = S n+i for all i > 0. We say that the set S is a target set if S n = V (for the activation process S = S 0 , . . . , S n ).

Input:
A graph G = (V, E), f : V → N, and a positive integer b ∈ N. Task: Find a target set S ⊆ V of size at most b or report that there is no such set.

Target Set Selection
We call the input integer b the budget. The problem interpretation and computational complexity clearly may vary depending on the input function f . There are three important settings studied -namely constant, majority, and a general function. If the threshold function f is the majority (i.e., f (u) = deg(u)/2 for every vertex u ∈ V ), we denote the problem as Majority Target Set Selection.
Motivation The Target Set Selection problem was introduced by Domingos and Richardson [10] in order to study influence of direct marketing on a social network. It is noted therein that it captures e.g. viral marketing [24]. The Target Set Selection problem is important also from the graph theoretic viewpoint, since it generalizes many well known NP-hard problems on graphs. These problems include Irreversible k-Conversion Set [11], k-Neighborhood Bootstrap Percolation [2] -the Target Set Selection problem with all thresholds fixed to a constant value k.

Previous Results
The Target Set Selection problem received attention of researchers in theoretical computer science in the past years. A general upper bound on the number of selected vertices under majority constraints is |V |/2 [1]. The Target Set Selection problem admits an FPT algorithm when parameterized by the vertex cover number [22]. A t O(w) poly(n) algorithm is known, where w is the tree-width of the input graph and t is an upper-bound on the threshold function [3], that is, f (v) ≤ t for every vertex v. This is essentially optimal, as the Target Set Selection problem parameterized by the path-width is W[1]-hard for majority [6] and general functions [3]. The Target Set Selection problem is solvable in linear time on trees [4] and more generally on block-cactus graphs [5]. The optimization variant of the Target Set Selection problem is hard to approximate [4] within a polylogarithmic factor. For more and less recent results we refer the reader to a survey by Peleg [23]. Cicalese et al. [8,7], considered versions of the problem in which the number of rounds of the activation process is bounded. For graphs of bounded clique-width, given parameters a, b, , they gave polynomial-time algorithms (XP algorithms) to determine whether there exists a target set of size b, such that at least a vertices are activated in at most rounds. Recently, Hartmann [16] gave a single-exponential FPT algorithm for Target Set Selection parameterized by clique-width when all thresholds are bounded by a constant.

Our Results
In this work we generalize some results obtained by Nichterlein et al. [22]. Chopin et al. [6] essentially proved that in sparse graph classes (such as graphs with the bounded tree-width) parameterized complexity of the Majority Target Set Selection problem is the same as for the Target Set Selection problem 1 . For these graph classes, it is not hard to see that e.g. if the threshold for vertex v is set above the majority (i.e., f (v) > deg(v)/2 ), then we may add 2 f (v) − deg(v)/2 vertices neighboring v only and the parameter stays unchanged whereas the threshold of v dropped to majority. However, this is not true in general for dense graph classes. We demonstrate this phenomenon for the parameterization by the neighborhood diversity. We show an FPT algorithm for a function which generalizes both constant and majority threshold functions. We call this function uniform (and the corresponding problem Uniform Target Set Selection), see the next section for a proper definition. Roughly speaking, all vertices belonging to a same part of a graph decomposition must possess the same value of the threshold function. In slight contrast to previous results, we derive an FPT algorithm that, instead of the maximal threshold value t, depends on the size of the image of the threshold function for graphs having bounded neighborhood diversity. Theorem 1. There is an FPT algorithm for the Uniform Target Set Selection problem parameterized by the neighborhood diversity of the input graph.
However, the problem is hard if the threshold function is not restricted. We prove W[1]-hardness of the problem and also a lower bound of algorithm running time based on ETH. The Exponential-Time Hypothesis (ETH) of Impagliazzo and Paturi [17] asserts that there is no 2 o(n) algorithm solving the Satisfiability problem, where n is the number of variables.

Preliminaries
In this section we give formal definitions of several graph parameters used in this work. To get better acquainted with these parameters and their relations, we provide a Hasse diagram of the considered parameters in Figure 2. For a graph G = (V, E) the set U ⊆ V is called a vertex cover of G if for every edge e ∈ E it holds that e ∩ U = ∅. The vertex cover number of a graph, denoted as vc(G), is the least integer k for which there exists a vertex cover of size k.
As the vertex cover number is (usually) too restrictive, many authors focused on defining other (i.e., weaker) structural parameters. Three most well-known parameters of this kind are the path-width, the tree-width (introduced by Robertson and Seymour [25]), and the cliquewidth (introduced by Courcelle et al. [9]). Classes of graphs with the bounded tree-width (respectively the path-width) are contained in the so-called sparse graph classes.
There are (more recently introduced) structural graph parameters which also generalize the vertex cover number but, in contrast with e.g. the tree-width, these parameters focus on dense graphs. First, up to our knowledge, of these parameters is the neighborhood diversity defined by Lampis [19].

Neighborhood Diversity
We say that two distinct vertices u, v are of the same neighborhood type if they share their respective neighborhoods, that is, when N (u) \ {v} = N (v) \ {u}.
Definition 6 (Neighborhood diversity [19]). A graph G = (V, E) has the neighborhood diversity at most w (nd(G) ≤ w) if there exists a decomposition D nd = (C i ) w i=1 of V = C 1 · ∪ · · · · ∪ C w (we call the sets C i types) such that all vertices in a type have the same neighborhood type (i.e., are twins).
Note that every type induces either a clique or an independent set in G and two types are either joined by a complete bipartite graph or no edge between vertices of the two types is present in G. Thus, we use a notion of a type graph, that is, a graph T G representing the graph G and its neighborhood diversity decomposition in the following way. The vertices of the type graph T G are the types C 1 , . . . , C w and two such vertices are joined by an edge if all the vertices of corresponding types are adjacent. It is possible to compute the neighborhood diversity of a graph in linear time [19].
Twin Cover If two vertices u, v have the same neighborhood type and e = {u, v} is an edge of the graph, we say that e is a twin edge.
Definition 7 (Twin cover number [14]). A set of vertices T ⊆ V is a twin cover of a graph G = (V, E) if for every edge e ∈ E either T ∩ e = ∅ or e is a twin edge. We say that G has the twin cover number t (tc(G) = t) if the size of a minimum twin cover of G is t.
Note that after removing T from the graph G, the resulting graph is a disjoint union of cliques -we call them twin cliques. Moreover, for every vertex v in T and a twin clique C it holds that v is either adjacent to every vertex in C or to none of them. A twin cover decomposition D tc = (C i ) ν i=1 of a graph G is a partition of V (G) such that each C i is either a vertex of the twin cover or a twin clique.
Note that the twin cover number can be upper-bounded by the vertex cover number. The structure of graphs with bounded twin cover is very similar to the structure of graphs with bounded vertex cover number. Thus, there is a hope that many of known algorithms for graphs with bounded vertex cover number can be easily turned into algorithms for graphs with bounded twin cover number [14].

Uniform Threshold Function
As it is possible to compute the neighborhood diversity (or the twin cover) decomposition in polynomial time (or FPT-time, respectively), we may assume that the decomposition is given in the input. Given a decomposition D (D nd or D tc ) a threshold function f : V (G) → N is uniform with respect to D if f (u) = f (v) for every u, v ∈ C and every C ∈ D. Observe that this notion generalizes the previously studied model [6] in which the threshold function is required to satisfy f (u) = f (v) whenever |N (u)| = |N (v)|, since this indeed holds if u, v ∈ C and C ∈ D. It is not hard to see that the uniform function generalizes both the constant and the majority functions for the twin cover number and the neighborhood diversity.
Moreover, if f (v) is bounded by a constant c for all v ∈ V (G), then there exists D nd with |D nd | ≤ c · nd(G) such that f is uniform with respect to D nd . We stress here that this construction is not legal for the twin cover decompositions. Uniform Target Set Selection is a variant of Target Set Selection, where the input instance (G, f, b, D) is restricted in such a way that the function f is uniform with respect to D.

Modular-width
Both the neighborhood diversity and the twin cover number are generalized by the modular-width. Here we deal with graphs created by an algebraic expression that uses the following four operations: 1. Create an isolated vertex.

2.
The disjoint union of two graphs, that is from graphs Definition 8 (Modular-width [13]). Let A be an algebraic expression that uses only operations 1-4 above. The width of the expression A is the maximum number of operands used by any occurrence of operation 4 in A. The modular-width of a graph G, denoted mw(G), is the least positive integer k such that G can be obtained from such an algebraic expression of width at most k.
An algebraic expression of width mw(G) can be computed in linear time [26].

Restricted Modular-width
We would like to introduce here a restriction of the modularwidth that still generalizes both the neighborhood diversity and the twin cover number. The algebraic expression used to define a graph G may contain the substitution operation at most once and if it contains the substitution operation it has to be the last operation in the expression. However, there is no limitation for the use of operations 1-3.

Positive Results
In this section we give proofs of Theorem 1 and 3. In the first part we discuss the crucial property of dense structural parameters we study here -the uniformity of neighborhoods. This, opposed to e.g. the cluster vertex deletion number, allows us to design parameterized algorithms. In this section by a decomposition D we mean a neighborhood diversity decomposition or a twin cover decomposition.

Lemma 9.
Let G = (V, E) be a graph, D be a decomposition of G, S ⊆ V be a target set, and f be a uniform threshold function with respect to D. Let C ∈ D and S 0 = S, S 1 , . . . be an activation process arising from S. There exists j C ∈ N 0 such that: Proof. For i = 0 clearly holds Part 1. Moreover, if S 0 ∩ C = C, then j C = 0 and the lemma holds. Now suppose there is u ∈ V (C) \ S 0 which is activated in the round j. All vertices in V (C) \ S 0 have the same threshold as v and the same neighborhood. Thus, all vertices in V (C) \ S 0 is activated in the round j as well and we can define j C as j.
Let C ∈ D. For a threshold function f which is constant on C we define f (C) as f (v) for arbitrary vertex v in C. We say that C is activated in round j C , given by Lemma 9. We denote a S i (v) the number |S i−1 ∩ N (v)|, i.e., the number of active neighbors of v in the round i − 1 in the activation process arising from the set S. Thus, a vertex v is activated in the , otherwise there is clearly no target set for G.

Uniformity and Twin Cover
In this subsection we present an algorithm for Uniform Target Set Selection parameterized by the twin cover number.

Trivial Bounds on the Minimum Target Set
Let G = (V, E) be a graph with a twin cover T of size t and let C 1 , C 2 , . . . , C q be the twin cliques of G. For a twin clique C by N (C) we denote the common twin cover neighborhood, that is, N (v) ∩ T for any v ∈ C. We show there is a small number of possibilities how the optimal target set can look like. Let b C = max f (C) − |N (C)|, 0 for a twin clique C. Observe that we need to select at least b C vertices of the twin clique C to any target set.
The first preprocessing we do here is with twin cliques C having N (C) = ∅. Clearly, since Target Set Selection is solvable in polynomial time on a clique C, we can remove C from G and reduce the budget b accordingly. Thus, from now we assume N (C) = ∅ for all twin cliques C.
Proof. Let S be a target set for G of size s. Suppose there is a twin clique C such that S ∩ V (C) = p < b C . It means that b C > 0. Let v ∈ C \ S. Note that p < |V (C)| as f (C) ≤ |C| + |N (C)|. Thus, the vertex v exists. For the vertex v it holds that a S i (v) ≤ p + |N (C)| for every round i of the activation process. Thus, the vertex v is never activated because p + |N (C)| < b C + |N (C)| = f (C) and S is not a target set. On the other hand, if we put b C vertices from each twin clique C into a set S , then the set S ∪ T is a target set because every vertex not in S is activated in the first round.

Structure of the Solution
Let (G, f, b, D tc ) be an instance of Uniform Target Set Selection with tc(G) = t. By Observation 10, if b < b C , then we automatically reject. On the other hand, if b ≥ t + b C , then we automatically accept. Let w = b − b C . Thus, to find a target set of size b we need to select w excess vertices from the twin cliques and the twin cover. We will show there are at most g(t) interesting choices for these w excess vertices for some computable function g and those choices can be efficiently generated. Since we can check if a given set S ⊆ V (G) is a target set in polynomial time, we conclude there is an FPT algorithm for Uniform Target Set Selection.
We start with an easy preprocessing. Let C be a twin clique with b C > 0. We select b C vertices V ⊆ C and remove them from the graph G. We also decrease the threshold value by b C of every vertex which was adjacent to V (recall that vertices in V have the same neighborhood type, thus any vertex adjacent to some vertex in V is adjacent to all vertices in V ). Formally, we get an equivalent instance (G 1 , f 1 It is easy to see that the instances (G, f, b, D tc ) and (G 1 , f 1 , b − b C , D tc ) are equivalent, since any target set for G needs at least b C vertices in the twin clique C due to Observation 10.
Note that the function f 1 is uniform with respect to D tc ; which follows from the same fact as for the function f . We repeat this process for all twin cliques. Furthermore, if there is a vertex v with f 1 (v) ≤ 0, we delete it and decrease f 1 (w) by 1 for each w ∈ N (v). From now on, we suppose that the instance (G, f , b, D tc ) is already preprocessed. Thus, for every twin clique C it holds that b C = 0 and f (C) ≤ |N (C)| ≤ t. We say that a twin clique C is of a type (Q, r) for Q ⊆ T and 1 ≤ r ≤ t if Q = N (C) and f (C) = r. Note that there are at most t · 2 t distinct types of the twin cliques.
We start to create a possible target set S of size b. We add w 1 (for some w 1 ≤ w) vertices from the twin cover T to S (there are at most 2 t such choices). Now we need to select w 2 = w − w 1 excess vertices from twin cliques to S.
The number of the twin cliques of one type may be large. Thus, for the twin cliques we need some more clever way than try all possibilities. The intuition is that if we want to select some excess vertices from a clique of type (Q, r) it is a "better" choice to select the vertices from large cliques of type (Q, r). We assign to each type (Q, r) a number w (Q,r) how many excess vertices would be in twin cliques of type (Q, r). We prove that it suffices to distribute w (Q,r) excess vertices among the w (Q,r) largest twin cliques of the type (Q, r). Definition 11. Let C 1 , . . . , C p be twin cliques of type (Q, r) ordered by the size in a descending order, i.e., for all 1 ≤ i < p it holds that |C i | ≥ |C i+1 |. We say that a target set has a hole (C i , C j ) for j > i if |S ∩ C i | = 0 and |S ∩ C j | ≥ 1. A target set is (Q, r)-leaky if it has a hole and it is (Q, r)-compact otherwise.
Our goal is to prove that if there is a target set S which is (Q, r)-leaky, then there is also a target set R which is (Q, r)-compact and |R| = |S|. After that we prove that there is only small number of compact targets, thus we can try all of them. Lemma 12. Suppose S is a target set for a graph G with a threshold function f and S is (Q, r)-leaky for some twin clique type (Q, r). Then, there is a target setS such that: 1. It holds that |S| = |S|. 2. The setsS and S differ only at the twin cliques of the type (Q, r).

The setS is (Q, r)-compact.
As the proof is a bit technical, we postpone it after we finish the algorithm using the above lemma.
Finishing the Algorithm By Lemma 12 we know that if there is a (Q, r)-leaky target set S, then there is a (Q, r)-compact target setS of the same size. Moreover, sets S andS differ only at the twin cliques of the type (Q, r). Thus, if we repeat the procedure for all types, we get a target set without any hole. To summarize how to distribute w excess vertices: 1. Pick w 1 vertices from the twin cover T , in total 2 t choices.

2.
Distribute w 2 = w − w 1 excess vertices among t · 2 t types of the twin cliques, in total (t · 2 t ) t = 2 O(t 2 ) choices. 3. Distribute w (Q,r) excess vertices among the w (Q,r) largest cliques of type (Q, r), in total t t choices. By this we create 2 O(t 2 ) candidates for a target set. For each candidate we test whether it is a target set for G or not. If any candidate set is a target set, then we find a target set of size b. If no candidate set is a target set, then by argumentation above we know the graph G has no target set of size (at most) b. This finishes the proof of Theorem 3.

Proof of Lemma 12
Delayed Activation Process For a better analyzing the activation process we introduce a little bit more general notion. Besides the threshold function we also have a delay function d : The delayed activation process arising from the set S is Thus, a vertex v cannot be activated before the round d(v). We say the set S is a delayed target set if there is some j such that S j = V (G). Note that a target set is a special case of a delayed target set for a delay function d(v) = 0 for all vertices v ∈ V (G).
Observation 13. Let S be a delayed target set for a graph G, a threshold function f , and a delay function d. Then, S is a target set for the graph G and the threshold function f .
Proof. The delayed condition of vertex activation is more restrictive than the condition for the standard activation process. Suppose a vertex v is activated in the round i during a delayed activation process. Then, the vertex v is certainly activated during the round i of the standard activation process at the latest. Now we are ready to prove Lemma 12. The idea of the proof is to create the target setS from S by removing vertices from C j and adding the same number of vertices from C i for any hole (C i , C j ).
Proof of Lemma 12. Let T be a twin cover of the graph G. Let C 1 , . . . , C p be order of all twin cliques of the type (Q, r) as in Definition 11 and let (C i , C j ) be a hole in the target set S. Let S = (S = S 0 , S 1 , . . . ) be an activation process arising from S and the clique C j is activated in the round j and the clique C i in the round i of the activation process S.
First, we show that j ≤ i . Since C i is activated in the round i and We create a delayed target set R from S by removing vertices from C j and adding the same number of vertices from C i ; see Figure 3. Formally, We set the delay function d as follows An illustration of how we create the set R from the set S. There are rounds when the parts of cliques are activated during the activation process S or R on the right or left, respectively.
Let R = (R = R 0 , R 1 , . . . ) be an activation process arising from the set R. The meaning of the delay d is that parts of the clique C i (the sets X and Y ) will behave in the activation process R in the same manner as the clique C j in the activation process S.
Immediate corollary of Claim 3.1 is that R is a delayed target set such that |R| = |S|. By Observation 13, we get that R is also a target set. The set R contains at least one less hole than the set S. Therefore, if we repeat this procedure we eventually get the sought (Q, r)-compact target setS.
Proof of Claim 3.1. We prove Claim 3.1 by induction on the number of round k. It is clear it holds for k = 0 because of the construction of the set R 0 = R. Now suppose it holds for k ≥ 0 and we will prove it for k + 1. Recall that for every vertex v not in the cliques C i and C j holds that d(v) = 0. Let v ∈ (S k+1 \ S k ) ∩ T . Let C v be the set of twin cliques C such that v ∈ N (C) and T v = T ∩ N (v), i.e., the neighbors of v in T . Then, Suppose v ∈ Q. Then, by induction hypothesis (Part 1 in the claim), it holds that We distinguish three cases: k + 1 ≤ j , j < k + 1 ≤ i , and i < k + 1. Suppose k + 1 ≤ j . Thus, the vertex v is activated at most in the same round as the clique C j in the activation process S. Note that in the activation process R the only active neighbors of the vertex v in the clique C i and C j are those vertices in the set X (which has the same size as S 0 ∩ C j ). Then, Thus, v ∈ R k+1 . The other cases are similar, now suppose that j < k + 1 ≤ i , i.e., the vertex v is activated in the activation process S after the clique C j but before the clique C i . We consider this case only if j < i . In the activation process R the vertices in X and Y are the only active vertices in the cliques C i and C j (recall that |X| The last case i < k + 1 is when the vertex v is activated after the activation of both cliques C i and C j in the both processes. In all three cases the vertex v has more than f (v) active neighbors in the round k + 1 of the process R.
Therefore, v ∈ R k+1 . It remains to prove the claim about the cliques C i and C j . It is clear that for a vertex v ∈ X holds that v ∈ R 0 .
Let v ∈ C j , thus d(v) = i . In the activation process S the clique C i is activated in the round i , thus f (C i ) ≤ |S i −1 ∩ Q|. The cliques C i and C j have the same type, thus f (v) = f (C i ). Therefore by induction hypothesis, and the clique C j is activated in the round i of the activation process R because of the delay. The proof for a vertex u then the set Y is empty as well and there is nothing to prove for this case. The clique C j was activated in the round j of the activation process S. Thus, The vertex u is activated in the round j of the activation process R.
i.e., d(u ) = i . The clique C i (included the vertex u ) was activated in the round i of the activation process S. Thus, Thus, the vertex u is activated in the round d(u ) = i , which finishes the proof of Claim 3.1.

Neighborhood Diversity
In this section we prove the Uniform Target Set Selection problem admits an FPT algorithm on graphs of the bounded neighborhood diversity. We again use Lemma 9. Note that in each round of the activation process at least one type has to be activated. This implies that there are at most nd(G) rounds of the activation process. We use this fact to model the whole activation process as an integer linear program which is then solved using Lenstra's celebrated result.
Theorem 14 ([20, 12]). Let p be a number of integral variables in a mixed integer linear program and let L be a number of bits needed to encode the program. Then it is possible to find an optimal solution in time O(p 2.5p poly(L)) and a space polynomial in L.
There has to be an order in which the types are activated in order to activate the whole graph. Since there are t = nd(G) types, we can try all such orderings. Let us fix an order ≺ on types. To construct the ILP we further need to know which types are fully activated at the beginning, since for these types we will not need to check there are enough neighbors activated in their round. Denote by c 0 the number of such types. Once the order ≺ is fixed the set of fully activated types at the beginning is determined by c 0 . Since c 0 can attain values 0, . . . , t we can try all t + 1 possibilities. Now, with both ≺ and c 0 fixed, denote the set of the types activated in the beginning by D 0 .
Observe further that, as the vertices in a type share all neighbors, the only thing that matters is the number of activated vertices in each type and not the actual vertices activated. Thus, we have variables x C which correspond to the number of vertices in type C selected into a target set S.
Let C be a type and n C be the number of vertices in C. Since we know when C is activated, we know how many active vertices are in C in each round. In C there are x C vertices before the activation of C and n C after the activation. To formulate the integer linear program we denote the set of types by D and we write D ∈ N (C) if the two corresponding vertices in the type graph T G are connected by an edge.
As there are at most t! orders of the set D and t + 1 choices of c 0 , the Uniform Target Set Selection problem can be solved in time (t + 1)t!t O(t) poly(n) = t O(t) poly(n). Thus, we have proven Theorem 1.

Hardness
In this section we prove hardness results for Target Set Selection. We prove the following problems are W[1]-hard. 1. Target Set Selection parameterized by the neighborhood diversity.

Majority Target Set Selection parameterized by the modular-width.
3. Target Set Selection parameterized by the twin cover number. Moreover unless ETH fails, there is no algorithm of running time f (k)n o(k/ log k) for the problems above, where k is the appropriate parameter. We use an FPT reduction from the following problem.
Is H isomorphic to a (colored) subgraph of G? I.e., is there an injective

then ETH fails.
It is known that there are infinitely many 3-regular graphs such that each such graph H has treewidth Θ(k) (cf. [15, Proposition 1, Theorem 5]). Using the class of 3-regular graphs as H in the above theorem, we derive the following corollary.

Corollary 16. If there is an algorithm A and a function f such that A correctly decides every instance of Colored Subgraph Isomorphism with the graph H being 3-regular in
Thus, from now we suppose the graph H is 3-regular. Let (G, H) be an instance of CSI. We will present three FPT reductions to Target Set Selection such that the sizes of the resulting graphs G will be polynomial in |V (G)| and the appropriate parameters will be bounded by O(k). We refer to the sets V c as to color classes of G and to a set E cd as to edges between the color classes V c and V d . Note that we can suppose all color classes have the same size and E cd is not empty if and only if {c, d} ∈ E(H). In the CSI problem we need to select exactly one vertex from each color class V c and exactly one edge from each (nonempty) set E cd . Moreover, we have to make certain that if {u, v} ∈ E cd is a selected edge, then u ∈ V c and v ∈ V d are the selected vertices. This selection of vertices and edges and the checking of their incidence needs to be captured in the reductions to Target Set Selection.

Neighborhood Diversity
For an easier notation during the reduction, we denote the size of an arbitrary color class V c by n + 1. Similarly, we denote m cd We describe a reduction from the graph G to an instance (G , f, b) of Target Set Selection such that nd(G ) is O(k).

Overview
As the proof is quite long and technical we overview main ideas contained in the proof here. We encode a vertex v c i in a color class V c of the graph G by two numbers i and n − i. The selection gadget for V c has two parts: pos and neg. We select the v c i ∈ V c for the copy of H if and only if we select to a target set i vertices in the pos part of the gadget for V c and n − i vertices in the neg part. We proceed with encoding of edges similarly, however, edges are encoded by multiples of sufficiently large number q. I.e., we select the -th edge in E cd for the copy of H if and only if we select q in the pos part of the gadget for E cd and q(m cd − ) in the neg part. We will create three types of gadgets: for selection vertices, for selection edges, and gadgets which check that the selected vertices are incident to the selected edges.
The incidence check is done by the following idea. The incidence gadget for V c and E cd contains 2 vertices u cd ( ) and w cd ( ) for each edge e cd ∈ E cd . The vertices u cd ( ) are connected to the pos parts of the selection gadgets for V c and E cd and the vertices w cd ( ) are connected to the neg parts.
Now suppose we selected v c j ∈ V c and the edge e cd for the copy of H and the vertices u = u cd ( ) and w = w cd ( ) were activated during the activation process in G . The vertex u is connected to j selected neighbors in the pos part of the vertex selection gadget and to q selected neighbors in the pos part of the edge selection gadget. Since f (u) = i + q , it must holds that j ≥ i. Similarly, the vertex w is connected to n − j + q(m cd − ) selected vertices in the neg parts of the selection gadgets and f (w) = n − i + q(m cd − ). Thus, we have j ≤ i. Therefore, if we check that the vertices u and w are activated during the activation process we can verify that i = j and the vertex v c j is actually incident to the edge e cd . To make this incidence check actually work, we need that This can be done by setting q to 2n, which is sufficiently large. Now, we proceed with the formal description of the reduction. We point out that all types of G in the neighborhood diversity decomposition are independent sets.

Selection Gadget L(s)
First, we describe gadgets of the graph G for selecting vertices and edges of the graph G.
For an overview of the gadget please refer to Figure 4. The gadget L(s) is formed by two types L-neg and L-pos of equal size s (the number s will be determined later); we refer to these two types as the selection part. For a vertex v in the selection part we set the value f (v) to the degree of v. It means that if some vertex v from the selection part is not selected into the target set, then all neighbors of v have to be active before the vertex v can be activated by the activation process. The selection gadget L is connected to the rest of the graph using only vertices from the selection part. The last part of the gadget L is formed by the type L-guard of s + 1 vertices connected to both types in the selection parts. For each vertex v in L-guard type we set f (v) = s.

Lemma 17.
Suppose there is a selection gadget L(s) in the graph G . We claim that exactly s vertices of the gadget L are needed to be selected in the target set S to activate the vertices in the L-guard type. Moreover, these s vertices have to be selected from the selection part of L. is s. Note that |V p ∩ S | < s. Thus, at least one vertex w ∈ V p \ S needs to be activated during the activation process before the vertex v is activated. However, f (w) = deg(w) for w ∈ V p . Therefore, the vertex w has to be activated after the vertex v is activated. That is a contradiction and |V p ∩ S | ≥ s must hold. When S contains s vertices from the selection part of L, then it is easy to see that the all vertices in L-guard type are activated in the first round of the activation process.

Numeration of Vertices and Edges
For every color class V c we create a selection gadget L c = L(n). We select a vertex v c i ∈ V c to the colored copy of H if i vertices in the L c -pos type and n − i vertices in the L c -neg type of the gadget L c are selected into the target set.
The selection of edges is similar, however, a bit more complicated. For every set E cd we create a selection gadget L cd of kind L(qm cd ). We select an edge e cd j ∈ E cd to the colored copy of H if qj vertices in the L cd -pos type of the gadget L cd are selected into the target set (and q(m cd − j) vertices in the L cd -neg are selected into the target set). Suppose s vertices in the L cd -pos type are selected into the target set. If s is not divisible by q, then it is an invalid selection. We introduce a new gadget such that s has to be divisible by q.

Incidence Gadget
So far we described how we encode in graph G selecting vertices and edges to the colored copy of H. It remains to describe how we encode the correct selection, i.e., if v ∈ V c and e ∈ E cd are selected vertex and edge to the colored copy of H, then v ∈ e. We create a selection gadget L c (n) for each color class V c . We set the number q to 2n and create a multiple gadget M cd of kind M (2n, m cd ) (with selection gadget L cd ) for each set E cd . We join gadgets L c and M cd through an incidence gadget I c:cd . See Figure 6, for better understanding how the incidence gadget is connected to the selection and multiple gadgets. The incidence gadget I c:cd has three types I c:cd -pos and I c:cd -neg of m cd + 1 vertices each and I c:cd -guard of n + 2nm cd vertices. We connect the I c:cd -guard type to the types I c:cd -pos and I c:cd -neg. Furthermore, we connect the type I c:cd -pos to the types L c -pos and L cd -pos. Similarly, we connect the type I c:cd -neg to the types L c -neg and L cd -neg.
We set thresholds of all vertices in the I c:cd -guard type to m cd + 2. Recall there are m cd + 1 edges in the set E cd . Thus, we can associate edges in E cd with vertices in I c:cd -pos Since we set the coefficient q to 2n, for each edge e j ∈ E cd and each vertex v i ∈ V c the sum i + 2nj is unique. Thus, every vertex in I c:cd -pos (I c:cd -neg) has a unique threshold. We will use this number to check the incidence.
We described how from the graph G with k color classes (instance of CSI) we create the graph G with the threshold function f (input for Target Set Selection). We join the gadgets L c and M cd by an incidence gadget I c:cd (gadgets L d and M cd are joint by a gadget I d:cd ). Letm = {c,d}∈E(H) m cd . To finish the construction of the instance of Target Set Selection, we set the budget b to kn + 2nm.

Finishing the Reduction
It is easy to see the following observations follow directly from the construction of G . Proof. Let K be a colored copy of H in the graph G. We construct a set We add i vertices in the L c -pos type and n − i in the L c -neg type into the set S. Let e cd j ∈ E(K) ∩ E cd . For the set E cd we have a multiple gadget M cd and there is a selection gadget L cd inside M cd . We add 2nj vertices in the L cd -pos type and 2n(m cd − j) vertices in the L cd -neg into the set S. We have n vertices in S for every color class V c and 2nm cd vertices in S for every edge set E cd . Thus, |S| = kn + 2nm = b.
We claim the set S is a target set. We analyze the selection gadget L c , the multiple gadget M cd (with the L cd selection gadget), and the incidence gadget I c:cd . All vertices in the types L c -guard and L cd -guard are activated in the first round (see the proof of Lemma 17).
All vertices in the types M cd -neg, M cd -pos and M cd -guard are activated during the first three rounds -for details see the proof of Lemma 18.
Recall V (I c:cd -pos) = {u : e ∈ E cd } and V (I c:cd -neg) = {w : e ∈ E cd }. The threshold of u ∈ V (I c:cd -pos) is 2n + for some ∈ {0, . . . , n}. There are 2nj +i vertices activated in the types L cd -pos and L c -pos. Vertices u 0 , . . . , u j−1 are activated in the first round because their thresholds are strictly smaller than 2nj. The threshold of u j is 2nj + i because this vertex corresponds to the incidence v i ∈ e j . Thus, the vertex u j is activated in the first round as well. Vertices u j+1 , . . . , u m cd have thresholds bigger than 2n(j + 1) and cannot be activated in the first round. By the same analysis we get that vertices w j , . . . , w m cd in the I c:cd -neg type are activated in the first round.
In the first round there are m cd + 2 activated vertices in the types I c:cd -pos and I c:cd -neg altogether. All vertices in the I c:cd -guard type are activated in the second round because they have threshold m cd + 2. The maximum threshold in the I c:cd -pos (I c:cd -neg) type is n + 2nm cd . Thus, the rest of vertices in the types I c:cd -pos and I c:cd -neg are activated in the third round because they have n + 2nm cd active neighbors in the I c:cd -guard type.
All vertices outside the types L c -pos, L c -neg, L cd -pos, and L cd -neg are activated during the first three rounds. Let U be a set of vertices which are not activated during the first three rounds. Note that U is an independent set and for every u ∈ U holds that f (u) = deg(u). Therefore, vertices in U are activated in the fourth round. It remains to analyze the vertices u j and w j . Suppose u j is activated in the first round.
Since the vertex w j has n − i + 2n(m cd − j) active neighbors (i.e., |N (w j ) ∩ S 0 | = n − i + 2n(m cd − j)), the vertex w j cannot be activated in the first round. Thus, at least one of the vertices u j , w j is not activated in the first round.
Any vertex of the type I c:cd -guard cannot be activated in the second round because they have threshold m cd + 2 and they have at most m cd + 1 active neighbors in the first round.
Vertices of the type I c:cd -guard have to be activated after some other vertices in the types I c:cd -pos or I c:cd -neg are activated. Let W be the neighbors of I c:cd -pos or I c:cd -neg that are not from I c:cd -guard. By the construction, the vertices of W are only in the selection parts of the gadgets. Thus, for every w ∈ W holds that f (w) = deg(w). There are no vertices in the neighborhood of I c:cd -pos and I c:cd -neg which would be activated during the activation process and the vertices of the type I c:cd -guard stay inactive during the whole process. Therefore, S is not a target set, which is a contradiction.
Theorem 2 is a corollary of Theorem 21 and 22 and Observation 19 and 20.

Modular-width
In fact this can be seen as a clever twist of the ideas contained in the proof of Theorem 2. There are some nodes of the neighborhood diversity decomposition already operating in the majority mode -e.g. guard vertices -these we keep untouched. For vertices with threshold set to their degree one has to "double" the number of vertices in the neighborhood. Finally, one has to deal with types having different thresholds for each of its vertices, which is quite technical. Here we exploit the property of the previous proof -that these vertices naturally come in pairs and that it is possible to replace each of these vertices by a collection of cliques. This ensures that even if the neighborhood is the same some vertices get activated and some not.
As already noted, we reduce the instance (G, H) of CSI into an instance (G , b) of Majority Target Set Selection. The graph G consists of several different types of gadgets. Throughout the description of gadgets, we use the following terminology. The vertices that are adjacent to vertices outside of the gadget (that introduces them) are referred to as interface vertices, the other vertices of the gadget are internal vertices. The vertices outside of the gadget that are adjacent to its interface part are neighboring vertices of the gadget. As we try to adapt the previous reduction to work in a "majority" regime, we need to know how many neighboring vertices gadgets have, to make gadgets work properly.

Selection Gadget L(s, r)
This gadget (together with an appropriate budget value) ensures that every target set encodes a number from 0 to s. The parameter r denotes the number of neighboring vertices, that is, we assume that each interface vertex has exactly r neighbors not in the gadget. The gadget consists of the following five types (see Figure 7 for an overview of the construction): Two independent sets each of size s called L-pos and L-neg (selection part of the gadget). One independent set of size 3s called L-guard. One independent set of size r + 3s called L-doubling. One independent set of size 2s called L-end. The L-guard type is connected to L-pos and L-neg, L-doubling is connected to L-pos, L-neg, and L-end. The L-pos and the L-neg types form the interface part of the gadget. The next definition gives us a useful tool for showing a lower bound on a number of vertices of a gadget that need to be in every target set. In other words, deficit determines how many neighbors of v in J we need to activate, provided that every vertex outside of J is already activated. Note that for an internal vertex, its deficit is exactly its threshold. For an interface vertex, its deficit is its threshold decreased by a number of adjacent vertices outside J.

Definition 23. Let J be a gadget in G and let
The following lemma gives us a lower bound on how many elements of J need to be in any target set.

Lemma 24. If all vertices in a gadget J have deficit at least d and S ⊆ V (G ) is a set with |S ∩ V (J)| < d, then S is not a target set.
Proof. We show a stronger statement that S = S ∪ V J is not a target set. We see that every vertex v ∈ V (J) has at most |S ∩ V (J)| + |N (v) ∩ V J | neighbors in S ; which is at most d − 1 + |N (v) ∩ V J |. However, from the definition of deficit and the assumption that deficit is at least d we have deg(v)/2 ≥ |N (v) ∩ V J | + d. Thus, no vertex in J has enough active neighbors and the activation process for S terminates immediately.
The following is then a simple consequence.

Lemma 25. Let L = L(s, r) be a selection gadget in the graph G . If S ⊆ V (G ) contains less than s vertices in V (L), then S is not a target set.
Proof. We examine the values of deficits for vertices in gadget L. The degrees of vertices in L-end, L-doubling, and L-guard are 3s + r, 4s, and 2s, respectively, and therefore their deficits are (3s + r)/2, 2s, and s, respectively. The vertices in L-pos and L-neg have degree 6s + 2r and so their threshold is 3s + r. As they have r neighbors in V L , their deficit is 3s. We see that every vertex has the deficit at least s. The lemma follows from Lemma 24.  For the second part, we can assume v ∈ V (L-pos) \ S, since the gadget is symmetric. From Part 1 we already know that the set S contains only vertices from the selection part. Thus, L-guard is activated in the first round. To activate v, other r vertices has to be activated. Since S does not intersect L-doubling and L-end, those types can be activated after L-pos and L-neg. Thus, the neighboring vertices of L connected to v has to be activated before v.

Threshold Decrease Gadget D(d, r)
The purpose of a threshold decrease gadget D(d, r) is to ensure there are d active vertices in its interface part. This can be also viewed as effectively decreasing the threshold of neighboring vertices by d/2, since if it works as described, then it adds d neighbors to the neighborhood of the gadget all of which are activated. The parameter r again determines the number of neighboring vertices.
The gadget consists of the following three types (see Figure 8 for an overview): The independent set of size d called D-interface. The independent set of size 2d + r + 1 called D-middle. The independent set of size d called D-end. The type D-middle is connected to D-interface and D-end.

Lemma 27. Let D = D(d, r) be a threshold decrease gadget in the graph G . If S ⊆ V (G) contains less than d vertices in V (D) then S is not a target set. Moreover, S ∩ V (D) is a subset of vertices in D-interface and D-end.
Proof. Let S D denote S∩V (D). Again we can assume that vertices in V D are in S. The deficit of vertices in the D-end part is (2d + r + 1)/2 > d, the deficit of vertices in the D-middle part is d, and the deficit of vertices in D-interface part is (2d + 2r + 1)/2 > d. Therefore, by Lemma 24 the set S is not a target set. The moreover part of the lemma follows immediately, since the only part with deficit exactly d is the D-middle part and therefore S must contain d vertices in its neighborhood.
Note that we can choose how we distribute d vertices in S between D-end and D-interface. The next lemma states that for determining the existence of a target set, it is enough to consider sets S that have d vertices in D-interface. Putting these three observations together, we obtain that |S | ≤ |S|.
Now observe that if we start the activation process with the set S the vertex set of the gadget D activates after two rounds. In particular, we have S ⊆ S 2 . Consequently, the activation process starting from the set S must activate all the vertices activated in the activation process starting from the set S. Since S was a target set, so is S .
We set the budget b in such a way that it exactly covers all selection gadget and all threshold decrease gadgets. This means that if any element of S is outside of the selection part of the selection gadgets or outside of the D-interface or the D-end part of the threshold decrease gadgets, then S is not a target set. By Lemma 28, we know that we can ignore S intersecting any D-end part. This motivates the following definition.

Definition 29. We say that a set S ⊆ V (G ) is hopeful if all its elements lie in the selection parts of selection gadgets and in the interface parts of threshold decrease gadgets.
When the budget is set as mentioned, it follows from Lemma 25, Lemma 27, and Lemma 28 that if we want to decide whether there exists a target set, it is sufficient to consider only hopeful sets.

Check Gadget C(Z, s)
The parameter s is a positive integer and Z ⊆ {0, . . . , s}. The gadget has two interface parts C-pos and C-neg that will be connected to the pos and neg parts of selection gadgets. The gadget is constructed in such a way that it is activated if and only if the sum of the numbers represented by connected selection gadgets is in Z.
We start with few auxiliary definitions. An i-clique group is the graph (2(s − i) + 1) × K 2i+1 (i.e., disjoint union of 2(s − i) + 1 cliques, each of size 2i + 1). The weight of an i-clique group is the number of vertices of the group and is denoted by w s (i) = (2(s − i) + 1) · (2i + 1).
The graph C Z is defined as a disjoint union of z-clique groups for each z ∈ Z. The graph C Z is defined as a disjoint union of (s − z)-clique groups for each z ∈ Z. The z-clique group in C Z and the (s − z)-clique group in C Z are referred to as complementary clique groups. Note that the clique group and its complementary clique group have the same weight. The weight of the set Z is defined as The gadget C(Z, s) consists of the following parts (see Figure 9 for overview): Interface parts C-pos and C-neg that are formed by C Z and C Z , respectively. Independent set C-guard of size s that is connected to the parts C-pos and C-neg. A single vertex connected to C-guard. A threshold decrease gadget D C = D 2s, 2w s (Z) with its interface part connected to C-pos and C-neg.
Lemma 31. Let C = C(Z, s) be a check gadget in the graph G and let L 1 = L(s 1 , r 1 ), . . . , L h = L(s h , r h ) be selection gadgets that are connected to C in such a way that each L i -pos is connected to C-pos and each L i -neg is connected to C-neg. We additionally require that s i = s and no other gadget is connected to C. Furthermore, let S be a hopeful set that represents numbers 1 , . . . , h in gadgets L 1 , . . . L h , respectively. Then, the gadget C is activated if and only if 1 + · · · + h ∈ Z.
Proof. First notice that due to Lemma 26 Part 2, no vertex in L i can be activated before C-pos and C-neg are fully activated. Let us set = 1 + · · · + h .
The degree of vertices in the i-clique group K is 4s + 2i; there are s neighbors in the adjacent selection gadgets, s neighbors in the C-guard part, 2s neighbors in the adjacent threshold decrease gadget, and 2i neighbors within the clique itself. Therefore, the threshold of vertices in the i-clique group is 2s + i. We know that 2s vertices in the neighborhood of K are already activated due to the threshold decrease gadget D C . Thus, at least i other vertices need to be activated for the i-clique to be activated. Since S is hopeful, these vertices can be only in the pos parts of the adjacent selection gadgets. From the assumption of the lemma, we know that there are such vertices, which gives us that the clique group activates if and only if ≥ i.
To prove the second part, it is enough to observe that exactly s − vertices are activated in the neg parts of the selection gadgets L 1 . . . , L h because S is hopeful. The rest follows by a similar argument.
Proof. If a clique group K is not activated in the first round, then its complementary clique group K is activated in the first round.
Suppose that K is an i-clique group. This means that K is an (s − i)-clique group. If K is not activated in the first round, then we have i > by Proof. If / ∈ Z, the activation process in C stops after the first round.
If / ∈ Z, by Claim 4.2.3 we see that there is no pair of complementary clique groups K, K such that both of them are activated in the first round. But then C-guard cannot be activated, as less than half of its neighbors are activated. Note that the interface vertices of the gadget C have to be activated in order to activate the rest of the vertices in adjacent selection gadgets (by Lemma 26).
Proof. If ∈ Z, the whole gadget C is activated in three rounds.
We can only consider vertices outside of threshold decrease gadgets; it is straightforward to check that if S is hopeful, all threshold decrease gadgets are activated in two rounds.
If ∈ Z, then by Claim 4.2.3 a pair of complementary clique groups K, K are both activated in the first round. Thus, a strict majority of vertices in C-pos and C-neg are activated in the first round. This causes the C-guard to be activated in the second round. In the third round, the single vertex connected to C-guard is activated. Moreover, all remaining clique groups are activated, as they have at least 3s activated neighbors in total (2s from the threshold decrease gadget, s from C-guard); see Claim 4.2.3. This finishes the proof of Lemma 31.

Multiple Gadget M (s, q, r)
The last gadget used is a multiple gadget. It is a variant of selection gadget; similarly to the selection gadget, every target set represents an integer between 0 and qs. However, the multiple gadget additionally ensures that the number is a multiple of q. The last parameter r determines the number of neighboring vertices, as usual. The gadget M consists of a selection gadget L = L(qs, r + w qs (Q q,s )) and a check gadget C = C (Q q,s , qs), where Q q,s = {0, q, 2q, . . . , sq}. Observe that the multiple gadget contains a threshold decrease gadget D(2qs, w qs (Q q,s )) as a part of the check gadget C (Q q,s , qs). The type L-pos is connected to C-pos and L-neg is connected to C-neg. The interface of M is the interface of the gadget L, i.e., L-pos and L-neg. Proof. If |S ∩ V (M )| < 3qs, then at least one of the following necessarily happens.
The selection gadget in M has less than qs vertices from S. Then by Lemma 25 we have that S is not a target set. The threshold decrease gadget in M has less than 2qs vertices from S. By Lemma 27 again S is not a target set.

Finishing the Reduction
We finally have all building blocks for the reduction. The graph G is constructed as follows (the numbers r c , r cd , r c:cd will be computed later).
It remains to compute the numbers r c , r cd , and r c:cd . The number r c:cd is n + 2nm cd , as I c:cd -pos is adjacent to L c -pos and M cd -pos.
The gadget M cd is adjacent to I c:cd and I d:cd . To determine r cd , we need to count the number of vertices of the pos types in both incident gadgets. This can be expressed by the weight function giving r cd = w r c:cd (Z c:cd ) + w r d:cd (Z d:cd ).
Finally, the gadget L c is adjacent to I c:cd for every d ∈ N H (c). analogously, we get wherem is again {c,d}∈E(H) m cd . The first term nk is for k selection gadgets L(n, r c ) corresponding to the color classes. The second term accounts the multiple gadgets M (m cd , 2n, r c d) corresponding to the edge sets E cd ; each of them requires at least 6nm cd vertices of a target set by Lemma 32. The last two terms are for threshold decrease gadgets D 2(2m cd n + n), w 2m cd n+n (Z c:cd ) inside each check gadget I c:cd = C(Z c:cd , 2m cd n + n).
We verify that G has size polynomial in |V (G)|. Observe that the size of each gadget is polynomial in its parameters, and the parameters are polynomial with respect to |V (G)|. Since we have O(k) gadgets, the whole graph G has size polynomial in |V (G)|, since k ≤ |V (G)|. Moreover, the graph G can be clearly constructed in polynomial time.
We turn our attention to the restricted modular width of G . Consider a graphĜ obtained by replacing each pos and neg part of each check gadget in G by an independent set of the same size. It is easy to verify thatĜ is a graph of neighborhood diversity O(k); every gadget inĜ has neighborhood diversity bounded by a constant. As each pos or neg part of the check gadget in G is a cluster graph, we can obtain G from the type graph TĜ by an appropriate substitution operation. This gives us an algebraic expression proving the restricted modular width of G is O(k).

Lemma 34. The graph G contains a colored copy of H if and only if G has a target set of size b.
Proof. First, suppose that G contains a colored copy of H. Denote by c the number of the selected vertex in V c in the numeration we fixed before. Similarly denote by cd the number of edge that connects the selected vertices in V c and V d .
The target set is constructed as follows. By the choice of b, we see that |S| = b. We claim that S is a target set.
By Lemma 31, the check gadget C(Q 2n,m cd , 2nm cd ) in M cd is activated in three rounds as cd is a multiple of 2n and hence is in Q 2n,m cd . Similarly, as the vertex v ∈ V c corresponding to c is incident to the edge e ∈ E cd corresponding to cd , the gadget I c:cd is activated in three rounds again by Lemma 31, since the number c + 2n cd is in Z c:cd . We now analyze the gadget L c = L(n, r c ). The part L c -guard is activated in the first round. In the third round, all neighboring check gadgets are activated. Since those gadgets together with L c -guard constitute exactly the half of the neighbors of every vertex in L c -pos or L c -neg, these parts are activated in the round four. It is now easy to see that the remaining two types (L c -doubling and L c -end) are activated in the rounds five and six.
The argument for the gadget M cd = M (m cd , 2n, r cd ) is analogous -in the third round, all check gadgets (including the one inside M cd ) are activated and again this is enough to activate the M cd -pos and M cd -neg parts in the round four. The rest of the gadget again is activated in the round six. This proves that S is a target set.
For the opposite direction, suppose that we have a target set S in G with |S| ≤ b. We know that without loss of generality we may assume that S is hopeful. Let c be the number represented by S in V c and 2n cd the number represented by S in M cd . We know the number represented by S in M cd is a multiple of 2n by Lemma 33. Now we pick c -th vertex from each color class V c . We claim that those vertices form a solution to the original instance of CSI.
Since S is a target set, we obtain from Lemma 31 that c + 2n cd ∈ Z c:cd . Note that a number z ∈ Z c:cd is of the form z = i + 2nj and the number i and j are uniquely determined by z alone; simply take i = z mod 2n and j = z div 2n. This means that number c + 2n cd is in Z if and only if a vertex v ∈ V c corresponding to the number c is incident to an edge e ∈ E cd corresponding to the number cd . Thus, we have proved that the set of vertex obtained from S indeed form a solution to (G, H, ψ).
This finishes the proof of Theorem 5.

Twin Cover
As usual, we enumerate vertices in color classes V c and edges in sets E cd and design vertex, edge, and incidence gadgets based on this enumeration. This time all the gadgets are cliques and we encode the input instance into sizes of parts of these cliques with different thresholds. It is worth noting that in each such clique the number of different vertex thresholds is at most eleven. The resulting instance (G , f, b) of Target Set Selection is equivalent to the instance (G, H) of CSI and tc(G ) = O(k).

Construction
Let c, d ∈ V (H). As we assume |V c | = |V d |, we denote this common value as n − 1 for technical reason. Thus, we can denote the vertices in V c as v c 1 , . . . , v c n−1 . As we mentioned, we have no control on the number of edges in E cd -it is upper bounded by (n − 1) 2 .
We arbitrarily orient edges of H. Vertex Gadget Let c ∈ V (H) and let v = v c i be the i-th vertex in V c . We first introduce few constants that will later allow us to verify the proof of the correctness of our reduction. Let γ s = 21, γ = 10, and Γ = γ s + γ + 1 (γ s will denote the size of a vertex set which we will call a selector, γ will denote the size of a vertex set which we will a call class validator and denote L). For the vertex v we create a clique C v . The size of C v and thresholds of the vertices in C v depend on deg − (c) and deg + (c). The main idea is that in the activation process we first check the incidence of vertices and outgoing arcs and then we check the incidence of ingoing arcs. Thus, for example if c ∈ V + (i.e., deg − (c) = 0), then there is no need to check incidence between selected v ∈ V c and outgoing edges. The vertices in C v are divided into several groups. The sizes of the groups and thresholds of vertices in the group are in the following table.
n 3 4n + Γ + 10 n 3 4n + Γ + 8 By deg in the selector vertices threshold is meant the degree of selector vertices not the degree of c ∈ V (H). If c ∈ V r , then the vertex gadget has smaller number of groups than in the general case. Note that i, j < n thus every group is non-empty. We denote all vertices in all cliques C u for all u ∈ V c by U c . Observe that all of the cliques in U c are of the same size n 3 + 4n + γ s + 1, independent on the value of i.

Edge Gadget
Let e = (c, d) ∈ E(H). Again, we first introduce few constants. Let δ s = 17, δ = 8, and ∆ = δ s + δ + 1. For each edge e = {u, v} ∈ E cd we create a clique C e . Let u = v c i and v = v d j . There are again eleven groups of vertices in C e . The sizes of the groups and thresholds of vertices in the group are in the following table.
n − j 3n + j + ∆ + 7 9. n 4 4n + ∆ + 8 All vertices of these cliques are denoted by U e . Observe that all of the cliques in U e are of the same size n 4 + 4n + δ s + 1, independent on the value of i or j. We set the budget b to γ s · k + δ s · E(H) . This will allow us to select one vertex (by adding all of its selector vertices) from each color class V c as well as one edge from each edge set E cd .
Twin Cover Vertices So far our graph is a cluster graph and thus admits a twin cover of size 0. Now, we are going to add few vertices (forming the twin cover of the constructed graph) in order to connect these pieces together and the reduction to work. For each edge e = (c, d) ∈ E(H) we add four checker vertices defined in the following The outgoing checkers − (c, e ) and u − (c, e ) are both connected to all vertices in U c and U e . Similarly, the ingoing checkers + (d, e ) and u + (d, e ) are both connected to all vertices in U d and U e . Note that for each vertex c ∈ V (H) there are 2 · deg − (c) outgoing checkers and 2 · deg + (c) ingoing checkers connected to U c . The checker vertices will check if the selection of vertices in V c and V d is consistent with the selection of edge in E cd . For each type of checkers we add one checker validator vertex defined in the following table.
Next, for each c ∈ V (H) we add γ class validator vertices L c and γ s sentry vertices R c . The class validator vertices L c and the sentry vertices R c are connected to all vertices in U c . The threshold of class validator vertices L c is γ s + 1 and the threshold of sentry vertices R c is set to the clique size in U c , i.e., n 3 + 4n + γ s + 1.
Similarly, for each e ∈ E(H) we add δ class validator vertices L e and δ s sentry vertices R e . The class validator vertices L e and the sentry vertices R e are connected to all vertices in U e . The threshold of class validator vertices L e is δ s + 1 and the threshold of sentry vertices R e is set to the clique size in U e , i.e., n 4 + 4n + δ s + 1.
The purpose of class validator vertices is that vertices only from one clique C v in each U c are selected to the target set. The intended meaning of sentry vertices is to be activated when for each c ∈ V (H) one vertex gadget C v in U c is activated and for each e ∈ E(H) one edge gadget C e in U e is activated. After that the sentry vertices will help to activate the remaining (i.e., not selected) gadgets.
Let τ denote the number of non-selector vertices constructed so far. We finish the construction by adding b + γ s special vertices with threshold τ + b and we connect these to every vertex constructed so far. These vertices play an important role in our reduction as they ensure that any target set consists of selector vertices only (see Lemma 36). Recall that b is linear in k. Thus, the twin cover of the constructed graph has size

Subgraph Gives Target Set
Suppose G contains a colored copy of H given by a mapping φ : V (H) → V (G). We put the following selector vertices to the set S.
Let c ∈ V (H) and v = φ(c) ∈ V (G). We put all γ s selector vertices from C v into S.
By property of φ we know that e = {u, v} ∈ E(G). We put all δ s selector vertices from C e into S. It is clear that |S| = b. We claim that S forms a target set for the graph G constructed in the previous section. The high-level description of the activation process is that first the vertices in C v and C e cliques with checkers and checker validators are activated for the selected v ∈ V (G) and e ∈ E(G). Then, the sentry vertices are activated which causes activation of all vertex and edge gadgets without the selector vertices. At the end the special vertices and remaining selector vertices are activated. Let Note that for the vertexū and the edge the edgeē the minimal threshold in Cū is γ s and in Cē it is δ s . Thus, some vertices in these cliques can be activated after at least γ s (or δ s ) vertices in their neighborhood in twin cover are activated. We will show that these neighborhood vertices of Cū (or Cē) are activated in the order: 1. γ (or δ ) class validator vertices L c (or L e ).

6 (or 4) checkers and 4 checker validators.
3. γ s (or γ s ) sentry vertices R c (or R e ). 4. b + γ s special vertices. Since 21 = γ s > 10 + γ = 20, the first vertex in Cū is activated after the sentry vertices R c are activated. By similar argument, the same holds for Cē, i.e., the first vertex in Cē is activated after the sentry vertices R e .
Let e = (c, d) ∈ E(H), u = v c i ∈ V * , v = v d j ∈ V * , and e = {u, v} ∈ E * , i.e., u and v are the selected vertices from V c and V d and e is the selected edge from E cd incident to u and v. We describe the activation process from the point of view of u, v, and e, i.e., the following rounds holds for every u * ∈ V * ,ĉ ∈ V (H), e * ∈ E * , andê ∈ E(H), not only for u, v, c, d, e, and e . In what follows please refer to Figure 11.  There are all 4 active checkers all 4 active checker validators in the neighborhood of C e , thus the ninth group of C e is activated. S 20 : Sentries. Up until now we have activated the following vertices: The vertex gadget C v of size n 3 + 4n + γ s + 1 and the vertex gadget C u .
The edge gadget C e of size n 4 + 4n + δ s + 1.
All checkers, checker validators and class validators. Every sentry vertex r ∈ R c has n 3 + 4n + γ s + 1 active neighbors -namely, the clique C v . Thus, all sentry vertices in R c are activated. Similarly, all sentry vertices in R d and R e are activated. S 21 -S 30 : Non-selector vertices. Every vertex gadget has 10 + γ s + γ active neighbors (6 checkers, 4 checker validators, γ class validators and γ s sentry vertices). Thus, every vertex gadget in U c (if c ∈ V − ) without the selector vertices is activated group by group in 10 rounds (see Figure 11). The sentry vertices substitute the selector vertices during this phase. The non-selector vertices in U d are activated in the similar way. If d ∈ V + then non-selector vertices in U d are activated in 6 rounds (and then no vertex is activated in U d till the round S 32 ). Every edge gadget in U e has 8 + δ s + δ active neighbors and is activated in the same way as each vertex gadget. S 31 : Special vertices. All τ non-selector and non-special vertices are active. Since b selector vertices are active from the beginning, the special vertices are activated. S 32 : Guard. All vertices except selector vertices not in S are active. Note that, each selector vertex has threshold its degree minus the number of selector vertices in its neighborhood. Thus, all remaining selector vertices are activated and S 32 = V (G ).
Thus, we prove the following theorem.
Theorem 35. If G contains a colored copy of H, then G with the threshold function f contains a target set of size b.

Target Set Gives Subgraph
In this section we want to prove the converse implication of Theorem 35. Let S be a target set of G and |S| ≤ b. First, we want to prove that basically the only possibility is that S corresponds to a (valid) selection of vertices and edges (i.e., S contains all selector vertices of exactly one vertex or edge gadget in each class). We prove this in the following lemmata. Proof. Suppose the set S does not contain b selector vertices. Note that there are at least γ s special vertices not in S. Let T be the set of all special vertices not in S. We show that S cannot activate vertices in T . Let v be a selector vertex which is not in S. By our construction, the vertex v has at most γ s other selector vertices as neighbors. Since for a selector vertex in a vertex gadget and f (v) = deg(v) − δ s + 1 for a selector vertex in an edge gadget; furthermore, γ s ≥ δ s ), the vertex v is activated after at least one vertex in T is activated.
Thus, any selector vertex which is not in S can be activated only after at least one vertex in T activated. However, the vertices in T have threshold τ + b. Therefore, even if all non-selector vertices are activated, at least b selector vertices have to be in S.
Before we prove that in each set U z (for z ∈ V (H) ∪ E(H)) there is a correct number of selector vertices in S we first observe few facts about the last rounds of the activation process arising from a set of selector vertices S. In order to give more properties (in fact, more "local" ones) the set S must fulfill it helps us if we understand the last rounds of the activation process as it mainly deals with the globally connected vertices forming the twin cover. This allows us to prove the sought properties more in a local way.
Lemma 37. The following holds in the activation process arising from S: 1. Selector vertices not in S are activated in the last round of the activation process. 2. Special vertices are activated in the last but one round.
Proof. The threshold of special vertices is τ + b, thus they can be activated when all τ non-selector vertices are activated. The selector vertices have their threshold set exactly to the number of their non-selector neighbors and they are connected to the special vertices. Thus, selectors not in S have to be activated after the special vertices. We conclude the activation of these two groups of vertices takes place in the last two rounds of the activation process arising from S.
In particular, the above lemma implies that even if a single (group of) sentry vertices is not activated before the special vertices and the selector vertices not in S, the activation process arising from S terminates before all of the vertices are active and thus S is not a target set. Let z ∈ V (H) ∪ E(H). For a clique C in U z we denote the non-empty group with the highest number as the last group (for z ∈ V − the last group is the fifth group and for z ∈ V − the last group is the ninth group).

Lemma 38. Let z ∈ V (H) ∪ E(H).
In the activation process arising from S, the sentry vertices in R z can be activated after the last group of at least one clique in U z is activated.
Proof. Suppose z ∈ V (H). Then, the threshold of vertices in R z is larger than n 3 . The size of each clique C v in U z without the last group is 4n + γ s + 1 and there are n − 1 cliques in U z . Thus, even if all cliques in U z without the last groups are activated, the sentry vertices in R z can not be activated, since n 3 > (4n + γ s + 1)(n − 1) for n ≥ 6 and the only neighborhood of R z are the special vertices and vertices in U z .
The proof for z ∈ E(H) is analogous. There are at most n 2 cliques in U z and each cliques without the last group has 4n + δ s + 1 vertices. Since the thresholds of sentry vertices in R z is at least n 4 , the lemma follows. Now, we are ready to finish the first part of the proof -namely, that the selection indeed corresponds to a selection of vertices and edges in the original instance of CSI.
Lemma 39. For each c ∈ V (H) there is exactly one vertex v ∈ V c such that V (C v ) ∩ S contains exactly γ s selectors in the vertex gadget C v . For each (c, d) ∈ E(H) there is exactly one edge e ∈ E cd such that V (C e ) ∩ S contains exactly δ s selectors in the edge gadget C e .
Proof. We prove the lemma for edges E(H) (the proof for vertices c ∈ V (H) follows in a similar way but we have to distinguish cases if c is in V − or not). Suppose there is e = (c, d) ∈ E(H) such that for all e ∈ E cd holds |V (C e ) ∩ S| < δ s . We prove the sentry vertices R e are never activated. Let us assume all 4 checker, all 4 checker validators and the class validator L e are activated. Thus, in each C e all groups but selectors not in S and the last one are activated in 9 rounds. However, the last group in C e can not be activated. The last group has the following active neighbors: 4n vertices in the groups 1-8 in C e . 1 starter vertex in C e . Strictly less than δ s selectors in C e . δ class validators L e . 4 checkers and 4 checker validators. In total the last group has strictly less than 4n + 1 + δ s + δ + 8 = 4n + ∆ + 8, which is the threshold of the last group. Thus, the last group in any C e in U e can be activated after some sentry vertex in R e , or special vertex or selector vertex in C e \ S is activated. However, this cannot happen due to Lemma 37 and 38.
Thus, for each z ∈ V (H) ∪ E(H) there is at least one clique C ∈ U z such that |C ∩ S| ≥ δ s (or γ s if z ∈ V (H)). Since the size of b is γ s · k + δ s · |E(H)|, these inequalities are actually tight and the lemma follows.
By Lemma 39, the set S contains: Proof. We prove this by a more detailed examination of the activation process arising from the set S. Let e = φ E (e ) for e = (c, d) ∈ E(H). Let u = φ(c) and v = φ(d). We will prove that u, v ∈ e.
We claim the outgoing checkers connected to C e are activated if and only if u ∈ e. Let u = v c i for some i ∈ N and let e ∩ {v c 1 , . . . , v c n−1 } = v c j . We will prove that i = j. We observe that the activation process begins by following the lines of the proof of Theorem 35. In the first round the starter vertex in C u is activated, then the class validator vertices are activated and then the first group of vertices in C u is activated in the third round. Thus, there are i + γ s + 1 active vertices in U c by now. Similarly for e -there are n − j + δ s + 1 vertices activated in C e . The vertices in the neighborhood of C e with the lowest threshold is the outgoing lower checker − (c, e ). Now suppose that n − j + i < n, i.e., the checker (c, e ) can not activated in the round 4. Consequently, the second groups of C e and C u are not activated in the round 5. There can be some cliques C in U z for some z ∈ V (H) ∪ E(H) such that the second group of C is activated in the round 5 (if an appropriate number of outgoing lower checkers connected to C were activated in the round 4). We claim in this moment the activation process stops. In the round 6 the outgoing lower checker validator˜ − should be activated. However, to activatẽ − the selector, starter and first two groups of one clique C in U z for each z ∈ V (H) ∪ E(H) and all outgoing lower checkers have to be active. The second group of C e and C u and the checker (c, e ) are not active, thus˜ − can not be activated. To continue with the activation process, to activate the third group of any gadget clique C the vertex˜ − needs to be activate. Therefore, the activation process stops in the round 5.
On the other hand, if i + n − j ≥ n (i.e., j ≤ i), the lower checker vertex is activated. The activation process proceed as it is described in the previous section. The outgoing upper checker u − (c, e ) should be activated in the round 8. If it is not activated, then the activation process stops latest in the round 9 by the same argument as we presented for the outgoing lower checker. Otherwise, if u − (c, e ) is activated, then 2n − i + n + j ≥ 3n (i.e., j ≥ i). Thus, we prove that if S is a target set, then u ∈ e.
The argument for v ∈ e is similar, only ingoing checker vertices (d, e ) and u(d, e ) and ingoing checker validators˜ + andũ + are used.
This finishes the proof of Theorem 4.

Conclusions
We have generalized ideas of previous works [3,22] for the Target Set Selection problem. The presented results give a new idea how to encode selecting vertices and edges in the Colored Subgraph Isomorphism problem for showing W[1]-hardness and ETH-lower bound. In particular, only few problems are known to be W[1]-hard when parameterized by neighborhood diversity -which is the case for the Target Set Selection problem. We are not aware of other positive results concerning the number of different thresholds instead of the threshold upper-bound. We would like to point out that in our proofs of W[1]-hardness the activation process terminates after constant number of rounds (independent of the parameter value and the size of the input graph). This is true also for all reductions given by Chopin et al. [6].  Figure 11 A schema of an activation process for a Yes-instance of CSI. If there is an edge between two groups of vertices, this indicates that every vertex of one group is adjacent to every vertex in the other group. A rectangle represents a group of vertices and a number stands for activation in the round S . Vertices in the twin cover have the following colors: class validators yellow, lower checkers violet, upper checkers green, class sentry vertices light red, and checker validators white (special vertices are omitted). Groups in vertex and edge gadgets are in the same order as in the table. For simplicity we only depict two vertex gadgets from φ −1 (c) and φ −1 (d) with deg − (c), deg − (d) ∈ {1, 2}; the selected vertex gadget has bold borders. Finally, the gray area "contains"all the twin-cliques (the vertices in Uc and U e for each c ∈ V (H) and e ∈ E(H)).