Immunization in the Threshold Model: A Parameterized Complexity Study

We consider the problem of keeping under control the spread of harmful items in networks, such as the contagion proliferation of diseases or the diffusion of fake news. We assume the linear threshold model of diffusion where each node has a threshold that measures the node’s resistance to the contagion. We study the parameterized complexity of the problem: Given a network, a set of initially contaminated nodes, and two integers k and ℓ\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\ell $$\end{document}, is it possible to limit the diffusion to at most k other nodes of the network by immunizing at most ℓ\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\ell $$\end{document} nodes? We consider several parameters associated with the input, including the bounds k and ℓ\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\ell $$\end{document}, the maximum node degree Δ\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\Delta $$\end{document}, the number ζ\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\zeta $$\end{document} of initially contaminated nodes, the treewidth, and the neighborhood diversity of the network. We first give W[1] or W[2]-hardness results for each of the considered parameters. Then we give fixed-parameter algorithms for some parameter combinations.


Introduction
During the past decade, the study of spreading processes in complex networks has experienced a particular surge of interest across many research areas from viral marketing, to social media, to population epidemics.Several studies have focused on the problem of finding a small set of individuals who, given the item to be diffused, allow its diffusion to a vast portion of the network, by using the links among individuals in the network to transmit the item to their contacts [39].
Threshold models, where each node has a threshold that measures the node resistance to diffusion, are widely adopted by sociologists to describe collective behaviors [28], and their use to study the propagation of innovations through a network was first considered in [31].The linear threshold model has then been widely used in the literature to study the problem of influence maximization, which aims at identifying a small subset of nodes that can maximize influence diffusion [3,8,9,[11][12][13]31].The related Target set selection problem, which aims at selecting the smallest possible set of nodes, whose activation eventually leads to influencing all the nodes in the network, has also been widely studied; see for example [3,7,10,24,31].
Recently, with the aim of keeping under control the spread of harmful items in networks, some attention has been devoted to the important issue of developing strategies for reducing the spread of negative things through a network.The problem is motivated by its ability to model complex phenomena such as the proliferation of disease contagion or the spread of false news.In particular, several studies considered the problem of which structural changes (immunization measures) can be made to the network topology in order to block, or limit as much as possible, negative diffusion processes.
One such measure consists in intervening on the network topology by either blocking some links so that they cannot contribute to the diffusion process [33] or by immunizing some nodes [20].In this paper, we focus on the second strategy: Limit the spread to a small region of the network by immunizing a bounded number of nodes in the network.We study the problem in the linear threshold model [31].A node gets influenced/contaminated if it receives the item from a number of neighbors at least equal to its threshold.The diffusion proceeds in rounds: Initially only a subset of nodes has the item and is contaminated.At each round, the set of contaminated nodes is augmented with each node that has a number of already contaminated neighbors at least equal to its threshold.
In the presence of an immunization campaign, the immunization operation on a node inhibits the contamination of the node itself.Thus, given a network and a subset of its nodes, called spreader set, that has the malicious item to be diffused to the other nodes in the network, we are looking for a small subset of nodes (immunizing set) that, once immunized, enable to minimize the number of nodes influenced at the end of the diffusion process.
Under such a diffusion model, we perform a broad parameterized complexity study of the following Influence-Immunization problem: Given a network, a spreader set, and two integers k and , is it possible to limit the diffusion to at most k other nodes of the network by immunizing at most nodes?
We study the parameterized complexity of the Influence-Immunization problem, formally defined in Sect.3. Parameterized complexity is a refinement of classical complexity theory in which one takes into account not only the input size but also other aspects of the problem given by a parameter p [18,41].We recall that a problem with input size n and parameter p is called fixed parameter tractable (FPT) if it can be solved in time f ( p) • n c , where f is a computable function only depending on p and c is a constant.On the other hand, the theory of fixed parameter intractability defined the W -hierarchy t≥0 W [t], where F PT = W [0] ⊆ W [1] ⊆ . . .⊆ W [ poly], to characterize the inherent level of intractability for parameterized problems [18].For instance, the W [1]-hardness of a parameterized problem provides a strong evidence that the problem is not solvable in time f ( p)•n O (1) , for any function f of the parameter p.

Our Results
We consider several parameters associated to the input: the bounds k and , the number ζ related to initially contaminated nodes, and some parameters of the underlying network: The maximum degree , the treewidth tw [42], and the neighborhood diversity nd [37].The two last parameters, formally defined in Sects.4.4 and 4.5 respectively, are two incomparable parameters of a graph that can be viewed as representing sparse and dense graphs, respectively [37]; they received much attention in the literature [3,13,14,26,27,35].

Related Work
Several studies highlighted how the spread of epidemics is strongly influenced by the network structure and, consequently, a smart manipulation of the network enables maximizing/minimizing the node influenced at the end of a given diffusion process [5,21].
Influence maximization/minimization has also been addressed from the game theoretic perspective in [4,6,38].Bhawalkar et al. [4] introduced a problem strongly related to the Target set selection with fixed threshold k.The problem, named Anchored k-Core, assumes that at the beginning of the process all the nodes are engaged/influenced but each node remains engaged only if it maintains at least k engaged neighbors.The model enable to anchor a node.Anchored nodes remain engaged no matter what their friends do.Given a budget b the goal is to select a set of nodes (anchored nodes) to maximize the amount of engagement in a given network.The author shows that, for k = 2, the problem is solvable in polynomial time while for k ≥ 3 the problem is NPhard (even to be approximated).Moreover, the problem has shown to be W [2]-hard with respect to the budget parameter b.
Meier et al. [38] pose the problem in terms of virus propagation in a network where each node/player decides whether or not to protect itself.They adopt a game theory approach, where each player decides to be vaccinated or not, with the aim of maximizing its own utility function.The goal is to design the best strategy for the benefit of the overall community.Similarly, Chen et al. [6] studied the vaccination of nodes in graphs against the outbreak of infectious disease at random locations.
Influence minimization in the linear threshold model achieved by blocking some links has been studied in [32,33].In [33], the authors addressed the problem of minimizing the propagation of negative items by removing a limited number of links in a network.They propose a method for finding a good approximate solution to this problem based on a natural greedy strategy.In our study, we focus on strategies for reducing the spread size by immunizing/removing nodes.In this setting, papers [2,40] consider a greedy heuristic that immunizes nodes in decreasing order of out-degree.However, immunizing nodes according to their (out-)degrees is not necessarily an effective strategy.
When all the node thresholds are equal to 1, the immunization can be obtained by a cut (set of edges) or a separator (set of nodes) of the network.In particular, Hayrapetyan et al. [29] introduced the Minimum-size Bounded-Capacity Cut (MinSBCC) problem where, for a given graph with an identified source, the goal is to find a cut minimizing the number of nodes on the source side, subject to a budget constraint.Moreover, they showed a connection between the MinSBCC problem and the problem of choosing which individuals to immunize in order to minimize an epidemic process.Other papers dealing with such cut problems are [6,30] in case of edge cuts and [15,25] in case of node separators.
Another conceptually related problem is the Firefighter problem [23].This problem models diffusion processes such as an infection (as well as an idea, a computer virus, or a fire).The Firefighter problem is based on a diffusion process where all the node thresholds are equal to 1, and the goal is to contain the infection by using targeted immunizations: at each round of the diffusion process, one can defend (immunize) a fixed number of nodes, with the goal of minimizing the effect of the infection.Conversely, in our study, we considered a fixed overall budget , that is, we are allowed to immunize, from the beginning, at most nodes, and we ask whether we are able to limit the diffusion to at most k nodes.

