Alliances in graphs of bounded clique-width

Alliances in graphs of bounded clique-width

Discrete Applied Mathematics 223 (2017) 91–97 Contents lists available at ScienceDirect Discrete Applied Mathematics journal homepage: www.elsevier...

419KB Sizes 0 Downloads 76 Views

Discrete Applied Mathematics 223 (2017) 91–97

Contents lists available at ScienceDirect

Discrete Applied Mathematics journal homepage: www.elsevier.com/locate/dam

Alliances in graphs of bounded clique-width✩ Masashi Kiyomi a , Yota Otachi b,∗ a

International College of Arts and Sciences, Yokohama City University, 22-2 Seto, Kanazawa-ku, Yokohama, Kanagawa 236-0027, Japan

b

School of Information Science, Japan Advanced Institute of Science and Technology, Asahidai 1-1, Nomi, Ishikawa 923-1292, Japan

article

info

Article history: Received 13 July 2016 Received in revised form 30 January 2017 Accepted 6 February 2017 Available online 27 February 2017 Keywords: Graph algorithm Alliance Clique-width Vertex cover

abstract An alliance in a graph is a set of vertices that is either safe under attacks from the neighborhood (defensive), capable of attacking its neighbors (offensive), or simultaneously defensive and offensive (powerful). An alliance is global if all nonmembers are adjacent to some members of the alliance. The concept of alliances was introduced by Kristiansen et al. (2004). After that many results concerning the complexity for finding a minimum alliance were shown. It was shown that the problem of finding a minimum alliance of any variant is NP-hard in general. For some variants, it was shown that the problem becomes polynomialtime solvable when restricted to trees or series–parallel graphs. In this paper, we show that the problems for all variants are efficiently solvable for much larger graph classes. We present a polynomial-time algorithm for graphs of bounded clique-width. We also show that the problem is fixed-parameter tractable when parameterized by the vertex cover number. © 2017 Elsevier B.V. All rights reserved.

1. Introduction The concept of alliances in graphs was first studied by Kristiansen, Hedetniemi, and Hedetniemi [23]. They introduced defensive, offensive, and powerful alliances. A defensive alliance is a set of vertices that is safe from attacks by its neighborhood, an offensive alliance is a set of vertices that can attack its neighborhood, and a powerful alliance is an alliance that is both defensive and offensive. An alliance is global if it is a dominating set. See Section 1.1 for formal definitions. Alliances in graphs have been studied intensively [19,1,15], and generalizations called r-alliances are also studied [28]. In this paper, we study the computational complexity of the problem of finding a minimum alliance in graph classes of bounded clique-width. We show that the problems are polynomial-time solvable for graphs of bounded clique-width, and are fixedparameter tractable when parameterized by the vertex cover number. All graphs in this paper are finite, simple, and undirected. For a graph G, we denote its vertex set and edge set by V (G) and E (G), respectively. The subgraph induced by S ⊆ V (G) is denoted by G[S ]. The (open) neighborhood NG (v) of a vertex v ∈ V (G) is the set {u | {u, v} ∈ E (G)}. The closed neighborhood NG [v] of a vertex v ∈ V (G) is the set {v}∪ NG (v). The  degree of v ∈ V (G) is |NG (v)| and denoted by degG (v). For a subset S ⊆ V (G), we define its closed neighborhood as NG [S ] = v∈S NG [v] and its open neighborhood as NG (S ) = NG [S ]\ S. A set S ⊆ V (G) is a dominating set of G if NG [S ] = V (G). We omit the subscript G when it is clear from the context.

✩ Partially supported by MEXT KAKENHI Grant Number 24106004.



Corresponding author. E-mail addresses: [email protected] (M. Kiyomi), [email protected] (Y. Otachi).

http://dx.doi.org/10.1016/j.dam.2017.02.004 0166-218X/© 2017 Elsevier B.V. All rights reserved.

92

M. Kiyomi, Y. Otachi / Discrete Applied Mathematics 223 (2017) 91–97

