Abstract
A secure set S in a graph is defined as a set of vertices such that for any \(X\subseteq S\) the majority of vertices in the neighborhood of X belongs to S. It is known that deciding whether a set S is secure in a graph is \(\text {co-}\hbox {NP}\)-complete. However, it is still open how this result contributes to the actual complexity of deciding whether, for a given graph G and integer k, a non-empty secure set for G of size at most k exists. While membership in the class \(\Sigma ^{\mathrm{P}}_{2}\) is rather easy to see for this existence problem, showing \(\Sigma ^{\mathrm{P}}_{2}\)-hardness is quite involved. In this paper, we provide such a hardness result, hence classifying the secure set existence problem as \(\Sigma ^{\mathrm{P}}_{2}\)-complete. We do so by first showing hardness for a variantof the problem, which we then reduce step-by-step to secure set existence. In total, we obtain eight new completeness results for different variants of the secure set existence problem.
1 Introduction
Secure sets in graphs were introduced by Brigham et al. [3] as a strengthening of defensive alliances. Secure sets can be applied to, for instance, opinion research for analyzing group behaviour and identifying insusceptible peer groups, or to strategic settings where entities occupy spots on a map such that they can defend themselves against attacks from neighbors. A secure set of a graph \(G=(V,E)\) is a set \(S\subseteq V\) such that for each subset \(X\subseteq S\), the number of vertices in \(N[X]\cap S\) is not less than the number of vertices in \(N[X]\setminus S\), where N[X] denotes the closed neighborhood of X in G, i.e., X together with all vertices adjacent to X. The \(\textsc {Secure~Set}\) problem, which we address in this paper, can be specified as follows: Given a graph \(G=(V,E)\) and an integer k, does there exists a non-empty secure set S of G such that \(|S| \le k\)?
It is known that deciding whether a given set S is secure in a graph is \(\text {co-}\hbox {NP}\)-complete [6], indicating that the problem of finding (non-trivial) secure sets is very hard. Unfortunately, the exact complexity of this problem has so far remained unresolved. This is an unsatisfactory state of affairs because it leaves the possibility open that existing approaches for solving the problem (e.g., [1]) are suboptimal in that they employ unnecessarily powerful programming techniques. Hence we require a precise complexity-theoretic classification of the problem.
The main contribution of our paper is to show that \(\textsc {Secure~Set}\) is \(\Sigma ^{\mathrm{P}}_{2}\)-complete. Unlike the \(\text {co-}\hbox {NP}\)-hardness proof for secure set verificationof [6], which uses a reduction from Dominating Set, we base our proof on a reduction from a problem in the area of logic. To be specific, we first show that the canonical \(\Sigma ^{\mathrm{P}}_{2}\)-complete problem Qsat \(_2\) can be reduced to a variant of \(\textsc {Secure~Set}\) where (i) vertices can be forced to be in or out of every solution, (ii) pairs of vertices can be specified to indicate that every solution must contain exactly one element of each such pair, and (iii) each solution contains exactly a given number of elements. In order to prove the desired complexity result, we then successively reduce this variant to the standard \(\textsc {Secure~Set}\) problem.
Membership in the class \(\Sigma ^{\mathrm{P}}_{2}\) is obvious, as checking if a guessed candidate is indeed a solution can be done with a call to an oracle for \(\text {co-}\hbox {NP}\) [6]; in fact, [1] presents a poly-time reduction to Answer Set Programming [2] and thus implicitly shows this result. Together with our corresponding hardness result, it thus follows that \(\textsc {Secure~Set}\) is \(\Sigma ^{\mathrm{P}}_{2}\)-complete, and it turns out that all the problem variants we consider in this paper are \(\Sigma ^{\mathrm{P}}_{2}\)-complete.
We thus complete the picture of the precise complexity of the \(\textsc {Secure~Set}\) problem. Our results underline that \(\textsc {Secure~Set}\) is among the few rather natural problems in graph theory that are complete for the second layer of the polynomial hierarchy(like, e.g., Clique Coloring [7] or 2-Coloring Extension [8]). Therefore, our results allow us to conclude that approaches as suggested in [1] for solving the problem are indeed adequate from a complexity-theoretic point of view.
2 Background
All graphs in this paper are simple. Given a graph \(G = (V,E)\), the open neighborhood of a vertex \(v \in V\), denoted by \(N_G(v)\), is the set of all vertices adjacent to v, and \(N_G[v] = N_G(v) \cup \{v\}\) is called the closed neighborhood of v. Let \(S \subseteq V\) be a set of vertices. We abuse notation by writing \(N_G(S)\) and \(N_G[S]\) to denote \(\bigcup _{v \in S} N_G(v)\) and \(\bigcup _{v \in S} N_G[v]\), respectively. If it is clear from the context which graph is meant, we write \(N(\cdot )\) and \(N[\cdot ]\) instead of \(N_G(\cdot )\) and \(N_G[\cdot ]\), respectively.
Definition 1
Given a graph \(G = (V,E)\), a set \(S \subseteq V\) is secure in G if for each \(X \subseteq S\) it holds that \({\left|N[X] \cap S \right|} \ge {\left|N[X] \setminus S \right|}\).
We often write “S is secure” instead of “S is secure in G” if it is clear from the context which graph is meant. By definition, the empty set is secure in any graph. Thus, in the following decision problems we ask for secure sets of size at least 1.
The following is our main problem:
Figure 1 shows a graph together with a minimum non-empty secure set \(S = \{a,b,c\}\). Observe that for any \(X \subseteq S\) the condition \({\left|N[X] \cap S \right|} \ge {\left|N[X] \setminus S \right|}\) is satisfied.
We now define three variants of the \(\textsc {Secure~Set}\) problem that we require in our proofs. \(\textsc {Secure~Set}^{\mathrm{F}}\) generalizes the \(\textsc {Secure~Set}\) problem by designating some “forbidden” vertices that may never be in any solution. This variant can be formalized as follows:
\(\textsc {Secure~Set}^\mathrm{FN}\) is a further generalization that, in addition, allows “necessary” vertices to be specified that must occur in every solution.
Finally, we introduce the generalization \(\textsc {Secure~Set}^\mathrm{FNC}\). Here we may state pairs of “complementary” vertices where any solution must contain exactly one element of such a pair.
While the \(\textsc {Secure~Set}\) problem asks for secure sets of size at most k, we also consider the \(\textsc {Exact~Secure~Set}\) problem that concerns secure sets of size exactly k. Note that a secure set may become insecure by adding or removing elements, so this is a non-trivial problem variant. Analogously, we can also define exact versions of the three generalizations of \(\textsc {Secure~Set}\) presented above.
We often use the terms attackers and defenders of a subset X of a secure set candidate S. By these we mean elements of \(N[X] \setminus S\) and \(N[X] \cap S\), respectively. To show that a subset X of a secure set candidate S is not a witness to S being insecure, we sometimes employ the notion of matchings of the attackers of X with dedicated defenders in \(N[X] \cap S\): If we are able to find an injective mapping \(\mu : N[X] \setminus S \rightarrow N[X] \cap S\), then obviously \({\left|N[X] \setminus S \right|} \le {\left|N[X] \cap S \right|}\). Given such a matching \(\mu \), we say that a defender d repels an attack on X by an attacker a whenever \(\mu (a) = d\). When we say that a set of defenders D can repel attacks on X from a set of attackers A, we mean that there is a matching that assigns each element of A a dedicated defender in D.
3 Complexity Results
We prove \(\Sigma ^{\mathrm{P}}_{2}\)-hardness of the \(\textsc {Secure~Set}\) problem and several variants by a chain of polynomial reductions from Qsat \(_2\). Our proof strategy is illustrated in Fig. 2. In Theorem 1, we finally obtain \(\Sigma ^{\mathrm{P}}_{2}\)-completeness for eight problems.
Lemma 1
\(\textsc {Exact~Secure~Set}^\mathrm{FNC}\) is \(\Sigma ^{\mathrm{P}}_{2}\)-hard.
Proof
We reduce from Qsat \(_2\) to \(\textsc {Exact~Secure~Set}^\mathrm{FNC}\). We are given a quantified Boolean formula \(\varphi = \exists x_1 \dots \exists x_{n_x} \forall y_1 \dots \forall y_{n_y} \psi \), where \(\psi \) is in 3-DNF and contains \(n_t\) terms. We assume that no term contains both a variable and its complement (since such a term can never be satisfied) and that each term contains at least one universally quantified variable (since \(\varphi \) is trivially true otherwise).
We construct an instance \((G,k,V_\triangle ,V_\square ,C)\) of \(\textsc {Exact~Secure~Set}^\mathrm{FNC}\), where the set of vertices of \(G = (V,E)\) is the union of the following sets:
Next we define the set of edges. In the following, whenever we speak of a literal in the context of the graph G, we mean the vertex corresponding to that literal (i.e., some \(x_i\), \(\overline{x_i}\), \(y_i\) or \(\overline{y_i}\)), and we proceed similarly for terms. Furthermore, when we are dealing with a literal l, then \(\overline{l}\) shall denote the complement of l. For any term \(t_i\), let \(L_X(t_i)\) and \(L_Y(t_i)\) denote the set of existentially and universally quantified literals, respectively, in \(t_i\).
Finally, we define \(V_\triangle = Y \cup \overline{Y}\cup Y_\triangle \cup Y'_\triangle \cup \overline{T}_\triangle \), \(V_\square = Y_\square \cup \overline{T}_\square \cup T'_\square \cup \overline{T'}_\square \cup H\), \(C = \{(x_i,\overline{x_i}) \mid 1 \le i \le n_x\} \cup \{(t_i,\overline{t_i}), (\overline{t_i},t_i'), (t_i',\overline{t_i'}) \mid 1 \le i \le n_t\}\), and \(k = {\left|V_\triangle \right|} + n_x + 2n_t\). For an illustration, see Fig. 3.
The following observations are crucial: Elements of \(X \cup \overline{X}\) are only adjacent to vertices from \(\overline{T}_\square \) and \(\overline{T}\). For any i, each element of \(X \cup \overline{X}\) is adjacent to \(\overline{t_i}^\square \in \overline{T}_\square \) if and only if it is adjacent to \(\overline{t_i} \in \overline{T}\). Furthermore, for any i, j, if \(x_i\) or \(\overline{x_i}\) is adjacent to \(\overline{t_j}\), then the term \(t_j\) is falsified by setting the variable \(x_i\) to \(\text {true}\) or \(\text {false}\), respectively. Finally, for any i, j, if \(y_i\) or \(\overline{y_i}\) is adjacent to \(\overline{t_j'}\), then the term \(t_j\) is falsified by setting the variable \(y_i\) to \(\text {true}\) or \(\text {false}\), respectively.
We claim that \(\varphi \) is true if and only if \((G,k,V_\triangle ,V_\square ,C)\) is a positive instance of \(\textsc {Exact~Secure~Set}^\mathrm{FNC}\). Since, for each \(\varphi \), the corresponding instance \((G,k,V_\triangle ,V_\square ,C)\) can be constructed in time polynomial in the size of \(\varphi \), \(\Sigma ^{\mathrm{P}}_{2}\)-hardness follows.
“Only if” direction. If \(\varphi \) is true, then there is an assignment I to \(x_1, \dots , x_{n_x}\) such that, for all assignments extending I to \(y_1, \dots , y_{n_y}\), some term in \(\psi \) is satisfied.
We define a set
We observe that \({\left|S \right|} = k\), \(V_\square \cap S = \emptyset \), \(V_\triangle \subseteq S\), and that for any \((a,b) \in C\) it holds that \(a \in S\) if and only if \(b \notin S\). By construction, whenever some element of \(X \cup \overline{X}\) is in S, then all its neighbors in \(\overline{T}\) are in S; and whenever some \(\overline{t_i}\) is in S, then some neighbor of \(\overline{t_i}\) in \(X \cup \overline{X}\) is in S.
We claim that S is a secure set in G. Let R be an arbitrary subset of S. We show that R has at least as many defenders as attackers by matching each attacker of R with a dedicated defender in \(N[R] \cap S\). We distinguish cases regarding the origins of the attacks on R.
-
We match each attacker \(\overline{t_i}^\square \in \overline{T}_\square \) with \(\overline{t_i}\). Since \(\overline{t_i}^\square \) attacks R, R must contain some element of \(X \cup \overline{X}\) that is adjacent to \(\overline{t_i}^\square \) and thus also to \(\overline{t_i}\), so \(\overline{t_i} \in N[R] \cap S\).
-
Each attacker from \(X \cup \overline{X}\cup \{d_1^\square ,d_2^\square \}\) is adjacent to some \(\overline{t_i} \in \overline{T}\cap R\). We match that attacker with \(\overline{t_i}^\triangle \), which is adjacent to \(\overline{t_i}\). Note that it cannot be the case that \(\overline{t_i}\) is attacked by more than one vertex in \(X \cup \overline{X}\cup \{d_1^\square ,d_2^\square \}\) because \(\overline{t_i}\) has exactly two neighbors from that set and would not be in S if neither of these neighbors was in S.
-
If \(\overline{t}^\square \) attacks R, then it attacks at least one element of \(\overline{T}\cap R\), which is adjacent to some element of \(X \cup \overline{X}\) that is also in S. We match \(\overline{t}^\square \) with any such element of \(X \cup \overline{X}\).
-
Any attack from some \(\overline{t_i} \in \overline{T}\) on R must be on \(\overline{t_i}^\triangle \). Since \(\overline{t_i} \notin S\), \(\overline{t_i}^\triangle \) is not consumed for repelling an attack on \(\overline{t_i}\), so we match \(\overline{t_i}\) with \(\overline{t_i}^\triangle \).
-
If some \(t_i'^\square \in T'_\square \) attacks R (by attacking \(t_i'\)), we match \(t_i'^\square \) with \(t_i'\).
-
Analogously, we match each attacker \(\overline{t_i'}^\square \in \overline{T'}_\square \) with \(\overline{t_i'}\).
-
If, for some i with \(1 \le i \le n_y\), the vertices \(y_{i,j}^\square \) for \(1 \le j \le n_t+1\) attack R, then we distinguish the following cases: If \(y_i\) is in R, then the adjacent vertices \(y_{i,j}^\triangle \) for \(1 \le j \le n_t\) are in the neighborhood of R, too. We then match each \(y_{i,j}^\square \) with \(y_{i,j}^\triangle \) for \(1 \le j \le n_t\), and we match \(y_{i,n_t+1}^\square \) with \(y_i\). Otherwise, \(\overline{y_i}\) is in R, and we proceed symmetrically using \(\overline{y_{i,j}}^\triangle \) and \(\overline{y_i}\) as matches.
-
In order to account for attacks from \(T'\cup \overline{T'}\) on R, we distinguish two cases.
First, if for some i with \(1 \le i \le n_y\), both \(y_i\) and \(\overline{y_i}\) are in R, then, in the step before, we have matched each \(y_{i,j}^\square \) with the respective \(y_{i,j}^\triangle \) or \(y_i\), but all \(\overline{y_{i,j}}^\triangle \) are still free. These vertices can repel all attacks from \(T'\cup \overline{T'}\), as there are at most \(n_t\) such attacks.
Otherwise, we show that there are at most \(n_t - 1\) attacks from \(T'\cup \overline{T'}\), and they can be repelled using \(Y'_\triangle \). Consider the (partial) assignment J that assigns the same values to the variables \(x_1, \dots , x_{n_x}\) as the assignment I above, and, for any variable \(y_i\), sets \(y_i\) to \(\text {true}\) or \(\text {false}\) if R contains the vertex \(y_i\) or \(\overline{y_i}\), respectively. By assumption we know that our assignment to \(x_1, \dots , x_{n_x}\) is such that for all assignments to \(y_1, \dots , y_{n_y}\) some term \(t_i\) in \(\psi \) is true. In particular, it must therefore hold that J falsifies no existentially quantified literal in \(t_i\). Then, by construction of S, the vertex \(\overline{t_i'}\) is not in S. We also know that J falsifies no universally quantified literal in \(t_i\). But then the vertices from \(Y \cup \overline{Y}\) adjacent to the vertex \(\overline{t_i'}\) are not in R due to our construction of J, so \(\overline{t_i'}\) does not attack any vertex in R. From this it follows that there are at most \(n_t - 1\) attacks from \(T'\cup \overline{T'}\) on R. We can repel all these attacks using the vertices \(y_1^\triangle , \dots , y_{n_t-1}^\triangle \).
This allows us to conclude \({\left|N[R] \cap S \right|} \ge {\left|N[R] \setminus S \right|}\). Therefore S is secure.
“If” direction. Suppose S is a secure set in G honoring the conditions regarding forbidden, necessary and complementary vertices. If S contains some \(l \in X \cup \overline{X}\), then \(N(l) \cap \overline{T}\subseteq S\), as the number of neighbors l has in \(\overline{T}\) is equal to the number of its other neighbors, which are all in \(\overline{T}_\square \) and attack l since \(\overline{T}_\square \subseteq V_\square \). If S contains some \(\overline{t_i} \in \overline{T}\), then \(\overline{t_i}\) must be adjacent to some element of \(X \cup \overline{X}\) that is also in S. Otherwise \(\overline{t_i}\) would have three attackers (\(\overline{t}^\square \) and two vertices from \(X \cup \overline{X}\cup \{d_1^\square ,d_2^\square \}\)) but only two defenders (\(\overline{t_i}^\triangle \) and itself).
We construct an interpretation I on the variables \(x_1, \dots , x_{n_x}\) that sets exactly those \(x_i\) to true where the corresponding vertex \(x_i\) is in S, and we claim that for each extension of I to the universally quantified variables there is a satisfied term in \(\psi \). To see this, suppose to the contrary that some assignment J to all variables extends I but falsifies all terms in \(\psi \). Then we define a set R consisting of all vertices \(y_i\) such that \(J(y_i) = \text {true}\), all vertices \(\overline{y_i}\) such that \(J(y_i) = \text {false}\), and all vertices in \((T'\cup \overline{T'}) \cap S\) that are adjacent to these vertices \(y_i\) or \(\overline{y_i}\). Clearly, R is a subset of S. R has \({\left|R \right|}\) defenders due to itself, \(n_t - 1\) defenders due to \(Y'_\triangle \), and \(n_y \cdot n_t\) defenders due to \(N(R) \cap Y_\triangle \). This amounts to \({\left|N[R] \cap S \right|} = {\left|R \right|} + n_t - 1 + n_y \cdot n_t\).
On the other hand, there are \(n_t\) attacks on R from \(T'\cup \overline{T'}\). This is because for any term \(t_i\) in \(\psi \) one of the following cases applies: (a) The term \(t_i\) is falsified already by I. Then \(\overline{t_i'} \in S\) and thus \(t_i' \notin S\). The vertex \(t_i'\), however, is adjacent to any element of \(Y \cup \overline{Y}\), so it attacks R. (b) The term \(t_i\) is not falsified by I but by J. Then \(\overline{t_i'} \notin S\), and \(L_Y(t_i)\) contains some literal l with \(\overline{l} \in N(\overline{t_i'})\) and \(J \models \overline{l}\), so \(\overline{l}\) is in R and attacked by \(\overline{t_i'}\).
In addition to these \(n_t\) attackers, R has \({\left|R \cap (T'\cup \overline{T'}) \right|}\) attackers in \(N(R) \cap (T'_\square \cup \overline{T'}_\square )\), as well as \(n_y \cdot (n_t+1)\) attackers in \(Y_\square \). Since \({\left|R \right|} = n_y + {\left|R \cap (T'\cup \overline{T'}) \right|}\), we obtain in total
This contradicts S being secure, so for each extension of I to the universally quantified vertices, \(\psi \) is true; hence \(\varphi \) is true. \(\square \)
Lemma 2
\(\textsc {Exact~Secure~Set}^\mathrm{FN}\) is \(\Sigma ^{\mathrm{P}}_{2}\)-hard.
Proof
We give a polynomial reduction from \(\textsc {Exact~Secure~Set}^\mathrm{FNC}\).
Let an instance of \(\textsc {Exact~Secure~Set}^\mathrm{FNC}\) be given by \(G = (V,E)\), \(k > 0\), \(V_\square \subseteq V\), \(V_\triangle \subseteq V\) and \(C \subseteq V^2\), and let \(n = {\left|V \right|}\). For each \((a,b) \in C\), we introduce the set of new vertices \(A^{ab} = \{a^{ab}, b^{ab}, \triangle ^{ab}\}\) as well as, for any \(x \in \{a,b\}\), sets of new vertices \(C^{ab}_{x{\Circle }} = \{x^{ab}_1, \dots , x^{ab}_{n+1}\}\), \(D^{ab}_{x{\Circle }} = \{x^{ab}_{n+2}, \dots , x^{ab}_{n+4}\}\), \(C^{ab}_{x\square } = \{x^{ab\square }_1, \dots , x^{ab\square }_{n+1}\}\) and \(D^{ab}_{x\square } = \{x^{ab\square }_{n+2}, \dots , x^{ab\square }_{n+4}\}\); see also Fig. 4 how these vertices are used. We now construct a graph \(G' = (V',E')\) as follows:
Finally, we define \(k' = k + {\left|C \right|} \cdot (n+6)\), \(V_\square ' = V_\square \cup \bigcup _{(a,b) \in C} (C^{ab}_{a\square } \cup C^{ab}_{b\square } \cup D^{ab}_{a\square } \cup D^{ab}_{b\square })\) and \(V_\triangle ' = V_\triangle \cup \bigcup _{(a,b) \in C} \{\triangle ^{ab}\})\).
The intention of our construction is, for each \((a,b) \in C\), \(x \in \{a,b\}\) and any solution S, that (1) \(x \in S\) if and only if \(C^{ab}_{x{\Circle }} \cap S \ne \emptyset \); (2) \(C^{ab}_{x{\Circle }} \cup D^{ab}_{x{\Circle }} \subseteq S\) if \((C^{ab}_{x{\Circle }} \cup D^{ab}_{x{\Circle }}) \cap S \ne \emptyset \); (3) \(D^{ab}_{x{\Circle }} \cap S \ne \emptyset \) if and only if \(x^{ab} \in S\); (4) \(\triangle ^{ab} \in S\) and therefore \(a^{ab} \in S\) or \(b^{ab} \in S\). Note that we have chosen \({\left|D^{ab}_{x{\Circle }} \right|} = 3\) in order to ensure the “if” direction of (3) by making sure \(x^{ab}\) has more neighbors from \(D^{ab}_{x{\Circle }}\) than other neighbors (including itself). Furthermore, these conditions imply that \(a^{ab}\) and \(b^{ab}\) cannot both be in S, as otherwise \({\left|S \right|} > k'\). We claim that \((G,k,V_\square ,V_\triangle ,C)\) is a positive instance of \(\textsc {Exact~Secure~Set}^\mathrm{FNC}\) if and only if \((G',k',V_\square ',V_\triangle ')\) is a positive instance of \(\textsc {Exact~Secure~Set}^\mathrm{FN}\).
“Only if” direction. Let \(S \subseteq V \setminus V_\square \) be a secure set in G with \({\left|S \right|} = k\) and \(V_\triangle \subseteq S\) such that \({\left|S \cap \{a,b\} \right|} = 1\) whenever \((a,b) \in C\). We construct \(S' = S \cup \bigcup _{(a,b) \in C,\, x \in S \cap \{a,b\}} (\{\triangle ^{ab}, x^{ab}\} \cup C^{ab}_{x{\Circle }} \cup D^{ab}_{x{\Circle }})\) and observe that \(S' \cap V'_\square = \emptyset \), \(V'_\triangle \subseteq S'\), and \({\left|S' \right|} = k'\). Let \(X'\) be an arbitrary subset of \(S'\). Since S is secure and \(X' \cap V \subseteq S\), there is a matching \(\mu : N_G[X' \cap V] \setminus S \rightarrow N_G[X' \cap V] \cap S\). We now construct a matching \(\mu ': N_{G'}[X'] \setminus S' \rightarrow N_{G'}[X'] \cap S'\). For any attacker v of \(X'\) in \(G'\), we distinguish three cases. (1) If v is some \(x_i^{ab\square } \in C^{ab}_{x\square } \cup D^{ab}_{x\square }\) for some \((a,b) \in C\) and \(x \in \{a,b\}\), we set \(\mu '(v) = x_i^{ab}\). This element is in \(N_{G'}[X']\) since all nodes in \(X'\) that v can attack are adjacent to it. (2) If v is \(a^{ab}\) or \(b^{ab}\) for some \((a,b) \in C\), its only neighbor in \(X'\) can be \(\triangle ^{ab}\) (by our construction of \(S'\)), and we set \(\mu '(v) = \triangle ^{ab}\). (3) Otherwise v is in \(N_G[X' \cap V] \setminus S\) (by our construction of \(S'\)). Since the codomain of \(\mu \) is a subset of the codomain of \(\mu '\), we may set \(\mu '(v) = \mu (v)\). Since \(\mu '\) is injective, each attack on \(X'\) in \(G'\) can be repelled by \(S'\). Thus \(S'\) is secure in \(G'\).
“If” direction. Let \(S' \subseteq V' \setminus V'_\square \) be a secure set in \(G'\) with \({\left|S' \right|} = k'\) and \(V'_\triangle \subseteq S'\). First we make the following observations for each \((a,b) \in C\) and each \(x \in \{a,b\}\): (a) If \(x \in S'\), then \(C^{ab}_{x{\Circle }} \cap S' \ne \emptyset \), since x only has at most \(n-1\) neighbors not in \(C^{ab}_{x{\Circle }}\). (b) Similarly, if \(x^{ab} \in S'\), then \(D^{ab}_{x{\Circle }} \cap S' \ne \emptyset \), as \(x^{ab}\) only has one neighbor not in \(D^{ab}_{x{\Circle }}\). (c) If some \(x^{ab}_i \in C^{ab}_{x{\Circle }}\) is in \(S'\), then \(C^{ab}_{x{\Circle }} \cup D^{ab}_{x{\Circle }} \cup \{x\} \subseteq S'\), since \(x^{ab}_i\) has \(n+4\) attackers from \(C^{ab}_{x\square } \cup D^{ab}_{x\square }\) and only \(n+4\) other neighbors. (d) If some \(x^{ab}_i \in D^{ab}_{x{\Circle }}\) is in \(S'\), then \(C^{ab}_{x{\Circle }} \cup D^{ab}_{x{\Circle }} \cup \{x^{ab}\} \subseteq S'\) for the same reason. So for any \((a,b) \in C\) and \(x \in \{a,b\}\), \(S'\) contains either all or none of \(\{x, x^{ab}\} \cup C^{ab}_{x{\Circle }} \cup D^{ab}_{x{\Circle }}\).
For each \((a,b) \in C\), \(S'\) contains \(a^{ab}\) or \(b^{ab}\), since \(\triangle ^{ab} \in S'\), whose neighbors are \(a^{ab}\) and \(b^{ab}\). It follows that \({\left|S' \right|} > {\left|C \right|} \cdot (n+6)\) even if \(S'\) contains only one of each \((a,b) \in C\). If, for some \((a,b) \in C\), \(S'\) contained both a and b, we could derive a contradiction to \({\left|S' \right|} = k'\) because then \({\left|S' \right|}> ({\left|C \right|}+1) \cdot (n+6) > k'\). So \(S'\) contains either a or b for any \((a,b) \in C\).
We construct the set \(S = S' \cap V\) and observe that \({\left|S \right|} = k\), \(V_\triangle \subseteq S\), \(V_\square \cap S = \emptyset \), and \({\left|S \cap \{a,b\} \right|} = 1\) for each \((a,b) \in C\). Let \(X\subseteq S\) and \(X' = X \cup \bigcup _{(a,b) \in C, x \in X \cap \{a,b\}} C^{ab}_{x{\Circle }}\). For each \(C^{ab}_{x{\Circle }}\) in \(X'\), there are \({\left|C^{ab}_{x{\Circle }} \cup D^{ab}_{x{\Circle }} \right|} = n+4\) additional defenders and \({\left|C^{ab}_{x\square } \cup D^{ab}_{x\square } \right|} = n+4\) additional attackers of \(X'\) in \(G'\) compared to X in G; so \({\left|N_{G'}[X'] \cap S' \right|} - {\left|N_G[X] \cap S \right|} = {\left|N_{G'}[X'] \setminus S' \right|} -~{\left|N_G[X] \setminus S \right|}\). Clearly \(X' \subseteq S'\), so \({\left|N_{G'}[X'] \cap S' \right|} \ge {\left|N_{G'}[X'] \setminus S' \right|}\) as \(S'\) is secure in \(G'\). We conclude \( {\left|N_G[X] \cap S \right|} \ge {\left|N_G[X] \setminus S \right|}\). Hence S is secure in G. \(\square \)
Lemma 3
\(\textsc {Exact~Secure~Set}^{F}\) is \(\Sigma ^{\mathrm{P}}_{2}\)-hard.
Proof
We give a polynomial reduction from \(\textsc {Exact~Secure~Set}^\mathrm{FN}\).
Let an instance of \(\textsc {Exact~Secure~Set}^\mathrm{FN}\) be given by \(G = (V,E)\), \(k > 0\), \(V_\square \subseteq V\) and \(V_\triangle \subseteq V\). Let \(n = {\left|V \right|}\) and \(V_{\Circle }= V \setminus (V_\square \cup V_\triangle )\). We assume \(k \ge {\left|V_\triangle \right|}\), as the instance is trivially negative otherwise. We define for each \(v \in V_{\Circle }\) the set of new vertices \(C_v = \{v_1, \dots , v_{n+1}, v_1^\square , \dots , v_{n+1}^\square \}\), and we use shorthand notation \(C_v^{\Circle }= \{v_1, \dots , v_{n+1}\}\) and \(C_v^\square = \{v_1^\square , \dots , v_{n+1}^\square \}\). The intention is for each \(v_i^\square \) to be forbidden and for each \(v_i\) to be in a secure set if and only if v is in it at the same time. We define the graph \(G' = (V',E')\) with \(V' = V \cup \bigcup _{v \in V_{\Circle }} C_v\) and
Furthermore, we define \(V'_\square = V_\square \cup \bigcup _{v \in V_{\Circle }} C_v^\square \) and \(k' = {\left|V_\triangle \right|} + (k - {\left|V_\triangle \right|}) \cdot (n+2)\).
An example for this construction is given in Fig. 5. We claim that \((G,k,V_\square ,V_\triangle )\) is a positive instance of \(\textsc {Exact~Secure~Set}^\mathrm{FN}\) if and only if \((G',k',V'_\square )\) is a positive instance of \(\textsc {Exact~Secure~Set}^{F}\).
“Only if” direction. Let \(S \subseteq V \setminus V_\square \) be a secure set in G with \({\left|S \right|} = k\) and \(V_\triangle \subseteq S\). We construct \(S' = S \cup \bigcup _{v \in S \cap V_{\Circle }} C_v^{\Circle }\). It holds that \({\left|S' \right|} = {\left|S \right|} + ({\left|S \right|} - {\left|V_\triangle \right|}) \cdot (n+1) = k + (k-{\left|V_\triangle \right|}) \cdot (n+1) = {\left|V_\triangle \right|} + (k-{\left|V_\triangle \right|}) \cdot (n+2) = k'\). To show that \(S'\) is secure in \(G'\), let \(X'\subseteq S'\). Since S is secure in G and \(X' \cap V \subseteq S\), there is a matching \(\mu : N_G[X' \cap V] \setminus S \rightarrow N_G[X' \cap V] \cap S\). We now construct a matching \(\mu ': N_{G'}[X'] \setminus S' \rightarrow N_{G'}[X'] \cap S'\). For any attacker a of \(X'\) in \(G'\), we distinguish two cases: If a is some is some \(v_i^\square \in C_v^\square \) for some \(v \in V_{\Circle }\), there is some \(v_j \in C_v^{\Circle }\) in \(X'\). We set \(\mu '(v_i^\square ) = v_i\), which is in \(N_{G'}[X'] \cap S'\) since \(C_v^{\Circle }\) forms a clique. Otherwise a is in \(N_G[X' \cap V] \setminus S\) (by our construction of \(S'\)). Since the codomain of \(\mu \) is a subset of the codomain of \(\mu '\), we may set \(\mu '(a) = \mu (a)\). Since \(\mu '\) is injective, each attack on \(X'\) in \(G'\) can be repelled by \(S'\). Thus \(S'\) is secure in \(G'\).
“If” direction. Let \(S' \subseteq V' \setminus V'_\square \) be a secure set in \(G'\) with \({\left|S' \right|} = k'\). If \(S'\) contains some \(v_i \in C_v^{\Circle }\) for some \(v \in V_{\Circle }\), then \(\{v\} \cup C_v^{\Circle }\subseteq S'\), as \(v_i\) has \(n+1\) attackers in \(C_v^\square \) and only \(n+1\) neighbors not in \(C_v^\square \). It is impossible for \(S'\) to contain some \(v \in V_{\Circle }\) but none of \(C_v^{\Circle }\), as v has at most \(n-1\) neighbors not in \(C_v^{\Circle }\) and \({\left|C_v^{\Circle } \right|} = n+1\). From these considerations we derive \({\left|S' \right|} = {\left|S' \cap V_\triangle \right|} + {\left|S' \cap V_{\Circle } \right|} \cdot (n+2)\). Since \({\left|V_\triangle \right|} \le n\), this implies \({\left|S' \right|} \bmod (n+2) = {\left|S' \cap V_\triangle \right|}\). At the same time, \({\left|S' \right|} = k' = {\left|V_\triangle \right|} + (k - {\left|V_\triangle \right|}) \cdot (n+2)\), which implies \({\left|S' \right|} \bmod (n+2) = {\left|V_\triangle \right|}\). We conclude \({\left|S' \cap V_\triangle \right|} = {\left|V_\triangle \right|}\), so \(V_\triangle \subseteq S'\).
We construct \(S = S' \cap V\) and claim that it is secure in G. It is easy to see that \({\left|S \right|} = k\); otherwise we would obtain a contradiction to \({\left|S' \right|} = k'\) as we have seen that, for any \(v \in V_{\Circle }\), \(S'\) contains all elements of \(C_v^{\Circle }\cup \{v\}\) whenever it contains any of them. Let X be an arbitrary subset of S. We construct \(X' = X \cup \bigcup _{v \in X \cap V_{\Circle }} C^{\Circle }_v\) and observe that each \(C^{\Circle }_v\) we put into \(X'\) entails \({\left|C^{\Circle }_v \right|}\) additional defenders and \({\left|C^\square _v \right|} = {\left|C^{\Circle }_v \right|}\) additional attackers of \(X'\) in \(G'\) compared to X in G; so \({\left|N_{G'}[X'] \cap S' \right|} - {\left|N_G[X] \cap S \right|} = {\left|N_{G'}[X'] \setminus S' \right|} - {\left|N_G[X] \setminus S \right|}\). Clearly \(X' \subseteq S'\), so \({\left|N_{G'}[X'] \cap S' \right|} \ge {\left|N_{G'}[X'] \setminus S' \right|}\) as \(S'\) is secure in \(G'\). Consequently, \( {\left|N_G[X] \cap S \right|} \ge {\left|N_G[X] \setminus S \right|}\). Hence S is secure in G. \(\square \)
Lemma 4
\(\textsc {Secure~Set}^{\mathrm{F}}\) is \(\Sigma ^{\mathrm{P}}_{2}\)-hard.
Proof
We give a polynomial reduction from \(\textsc {Exact~Secure~Set}^{F}\).
Let an instance of \(\textsc {Exact~Secure~Set}^{F}\) be given by \(G = (V,E)\), \(k > 0\) and \(V_\square \subseteq V\). Let n denote \({\left|V \right|}\). We define for each \(v \in V\) the sets of new vertices \( A_v^{\Circle }= \{v_0, v_1, \dots , v_{n+1}\},\, A_v^\square = \{v_0^\square , v_1^\square , \dots , v_{n+1}^\square \} \), and denote by \(A_v^+\) the set \(A_v^{\Circle }\setminus \{v_0\}\) and by \(A_v\) the set \(A_v^{\Circle }\cup A_v^\square \). We also introduce the new vertices \(W = \{w_1, \dots , w_n\}\) and \(F^\square = \{f_1^\square , \dots , f_k^\square \}\), and we write \(A_0\) to denote \(\{v_0 \in A_v \mid v \in V\}\) and B to denote \(A_0 \cup W \cup F^\square \). We define the graph \(G' = (V',E')\) with \(V' = V \cup W \cup F^\square \cup \bigcup _{v \in V} A_v\) and
Furthermore, we define \(V'_\square = V_\square \cup F^\square \cup \bigcup _{v \in V} A_v^\square \) and \(k' = k \cdot (n+3) + n\).
Our construction is illustrated in Fig. 6. For any \(v \in V\), the intention for \(v_i\) is to be in a secure set if and only if v is in it. The intention behind the clique formed by B is that W shall be part of any secure set and is used for repelling attacks from \(F^\square \) and from those elements of \(A_0\) that are not in the secure set. This enforces that all secure sets in \(G'\) contain k elements of V. We claim that \((G,k,V_\square )\) is a positive instance of \(\textsc {Exact~Secure~Set}^{F}\) if and only if \((G',k',V_\square ')\) is a positive instance of \(\textsc {Secure~Set}^{\mathrm{F}}\).
“Only if” direction. Let \(S \subseteq V \setminus V_\square \) be a secure set in G with \({\left|S \right|} = k\). We construct \(S' = S \cup W \cup \bigcup _{v \in S} A_v^{\Circle }\) and observe that \({\left|S' \right|} = k'\). Let \(X'\) be an arbitrary subset of \(S'\). Since S is secure and \(X' \cap V \subseteq S\), there is a matching \(\mu : N_G[X' \cap V] \setminus S \rightarrow N_G[X' \cap V] \cap S\). We now construct a matching \(\mu ': N_{G'}[X'] \setminus S' \rightarrow N_{G'}[X'] \cap S'\) by distinguishing three cases: (1) For any \(v \in V\), if any \(v_i^\square \in A_v^\square \) attacks \(X'\), there is some \(v_j \in A_v^{\Circle }\) in \(X'\). We set \(\mu '(v_i^\square ) = v_i\), which is in \(N_{G'}[X'] \cap S'\) since \(A_v^{\Circle }\) forms a clique. (2) If any of the \(2n+k\) elements of B attacks \(X'\), \(B \cap X' \ne \emptyset \). By construction, \({\left|A_0 \cap S' \right|} = k\) and \(W \subseteq S'\), and we know \({\left|W \right|} = n\). So there are exactly n attacks from B. They can all be repelled using the n vertices in W, which are all in \(N_{G'}[X'] \cap S'\) as B forms a clique. (3) Any \(v \in V\) attacking \(X'\) is in \(N_G[X' \cap V] \setminus S\), due to our construction of \(S'\). Since the codomain of \(\mu \) is a subset of the codomain of \(\mu '\), we may set \(\mu '(v) = \mu (v)\). Clearly, \(\mu '\) is injective, so \(S'\) can repel each attack on \(X'\) in \(G'\). Thus \(S'\) is secure in \(G'\).
“If” direction. Let \(S' \subseteq V' \setminus V'_\square \) be a secure set in \(G'\) with \(1 \le {\left|S' \right|} \le k'\). First we make the following observations: (a) If \(v \in S'\) for some \(v \in V\), then some element of \(A_v^+\) must be in \(S'\) as well, since v has \(n+1\) neighbors in \(A_v^+\), while it only has at most \(n-1\) neighbors not in \(A_v^+\). (b) If \(v_0 \in S'\) for some \(v \in V\), then some \(v_i \in A_v^+\) is in \(S'\); otherwise \(v_0\) would have at least \(2n+3+k\) attackers due to \(A_v \setminus \{v_0\}\) and \(F^\square \), while \(v_0\) has only \(2n - 1\) other neighbors (due to W and \(A_0 \setminus \{v_0\}\)). (c) If \(v_i \in S'\) for some \(v \in V\) and \(v_i \in A_v^+\), then \(A_v^{\Circle }\cup \{v\} \subseteq S'\), since \(v_i\) has \(n+2\) attackers from \(A_v^\square \) and only \(n+2\) other neighbors (due to \(A_v^{\Circle }\setminus \{v_i\}\) and v). (d) If \(w_i \in S'\) for some \(w_i \in W\), then \(v_0 \in S'\) for some \(v \in V\); otherwise \(w_i\) would have at least \(n+k\) attackers due to \(A_0 \cup F^\square \) and at most n defenders (due to W).
It follows that, for any \(v \in V\), \(S'\) contains either all or none of the elements in \(\{v, v_0, v_1, \dots , v_{n+1}\}\). This implies that \(S'\) cannot contain more than k elements of V, since \({\left|S' \right|} \le k'\). Moreover, the case distinction shows that if any vertex is in \(S'\), then in particular some \(v \in V\) is in \(S'\).
As \(S'\) is not empty, we may conclude that \(v_0 \in S'\) for some \(v \in V\). Since \(v_0\) has \(n+2\) attackers from \(A_v^\square \), k attackers from \(F^\square \) and at least \(n-k\) attackers from \(A_0\) (as at most k elements of \(A_0\) can be in \(S'\)), \(v_0\) in total has at least \(2n+2\) attackers. At the same time, \(v_0\) has \(n+2\) defenders from \(A_v^{\Circle }\) (including itself), at most n defenders from W, and no other defenders. So \(v_0\) has at most \(2n+2\) defenders. This shows that \(S'\) must contain W and at least k elements of V; otherwise \(v_0\) would have more attackers than defenders. It follows in particular that \(S'\) contains exactly k elements of V.
We construct \(S = S' \cap V\) and observe that \({\left|S \right|} = k\) and \(V_\square \cap S = \emptyset \). Let X be an arbitrary subset of S. We construct \(X' = X \cup \bigcup _{v \in X} A^+_v\) and observe that each \(A^+_v\) we put into \(X'\) entails \({\left|A^{\Circle }_v \right|}\) additional defenders and \({\left|A^\square _v \right|} = {\left|A^{\Circle }_v \right|}\) additional attackers of \(X'\) in \(G'\) compared to X in G; so \({\left|N_{G'}[X'] \cap S' \right|} - {\left|N_G[X] \cap S \right|} = {\left|N_{G'}[X'] \setminus S' \right|} - {\left|N_G[X] \setminus S \right|}\). We have \(X' \subseteq S'\) and \({\left|N_{G'}[X'] \cap S' \right|} \ge {\left|N_{G'}[X'] \setminus S' \right|}\) as \(S'\) is secure in \(G'\). It follows that \({\left|N_G[X] \cap S \right|} \ge {\left|N_G[X] \setminus S \right|}\). This shows that S is secure in G.
We can now state the main result of the paper.
Theorem 1
The following problems are all \(\Sigma ^{\mathrm{P}}_{2}\)-complete: (a) \(\textsc {Secure~Set}\), (b) \(\textsc {Exact~Secure~Set}\), (c) \(\textsc {Secure~Set}^{\mathrm{F}}\), (d) \(\textsc {Exact~Secure~Set}^{F}\), (e) \(\textsc {Secure~Set}^\mathrm{FN}\), (f) \(\textsc {Exact~Secure~Set}^\mathrm{FN}\), (g) \(\textsc {Secure~Set}^\mathrm{FNC}\), and (h) \(\textsc {Exact~Secure~Set}^\mathrm{FNC}\).
Proof
For membership in \(\Sigma ^{\mathrm{P}}_{2}\), given an instance of one of the problems under consideration, we guess a subset S of the vertices such that, depending on the problem variant, the size of S is either at most k or exactly k, and S additionally respects the applicable conditions regarding forbidden, necessary and complementary vertices. Checking that S is secure can be done with an \(\hbox {NP}\) oracle [6].
We recall our proof strategy illustrated in Fig. 2. \(\Sigma ^{\mathrm{P}}_{2}\)-hardness of (h), (f), (d) and (c) follows from Lemmas 1–4. \(\Sigma ^{\mathrm{P}}_{2}\)-hardness of (e) and (g) follows directly from (c). We now show \(\Sigma ^{\mathrm{P}}_{2}\)-hardness of \(\textsc {Secure~Set}\) (a) by a polynomial reduction from \(\textsc {Secure~Set}^{\mathrm{F}}\) (c). Let an instance of \(\textsc {Secure~Set}^{\mathrm{F}}\) be given by \(G = (V,E)\), \(k > 0\) and \(V_\square \subseteq V\). For each \(f \in V_\square \), we introduce new vertices \(f_1, \dots , f_{2k}\), and we define a graph \(G' = (V',E')\) with \(V' = V \cup \{f_1, \dots , f_{2k} \mid f \in V_\square \}\) and \(E' = E \cup \{ (f_i,f_j) \mid f \in V_\square ,\; 1 \le i < j \le 2k\} \cup \{ (f,f_i) \mid f \in V_\square ,\; 1 \le i \le 2k\}\). The instance \((G,k,V_\square )\) of \(\textsc {Secure~Set}^{\mathrm{F}}\) possesses the same solutions as the instance \((G',k)\) of \(\textsc {Secure~Set}\): Each secure set S in G is also secure in \(G'\) because the subgraph of G induced by \(N_G[S]\) is isomorphic to the subgraph of \(G'\) induced by \(N_{G'}[S]\). On the other hand, a secure set \(S'\) in \(G'\) with \({\left|S' \right|} \le k\) cannot not contain any \(v \in \{f, f_1, \ldots , f_{2k}\}\) for any \(f \in V_\square \), as \({\left|N[v] \right|} \ge 2k+1\). Hence \(S'\) is also secure in G as the subgraphs induced by the respective neighborhoods are again isomorphic. The same argument also proves \(\Sigma ^{\mathrm{P}}_{2}\)-hardness of \(\textsc {Exact~Secure~Set}\) (b) by reduction from \(\textsc {Exact~Secure~Set}^{F}\) (d).
4 Conclusion
In this work, we have solved a complexity problem in graph theory that, to the best of our knowledge, has remained open since the introduction of secure sets [3]in 2007. We have shown that the problem of deciding whether, for a given graph G and integer k, G possesses a non-empty secure set of size at most k is \(\Sigma ^{\mathrm{P}}_{2}\)-complete. We moreover obtained \(\Sigma ^{\mathrm{P}}_{2}\)-completeness for seven further variants of this problem. In future work, we would like to identify subclasses of graphs that make the problems under consideration easier. Additionally,we plan to contribute results on the parameterized complexity of secure sets beyond the already known fixed-parameter tractability result from [5]. In particular, we believe that recently introduced classes (above \(\hbox {NP}\)) due to [4] are of interest for secure sets.
References
Abseher, M., Bliem, B., Charwat, G., Dusberger, F., Woltran, S.: Computing secure sets in graphs using answer set programming. In: Proceedings of ASPOCP 2014 (2014)
Brewka, G., Eiter, T., Truszczyński, M.: Answer set programming at a glance. Commun. ACM 54(12), 92–103 (2011)
Brigham, R.C., Dutton, R.D., Hedetniemi, S.T.: Security in graphs. Discrete Appl. Math. 155(13), 1708–1714 (2007)
de Haan, R., Szeider, S.: The parameterized complexity of reasoning problems beyond NP. In: Proceedings of KR 2014, pp. 82–91 (2014)
Enciso, R.I., Dutton, R.D.: Parameterized complexity of secure sets. Congr. Numer. 189, 161–168 (2008)
Ho, Y.Y.: Global secure sets of trees and grid-like graphs. Ph.D. thesis, University of Central Florida, Orlando, USA (2011)
Marx, D.: Complexity of clique coloring and related problems. Theor. Comput. Sci. 412(29), 3487–3500 (2011)
Szeider, S.: Generalizations of matched CNF formulas. Ann. Math. Artif. Intell. 43(1), 223–238 (2005)
Acknowledgments
This work was supported by the Austrian Science Fund (FWF) projects P25607 and Y698. We would like to thank the reviewers for their valuable comments and Herbert Fleischner for drawing our attention to the problem of secure sets.
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2016 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Bliem, B., Woltran, S. (2016). Complexity of Secure Sets. In: Mayr, E. (eds) Graph-Theoretic Concepts in Computer Science. WG 2015. Lecture Notes in Computer Science(), vol 9224. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-662-53174-7_5
Download citation
DOI: https://doi.org/10.1007/978-3-662-53174-7_5
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-662-53173-0
Online ISBN: 978-3-662-53174-7
eBook Packages: Computer ScienceComputer Science (R0)