Problem Statement
Let G = (V , E, t) be an undirected graph where V is the set of nodes, E is the set of edges, and t : V → N is a node threshold function.We use n and m to denote the number of nodes and edges in the graph, respectively.The degree of a node v is denoted by Given the network and a spreader set S, after one diffusion round, the influenced nodes are all those which are influenced by the nodes in S, that is, have a number of neighbors in S at least equal to their threshold.Noticing that nodes in S are already contaminated and cannot be immunized, we can then model the diffusion process by a graph, which represents the network except for the spreader set.Namely, we consider the graph G = (V , E, t) where: V is the set of nodes of the network excluding those in the spreader set, E ⊆ V × V is the edge set, and t is the threshold function t : V → N where t(v) is equal to the original threshold of the node v in the network decreased by the number of its neighbors in S (if the difference is negative then t(v) is set to 0).Hence in G, the diffusion process can be seen as starting at the nodes of threshold 0. Each node in V , including those of threshold 0, may be immunized.

Definition 1 The diffusion process in
We omit the subscript Y when no node is immunized, that is, (1) In the following, we assume that for the input graph it holds D G = V ; indeed, we could otherwise remove all the nodes that cannot be influenced, since they are irrelevant to the immunization problem.In particular, each remaining node v ∈ V has t(v) ≤ d G (v), otherwise, it could not be influenced.An example is given in Fig. 1a.
We are now ready to formally define our problem.For a given set Y we partition the node set into three subsets: • The set D G,Y , which contains the nodes that get influenced,

Influence-Immunization
• the immunizing set Y , which has the property that, if all its nodes are immunized then the diffusion process is contained to D G,Y , and of the nodes that, by immunizing Y , are not influenced.
We will refer to the nodes in the above subsets as influenced, immunized and safe, respectively.
In some cases it will be easier to deal with a different formulation of IIB based on the set of nodes to which one wants to confine the diffusion.
The set D G[X ] of nodes that get influenced in the subgraph G[X ] induced by X , can clearly be seen as the set of nodes that would get influenced in X if X were disconnected from the rest of the graph.Hence, according to Definition 2, the set Y (X ) contains the nodes in V − X that can be influenced by those in It is worth mentioning that a node having an initial threshold equal to 0 can only be influenced or immunized.Indeed, by Definition 2, all the nodes in V − X having initial threshold equal to 0 belong to Y (X ), that is, (see Fig. 1c for an example).By the above definitions and by (1), we have Fact 1 Proof We first notice that Y (X ) includes all the nodes in V −X that either are influenced by those in X or have a threshold equal to 0. As a consequence, the influenced nodes in V − Y (X ) can only belong to X .Hence the first equality holds.The second equality immediately follows by (1).
The sets are the influenced, immunized, and safe sets, respectively.
For some X , some nodes in G[X ] may be not influenced, even though they would in the whole graph G (see Fig. 1 (b)).However, it is easy to see that for each X the set In the following, we will refer as minimal to a set X such that D G[X ] = X (see Fig. 1c).We can then state the following.
Fact 2 (IIB equivalent formulation) G, k, is a yes instance of IIB iff there exists a minimal set X such that

Hardness
In this section we prove some hardness properties of Influence-Immunization Bounding with respect to the parameters k, tw, and nd, and to the pair of parameters ( , ) and ( , ζ ).The theorem will follow, since Theorem 3 in [25] proves that CVT-k is W [1]-hard with respect to k.

Parameter
To our aim, we construct the instance Suppose first that G, k − 1, admits a solution.By (4), there exists a minimal set Suppose now X H = X ∪ {s} is a minimum size solution to CVT-k.Then H [X H ] is connected, otherwise the connected component containing s would be a smaller solution.Recalling that in G all thresholds are at most 1, we have that all the nodes in the connected components containing a node with threshold 0 get influenced.Hence, As a consequence, X is a solution to IIB.
The same reduction, recalling that Theorem 5 in [25] proves that CVT-k is W [1]hard with respect to , also gives that IIB is W [1]-hard with respect to ; however, a stronger result is given in the next section.

Parameters and
Theorem 2 IIB is W [2]-hard with respect to the pair of parameters ζ , the number of nodes with threshold 0, and , the size of the immunized set.Given an instance {S 1 , . . ., S m }, A = {a 1 , . . ., a n }, h of HS, we construct an instance G, n + 1, h of IIB (cf. Figure 2).The graph G = (V , E, t) has node set V = I ∪ A ∪ S, where I = {v 0 , . . ., v h } is a set of h + 1 independent nodes, A = {a 1 , . . ., a n } represents the ground set, and S = {s 1 , . . ., s m } (each s j represents the set S j ), edge set and threshold function defined by We prove now that {S 1 , . . ., S m }, A, h is a yes instance of HS if and only if G, n + 1, h is a yes instance of IIB.
Suppose first there exists If we consider in G the set of nodes Ỹ ⊆ A corresponding to the elements of H then each node s t ∈ S is connected with a node in Ỹ .Consequently, if all the nodes in Ỹ are immunized, then the number of influenced neighbors of s t cannot reach its threshold t(s t ) = d G (s t ).Hence, no node in S can get influenced.Let then Y be the set obtained by padding Ỹ with nodes in A − Ỹ , so to have Assume now there exists a solution Y of IIB.We notice that:  Using a) and iterating on b) and c), we can assume that Y consists of at most h nodes in A. As a consequence We show now that Indeed, if we assume by contradiction that

Parameters 1 and
We show the W [2]-hardness of IIB with respect to the parameter , the size of the immunized set, even when the maximum degree of the graph is at most 3.
Given an instance {S 1 , . . ., S m }, A = {a 1 , . . ., a n }, h of HS, we construct an instance G, k, of IIB, where the maximum node degree is 3.We start the construction of G by inserting the nodes in A ∪ W ∪ U ∪ S where A = {a 1 , . . ., a n } represents the ground set and S = {s 1 , . . ., s m } (each s j represents the set S j ), while W and U are two auxiliary sets, of at most nm nodes each, that will be used to keep the degree bounded and, at the same time, simulating a complete bipartite connection between A and S (depicted using gray connection in Fig. 3c).We then add the following expansion, reduction and path gadgets.