1.1. Formal definitions of alliances in graphs For an integer r, a nonempty set S ⊆ V (G) is a defensive r-alliance if for each s ∈ S, |N (s) ∩ S | ≥ |N (s) \ S | + r. A set is a defensive alliance if it is a defensive (−1)-alliance. In this case, the condition can be replaced with |N [s] ∩ S | ≥ |N [s] \ S | for each s ∈ S. A defensive r-alliance S is global if S is a dominating set. We denote by dar (G) and gdar (G) the minimum sizes of a defensive r-alliance and a global defensive r-alliance, respectively. We omit the subscript r when r = −1. Similarly, for an integer r, a nonempty set S ⊆ V (G) is an offensive r-alliance if for each s ∈ N (S ), |N (s)∩ S | ≥ |N (s)\ S |+ r. An offensive 1-alliance is called an offensive alliance. In this case, the condition is replaced with |N [s] ∩ S | ≥ |N [s] \ S | for each s ∈ N (S ). An offensive r-alliance S is global if S is a dominating set. We denote by oar (G) and goar (G) the minimum sizes of an offensive r-alliance and a global offensive r-alliance, respectively. We omit the subscript r when r = 1. A set S ⊆ V (G) is a powerful r-alliance if S is simultaneously a defensive r-alliance and an offensive (r + 2)-alliance. A powerful (−1)-alliance is a powerful alliance. It is global if it is a dominating set. We denote by par (G) and gpar (G) the minimum sizes of a powerful r-alliance and a global powerful r-alliance, respectively. We omit the subscript r when r = −1. To see the differences among the concepts of alliances, let us consider alliances in a star as an example. Observe that da(K1,n ) = 1 since a degree-1 vertex forms a defensive alliance. It holds that oa(K1,n ) = goa(K1,n ) = 1 since the center vertex forms a global offensive alliance. On the other hand, gda(K1,n ) = pa(K1,n ) = gpa(K1,n ) = ⌊n/2⌋ + 1 holds (the minimum set contains the center and ⌊n/2⌋ leaves). 1.2. Known complexity results The hardness of the problem of finding a minimum alliance is well understood. Basically all variants are NP-hard. The problems of deciding whether dar (G) ≤ k [29] and whether gdar (G) ≤ k [16] are NP-complete for any fixed r. Furthermore, it is NP-complete to decide whether da(G) ≤ k for split graphs and bipartite graphs [21], and for planar graphs [10], and whether gda(G) ≤ k or gpa(G) ≤ k for bipartite graphs and for chordal graphs [20]. It is NP-complete to decide whether oar (G) ≤ k and whether goar (G) ≤ k for any fixed r [17]. If r ≥ 3, then deciding whether oar (G) ≤ k is NP-complete for r-regular planar graphs [17]. It is NP-complete to decide whether par (G) ≤ k and whether gpar (G) ≤ k for any fixed r [16] and whether pa(G) ≤ k for bipartite graphs [20]. The fixed-parameter tractability is also studied. All problems of deciding whether da(G) ≤ k, gda(G) ≤ k, oa(G) ≤ k, goa(G) ≤ k, pa(G) ≤ k, and gpa(G) ≤ k are fixed-parameter tractable when parameterized by k [14] (see also [10]). Their algorithms can be easily applied to r-alliances, where k + r becomes the parameter. Polynomial-time algorithms for finding minimum alliances in trees are presented by several groups [2,11,20,21]. It is also known that finding a minimum defensive alliance can be done in polynomial time for series–parallel graphs [20]. Enciso [10] showed that finding defensive and global defensive alliances is fixed-parameter tractable when parameterized by bounded domino treewidth, where the domino treewidth is the minimum width over all tree-decompositions with each vertex contained in at most two bags. 1.3. Our results As it is known that the problems are NP-hard in general but solvable in polynomial time for tree-like graphs, a natural question is whether the problems can be solved in polynomial time for some graph classes such as graphs of bounded treewidth. In this paper, we show that the problem can be solved for graphs of bounded clique-width in polynomial time. This result answers the question above affirmatively as the clique-width of a graph is bounded from above by a function of its treewidth [4]. We also show that the problems are fixed-parameter tractable when parameterized by vertex cover number, which is always larger than or equal to treewidth. The parameterized complexity with treewidth or clique-width remains unsettled. 2. Graphs with small vertex covers In this section, we show that when parameterized by the vertex cover number, the problems of finding smallest alliances (of all kinds studied in this paper) are fixed-parameter tractable. For the standard concepts in parameterized complexity, see the recent textbook by Cygan et al. [6]. For a graph G = (V , E ), a vertex set C ⊆ V is a vertex cover of G if for each edge in E, at least one of its endpoints belongs to C . In other words, C is a vertex cover of G if and only if V \ C is an independent set of G. The vertex cover number vc(G) of a graph G is the size of a smallest vertex cover in G. Note that domino treewidth studied in [10] is incomparable to vertex cover number. For example, consider K1,n and Pn . Theorem 2.1. Given an n-vertex graph G with vc(G) ≤ k, it is fixed-parameter tractable with the parameter k to find the values dar (G), gdar (G), oar (G), goar (G), par (G), and gpar (G) with corresponding sets.

M. Kiyomi, Y. Otachi / Discrete Applied Mathematics 223 (2017) 91–97

93

Observe that goa(G) ≤ vc(G) holds for every graph G without isolated vertices since a vertex cover is a global offensive alliance. Thus the results in [14] imply Theorem 2.1 restricted to goa and oa. On the other hand, there are some graphs with small vc and large da. For instance, the complete bipartite graph K2,n is such an example. Thus the results in [14] do not imply Theorem 2.1 restricted to da, gda, pa, or gpa. Outline of the algorithm. Given an n-vertex graph G with vc(G) ≤ k, we first find a vertex cover C of size at most k. For our purpose, a standard branching algorithm with O(2k n) running time is sufficient (see e.g. [6]). We next guess S ∩ C and N (S ) ∩ C , where S is a smallest alliance. There are at most 3|C | ≤ 3k candidates for the pair (S ∩ C , N (S ) ∩ C ) as each member of C has three options: either in S ∩ C , N (S ) ∩ C , or C \ N [S ]. Finally we reduce the problem of finding the rest of S to an integer linear programming (ILP) optimization with a constant number of variables (see Section 2.1). Since ILP optimization is fixed-parameter tractable when parameterized by the number of variables [12], we can conclude that our problem is fixed-parameter tractable when parameterized by the vertex cover number. Characterizations of an alliance S with a vertex cover C . Let G = (V , E ) be a graph and C ⊆ V be a vertex cover of G. We denote by I the independent set V \ C . Let S ⊆ V be a vertex set with S ∩ C = SC and S ∩ I = SI . For each u ∈ C , let demand(u) = 12 (deg(u) + r ) − |N (u) ∩ SC |. Lemma 2.2. For every u ∈ C , |N (u) ∩ S | ≥ |N (u) \ S | + r if and only if |N (u) ∩ SI | ≥ demand(u). Proof. Each u ∈ C satisfies that |N (u) ∩ S | = |N (u) ∩ SC | + |N (u) ∩ SI | and deg(u) = |N (u) ∩ SC | + |N (u) ∩ SI | + |N (u) \ S |. Therefore, |N (u) ∩ S | ≥ |N (u) \ S | + r holds if and only if |N (u) ∩ SC | + |N (u) ∩ SI | ≥ deg(u) − (|N (u) ∩ SC | + |N (u) ∩ SI |) + r, which is equivalent to 2|N (u) ∩ SI | ≥ deg(u) − 2|N (u) ∩ SC | + r = 2 · demand(u).  Lemma 2.3. For every v ∈ I, |N (v) ∩ S | ≥ |N (v) \ S | + r if and only if |N (v) ∩ SC | ≥ |N (v) \ SC | + r. Proof. Since N (v) ⊆ C , we have N (v) ∩ S = N (v) ∩ SC and N (v) \ S = N (v) \ SC .



The next two lemmas follow readily from the two lemmas above and the definitions of defensive and offensive r-alliances. Lemma 2.4. The set S is a defensive r-alliance of G if and only if 1. |N (s) ∩ SI | ≥ demand(s) for each s ∈ SC , and 2. |N (s) ∩ SC | ≥ |N (s) \ SC | + r for each s ∈ SI . Lemma 2.5. The set S is an offensive r-alliance of G if and only if 1. |N (u) ∩ SI | ≥ demand(u) for each u ∈ C ∩ N (S ), and 2. |N (v) ∩ SC | ≥ |N (v) \ SC | + r for each v ∈ I ∩ N (S ). 2.1. ILP formulations In this section we assume that we have a vertex cover C of size at most k. Our goal here is to find a smallest alliance S with P = S ∩ C and Q = N (S ) ∩ C , where P , Q ⊆ C are given. Let R = C \ (P ∪ Q ). We assume that there is no edge between P and R. Otherwise we immediately reject the input. Recall that the set I = V \ C is an independent set. We partition the independent set I into the twin classes I1 , . . . , It , where t ≤ 2k . That is, two vertices u and v are in the same class if and only if N (u) = N (v). For each Ii , we associate a variable xi that indicates |S ∩ Ii | = xi . Because the vertices in Ii have the same neighborhood, the variables xi determine S uniquely, up to isomorphism.  In the following, we present ILP formulations of all types of alliances. The objective is to minimize the sum 1≤i≤t xi under the condition xi ∈ {0, . . . , |Ii |} for all i ∈ {1, . . . , t } and the additional conditions described below.  For u ∈ C , we− denote by N (u) the set of indices i such that Ii ⊆ N (u). For U ⊆ C , we denote by N (U ) the union Ii . u∈U N (u). Let I ⊆ {1, . . . , t } be the set of indices i such that |N (v) ∩ P | < |N (v) \ P | + r for (every) v ∈ Conditions for Q and R. Each vertex in Q is adjacent to at least one vertex in S. Thus we have the condition i∈N (u) xi ≥ 1 for all u ∈ Q \ N (P ). Since any vertex in R cannot be adjacent to vertices in S, we need the condition xi = 0 for all i ∈ N (R).  Defensive r-alliances. By Lemma 2.4, each s ∈ P has to satisfy that i∈N (s) xi ≥ demand(s). Also by Lemma 2.4, for each v ∈ I, if v is in S, then it has to satisfy |N (v) ∩ P | ≥ |N (v) \ P | + r. Thus, v ∈ S ∩ I cannot be in Ii with i ∈ I− . This gives us the condition xi = 0 for all i ∈ I− . Conversely, if there is a feasible solution satisfying the constraints above, then the union of P and an arbitrary subset of I containing exactly xi elements from each Ii is a defensive r-alliance since it satisfies all the conditions in Lemma 2.4.  Offensive r-alliances. By Lemma 2.5, each u ∈ Q has to satisfy that i∈N (u) xi ≥ demand(u). Since Q = N (S ) ∩ C , each  u ∈ Q \ N (P ) has to satisfy that x ≥ 1. Lemma 2.5 implies also that, for each v ∈ I, if v is in N (P ) but does not i∈N (u) i satisfy |N (v) ∩ P | ≥ |N (v) \ P | + r, then it has to be in S. Thus we have the condition xi = |Ii | for all i ∈ I− ∩ N (P ). Powerful r-alliances. A formula for powerful r-alliances can be simply obtained by combining the ones for defensive r-alliances and for offensive (r + 2)-alliances. Global alliances. In a global alliance S, each vertex is either in S or in N (S ). Since the vertices in R have no neighbor in P, we need the condition i∈N (u) xi ≥ 1 for all u ∈ R. If a vertex in I has no neighbor in P, then it must be in S. This gives the condition xi = |Ii | for all i ̸∈ N (P ).