Expansion gadgets
For each i ∈ [n], if the sets containing a i are exactly S i 1 , S i 2 , . . ., S i δ i then we encode these relationships with a gadget.Namely, we add and the edges (a i , w i,i 1 ) and (w i,i j , w i,i j+1 ) for j ∈ [δ i − 1].See Fig. 3a.
Path gadgets.We complete the construction by adding m paths each of n + 2nm nodes, which depart from each s j ∈ S. See Fig. 3c.
Notice that, by construction each node has degree at most 3.We set now the thresholds of the nodes in G as: -hard with respect to the parameter , the size of the immunized set, even when the maximum degree of the graph is at most 3.
Suppose first that there exists a set H ⊆ A such that |H | ≤ h and H ∩ S j = ∅ for each j ∈ [m].Consider in G the set of nodes Y corresponding to the elements of H . Since H ∩ S j = ∅, for each j ∈ [m], we have that each node s j ∈ S is connected, through a reduction gadget, with a node in w i, j such that a i ∈ S j ∩ Y .Consequently, if all the nodes in Y are immunized, then at least one node in the reduction gadget associated to s j cannot reach the threshold and consequently s j will not be influenced.Hence, no node in S as well as in the associated path gadgets can get influenced.We have |Y | ≤ h and |D G,Y | < n + 2nm, where the last inequality follows noticing that n + 2nm is greater than the number of nodes that remain in G once we eliminate the nodes in S and in the path gadgets.
Assume now there exists a solution Y to IIB such that |Y | ≤ h and |D G,Y | ≤ n + 2nm.Without loss of generality, we can assume that Y ⊆ A. Indeed, if Y contains either of the nodes w i,i j , u i,i j , s i j or a node in the path P i j , for some i ∈ [n], we could replace such a node by a i ∈ A without increasing neither the size of Y nor the size of D G,Y .Hence, we have that Y consists of at most h nodes in A. We argue that the set H ⊆ A of the elements corresponding to the nodes in Y satisfies H ∩ S j = ∅, for each j ∈ [m].Indeed, assume by contradiction that there is a set S j such that H ∩ S j = ∅.This implies that in G the node s j will be influenced.Indeed, s j is connected through gadgets, to all the nodes in S j .Moreover each node in S j belongs to A − Y and has threshold 0. It follows that s j and, as a consequence, all the n + 2nm nodes on the associated path get influenced and we obtain the desired contradiction because this violate the bound on the size of D G,Y .

Graphs of Bounded Treewidth
In this section we show that IIB is W [1]-hard with respect to the treewidth parameter.
where T is a tree and each u ∈ V (T ) is assigned a node subset W u ⊆ V such that: The width of a tree decomposition (T , The treewidth of G, denoted by tw(G), is the minimum width over all tree decompositions of G.We show that IIB is W [1]-hard with respect to the treewidth parameter.
In order to prove that IIB is W [1]-hard with respect to the treewidth, we present a reduction from Multi-Colored clique (MQ): Given a graph G = (V , E) and a proper vertex-coloring c : V → [q] for G, does G contain a clique of size q?
It is worth noticing that a node v can belong to a multi-colored clique only if {v} ∪ G (v) contains at least one node from each color class.Hence, in the following we will assume that all the nodes that do not satisfy such a property are removed from G, since they are irrelevant to the problem.
Given an instance G, q of MQ, we construct an instance G = (V , E ), k, of IIB.We denote by n = |V | the number of nodes in G .For a color c ∈ [q], we denote by V c the class of nodes in G of color c and for a pair of distinct c, d ∈ [q], we let E cd be the subset of edges in G between a node in V c and one in V d .
Our goal is to guarantee that any optimal solution of IIB in G encodes a clique in G and vice-versa.Following some ideas in [3], we construct G using the following gadgets: Parallel-paths gadget: A parallel-paths gadget of size h, between nodes x and y, consists of h disjoint paths each built by a connection node which is adjacent to both x and y.In order to avoid cluttering, we draw such a gadget as an edge with label h (cf. Figure 4a).

Selection gadgets: The selection gadgets encode the selection of nodes (nodeselection gadgets) and edges (edge-selection gadgets):
Node-selection gadget: For each c ∈ [q], we construct a c-node-selection gadget which consists of a node x v for each v ∈ V c ; these nodes are referred to as nodeselection nodes.We then add a guard node g c that is connected to all the other nodes in the gadget; thus the gadget is a star centered at g c .Edge-selection gadget: For each c, d ∈ [q] with c = d, we construct a {c, d}edge-selection gadget which consists of a node x u,v for every edge (u, v) ∈ E cd ; these nodes are referred to as edge-selection nodes.We then add a guard node g cd that is connected to all the other nodes in the gadget; thus the gadget is a star centered at g cd .
Overall there are n node-selection nodes with q guard nodes and m edge-selection nodes with q 2 guard nodes (cf. Figure 4b).Validation gadgets: We assign to every node v ∈ V (G) two unique identifier numbers, low(v) and high(v), with low(v) ∈ [n] and high(v) = 2n − low(v).For every pair of distinct c, d ∈ [q], we construct two validation gadgets.One between the c-node-selection gadget and the {c, d}-edge-selection gadget and one between the dnode-selection gadget and the {c, d}-edge-selection gadget.We describe the validation gadget between the c-node-selection and {c, d}-edge-selection gadgets.It consists of two nodes.The first one is connected to each node x v , for v ∈ V c , by parallel-paths gadgets of size high(v), and to each edge-selection node x u,v , for (u, v) ∈ E cd and v ∈ V c , by parallel-paths gadgets of size low(v).The other node is connected to each node x v , for v ∈ V c , by parallel-paths gadgets of size low(v), and to each edgeselection node x u,v , for (u, v) ∈ E cd and v ∈ V c , by parallel-paths gadgets of size high(v).Overall, there are q(q − 1) validation gadgets, each composed of two nodes.

Black-hole gadget:
Finally we add a gadget, which will force the immunizing set Y to contain at least one node for each selection gadget.We add a set B of |B| = (n − q)(2nq − 2n + 1) + m − q 2 (4n + 1) independent nodes and a complete bipartite graph between nodes in B and the guard nodes.
To complete the construction, we specify the thresholds of the nodes in The complete construction of G for an instance of the MQ problem appears in Fig. 4b.In order to prove the desired hardness result, we show that the reduction is correct and that G has treewidth O(q 2 ).

Theorem 4 IIB is W [1]-hard with respect to the treewidth of the input graph.
Proof We first prove that G, q is a yes instance of MQ if and only if G , k, , where k = (n − q)(2nq − 2n + 1) + m − q 2 (4n + 1) and = q + q 2 , is a yes instance of IIB.
Suppose that K = (V (K ), E(K )) is a multi-colored clique in G of size q.Let C denote the set of all the connection nodes in G and let We show that ∈ E(K )} have threshold 0 and their neighbors in C have threshold 1. Recalling that for each v ∈ V (G), the set {v} ∪ G (v) contains at least one node from each color class (as already noticed, nodes which do not satisfy this property are irrelevant for the problem and can be removed beforehand), we can easily evaluate the size of X .Indeed X is composed of: • n −q nodes in the set of node-selection nodes and their (n −q)2n(q −1) neighbors in C. Indeed, each node-selection node is connected with q − 1 validation pairs and, for each node x u , we have low(u) + high(u) = 2n.• m − q 2 nodes in the set of edge-selection nodes and their (m − q 2 )4n neighbors in C. Indeed, each edge-selection node is connected with two validation pairs and for each node x u,v we have that low(u) Overall the set X has size It remains to show that Y = Y (X ).First of all, we observe that Y ⊆ Y (X ) because all the nodes in Y belongs to V − X and have threshold 0, hence, by Definition 2, each node in Y belongs to Y (X ).We show now that for any • Each guard node g has a neighbor in Y and its threshold is equal to the number of its neighbors belonging to its selection gadget.Hence, • Consider now the validation nodes.Knowing that K is a multi-colored clique, we have that for each validation pair there is exactly one node u and one edge (u, v) such that x u , x u,v ∈ Y .Hence, both nodes have exactly low(•) + high(•) = 2n neighbors which do not belong to X .Since the threshold of each validation node • Finally, for each connection node c / ∈ X , we have Assume now there exists a solution Y to IIB such that |Y | ≤ = q + q 2 and Noticing that k < |B| + 1 and all the nodes in B get influences as soon as a guard node is, we have that the immunization of Y saves all the guard nodes.
Noticing that the number of guard nodes is exactly q + q 2 and each guard node is connected to a distinct set of selection nodes, we have that |Y | = q + q 2 and each node in Y can save one guard node.
Recalling that the thresholds of guard nodes is equal to the number of neighbors belonging to the corresponding selection gadget, we have that in order to save a guard node there are two options: Put the guard node in Y or put in Y one of its neighbors, belonging to the corresponding selection gadget.Without loss of generality, we can assume that Y does not include any guard node.Indeed, if Y contains a guard node we could replace such a node by one of its selection node neighbors without increasing neither the size of Y nor the size of D G ,Y .
We can then assume that Y is composed of exactly q node-selection nodes and Let c, d be the colors of v and u, respectively.Let x w,z be the node in G which save the guard g cd associated to the pair c, d.Since (u, v) / ∈ E we have that w = u or z = v or both.Without loss of generality, we can assume that w = u.Consider now the validation pair between the c-node-and {c, d}-edge-selection gadgets.Recalling that Y contains exactly one node for each selection gadget, we have that both the nodes in the validation pair have all the neighbors influenced, except for the connections of the nodes x u and x w,z .Since w = u, we have that one of the nodes in the validation pair will get influenced.This is because for any w = u either high(w) + low(u) < 2n or low(w) + high(u) < 2n.That is, there is a validation node x having less than 2n not influenced neighbors, while all the remaining neighbors get influenced.Recalling that the threshold of x is d G (x) − 2n + 1, we have that x get influenced.
Hence, |D G ,Y | = k + 1. Indeed k are due to non immunized selection nodes and their connection neighbors (see ( 5)) plus at least one validation node.This contradicts (6).
We show now that G admits a tree decomposition of width O(q 2 ).The complete bipartite network defined by the guard nodes and the nodes in B has treewidth q + q 2 .Indeed, let A be the set of the guard nodes of size q + q 2 and b 1 , b 2 , . . ., b |B| the nodes in B, the decomposition tree has A as root and A ∪ b i as children.
Then we can add to this network the q + q 2 trees, rooted on the guard nodes and containing both selections and connection nodes, without increasing the treewidth.Finally we can add all O(q 2 ) validation nodes, getting a tree decomposition of width O(q 2 ) for G .

Graphs of Bounded Neighborhood Diversity
In this section we prove that IIB is W [1]-hard on graphs of bounded neighborhood diversity.First of all we define the neighborhood diversity of a graph.
Given a graph G = (V , E), two nodes u, v ∈ V are said to have the same type if The neighborhood diversity of a graph G, introduced by Lampis in [37] and denoted by nd(G), is the minimum number nd of sets in a partition V 1 , V 2 , . . ., V nd , of the node set V , such that all the nodes in V i have the same type, for i ∈ [nd].The family {V 1 , V 2 , . . ., V nd } is called the type partition of G. Notice that each V i induces either a clique or an independent set in G.Moreover, for each V i , V j in the type partition, we get that either each node in V i is a neighbor of each node in V j or no node in V i has a neighbor in V j .Hence, between each pair V i and V j , there is either a complete bipartite graph or no edges at all.
In order to prove that IIB is W[1]-hard with respect to the neighborhood diversity, we use a reduction from Multi-Colored clique (MQ), defined in Sect.4.4.As before, we refer to V c as a color class of G and to E cd as the set of edges between nodes in the color classes V c and V d .Here we will use the fact that MQ remains W[1]-hard even if each color class has the same size and for each distinct colors c, d ∈ [q], the set E cd has the same size [17].We then denote by r + 1 the size of each color class V c and by s + 1 the size of each set E cd , in particular we use the following notation and refer to v c i and e cd j as the i-th node in V c and the j-th edge in E cd , respectively.Let G, q be an instance of MQ.We describe a reduction from G, q to an instance G , k, of IIB such that nd(G ) is O(q 2 ).
In order to present the reduction we introduce some gadgets that are used in the construction of G .They are inspired by those used in [19].The rationale behind the construction is the following.First, we create two sets of gadgets (Selection and Multiple gadgets), which encode in G the selection of nodes and edges as part of a potential multicolored clique in G. Then we create another set of gadgets (Incidence gadgets) that is used to check whether the selected sets of nodes and edges actually represent a multicolored clique in G. Our goal is to guarantee that any solution of IIB in G encodes a clique in G and vice-versa.
In the following we call an independent set of nodes of a graph sharing all neighbors a bag.So, a connection between two bags points out a complete bipartite graph among the nodes in the bags.Figure 5 shows the gadgets we are going to introduce and how they are connected.
Selection Gadget.For each c ∈ [q], the selection gadget L c consists of three bags: L c -neg and L c -pos of r nodes each, and L c -guard of + 1 nodes (the value , representing an upper bound on the number of nodes to be immunized, will be determined later).The bag L c -guard is connected to both L c -neg and L c -pos.The selection gadget L c is connected to the rest of the graph G using only nodes from L c -neg ∪ L c -pos.We set now the thresholds of the nodes in L c as: Multiple Gadget.For each c, d ∈ [q] with c = d, we create a multiple gadget M cd consisting of six bags: L cd -pos and L cd -neg of 2rs nodes each, L cd -guard of + 1 nodes, M cd -pos and M cd -neg of s + 1 nodes each, and M cd -guard of + 1 nodes.M cd -guard is connected to the bags M cd -pos and M cd -neg.M cd -pos is connected to L cd -pos, and M cd -neg is connected to L cd -neg.Finally, the bag L cd -guard is connected to both L cd -pos and L cd -neg.The rest of graph G is connected only to the bags L cd -pos and L cd -neg.We set now the thresholds of the nodes in M cd as: Recalling that there are s + 1 edges in the set E cd , and that there are s + 1 nodes in I c:cd -pos and I c:cd -neg, we create one-to-one correspondences between E cd and I c:cd -pos and between E cd and I c:cd -neg.Namely, for each j = 0, . . .s, we associate the j-th edge e cd j in E cd (cfr.( 7)) to a node u j ∈ I c:cd -pos and to a node w j ∈ I c:cd -neg (with u j = u j and w j = w j , for j = j ).Moreover, if the endpoint of e cd j of color c is the ith node v c i of V c (cfr. ( 7)) then we set the thresholds of the nodes in I c:cd as: It is worth observing that the nodes in I c:cd -pos (respectively, I c:cd -neg) have different thresholds.Indeed, the numbers i + 1 + 2r j (respectively, r − i + 1 + 2r (s − j)) are all different, for 0 ≤ i ≤ r and 0 ≤ j ≤ s.
Black-hole Gadget.Finally we add a gadget, which will force the immunizing set Y to contain a specific number of nodes for selection (r nodes) and multiple gadgets (2rs nodes).We add a bag B of |B| = k (the value k will be determined later) nodes and connect it to the guard bags in all the selection, multiple and incidence gadgets.For each v ∈ B, we set t(v) = 1.
The value of k and are set to k = qr + q 2 (2r + 3)s and = qr + q 2 2rs.In order to prove the desired result, we need the following lemmata 1 and 4.