94

M. Kiyomi, Y. Otachi / Discrete Applied Mathematics 223 (2017) 91–97

2.2. Running time Lenstra [24] showed that deciding the feasibility of an ILP formula is fixed-parameter tractable when parameterized by the number of variables. The result is further improved by Kannan [22] and Frank and Tardos [18]. Here we need the optimization version presented by Fellows et al. [12]. The problem and the result are formally stated as follows. Problem. p-Opt-ILP Instance: A matrix A ∈ Zm×p , and vectors b ∈ Zm and c ∈ Zp . Objective: Find a vector x ∈ Zp that minimizes c ⊤ x and satisfies that Ax ≥ b. Parameter: p, the number of variables. Theorem 2.6 (Fellows et al. [12]). p-Opt-ILP can be solved using O(p2.5p+o(p) · L · log(MN )) arithmetic operations and space polynomial in L, where L is the number of bits in the input, N is the maximum absolute value any variable can take, and M is an upper bound on the absolute value of the minimum taken by the objective function. In our formulation, we have at most 2k variables. The values of all variables and the objective function are bounded above by n. The constraints can be represented using O(k2k log n) bits. Thus by Theorem 2.6 we can solve the problem with the guess (P , Q ) in FPT time. As there are at most 3k candidates for (P , Q ) and the ILP formula for a guess can be obtained in FPT time, Theorem 2.1 holds. 3. Graphs of bounded clique-width The clique-width of a graph is defined through vertex labelings of the graph [5]. In a vertex-labeled graph, we call a vertex of label i an i-vertex. A c-expression is a rooted binary tree such that

• each leaf has label ◦i for some i ∈ {1, . . . , c }, • each non-leaf node with two children has label ∪, and • each non-leaf node with only one child has label ρi,j or ηi,j (i, j ∈ {1, . . . , c }, i ̸= j). Each node in a c-expression represents a vertex-labeled graph as follows:

• a ◦i -node represents a graph with one i-vertex; • a ∪-node represents the disjoint union of the labeled graphs represented by its children; • a ρi,j -node represents the labeled graph obtained from the one represented by its child by replacing the labels of the i-vertices with j;

• an ηi,j -node represents the labeled graph obtained from the one represented by its child by adding all possible edges between the i-vertices and the j-vertices. A c-expression represents the graph represented by its root. The clique-width of a graph G, denoted by cw(G), is the minimum integer c such that there is a c-expression representing a graph isomorphic to G. A c-expression of a graph is irredundant if for each edge {u, v}, there is exactly one node ηi,j that adds the edge between u and v . It is known that a c-expression of a graph can be transformed into an irredundant one with O(n) nodes in linear time [5]. In what follows, we use irredundant c-expressions only. Computing the clique-width and a corresponding c-expression of a graph is NP-hard [13]. For c ≤ 3, we can compute a c-expression of a graph of clique-width at most c in O(n2 m) time [3], where n and m are the numbers of vertices and edges, respectively. For fixed c ≥ 4, it is not known whether one can compute the clique-width and a corresponding c-expression of a graph in polynomial time. On the other hand, it is known that for any fixed c, one can compute a (23c − 1)-expression of a graph of clique-width c in O(n3 ) time [26] (see also [27]). Theorem 3.1. Given an n-vertex graph G and an irredundant c-expression T of G, the values dar (G), gdar (G), oar (G), goar (G), par (G), and gpar (G) with corresponding sets can be computed in O(n8c +1 ) time. Corollary 3.2. Given an n-vertex graph G of clique-width at most c, the values dar (G), gdar (G), oar (G), goar (G), par (G), and 3c +3 −7