Lemma 1
If G, q is a yes instance of MQ then G , k, is a yes instance of IIB.
Proof Let K = (V (K ), E(K )) be a multicolored clique of G.We will show how to select nodes to be added to the immunizing set Y according to the nodes in K .First of all notice that, all the nodes in the bags L c -pos, L c -neg, L cd -pos, and L cd -neg belong to Y ∪ D G ,Y , as they all have threshold zero.
For each c ∈ [q], if the unique node of color c in K is v c i , the i-th node in V c , then we add i nodes of L c -neg and r − i nodes of L c -pos to Y .For each pair of distinct c, d ∈ [q], if the unique edge with endpoints of colors c and d in K is e cd j , then we add 2r j nodes of L cd -neg and 2r (s − j) nodes of L cd -pos to Y .Overall, |Y | = = qr + q 2 2rs.We now prove that |D G ,Y | = k = qr + q 2 (2r + 3)s.Consider the diffusion process in V (G ) − Y .At the first round, all non immunized nodes with threshold zero are influenced; hence D G ,Y [1] contains: i nodes of L c -pos and r − i nodes of L c -neg, for all c ∈ [q], 2r j nodes of L cd -pos, 2r (s − j) nodes of L cd -neg, for all c, d ∈ [q] with c = d.
We claim that, at the second round, the additional influenced nodes (in the neighborhood of D G ,Y [1]) are exactly: s nodes in M cd -pos ∪ M cd -neg, s nodes in I c:cd -pos ∪ I c:cd -neg, and s nodes in I d:cd -pos ∪ I d:cd -neg, for each pair of distinct c, d ∈ [q].Indeed, let M cd -pos = {x 0 , . . ., x s } and M cd -neg = {y 0 , . . ., y s }.Since at the end of the first round the nodes in M cd -pos have 2r j influenced neighbors in L cd -pos and the nodes in M cd -neg have 2r (s − j) influenced neighbors in L cd -neg, recalling that t(x j ) = t(y j ) = 2r j + 1, we have that nodes x 0 , . . ., x j−1 in M cd -pos and nodes y 0 , . . ., y s− j−1 in M cd -neg get influenced.Overall s nodes in M cd -pos ∪ M cd -neg are influenced at the second round.Consider now the incidence gadgets.Since there are 2r j + i influenced nodes in L c -pos ∪ L cd -pos that are in neighborhood of the nodes in I c:cd -pos, recalling that the thresholds of nodes in I c:cd -pos are: Hence, nodes u 0 , . . ., u j−1 in I c:cd -pos are influenced at the second round.We now make a similar analysis for the nodes in I c:cd -neg.Since there are 2r (s − j) + r − i influenced nodes in L c -neg ∪ L cd -neg that are in neighborhood of the nodes in I c:cd -neg, recalling that the threshold of nodes in I c:cd -neg are: Hence, nodes w j+1 , . . ., w s in I c:cd -neg are influenced at the second round.Overall, we have that s nodes in I c:cd -pos ∪ I c:cd -neg are influenced at the second round.
Using exactly the same argument we can show that s nodes in I d:cd -pos ∪ I d:cd -neg are influenced at the second round.Finally, the nodes in L c -guard (resp.L cd -guard) have r (resp.2rs) influenced neighbors at the end of the first round and since all of them have threshold r + 1 (resp.2rs + 1), we have that none of them gets influenced at the second round.
We notice now that only the nodes in M cd -guard and I c:cd -guard have neighbors in D G ,Y [2].However, they cannot be influenced (indeed, each of them has threshold s +1 but it has only s influenced neighbors in D G ,Y [2] -either in M cd -pos ∪ M cd -neg or in I c:cd -pos ∪ I c:cd -neg).We have that D G ,Y [3] = D G ,Y [2] and the diffusion process stops.
Summarizing, D G ,Y contains: r influenced nodes for each of the q nodes in the clique K (those that are influenced in the selection gadgets L c for c ∈ [q]), 2rs + s influenced nodes for each of the q 2 edges in K (those in the multiple gadgets M cd , for c, d ∈ [q]) and 2s influenced nodes, for each of the q 2 edges in K (those in the incidence gadgets I c:cd and I d:cd , for distinct c, d ∈ [q]).Hence, the set D G ,Y contains k = qr + q 2 (2r + 3)s nodes.
Let Y be an immunizing set such that |Y | ≤ = qr + q 2 2rs and |D G ,Y | ≤ k = qr + q 2 (2r + 3)s.In the following we derive some useful constraints on the nodes contained in Y and D G ,Y .

Lemma 2 For distinct c, d ∈ [q]
, no node in L c -guard, L cd -guard, I c:cd -guard, I d:cd -guard, M cd -guard can be in D G ,Y .
Proof Since the threshold of each v ∈ B is t(v) = 1, it is sufficient that at least one guard node g ∈ L c -guard ∪ L cd -guard ∪ I c:cd -guard ∪ I d:cd -guard ∪ M cd -guard is influenced to influence the whole B. However this cannot be since

a multiple of 2r nodes of L cd -pos and L cd -neg.
Proof First of all notice that all the nodes in L c -pos, L c -neg, L cd -pos, and L cd -neg have threshold zero, and consequently belong to Y ∪ D G ,Y .We claim that at most r of the nodes of (L c -pos However, by Lemma 2, no node in L c -guard can be influenced.Moreover, it cannot occur that all the nodes in L c -guard are immunized, since Using the same argument we can prove that at most 2rs of the nodes of (L cd -pos ∪ L cd -neg) can be in D G ,Y .
This allows to say that Y contains at least r nodes of (L c -pos ∪ L c -neg) and at least 2rs nodes of (L cd -pos ∪ L cd -neg).However, if there exists c ∈ [q] or a pair of distinct c, d ∈ [q] such that Y contains strictly more than r nodes of (L c -pos ∪ L c -neg) or 2rs nodes of (L cd -pos ∪ L cd -neg), then |Y | > qr + q 2 2rs and this is not possible.Hence, 1) and 2) follow.
To prove that 3) holds, we proceed by contradiction.Suppose that D G ,Y contains 2ra + z nodes of L cd -pos, for some a < s and 0 < z < 2r .By 2) we have that D G ,Y contains 2r (s − a) − z nodes of L cd -neg.Let M cd -pos = {x 0 , . . ., x s } and M cd -neg = {y 0 , . . ., y s }.Recalling that the nodes in M cd -pos are neighbors of those in L cd -pos, the nodes in M cd -neg are neighbors of those in L cd -neg and t(x i ) = t(y i ) = 2ri + 1, we have that nodes x 0 , . . ., x a of M cd -pos and nodes y 0 , . . ., y s−a−1 of M cd -neg get influenced.Since these s + 1 influenced nodes are neighbors of each node g ∈ M cd -guard, whose threshold is t(g) = s + 1, it follows that either g is influenced or it is immunized.By Lemma 2, no node in M cd -guard can be influenced.On the other hand, it cannot occur that all the nodes in M cd -guard are immunized, since |M cd -guard| = + 1 > |Y | and we obtain the desired contradiction.
We proceed by identifying the clique K of G according to the number of nodes that are in L c -neg ∩ Y for each c ∈ [q] and in L cd -neg ∩ Y , for each distinct c, d ∈ [q].Namely, we select: The above selection is correct since, by Lemma 3, we know that in particular, Y contains a multiple of 2r nodes of both L cd -pos and L cd -neg.Let V (K ) be the set of the q selected nodes and E(K ) be the set of the q 2 selected edges.We argue that K = (V (K ), E(K )) is a clique.By contradiction assume there are two distinct colors c, d ∈ [q] such that v c i ∈ V (K ) and e cd j ∈ E(K ) but v c i is not an endpoint of e cd j .Consider the incidence gadget I c:cd .Let I c:cd -pos = {u 0 , . . ., u s } and I c:cd -neg = {w 0 , . . ., w s }.Assume that v c h is the endpoint of color c of e cd j .Recall that nodes u j and w j represent the edge e cd j and that, by the construction of G , it holds t(u j ) = 2r j + h + 1 and t(w j ) = 2r (s − j) + r − h + 1. Recalling that the nodes of I c:cd -pos have 2r j , we can perform an analysis similar to that in the proof of Lemma 1, thus obtaining that all the nodes u 0 , . . ., u j−1 in I c:cd -pos and w j+1 , . . ., w s in I c:cd -neg get influenced.It remains to analyze the nodes u j and w j .We will prove that at least one of them gets influenced: If h < i then t(u j ) = 2r j + h + 1 ≤ 2r j + i and u j is influenced; if h > i then t(w j ) = 2r (s − j) + r − h + 1 ≤ 2r (s − j) + r − i and w j is influenced.This allows to say that if v c h ∈ e cd j then s + 1 nodes among those in I c:cd -pos and I c:cd -neg are influenced.As a consequence, each node g ∈ I c:cd -guard, whose threshold is t(g) = s + 1, must either be influenced or immunized.By Lemma 2, no node in I c:cd -guard can be influenced.On the other hand, it cannot occur that all the nodes in I c:cd -guard are immunized, since |I c:cd -guard| = + 1 > |Y | and we obtain the desired contradiction.

Theorem 5 IIB is W[1]-hard with respect to the neighborhood diversity of the input graph.
Proof By the above Lemmas, we have that G, q is a yes instance of MQ iff G , k, is a yes instance of IIB, where k = qr + q 2 (2r + 3)s, = qr + q 2 2rs.We complete the proof by showing that G has neighborhood diversity O(q 2 ).Since each bag in G is a type set in the type partition of G and, since for each c ∈ [q], there are three bags in L c and, for each c, d ∈ [q] with c = d there are six bags in M cd , and three bags in both I c:cd and I d:cd , we have that the neighborhood diversity of G is 3q + 12 q 2 .

FPT Algorithms
In this section, we present FPT algorithms for several pairs of parameters.

Parameters k and
For such a pair of parameters, we observe that the fixed parameter tractability of IIB with respect to k + can be proved by the arguments used in Theorem 1 of [25] for the problem cutting at most k vertices with terminal.For the sake of completeness, the proof is given in the following.
Theorem 6 IIB can be solved in time (1) .
Proof Let G, k, be the input instance of IIB.Consider a random labelling of the nodes of G, where each node is independently assigned either 0 or 1 with equal probability.Let now We estimate now the number of needed iterations of random labelling.Suppose G contains a set X satisfying (4).For such a set, it holds then a random labelling identifies a solution of IIB if and only if all the nodes in X are labelled 1 and all the nodes in Y (X ) are labelled 0, that is, Indeed, in such a case the above procedure identifies D H = X as a solution.This happens with probability 2 −(|D H |+|Y (D H )|) ≥ 2 −(k+ ) .Hence, the algorithm requires time 2 k+ n O (1) .
A derandomization of the above process can be done using universal sets.A (n, i)universal set is a collection of binary vectors of length n such that for each set of i indices, each of the 2 i possible combinations of values appears in some vector of the set.To run the algorithm, it suffices to try all labellings induced by a (n, k+ )-universal set.Naor et al. [18] give a construction of (n, i)-universal sets of size 2 i i O(log i) log n that can be listed in linear time.We notice that in G, the solution set X (cfr.( 4)) can be disconnected but any of its connected components must include at least one node of threshold 0. Hence, in G the nodes in X are now connected through a path in the -ry tree.This implies that there exists X ⊆ V such that: X ⊆ X , (X − X ) ⊆ V − V , and G [X ] is connected.In particular, if s is the root of the tree, we can assume that s ∈ X .In the worst case, all the paths within the -ry tree go through the root s, hence |X | ≤ |X | log ζ + 1.

Parameters k and
Let k = k log ζ +1.We use the following result [36], Lemma 2: There are at most 4 k k connected subgraphs that contain s and have order at most k .Furthermore, these subgraphs can be enumerated in O( 4 log 4 (2n 2 ) ≤ 8ζ 3k n 3 .We can then apply the result in [36] to enumerate all the connected subgraphs of G of size up to k .For each candidate set X (the node set of the current connected subgraph) one has to determine whether X ∩ V is a solution according to (4), which can be done in O(n 2 ) time.

Parameters k (or 1) and Treewidth
We present an algorithm that makes use of the nice tree decomposition of a graph [34].Consider a graph G = (V , E) with treewidth tw and nice tree decomposition (T , {W u } u∈V (T ) ).Let T be rooted at node r and denoted by T (u) the subtree of T rooted at u, for any node u of T .Moreover, we denote by W (u) the union of all the bags in T (u), i.e., W (u) = v∈T (u) W v .We will denote by s u = |W u | the size of W u .
We recursively compute the solution of IDM.The algorithm exploits a dynamic programming strategy and traverses the input tree T in a breadth-first fashion.Fix a node u in T , in order to be able to recursively reconstruct the solution, we calculate optimal solutions under different hypotheses based on the following considerations: • For each node v ∈ W u we have three cases: v gets influenced, v is immunized, or v is safe.We are going to consider all the 3 s u combinations of such states with respect to some solution of the problem.We denote each combination with a vector C of size s u indexed by the elements of W u , where the element indexed by v ∈ W u denotes the state influenced (0), immunized (1), safe (2) of node v.The configuration C = ∅ denotes the vector of length 0 corresponding to an empty bag.We denote by C u the family of all the 3 s u possible state vectors of the s u nodes in W u .
• Let U be a subset of V (G).Let us first notice that by 3) of Definition 3, all the edges between nodes in V − W (u) and W (u) connect a node in V − W (u) with a node in W u (the bag corresponding to the root of T (u)).We are going to consider all the possible contribution to the diffusion process, of nodes in V − W (u); that is, for each v ∈ W u , we consider all the possible thresholds among t(v), t(v) − 1, . . ., t(v) − min{k, t(v)} (recall that at most k nodes belong to X and can therefore reduce the threshold of v).We notice that, for each node v, it is possible to bound the number of thresholds to be considered by the value min{k, t(v)}.Moreover, since no node with t(v) > d G (v) can be influenced and we can purge such nodes from G in a preprocessing step, we can assume that in G it holds (max v∈V t(v)) ≤ .
As a consequence, we will have up to μ s u threshold combinations, where μ = min{k, }.We will denote each possible threshold combination with a vector T , indexed by the s u elements in W u , where the element indexed by v belongs to {max{0, t(v) − k}, . . ., t(v)} and denotes the threshold of v ∈ W u .The configuration T = ∅ denotes the vector of length 0 corresponding to an empty bag.We denote by T u the family of all the possible threshold combinations of nodes in W u .
The following definition introduces the values that will be computed by the algorithm in order to keep track of all the above cases: Definition 5 For each node u ∈ T , each j = 0, . . ., , C ∈ C u and T ∈ T u we denote by X u ( j, C, T ) the minimum number of influenced nodes one can attain in G[W (u)] by immunizing at most j nodes in W (u), where the states and the thresholds of nodes in W u are given by C and T .
By noticing that the root r of a nice tree decomposition has W r = ∅, we have that the solution of the IDM instance G, can be obtained by computing X r ( , ∅, ∅).For each leaf u ∈ T and for each j = 0, . . ., we have X u ( j, ∅, ∅) = 0.For any internal node u, we show how to compute each values X u ( j, C, T ), for each j = 0, . . ., , C ∈ C u , and T ∈ T u in time O(2 tw + ).
We have three cases to consider according to the type of u (cf.Definition 4): 1) Node u is an introduce node.In this case u has exactly one child u and we have that W u = W u ∪ {v} for some node v / ∈ W u .For a given node u ∈ V (T ) (introducing a node v ∈ V ) and state configuration C, we denote by S u (C) the set of influenced nodes (according to the configuration C) that belongs to W u ∩ G (v).Given a threshold configuration T associated to a set of nodes W , and a set of nodes S ⊆ W , we denote by T (S) the configuration obtained starting from T and decreasing by one the threshold of each node in S. In the following we assume w.l.o.g. that the element indexed by v is the last element of the vectors C and T .We have that for each j = 0, . . ., , each C ∈ C u and each T ∈ T u .
It is worth to observe that the size of S u (C) is bounded by tw and for this reason the above value can be computed in time O(2 tw ) 2) Node u is a forget node.In this case u has exactly one child u and we have that W u = W u ∪ {v} for some node v / ∈ W u .We have for each j = 0, . . ., , each C ∈ C u , and each 3) Node u is a join node.In this case u has exactly two child u 1 , u 2 such that We have for each j = 0, . . ., , each C ∈ C u , and each where I (C) denotes the number of immunized nodes in the configuration state C.