gpar (G) with corresponding sets can be computed in O(n2

) time.

We only show that the values can be computed in the claimed running time. Corresponding sets can be easily computed in the same running time by remembering a corresponding set for each table entry in the dynamic program below. For each node t in T , let Gt be the vertex-labeled graph represented by t. We denote by Vt the vertex set of Gt . For each i, we denote the set of i-vertices in Gt by Vti . Now, for each node t in T , we construct a table dp(t , n, d, w, s, m) ∈ {true, false} with indices n : {1, . . . , c } → {0, . . . , n}, d : {1, . . . , c } → {true, false}, w : {1, . . . , c } → {−n + 1, . . . , n − 1}∪{∞}, and s : {1, . . . , c } → {−n + 1, . . . , n − 1}∪{∞}, and m : {1, . . . , c } → {0, . . . , n − 1} ∪ {−∞} as follows. We set dp(t , n, d, w, s, m) = true if and only if there exists a set S ⊆ Vt such that: for all i ∈ {1, . . . , c },

M. Kiyomi, Y. Otachi / Discrete Applied Mathematics 223 (2017) 91–97

• • • • • •

95

n(i) = |S ∩ Vti |; d(i) = true if and only if Vti ⊆ NGt [S ]; if S ∩ Vti ̸= ∅, then w(i) = mins∈S ∩V i |NGt (s) ∩ S | − |NGt (s) \ S |; otherwise w(i) = ∞; t if NGt (S ) ∩ Vti ̸= ∅, then s(i) = mins∈N (S )∩V i |NGt (s) ∩ S | − |NGt (s) \ S |, otherwise s(i) = ∞; Gt t if Vti \ NGt [S ] ̸= ∅, then m(i) = maxs∈V i \N [S ] |NGt (s) ∩ S | − |NGt (s) \ S |, otherwise m(i) = −∞. Gt t if Vti \ NGt [S ] ̸= ∅, then m(i) = maxs∈V i \N [S ] degGt (s), otherwise m(i) = −∞. G t

t

In other words, n(i) is the number of the i-vertices in S, d(i) indicates whether the i-vertices are dominated by vertices in S, w(i) is the ‘‘surplus’’ at the weakest i-vertex in S, s(i) is the ‘‘surplus’’ at the strongest i-vertex in NGt (S ), and m(i) is the maximum degree of the vertices in Vti \ NGt [S ]. Note that degGt (s) = |NGt (s) \ S | − |NGt (s) ∩ S | for each s ∈ Vti \ NGt [S ]. Proposition 3.3. Let τ be the root of the c-expression T of G. Then,

 • dar (G) is the minimum s such that there exist n, d, w, s, and m satisfying dp(τ , n, d, w, s, m) = true, 1≤i≤c n(i) = s, and min1≤i≤c w(i) ≥ r.  • gda  r (G) is the minimum s such that there exist n, d, w, s, and m satisfying dp(τ , n, d, w, s, m) = true, 1≤i≤c n(i) = s, 1≤i≤c d(i) = true, and min1≤i≤c w(i) ≥ r.  • oar (G) is the minimum s such that there exist n, d, w, s, and m satisfying dp(τ , n, d, w, s, m) = true, 1≤i≤c n(i) = s, and min1≤i≤c s(i) ≥ r.  •  goar (G) is the minimum s such that there exist n, d, w, s, and m satisfying dp(τ , n, d, w, s, m) = true, 1≤i≤c n(i) = s, 1≤i≤c d(i) = true, and min1≤i≤c s(i) ≥ r.  • par (G) is the minimum s such that there exist n, d, w, s, and m satisfying dp(τ , n, d, w, s, m) = true, 1≤i≤c n(i) = s, min1≤i≤c w(i) ≥ r, and min1≤i≤c s(i) ≥ r + 2.  •  gpar (G) is the minimum s such that there exist n, d, w, s, and m satisfying dp(τ , n, d, w, s, m) = true, 1≤i≤c n(i) = s, 1≤i≤c d(i) = true, min1≤i≤c w(i) ≥ r, and min1≤i≤c s(i) ≥ r + 2. By Proposition 3.3, if all entries dp(t , n, d, w, s, m) are computed in advance, then we can compute the minimum size of any kind of alliance by spending O(1) time for each tuple (t , n, d, w, s, m). In the following, we compute all entries dp(t , n, d, w, s, m) in a bottom-up manner. There are O(n · (n + 1)c · 2c · (2n)c · (2n)c · (n + 1)c ) = O(n4c +1 ) possible tuples (t , n, d, w, s, m). Thus, to prove Theorem 3.1, it suffices to show that each entry dp(t , n, d, w, s, m) can be computed in time O(n4c ) assuming that the entries for the children of t are already computed. Lemma 3.4. For a leaf node t with label ◦i , dp(t , n, d, w, s, m) can be computed in O(1) time. Proof. Observe that dp(t , n, d, w, s, m) = true if and only if n(j) = 0, d(j) = true, w(j) = s(j) = ∞, and m(j) = −∞ for all j ̸= i, and either