123
Proof By using Lemma 18 in [34], we have that the desired value X r ( , ∅, ∅), which corresponds to the solution of the IDM instance G, , can be computed in time O(ntw(2 tw + ) 3 tw μ tw ).The optimal set X can be computed in the same time by standard backtracking techniques.

Graphs of Bounded Neighborhood Diversity
We give FPT algorithms for IIB with respect to both the pairs (k, nd) and ( , nd).
We first present some result that will be useful in the rest of this section.
Let {V 1 , V 2 , . . ., V nd } be the type partition of G. Below, we assume that the nodes of each V i = {v i,1 , . . ., v i,|V i | } are sorted in non-decreasing order of thresholds, i.e., t(v i, j ) ≤ t(v i, j+1 ).

Proof
We first prove (i).Consider X = X − {u max } ∪ {v} and the diffusion process in G[X ].We have that v is influenced at a round which is at most equal to that in which u max is influenced during the diffusion process in G[X ] (recall t(v) ≤ t(u max ) and that v and u max have the same neighbors).Furthermore, since all the neighbors of v and u max have the same number of neighbors in X as in X we have that all the nodes in X are influenced, that is X = D G[X ] , and u max ∈ Y (X ).This allows to say that |Y

Parameters nd and k
Algorithm IIB-k below constructs one candidate set for each nd-ple ( f 1 , . . ., f nd ), where Proof Given f ≤ k, Algorithm IIB-k(G, k, ) considers all the possible nd-ples ( f 1 , f 2 , . . ., f nd ) with nd i=1 f i = f ; for each f = ( f 1 , f 2 , . . ., f nd ) it constructs the set X = nd i=1 X i where X i consists of the first (e.g. with the smallest thresholds) f i nodes in V i .Then it computes the immunizing set of X , Y (x) (cf.Definition 2).If |Y (X )| ≤ then we answer yes.In case no f gives a set X such that |Y (X )| ≤ , we answer no.
We show now that Algorithm IIB-k outputs yes iff there exists X satisfying (4).
If the output of Algorithm IIB-k is yes then trivially the current set X has |X | ≤ k and its immunizing set |Y (X )| ≤ .
Define Xi = X ∩ V i and let | Xi | = f i , for i ∈ [nd].Clearly, nd i=1 f i = f .Consider the nd-ple f = ( f 1 , f 2 , . . ., f nd ) and the set X = nd i=1 X i constructed at line 4 of algorithm IIB-nd-k.Recall that |X i | = f i and t(v) ≤ t(w) for each v ∈ X i and w ∈ V i − X i , for each i ∈ [nd].We show that the algorithm outputs yes on X .
Fix any i ∈ [nd].Knowing that | Xi | = |X i | = f i , we have that if Xi = X i , then there exists u ∈ Xi − X i and v ∈ X i − Xi such that t(v) ≤ t(u).W.l.o.g assume that u is the node with maximum threshold in Xi − X i .Since X = D G[ X ] , we have that u has at least t(u) neighbors in X .Furthermore, since v, u ∈ V i we have that u and v have the same neighbors.Hence, v has at least t(u) ≥ t(v) neighbors in X .As a consequence, since v / ∈ X we have v ∈ Y ( X ).Consider X = X − {u} ∪ {v}.By (i) in Lemma 7,  Hence, trading each node in Xi − X i for one in X i − Xi , for each i such that Xi = X i , we can prove that |Y (X )| = |Y ( X )| ≤ .Therefore, the algorithm returns yes.Now we evaluate the running time of the algorithm.For each fixed f ∈ [k], the number of all the possible nd-ples ( f 1 , . . ., f nd ) with nd . Noticing that for each choice of ( f 1 , . . ., f nd ) one needs time O( f ) to construct X and O(n 2 ) to obtain Y (X ) and that the desired result follows.

Parameters nd and
An idea similar to that in Algorithm 1 can be used to prove IIB is FPT with respect to nd and .

Algorithm 2 IIB-(G, k, )
Input: A graph G = (V , E, t), integers k, and a type partition V 1 , . . ., V nd of G.  Since | Ỹi | = |Y i | = h i , we have that if Ỹi = Y i , for some i, then there are v ∈ Ỹi − Y i and u ∈ Y i − Ỹi such that t(u) ≤ t(v).W.l.o.g select u as the node with minimum threshold in Y i − Ỹi and v as the node with maximum threshold in Ỹi − Y i .By the fact that v ∈ Ỹ and Ỹ is minimal, we know that v must have at least t(v) neighbors in D G, Ỹ (otherwise, Ỹ − {v} would be a smaller solution).Furthermore, since v, u ∈ V i we have that they have the same neighbors.As a consequence, also u has at least t(v) ≥ t(u) neighbors in D G, Ỹ .Knowing that u / ∈ Ỹ , we have that

Conclusion
We introduced the influence immunization problem on networks under the threshold model and analyzed its parameterized complexity.We considered several parameters and showed that the problem remains intractable with respect to each one.We have also shown that for some pairs (e.g., (ζ , ) and ( , )) the problem remains intractable.On the positive side, the problem was shown to be FPT for some other pairs: (k, ), (k, ζ ), (k, tw), ( , tw), (k, nd) and ( , nd).It would be interesting to assess the parameterized complexity of IIB with respect to the remaining pairs of parameters; in particular with respect to k and .

Fig. 1 A
Fig. 1 A graph G (node thresholds appear in red).a The diffusion process in G. b An example of X whose G[X ] includes nodes not influenced.c An example of immunizing set Y (X ) = {v 3 , v 8 }, which enables to confine the diffusion to X = {v 1 , v 5 } (Color figure online)

Fig. 2
Fig.2The Graph G encoding the HS problem.The big circle on the left represents a set I of h + 1 independent nodes having threshold 0 and sharing all neighbors.The thresholds of nodes appear in red (Color figure online) (a) I ⊆ D G,Y ∪ Y (since all the nodes in I have threshold 0, they are immunized or influenced).(b) If there exists

Fig. 3 a
Fig. 3 a The expansion gadget.b The reduction gadget.c The graph G (Color figure online) thus contradicting the hypothesis that Y is a solution of the instance G, n + 1, h of the IIB problem.Hence, we have that S ∩ D G,Y = ∅, each node in S has some neighbor in Y and the set H of elements corresponding to the h nodes in Y satisfies H ∩ S t = ∅, for each t ∈ [m].

Fig. 4 a
Fig. 4 a Parallel-paths gadget.b Representation of the graph G for a trivial instance of the MQ problemG = (V 1 ∪ V 2 , E 1,2 ), 2 (Color figure online)

Fig. 5
Fig. 5 An overview of the reduction.Each circle represents a bag.The number inside a bag is the number of nodes of the bag.The threshold of nodes in a bag is displayed in red (Color figure online) guard Incidence Gadget.For each pair of distinct c, d ∈ [q], we construct two incidence gadgets: I c:cd (connected with the gadgets L c and M cd ) and I d:cd (connected with the gadgets L d and M cd ).In the following we present the gadget I c:cd which has the same structure as the gadget I d:cd .The incidence gadget I c:cd has three bags I c:cd -pos and I c:cd -neg of s + 1 nodes each, and I c:cd -guard of + 1 nodes.We connect I c:cd -guard to I c:cd -pos and I c:cd -neg.Furthermore, we connect I c:cd -pos to L c -pos and L cd -pos.Similarly, we connect I c:cd -neg to L c -neg and L cd -neg.

Theorem 7
IIB can be solved in time O(ζ 3k n 5 ), where ζ =|{v ∈ V | t(v) = 0}|.Proof Let G, k, be the input instance of IIB.Suppose v 1 , . . .v ζ are the nodes in G having threshold 0 and let denote the maximum degree of a node in G. Consider the graph G = (V , E ) obtained from G by adding the internal nodes and the edges of a -ry tree whose leaves are v 1 , . . .v ζ .Assume G, k, , is a yes instance of IIB.

Definition 4 A 2 Lemma 5 [ 34 ]
tree decomposition (T , {W u } u∈V (T ) ) is called nice if it satisfies conditions 1. and 2.:1.W r = ∅ for r the root of T and W v = ∅ for every leaf v of T .2.Every non-leaf node of T is of one of the following three types:-Introduce: a node u with exactly one child u such that W u = W u ∪ {v} for a node v / ∈ W u .-Forget: a node u with exactly one child u such that W u = W u ∪ {v} for a node v / ∈ W u .-Join: a node u with two children u 1 , u 2 such that W u = W u 1 = W u If a graph G admits a tree decomposition of width at most tw, then it admits a nice tree decomposition of width at most tw.Moreover, given a tree decomposition (T , {W u } u∈V (T ) ) of G of width at most tw, one can compute in time O(tw2 max{|V (T )|, |V (G)|}) a nice tree decomposition of G of width at most tw that has at most O(tw|V (G)|) nodes.We give a dynamic programming algorithm, which exploiting a nice tree decomposition, enables to solve a minimization version of IIB, namely the Influence Diffusion Minimization (IDM): Given a graph G = (V , E, t) and a budget , find a set Y such that |Y | ≤ and |D G,Y | is minimized.

Lemma 6
For each u ∈ T , the computation of X u ( j, C, T ), for each j ∈ {0, . . ., }, state configuration C ∈ C u , and threshold configuration T ∈ T u comprises O( 3 tw μ tw ) values, where μ = min{k, }, each of which can be computed recursively in time O(2 tw + ).Proof We show how use a bottom-up strategy to compute all the values of X u ( j, C, T ), for each u ∈ T , j = 0, . . ., , state configuration C ∈ C u , and threshold configuration T ∈ T u .By Definition 5, we know that such values are O( 3 tw μ tw ), where μ = min{k, }.
X )| = |Y |.We now prove (ii).If we consider the diffusion process in G[V − Y ] we have that no node outside D G,Y − {u}, except eventually for node v max , can be influenced.Hence, D G,Y ⊆ D G,Y − {u} ∪ {v max }.
G and the set D G,Y of influenced nodes when the elements of Y are immunized.If |D G,Y | ≤ k then we answer yes.In case no h gives a set Y such that |D G,Y | ≤ k, we answer no.If Algorithm IIB-nd-returns yes then the set Y constructed by algorithm IIBhas size at most and we know that |D G,Y | ≤ k.Assume now that there exists Ỹ such that | Ỹ | = h ≤ and |D G, Ỹ | ≤ k.Assume w.l.o.g. that no smaller solution exists, that is, for anyY such that |D G,Y | ≤ k it holds |Y | ≥ h.Define Ỹi = Y (D G, Ỹ ) ∩ V i and let | Ỹi | = h i , for i ∈ [nd].Clearly, nd i=1 h i = h.Consider the nd-ple h = (h 1 , h 2 , . . ., h nd ) and the set Y = nd i=1 Y i constructed at line 4 of algorithm IIB-nd-.Recall that |Y i | = h i and t(v) ≤ t(w) for each v ∈ Y i and w ∈ V i − Y i .

u 1 h.
∈ D G, Ỹ .Set Y = Ỹ − {v} ∪ {u}.By (ii) in Lemma 7, we have that D G,Y satisfies |D G,Y | ≤ |D G, Ỹ | ≤ k.Hence, Y is also a solution.Starting from Y , we then can repeat the above reasoning until we get Y r = Y , the immunizing set considered in the algorithm for the tuple h.Hence, |D G,Y | ≤ k.We now evaluate the running time.Fix h ∈ [ ], for each (h 1 , . . ., h nd ) with nd i=1 h i = h, one needs time O(h) to get Y and O(n 2 ) to get D G,Y , moreover the number of all possible such nd-tuple is h+nd−Summing over all h we get h∈[ ] h+nd−1 h < 2 +nd−1 and the theorem holds.
be the graph induced by the set V 1 of nodes having label 1.Consider the set D H of influenced nodes when we run the diffusion process on H .If |D H | ≤ k and |Y (D H )| ≤ then (4) holds for X = D H and we can answer yes.

return yes 4 return no Theorem 10
1 foreach h = 1, . .., do 2 foreach h = (h 1 , h 2 , . .., h nd ) such that nd i=1 h i = h do 3 foreach i ∈ [nd] do let Y i = {v i,1 , . .., v i,h i } ⊆ V i Set Y = nd i=1 Y i if |D G,Y | ≤ k then Algorithm IIB-solves IIB in time O(n 2 2 +nd−1 ).Given h ≤ , Algorithm IIB-(G, k, ) considers all the possible nd-ples (h 1 , h 2 , . .., h nd ) with nd i=1 h i = h; for each h = (h 1 , h 2 , . .., h nd ) we construct the set Y = nd i=1 Y iwhere Y i consists of the first (e.g. with the smallest thresholds) h i nodes in V i .We then consider the diffusion process in