• n(i) = 0, d(i) = true, w(i) = s(i) = ∞, and m(i) = 0, or • n(i) = 1, d(i) = true, w(i) = 0, s(i) = ∞, and m(i) = −∞, where the first case corresponds to S = ∅ and the second one to S = Vti = Vt . These conditions can be checked in O(1) time.  Lemma 3.5. For a ∪-node t, dp(t , n, d, w, s, m) can be computed in O(n4c ) time. Proof. Let t1 and t2 be the children of t in T . Then, dp(t , n, d, w, s, m) = true if and only if there exist n1 , n2 , d1 , d2 , w1 , w2 , s1 , s2 , m1 , and m2 such that dp(t1 , n1 , d1 , w1 , s1 , m1 ) = dp(t2 , n2 , d2 , w2 , s2 , m2 ) = true, n(i) = n1 (i)+ n2 (i), d(i) = d1 (i)∧ d2 (i), w(i) = min{w1 (i), w2 (i)}, s(i) = min{s1 (i), s2 (i)}, and m(i) = max{m1 (i), m2 (i)} for all i. There are at most (n + 1)c possible pairs for (n1 , n2 ) as n2 is uniquely determined by n1 , 2c candidates for d1 and for d2 , 2c (2n)c possible pairs for (w1 , w2 ) and for (s1 , s2 ), and (n + 1)c possible pairs for (m1 , m2 ). In total, there are O(n4c ) candidates. Each candidate can be checked in O(1) time, and thus the lemma holds.  Lemma 3.6. For a ρi,j -node t, dp(t , n, d, w, s, m) can be computed in O(n4 ) time. Proof. Let t ′ be the child of t in T . Now dp(t , n, d, w, s, m) = true if and only if there exist n′ , d′ , w′ , s′ , and m′ such that dp(t ′ , n′ , d′ , w′ , s′ , m′ ) = true, where

• • • • •

n(i) = 0, n(j) = n′ (i) + n′ (j), and n(h) = n′ (h) if h ̸∈ {i, j}; d(i) = true, d(j) = d′ (i) ∧ d′ (j), and d(h) = d′ (h) if h ̸∈ {i, j}; w(i) = ∞, w(j) = min{w′ (i), w′ (j)}, and w(h) = w′ (h) if h ̸∈ {i, j}; s(i) = ∞, s(j) = min{s′ (i), s′ (j)}, and s(h) = s′ (h) if h ̸∈ {i, j}; m(i) = −∞, m(j) = max{m′ (i), m′ (j)}, and m(h) = m′ (h) if h ̸∈ {i, j}.

The lemma follows as there are O(n4 ) candidates of such tuples (n′ , d′ , w′ , s′ , m′ ).



96

M. Kiyomi, Y. Otachi / Discrete Applied Mathematics 223 (2017) 91–97

Lemma 3.7. For an ηi,j -node t, dp(t , n, d, w, s, m) can be computed in O(n2 ) time. Proof. Let t ′ be the child of t in T . Then, dp(t , n, d, w, s, m) = true if and only if dp(t ′ , n, d′ , w′ , s′ , m′ ) = true for some d′ , w′ , s′ , and m′ with the following conditions:

• d(h) = d′ (h), w(h) = w′ (h), s(h) = s′ (h), and m(h) = m′ (h) hold for all h ̸∈ {i, j}; • d(i), w(i), s(i), and m(i) are set as

d(i) = d′ (i) ∨ [n(j) ̸= 0], w(i) = w′ (i) + 2n(j) − |Vtj |,  ′ s (i) − |Vtj | s(i) = j min{s′ (i), −m′ (i)} + 2n(j) − |Vt |  j ′ m(i) = m (i) + |Vt | if n(j) = 0, −∞ otherwise;

if n(j) = 0, otherwise,

• d(j), w(j), s(j), and m(j) are set as above with i and j interchanged. As most of the conditions above follows directly from the definitions, here we only explain the conditions for w(i) and

s(i).

Recall that T is irredundant. That is, the graph Gt ′ does not have any edge between the i-vertices and the j-vertices. j In Gt , an i-vertex has exactly n(j) more neighbors in S and exactly |Vt | − n(j) more neighbors not in S. Thus we have j ′ w(i) = w (i) + 2n(j) − |Vt | as follows:

w(i) = min |NGt (s) ∩ S | − |NGt (s) \ S | s∈S ∩Vti

= min (|NGt ′ (s) ∩ S | + n(j)) − (|NGt ′ (s) \ S | + |Vtj | − n(j)) s∈S ∩V i′ t

= 2n(j) − |Vtj | + min |NGt ′ (s) ∩ S | − |NGt ′ (s) \ S | s∈S ∩V i′ t

j Vt

= 2n(j) − | | + w (i). ′

j

j

For s(i), we have two cases to consider. If n(j) = 0, then we can show that s(i) = s(i) + 2n(j) − |Vt | = s(i) − |Vt | in the same way as for w(i). If n(j) ̸= 0, then the vertices in Vti \ NGt ′ [S ] become neighbors of S in Gt . Therefore,

s(i) =

min

s∈NGt (S )∩Vti

= 

|NGt (s) ∩ S | − |NGt (s) \ S | min  

s∈ NG ′ (S )∩Vti ∪ Vti \NG ′ [S ] t t

 |NGt (s)

∩ S | − |NGt (s) \ S |

= 2n(j) − |Vtj | + min{s′ (i), −m′ (i)}. Thus the lemma holds as there are O(n) candidates for each pair (s′ (i), m′ (i)) and (s′ (j), m′ (j)), and other parameters in 

(d′ , w′ , s′ , m′ ) are uniquely determined. 4. Related parameters

4.1. Treewidth and pathwidth Treewidth is arguably the most successful graph parameter that measures how tree-like a graph is. For example, forests have treewidth at most 1 and series–parallel graphs have treewidth at most 2. Pathwidth is a path variant of treewidth. It is known [4] that for every graph, log2 (clique-width) − 1 < treewidth ≤ pathwidth ≤ vertex cover number. As we mentioned in the introduction, our result implies that the problem of finding a minimum alliance is polynomial-time solvable for graphs of bounded treewidth (or pathwidth). The parameterized complexity of the alliance problems remains unsettled when parameterized by clique-width, treewidth, or pathwidth.

M. Kiyomi, Y. Otachi / Discrete Applied Mathematics 223 (2017) 91–97

97

4.2. (D, O)-alliances Fernau and Rodríguez-Velázquez [15] pointed out that several graph parameters strongly related to (global) alliances are known in different areas under different names. To unify them, the concept of (D, O)-alliance is introduced in [15]. For D, O ⊆ Z, a nonempty set S ⊆ V (G) is a (D, O)-alliance of G if there exist d ∈ D and o ∈ O such that S is simultaneously a d-defensive alliance and an o-offensive alliance. A (D, O)-alliance of G is a global (D, O)-alliance of G if it is a dominating set of G. Our algorithms in the previous sections consider defensiveness and offensiveness separately. Thus the algorithms can find a minimum (global) (D, O)-alliance when D is Z or {d ∈ Z | d ≥ r } and O is Z or {o ∈ Z | o ≥ r }. In [15], it is shown that such cases include signed (total) k-dominating sets [30], (partial) monopolies [25], 1/2-dominating sets [9], the complements of 1/2-independent sets [7], and positive influence dominating sets [8]. Thus we can solve the problems of finding such kinds of minimum sets in polynomial time for graphs of bounded clique-width and in FPT time when parameterized by the vertex cover number. Acknowledgments The authors are grateful to the anonymous referees for their constructive suggestions that improved this paper considerably. References [1] Aurel Cami, Hemant Balakrishnan, Narsingh Deo, Ronald D. Dutton, On the complexity of finding optimal global alliances, J. Combin. Math. Combin. Comput. 58 (2006) 23–31. [2] Chan-Wei Chang, Ma-Lian Chia, Cheng-Ju Hsu, David Kuo, Li-Ling Lai, Fu-Hsing Wang, Global defensive alliances of trees and Cartesian product of paths and cycles, Discrete Appl. Math. 160 (2012) 479–487. [3] Derek G. Corneil, Michel Habib, Jean-Marc Lanlignel, Bruce A. Reed, Udi Rotics, Polynomial-time recognition of clique-width ≤ 3 graphs, Discrete Appl. Math. 160 (2012) 834–865. [4] Derek G. Corneil, Udi Rotics, On the relationship between clique-width and treewidth, SIAM J. Comput. 34 (2005) 825–847. [5] Bruno Courcelle, Stephan Olariu, Upper bounds to the clique width of graphs, Discrete Appl. Math. 101 (2000) 77–114. [6] Marek Cygan, Fedor V. Fomin, Lukasz Kowalik, Daniel Lokshtanov, Dániel Marx, Marcin Pilipczuk, Michal Pilipczuk, Saket Saurabh, Parameterized Algorithms, Springer, 2015. [7] F. Dahme, Dieter Rautenbach, Lutz Volkmann, α -domination perfect trees, Discrete Math. 308 (15) (2008) 3187–3198. [8] Thang N. Dinh, Yilin Shen, Dung T. Nguyen, My T. Thai, On the approximability of positive influence dominating set in social networks, J. Comb. Optim. 27 (3) (2014) 487–503. [9] Jean E. Dunbar, Dean G. Hoffman, Renu C. Laskar, Lisa R. Markus, α -domination, Discrete Math. 211 (2000) 11–26. [10] Rosa I. Enciso, Alliances in Graphs: Parameterized Algorithms and on Partitioning Series-Parallel Graphs (Ph.D. thesis), University of Central Florida, 2009. [11] Rosa I. Enciso, Ronald D. Dutton, Algorithms for defensive alliance problems. Manuscript. [12] Michael R. Fellows, Daniel Lokshtanov, Neeldhara Misra, Frances A. Rosamond, Saket Saurabh, Graph layout problems parameterized by vertex cover, in: ISAAC 2008, in: Lecture Notes in Computer Science, vol. 5369, 2008, pp. 294–305. [13] Michael R. Fellows, Frances A. Rosamond, Udi Rotics, Stefan Szeider, Clique-width is NP-complete, SIAM J. Discrete Math. 23 (2009) 909–939. [14] Henning Fernau, Daniel Raible, Alliances in graphs: a complexity-theoretic study, in: SOFSEM (2), 2007, pp. 61–70. [15] Henning Fernau, Juan Alberto Rodríguez-Velázquez, A survey on alliances and related parameters in graphs, Electron. J. Graph Theory Appl. 2 (2014) 70–86. [16] Henning Fernau, Juan Alberto Rodríguez-Velázquez, Jose Maria Sigarreta, Global r-alliances and total domination, in: Seventh Cologne Twente Workshop on Graphs and Combinatorial Optimization, 2008, pp. 98–101. [17] Henning Fernau, Juan Alberto Rodríguez-Velázquez, Jose Maria Sigarreta, Offensive r-alliances in graphs, Discrete Appl. Math. 157 (2009) 177–182. [18] András Frank, Éva Tardos, An application of simultaneous diophantine approximation in combinatorial optimization, Combinatorica 7 (1987) 49–65. [19] G.H. Fricke, L.M. Lawson, T.W. Haynes, S.M. Hedetniemi, S.T. Hedetniemi, A note on defensive alliances in graphs, Bull. Inst. Combin. Appl. 38 (2003) 37–41. [20] Lindsay H. Jamieson, Algorithms and complexity for alliances and weighted alliances of different types (Ph.D. thesis), Clemson University, 2007. [21] Lindsay H. Jamieson, Stephen T. Hedetniemi, Alice A. McRae, The algorithmic complexity of alliances in graphs, J. Combin. Math. Combin. Comput. 68 (2009) 137–150. [22] Ravi Kannan, Minkowski’s convex body theorem and integer programming, Math. Oper. Res. 12 (1987) 415–440. [23] Petter Kristiansen, Sandra M. Hedetniemi, Stephen T. Hedetniemi, Alliances in graphs, J. Combin. Math. Combin. Comput. 48 (2004) 157–177. [24] Hendrik W. Lenstra Jr., Integer programming with a fixed number of variables, Math. Oper. Res. 8 (1983) 538–548. [25] S. Mishra, Jaikumar Radhakrishnan, Sivaramakrishnan Sivasubramanian, On the hardness of approximating minimum monopoly problems, in: FSTTCS 2002, in: Lecture Notes in Computer Science, vol. 2556, 2002, pp. 277–288. [26] Sang-il Oum, Approximating rank-width and clique-width quickly, ACM Trans. Algorithms 5 (2008). [27] Sang-il Oum, Paul D. Seymour, Approximating clique-width and branch-width, J. Combin. Theory Ser. B 96 (2006) 514–528. [28] Khurram H. Shafique, Ronald D. Dutton, Maximum alliance-free and minimum alliance-cover sets, Congr. Numer. 162 (2003) 139–146. [29] Jose Maria Sigarreta, Sergio Bermudo, Henning Fernau, On the complement graph and defensive k-alliances, Discrete Appl. Math. 157 (2009) 1687–1695. [30] Changping Wang, The signed k-domination numbers in graphs, Ars Combin. 106 (2012) 205–211.