Vector Domination in split-indifference graphs

Vector Domination in split-indifference graphs

Journal Pre-proof Vector Domination in split-indifference graphs Rodrigo L. Mafort, Fábio Protti PII: S0020-0190(19)30182-6 DOI: https://doi.org/...

274KB Sizes 0 Downloads 44 Views

Journal Pre-proof Vector Domination in split-indifference graphs

Rodrigo L. Mafort, Fábio Protti

PII:

S0020-0190(19)30182-6

DOI:

https://doi.org/10.1016/j.ipl.2019.105899

Reference:

IPL 105899

To appear in:

Information Processing Letters

Received date:

18 December 2018

Revised date:

22 November 2019

Accepted date:

23 November 2019

Please cite this article as: R.L. Mafort, F. Protti, Vector Domination in split-indifference graphs, Inf. Process. Lett. (2020), 105899, doi: https://doi.org/10.1016/j.ipl.2019.105899.

This is a PDF file of an article that has undergone enhancements after acceptance, such as the addition of a cover page and metadata, and formatting for readability, but it is not yet the definitive version of record. This version will undergo additional copyediting, typesetting and review before it is published in its final form, but we are providing this version to give early visibility of the article. Please note that, during the production process, errors may be discovered which could affect the content, and all legal disclaimers that apply to the journal pertain. © 2020 Published by Elsevier.

Highlights • We present an O(n)-time algorithm for Vector Domination in split-indifference graphs. • Cases of the algorithm are based on a structural characterization of such graphs. • The O(n)-time complexity is achieved by appropriate manipulation of data structures.

Vector Domination in Split-Indifference Graphs Rodrigo L. Maforta , Fábio Prottia,∗ a

Institute of Computing – Fluminense Federal University, Niterói, Brazil

Abstract Given a graph G = (V, E) and a vector of nonnegative integers R[u]u∈V (the vertex requirements), a set S ⊆ V is an R-dominating set of G if each u ∈ V \ S has at least R[u] neighbors in S. The V ECTOR D OMINATION problem aims at finding a minimum R-dominating set S. In this work we describe an O(n)-time algorithm to solve V ECTOR D OMINATION in split-indifference graphs. Keywords: Vector Domination Problem, Split-Indifference Graph, Indifference Graph, Split Graph, Unit Interval Graph, Bounded Clique-Width

1

2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20

1. Introduction Given a graph G = (V, E) (where |V | = n) and a vector of nonnegative integers R[u]u∈V , a set S ⊆ V is an R-dominating set of G if each u ∈ V either is in S or has at least R[u] neighbors in S. The V ECTOR D OMINATION problem aims at finding an R-dominating set S of minimum cardinality. Values R[u] are the (vertex) requirements; we assume R[u] ≤ deg(u) for every u ∈ V . The well-known D OMINATING S ET problem [1] corresponds to the particular case R[u] = 1 for every u ∈ V . Thus, V ECTOR D OMINATION is NP-hard. In fact, V ECTOR D OMINATION generalizes the k-D OMINATING S ET problem, where R[u] = k for every u ∈ V . Booth and Johnson [2] show that D OMINATING S ET remains NP-hard for chordal graphs. Bertossi [3] extends this result to split graphs, and also proves the NP-hardness of D OMINATING S ET for bipartite graphs. Thus, V ECTOR D OMINATION remains NP-hard when restricted to such classes. Cicalese et al. [4] list several domination models in graphs, and prove that: (a) V ECTOR D OMINATION cannot be approximated to within a factor of 0.1133 ln n, unless P = NP; (b) V ECTOR D OMINATION can be approximated in polynomial time by a factor of ln Δ+2, where Δ is the maximum degree of the input graph; (c) V ECTOR D OMINATION can be solved in polynomial time for trees and cographs. The inapproximability factor of 0.1133 ln n can be improved to (1 − ) ln n for every  > 0 [5]. V ECTOR D OMINATION is related to graph convexity and processes in graphs. The I NTERVAL S ET problem seeks for a minimum subset S of vertices of a graph G = (V, E) such that I(S) = V , where I : 2V → 2V is a function expressing the convexity rule or the iteration rule in a graph process. The value of such a function is often computed by adding to a subset S all the vertices u ∈  ∗

This project was partially supported by CNPq, FAPERJ (grant no. E-26/200.547/2018), and CAPES - Brazil. Corresponding author Email addresses: [email protected] (Rodrigo L. Mafort), [email protected] (Fábio Protti)

Preprint submitted to Information Processing Letters

November 25, 2019

27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45

Theorem 1. [12] A connected graph G = (V, E) is a split-indifference graph if and only if: 1. G is a complete graph, or 2. G is formed by the union of two cliques C1 and C2 such that |C1 \ C2 | = 1, or 3. G is formed by the union of three cliques C1 , C2 , and C3 such that |C1 \ C2 | = |C3 \ C2 | = 1 and (a) C1 ∩ C3 = ∅ or (b) C1 ∪ C3 = V. (See Figure 1.)

}

= 1

}

R

{w

{w

R12

C3

=

=

{v

C1

R3

v

C3

R3

C1

C1

}

26

{v

25

=

24

1

23

R

22

S having at least R[u] neighbors in S. The application of I is repeated (by defining I 1 (S) = I(S) and I k (S) = I(I k−1 (S)), k > 1) until the process stabilizes, that is, when I k (S) = I k−1 (S). There are several applications based on this model: disease spread, information dissemination, social network influence, and others [6–9]. In this context, V ECTOR D OMINATION can be regarded as the problem of determining the minimum number of influencers needed to reach, in one step, all the individuals in a network, where each individual has his/her own requirement level. If R[u] = deg(u)/2 for every u ∈ V , an R-dominating set of G is said to be a monopoly [10]. Besides influence/disease spread, monopolies also model consensus and voting problems. Monopolies are an example of a model where requirements are not bounded by a constant. A graph G = (V, E) is an indifference graph [11] if there is a function f : V → R such that for every pair of vertices u, v ∈ V , {u, v} ∈ E if and only if |f (u)−f (v)| ≤ 1. Indifference graphs are defined in the context of social sciences and mathematical psychology to model “indistiguishability” between individuals of a certain domain (thence the name “indifference”). Individuals u and v are indistinguishable according to measurement f exactly when |f (u) − f (v)| ≤ 1. Combinatorial arguments show that indifference graphs are precisely the unit (or proper) interval graphs, a terminology more widely used in the literature. To the best of the authors’knowledge, the complexity of V ECTOR D OMINATION for indifference graphs is an open problem; since V ECTOR D OMINATION is NP-hard for split graphs, a natural and interesting question is to investigate the complexity of this problem in the intersection of such classes. A graph G is a split-indifference graph if it is both a split graph and an indifference graph. The characterization below will be useful:

}

21

R23

R12

R123

R23

R2 C2

C2

C2

Figure 1: Representation of Cases 2, 3(a), and 3(b), where R12 = (C1 ∩ C2 ) \ C3 , R23 = (C2 ∩ C3 ) \ C1 , and R123 = C1 ∩ C2 ∩ C3 . Shaded areas are empty. In Case 3(b), note that: (i) C2 \ (C1 ∪ C3 ) = ∅; (ii) C1 ∩ C3 = ∅ (to distinguish it from Case 3(a)); (iii) (C1 ∩ C3 ) \ C2 = ∅. 46 47 48 49

Markenzon and Waga [13] present a method to count and list unlabeled split-indifference graphs with n vertices. Cicalese et al. [14] describe a polynomial-time algorithm for L ATENCYB OUNDED TARGET S ET S ELECTION for graphs with bounded clique-width; this problem generalizes V ECTOR D OMINATION, and the approach in [14] implies an O(|σ|n5k )-time algorithm for 2

54

V ECTOR D OMINATION applied to an input graph G with |V | = n and clique-width at most k, where G is given by a k-expression σ. Since split-indifference graphs have clique-width at most 3 and a 3-expression of size O(n) for such graphs can be obtained in linear time, this yields an O(n16 )-time algorithm for V ECTOR D OMINATION in split-indifference graphs. In this work, we show that an O(n)-time algorithm is possible, proving in Section 2 the following theorem:

55

Theorem 2. V ECTOR D OMINATION can be solved in O(n) time for split-indifference graphs.

50 51 52 53

56 57 58 59 60 61 62

63 64 65 66 67 68 69 70 71 72 73 74

75 76

The fact that split-indifference graphs have clique-width at most 3 can be easily derived from the definition of clique-width. Consider the three operations below, defined in [15]: (a) create(x, l): creates a new vertex x with label l; (b) add-edges(l, l ): create all edges between vertices labeled l and vertices labeled l ; (c) relabel(l, l ): change the label of all vertices labeled l to l . For instance, let G be a split-indifference graph satisfying Case 3(b) of Theorem 1 (see Figure 1). The following sequence of operations constructs G using only three labels: 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12.

for some x in R12 , create(x, 1); for each x = x in R12 do: create(x , 2), add-edges(2, 1), relabel(2, 1); for some y in R23 do: create(y, 3), add-edges(3, 1), relabel(3, 2); for each y  = y in R23 do: create(y  , 3), add-edges(3, 1), add-edges(3, 2), relabel(3, 2); create(v, 3); add-edges(3, 1); relabel(3, 1); create(w, 3); add-edges(3, 2); relabel(3, 2); relabel(2, 1); for each z in R123 do: create(z, 2), add-edges(2, 1), relabel(2, 1).

We remark that the clique-width can also be experimentally determined using the TRAG system [16, 17]), in many practical scenarios.

80

For simplicity, in this work we refer to a clique indistinctively as a subset of vertices or a complete subgraph. Any R-dominating set S of G is a solution. If no proper subset of S is an R-dominating set of G then S is a minimal solution. If S has minimum cardinality, then it is an optimal solution. The neighborhood of a vertex v is denoted by N (v), and N [v] = {v} ∪ N (v).

81

2. O(n)-time algorithm for split-indifference graphs

77 78 79

82 83 84 85 86 87

2.1. Processing the input Let G be a connected split-indifference graph with V = {1, . . . , n}. The vertex degrees can be computed when reading G’s edges, with no time complexity increase. Now, we show how to determine in O(n) time which of the cases of Theorem 1 (1, 2, 3(a), or 3(b)) applies to G, as well as the corresponding cliques. First, sort the vertex degrees in O(n) time using counting sort. Next, set v as a vertex with minimum degree (see Figure 1). If deg(v) = n − 1 then G is in Case 1 3

88 89 90 91 92 93 94 95

96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128

and C1 = V . If deg(v) ≤ n − 2 and deg(u) ≥ n − 2 for all u = v then G is in Case 2, where C1 = N [v] and C2 = V \ {v}. At this point, let w be a vertex with second minimum degree. If deg(v) ≤ n − 3, deg(w) ≤ n − 3, and deg(u) ≤ n − 2 for all u ∈ {v, w}, then G is in Case 3(a), where C1 = N [v], C2 = V \ {v, w}, and C3 = N [w]. Finally, if deg(v) ≤ n − 3, deg(w) ≤ n − 3, and there is u with deg(u) = n − 1, then G is in Case 3(b) and C1 , C2 , C3 are set as in Case 3(a). Note that the “if” cases are disjoint and take O(n) time overall. By storing each clique Cj as a binary vector such that Cj [i] = 1 if and only if vertex i belongs to Cj , we can check in O(1) time if two vertices are adjacent, since this amounts to checking if they belong to a same clique. 2.2. Algorithm for Cases 1, 2, and 3(a) of Theorem 1 Case 1 in Theorem 1 can be solved by applying an O(n)-time greedy approach to solve V ECTOR D OMINATION in a complete graph described in [4]. It consists of sorting R so that R[u1 ] ≥ R[u2 ] ≥ · · · ≥ R[un ] (this can be done using counting sort, since R[ui ] < n for every i ), and then finding the minimum index p ∈ {0, 1, . . . , n − 1} such that p ≥ R[up+1 ]. The set S = {u1 , . . . , up } is then an optimal solution. The entire procedure runs in O(n) time. Case 2 in Theorem 1 is solved as follows. Let {v} = C1 \ C2 . The optimal solution is determined by taking the better of two subcases, both reducible to Case 1.  First, we construct a best possible solution containing v. Vertex v is included in the solution, and the requirement of each u ∈ N (v) is decreased by one or does not change if it is zero. At this point, the procedure used in Case 1 can be applied to C2 ; let Q1 be the set returned by the procedure. A solution for this subcase is then Y1 = {v} ∪ Q1 .  Next, we construct a best possible solution not containing v. In this situation, R[v] neighbors of v must be included in the solution. A set A of R[v] neighbors of v with largest requirements (i.e., if v  ∈ A and v  ∈ N (v) \ A then R[v  ] ≥ R[v  ]) is included in the solution, and the requirement of each u ∈ C2 \ A is updated to max{R[u] − |A|, 0}. Then, the procedure used in Case 1 is applied to C2 \ A; let Q2 be the set returned by the procedure. A solution for this subcase is Y2 = A ∪ Q2 . The final solution of Case 2 is the smaller of Y1 and Y2 . This strategy clearly takes O(n) time. The correctness of the above strategy for Case 2 is straightforward. Let S be an optimal solution for Case 2, and assume |S| = k. If v ∈ S then S \ {v} ⊆ C2 , |S \ {v}| = k − 1, and each vertex x ∈ C2 \ S must satisfy R[x] ≤ k if x ∈ N (v), and R[x] ≤ k − 1 if x ∈ / N (v); this means that the strategy of decreasing the requirements of neighbors of v by one and then taking the k − 1 vertices with largest (updated) requirements in C2 is correct. If v ∈ / S then S ⊆ C2 and k ≥ R[v]; in addition, we can assume that the R[v] vertices of C2 with largest requirements are in S, and the remaining k − R[v] vertices of S can be greedily chosen as described above. In Case 3(a), we proceed as in Case 2, taking the better of two possibilities:  Vertex v is included in the solution and the requirements of v’s neighbors are decremented by one, except those equal to zero. Next, the same strategy used in Case 2 is applied to G − v.  Vertex v is not included in the solution; then, a set B of R[v] neighbors of v with largest requirements is included in the solution, and the requirements of the vertices in C2 \ B are updated as explained earlier. Next, the same strategy used in Case 2 is applied to G − ({v} ∪ B), since B ∩ N (w) = ∅. Both this and the previous subcase of Case 3(a) can be solved in O(n) time. The strategy for Case 3(a) is based on that for Case 2, i.e., its correctness easily follows. Then: 4

129 130 131

132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154

Lemma 1. Let G = (V, E) be a split-indifference graph satisfying one of the Cases 1, 2, or 3(a) of Theorem 1, and let R[v]v∈V be a vector of requirements. Then a minimum R-dominating set of G can be determined in O(n) time. 2.3. Algorithm for Case 3(b) The algorithm for Case 3(b) first constructs a best possible solution containing v, following the previous idea: v is included in the solution, the requirements of v’s neighbors are updated, and the same strategy used in Case 2 can be applied to G − v (because G − v consists of two cliques, C2 and C3 , such that |C3 \ C2 | = 1). Let Sv be the solution obtained in this way. Define Sw similarly. Now we construct a best possible solution S˜ such that S˜ ∩ {v, w} = ∅. Since v and w have common neighbors, we need a deeper analysis. The algorithm first determines two best possible solutions S1 and S3 of C1 and C3 , respectively, such that v ∈ S1 and w ∈ / S3 . Since C1 ∪ C3 = V , S = S1 ∪ S3 is an R-dominating set of G, not necessarily optimal. The algorithm then starts a new phase that tries to reduce S by applying vertex removals. In the removal phase, every u ∈ S is analyzed, following a non-decreasing order of requirements, to determine if the removal of u still leaves an R-dominating set of G (i.e., the removal of u is “feasible”). See Algorithm 1. Let S  be the solution obtained after performing the removal phase. Now, a new phase based on vertex swaps begins. Vertex swaps are movements that replace a pair of distinct vertices in S  by one vertex outside S  . To ensure that a swap move is feasible (that is, S  remains an Rdominating set of G after the move), three conditions must be satisfied: (a) S  must contain two vertices av and aw such that av ∈ R12 ∩ S  and aw ∈ R23 ∩ S  ; (b) the requirements of all vertices in C2 \ (S  \ {av , aw }) must be strictly less than |S  |; (c) there must exist a vertex ac ∈ R123 such that ac ∈ / S  and ac is adjacent to both v and w. If these three conditions are satisfied then the swap move can be done: av and aw are removed from S  and ac is added to S  . Among all triples (av , aw , ac ) satisfying the three conditions above, av and aw are chosen so that R[av ] and R[aw ] are minimized, and R[ac ] is maximized. This process is repeated until no more swaps are possible. Algorithm 2 describes the vertex swap phase. The entire algorithm for Case 3(b) is Algorithm 3. Algorithm 1: Removal phase 1 Function Reduce(S) 2 let u1 , . . . , uk be an ordering of the vertices in S such that R[u1 ] ≤ . . . ≤ R[uk ] 3 Saux ← S; 4 for i = 1, . . . , k 5 if Saux \ {ui } is an R-dominating set of G then Saux ← Saux \ {ui } 6 return Saux 7 end

5

155

156 157 158

159 160 161 162 163 164 165 166 167 168

169 170 171 172 173

174 175 176 177 178 179 180 181

Algorithm 2: Vertex swap phase  1 Function Swap(S ) 2 adjvw ← R123 \ S  ; adjv ← R12 ∩ S  ; adjw ← R23 ∩ S  while (|adjvw | > 0) and (|adjv | > 0) and (|adjw | > 0) do 3 4 remove from adjv a vertex av such that R[av ] is minimum 5 remove from adjw a vertex aw such that R[aw ] is minimum 6 if R[u] < |S  | for all u ∈ C2 \ (S  \ {av , aw }) then 7 remove from adjvw a vertex ac such that R[ac ] is maximum 8 S  ← (S  \ {av , aw }) ∪ {ac } 9 end 10 end 11 return S  12 end Lemma 2. Let G = (V, E) be a split-indifference graph satisfying Case 3(b) of Theorem 1, and let R[v]v∈V be a vector of requirements. Then Algorithm 3 returns a minimum R-dominating set of G in O(n) time. Proof. If there is an optimal solution containing v or w then the algorithm is clearly correct, because in this case at least one of Sv and Sw is optimal. Assume then that every optimal solution contains neither v nor w; we thus need to show that the solution S˜ obtained in line 10 of Algorithm 3 is optimal. We first remark that sets S1 and S3 defined in line 8 of Algorithm 3 can be easily constructed via a simple adaptation of the approach described in [4] to solve V ECTOR D OMINATION in complete graphs. Write C1 = {u1 , u2 , . . . , uk }, where uk = v and R[u1 ] ≥ R[u2 ] ≥ · · · ≥ R[uk−1 ]. Then we find the minimum index p ∈ {0, 1, . . . , k − 1} such that p ≥ R[up+1 ] and p ≥ R[v] and define S1 = {u1 , . . . , up }. (The same approach applies to C3 .) Let S  be the set returned by the Reduce procedure applied to S (line 10 in Algorithm 3). It can be observed that S  satisfies three properties: (i) S  is a minimal solution, i.e., no proper subset of S  can R-dominate G; (ii) for every pair x, y with x ∈ (R12 ∪ R123 ) ∩ S  (resp., (R23 ∪ R123 ) ∩ S  ) and y ∈ (R12 ∪ R123 ) \ S  (resp., (R23 ∪ R123 ) \ S  ) it holds that R[x] ≥ R[y]; (iii) if there is a pair x, y with x ∈ R12 ∩ S  (resp., R23 ∩ S  ) and y ∈ R23 \ S  (resp., R12 \ S  ) such that R[x] < R[y] then R[v] = |N (v) ∩ S  | (resp., R[w] = |N (w) ∩ S  |). Property (i) trivially follows from the way Algorithm 1 constructs S  from S. Property (ii) follows from the way S1 and S3 are constructed and the ordering considered in line 2 of Algorithm 1. This ordering also ensures that property (iii) is valid: if a vertex with greater requirement is removed in Algorithm 1 while a vertex x with smaller requirement is maintained in S  , it is clear that there is a vertex y ∈ / S  which “prevents” the removal of x, that is, if x is removed from S  then y is no longer dominated because x ∈ N (y) and R[y] = |N (y) ∩ S  |. But considering that all vertices in S  have the same neighborhood in C2 , the only possible conclusion is that y = v or y = w, which implies that R[v] = |N (v) ∩ S  | or R[w] = |N (w) ∩ S  | at this moment. 6

Algorithm 3: Algorithm for Case 3(b) in Theorem 1 Input: Split-indifference graph G satisfying Case 3(b) of Thm. 1; vector R[v]v∈V Output: Minimum R-dominating set of G 1 let {v} = C1 \ C2 and {w} = C3 \ C2 2 /* determining solutions Sv and Sw */ 3 for u ∈ V \ {v} do 4 if u ∈ N (v) then 5 R [u] ← max{R[u] − 1, 0} 6 else 7 R [u] ← R[u] 8 end 9 end  10 let Qv be an optimal solution of input (G − v, R ) using Case 2, and let Sv = {v} ∪ Qv 11 for u ∈ V \ {w} do 12 if u ∈ N (w) then 13 R [u] ← max{R[u] − 1, 0} 14 else 15 R [u] ← R[u] 16 end 17 end  18 let Qw be an optimal solution of input (G − w, R ) using Case 2, and let Sw = {w} ∪ Qw ˜ such that S˜ ∩ {v, w} = ∅ */ 19 /* determining solution S 20 let S1 , S3 be best possible solutions of C1 , C3 such that v ∈ S1 , w ∈ / S3 21 S ← S1 ∪ S3  22 S ←Reduce (S) ˜ ←Swap (S  ) 23 S ˜ 24 return a smallest of Sv , Sw , and S

182 183 184 185 186 187 188 189 190 191 192 193 194

To proceed with the proof, we must consider the causes that prevent further removals from S  . Let a ∈ S  be a vertex with smallest requirement. We analyze two possibilities. If R[a] ≥ |S  | then S  is clearly an optimal solution: If we suppose a set Y with fewer elements, let y be a vertex in S  \ Y . Since R[y] ≥ |S  | > |Y |, it follows that R[y] > |Y |, which implies that there is no R-dominating set with fewer elements than S  , proving that S  is optimal. On the other hand, if R[a] < |S  | then there must be a vertex b ∈ / S  which prevents the removal of a, that is, R[b] = |N (b) ∩ S  |. Let us analyze possible locations of a and b in G. Case A: Suppose b ∈ C2 . Then S  ⊆ N (b), which implies that R[b] = |S  |. We have two possible locations for a: a ∈ R12 (the case a ∈ R23 is analogous), or a ∈ R123 . Since R[b] = |S  | and R[a] < |S  |, the case where a ∈ R123 violates property (ii) because R[a] < R[b], a ∈ S  , and b∈ / S  . Thus, without loss of generality, only the case a ∈ R12 remains to be analyzed. In this case, the only possible location for b to keep property (ii) valid is b ∈ R23 . This configuration, according to property (iii), also implies R[v] = |N (v)∩S  |. Since b ∈ / S  and R[b] = |S  |, property 7

195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235

(ii) also ensures that every vertex x ∈ (R23 ∪ R123 ) ∩ S  satisfies R[x] ≥ |S  |. At this moment we know that v inhibits the removal of all vertices in (R12 ∪ R123 ) ∩ S  and that every vertex in (R23 ∪ R123 ) ∩ S  cannot be dominated by any set Y with fewer elements than S  . This is explained as follows. If Y is a minimum R-dominating set of G and Y = S  then there is z ∈ Y such that either z ∈ (R23 ∪ R123 ) ∩ S  or z ∈ R12 ∩ S  . In the former case, since Y must contain R[z] neighbors of z and R[z] ≥ |S  |, we have |Y | ≥ R[z] ≥ |S  |. In the latter case, Y must contain R[v] neighbors of v; but since R[v] = |N (v) ∩ S  |, again we get |Y | ≥ |S  |. Hence, S  is indeed a minimum R-dominating set of G, that is, if b ∈ C2 then S  is an optimal solution. Case B: Now, suppose b ∈ / C2 . Then, b = v or b = w. Assume without loss of generality that b = v. Then a ∈ N (v) ∩ S  , which implies that a ∈ R12 or a ∈ R123 , and that R[v] = |N (v) ∩ S  |. If adjw = R23 ∩ S  = ∅ then S  ⊆ N (v), which implies R[v] = |S  |. Hence S  is an optimal solution, because there is no set with fewer elements than S  that can R-dominate v. On the other hand, if adjw = ∅, let aw be a vertex with smallest requirement in adjw . There are two possibilities: Case B.1: If R[aw ] ≥ |S  | then S  is an optimal solution. In order to prove that, if we suppose that S  is not optimal, let X be an optimal solution without v or w. Let us split the sets X and S  in two disjoint subsets: X ∩ N (v) and X ∩ R23 , which implies that |X ∩ N (v)| + |X ∩ R23 | < |S  ∩ N (v)| + |S  ∩ R23 |. Since R[aw ] ≥ |S  | and |X| < |S  |, we can conclude that R[aw ] > |X| and that every vertex in adjw must be included in X. Thus, we have |X ∩ R23 | = |S  ∩ R23 |. Consequently, the expression |X ∩ N (v)| + |X ∩ R23 | < |S  ∩ N (v)| + |S  ∩ R23 | can be simplified to |X ∩ N (v)| < |S  ∩ N (v)|. However, as previously demonstrated, |S  ∩ N (v)| = R[v], which implies |X ∩ N (v)| < R[v]. Thus, since any set with fewer elements than S  cannot R-dominate G, we conclude that S  is actually an optimal R-dominating set. Case B.2: Suppose now R[aw ] < |S  |. Since aw ∈ S  and aw ∈ / N (v), there must be a vertex   y ∈ / S such that S \ {aw } does not R-dominate y. Clearly, y = v. Also, y ∈ / C2 , because: (a) if y ∈ R23 or y ∈ R123 then property (ii) would be violated by aw and y, since in this case aw ∈ R23 ∩ S  ⊆ (R23 ∪ R123 ) ∩ S  , y ∈ (R23 ∪ R123 ) \ S  , and R[aw ] < |S  | = R[y]; (b) if y ∈ R12 then property (ii) would be violated by a and y, since in this case a ∈ (R12 ∪ R123 ) ∩ S  (recall the location of a in the graph), y ∈ (R12 ∪ R123 ) \ S  , and R[a] < |S  | = R[y]. Therefore, the only remaining possibility is y = w, which implies R[w] = |N (w) ∩ S  |. From now on, we know that R[v] = |N (v) ∩ S  | and R[w] = |N (w) ∩ S  |. Let us analyze the location of vertex a. Recall that a is a vertex with smallest requirement in S  , and that a ∈ R12 ∩ S  or a ∈ R123 ∩ S  . Case B.2.1: If a ∈ R12 ∩ S  then a is a candidate for a swap move. Note that aw is also a candidate for such move, because aw is a vertex with smallest requirement in R23 ∩ S  . If R123 \ S  = ∅ then no swap move is possible and S  is an optimal solution: R123 ⊆ S  and there is no set with fewer elements that can R-dominate v and w. Otherwise, let ac be a vertex with largest requirement in R123 \ S  , and let S  = (S  \ {a, aw }) ∪ {ac }. Since R[a] < |S  | and R[aw ] < |S  |, S  R-dominates a and aw . In addition, it is easy to see that S  R-dominates v and w. Thus, S  is a solution obtained by a swap move with fewer elements then S  . Case B.2.2: If a ∈ R123 ∩ S  then a is not a candidate for a swap move. Thus, besides aw , another candidate for a swap move must be a vertex in R12 ∩S  . If no such a vertex exists then S  is optimal 8

236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264

because S  ⊆ N (w) and R[w] = |S  |. Otherwise, let av be a vertex with smallest requirement in R12 ∩ S  . The case R[av ] ≥ |S  | is analogous to the earlier explained case R[aw ] ≥ |S  | and leads to the conclusion that S  is optimal, while the case R[av ] < |S  | follows the same argumentation in Case B.2.1 (using av instead of a). In either of the Cases B.2.1 and B.2.2, note that the new solution S  obtained by a swap move satisfies properties (i)–(iii) (replace S  by S  in the statements): (i) is satisfied because R[v] = |N (v) ∩ S  | and R[w] = |N (w) ∩ S  |, i.e., no set properly contained in S  can dominate both v and w; (ii) is satisfied because the swap move replaces a pair of vertices with smallest requirements in R12 ∩S  and R23 ∩S  , respectively, by a vertex with largest requirement in R123 \S  ; finally, (iii) is satisfied because, as said above, R[v] = |N (v)∩S  | and R[w] = |N (w)∩S  |. Thus, since properties (i)–(iii) are preserved under the application of a swap move, new moves of this type can be iteratively applied (see the while command in lines 3–10 of Algorithm 2) without violating such an invariant. Algorithm 2 eventually stops because the number of swap moves is bounded by min{ |R123 \ S  |, |R12 ∩ S  |, |R23 ∩ S  | }. It is essential to note the following key point in this proof: either there is at least one more swap movement or the solution is optimal, since in all possible cases where the swap move is impossible the current solution is proved to be optimal. Therefore, Algorithm 3 is correct. Time complexity. Solutions Sv and Sw can be determined (lines 3–5 of Algorithm 3) in O(n) time, since their construction uses the strategy for Case 2 of Theorem 1. ˜ the greedy approach used for the construction of sets S1 and S3 As to the determination of S, (line 8 of Algorithm 3) takes O(n) time. Procedure Reduce in line 10 of Algorithm 3 can also be performed in O(n) time as follows. Note first that the ordering in line 2 of Algorithm 1 can be obtained in O(n) time using counting sort. In addition, the feasibility test in line 5 of Algorithm 1 can be done in O(1) time by maintaining some auxiliary, dynamically updatable variables: a boolean vector Av such that Av [ui ] = true if and only if ui ∈ N (v) ∩ Saux ; a similar vector Aw to store N (w) ∩ Saux ; dynamic counters cv and cw to store the current number of elements in Av and Aw , respectively; and Rmax to store the largest requirement of a vertex in C2 \ Saux . Note that all such variables can be trivially initialized in O(n) time. The test in line 5 of Algorithm 1 amounts then to checking the condition below: (R[ui ] < |Saux |)∧(Rmax < |Saux |)∧(Av [ui ] = false ∨R[v] < cv )∧(Aw [ui ] = false ∨R[w] < cw ).

265 266 267 268 269 270 271 272 273 274 275

To conclude the complexity analysis of Reduce, we remark that each time a vertex ui is removed from Saux , all the above variables can be easily updated in O(1) time: if R[ui ] > Rmax then Rmax is updated to R[ui ], and if ui ∈ N (v) then Av [ui ] is set to false and cv is decreased by one (the same for Aw [ui ] and cw ). Now we analyze the complexity of the Swap procedure (line 11 of Algorithm 3). Sets adjv , adjw , and adjvw can be implemented as queues, sorted in non-decreasing order of vertex requirements in the case of adjv and adjw , and in non-increasing order in the case of adjvw . Initializing such queues can be done in O(n) time, and the vertex removals in lines 4, 5, and 7 can be done  in O(1) time each. In addition to the queues, we also need a variable Rmax to store the largest re quirement of a vertex in (R12 ∪ R23 ) \ S . At each iteration of Swap, av and aw are dequeued from adjv and adjw . Also, let z be the second element of the queue adjvw . Note that advvw can contain 9

276 277 278

only one vertex, i.e., vertex z may not exist; in this case, the last condition in the feasibility check must be ignored. Thus, the feasibility of a swap move (line 6 in Algorithm 2) can be evaluated in O(1) time by the following expression:  (R[av ] < |S  |) ∧ (R[aw ] < |S  |) ∧ (Rmax < |S  |) ∧ (R[z] < |S  |).

279 280 281

282

  After a swap move, Rmax is updated in O(1) time to max{Rmax , R[av ], R[aw ]}. Since the number   of swap moves is bounded by min{ |R123 \ S |, |R12 ∩ S |, |R23 ∩ S  | } ≤ n, the Swap procedure runs in O(n) time. Hence, the overall complexity of Algorithm 3 is O(n).

As a consequence of Lemmas 1 and 2, we have:

283

Theorem 2. V ECTOR D OMINATION can be solved in O(n) time for split-indifference graphs.

284

References

285

[1] M. R. Garey, D. S. Johnson, Computers and Intractability; A Guide to the Theory of NP-Completeness, W. H. Freeman & Co., 1990. [2] K. S. Booth, J. Johnson, Dominating sets in chordal graphs., SIAM J. Comput. 11 (1982) 191–199. [3] A. A. Bertossi, Dominating sets for split and bipartite graphs, Inform. Process. Lett. 19 (1984) 37–40. [4] F. Cicalese, M. Milaniˇc, U. Vaccaro, On the approximability and exact algorithms for vector domination and related problems in graphs, Discrete Appl. Math. 161 (2013) 750–767. [5] F. Bonomo, B. Brešar, L. N. Grippo, M. Milaniˇc, M. D. Safe, Domination parameters with number 2: interrrelations and algorithmic consequences, Discrete Applied Mathematics 253 (2018) 23–50. [6] P. A. Dreyer, F. S. Roberts, Irreversible k-threshold processes: Graph-theoretical threshold models of the spread of disease and of opinion, Discrete Appl. Math. 157 (2009) 1615–1627. [7] C. C. Centeno, M. C. Dourado, L. D. Penso, D. Rautenbach, J. L. Szwarcfiter, Irreversible conversion of graphs, Theoretical Computer Science 412 (2011) 3693–3700. [8] M. C. Dourado, J. G. Gimbel, J. Kratochvíl, F. Protti, J. L. Szwarcfiter, On the computation of the hull number of a graph, Discrete Math. 309 (2009) 5668–5674. [9] D. Kempe, J. Kleinberg, É. Tardos, Maximizing the spread of influence through a social network, in: Proceedings of the Ninth ACM SIGKDD International Conference on Knowledge Discovery and Data Mining - KDD ’03, ACM Press, New York, New York, USA, 2003, p. 137. [10] K. Khoshkhah, M. Nemati, H. Soltani, M. Zaker, A study of monopolies in graphs, Graphs and Combinatorics 29 (2013) 1417–1427. [11] M. C. Golumbic, Algorithmic Graph Theory and Perfect Graphs, Academic Press, 1980. [12] C. Z. Ortiz, N. Maculan, J. L. Szwarcfiter, Characterizing and edge-colouring split-indifference graphs, Discrete Appl. Math. 82 (1998) 209–217. [13] L. Markenzon, C. F. E. M. Waga, Counting and enumerating unlabeled split-indifference graphs, Discrete Mathematics, Algorithms, and Applications 9 (2017) 1750055. [14] F. Cicalese, G. Cordasco, L. Gargano, M. Milaniˇc, U. Vaccaro, Latency-bounded target set selection in social networks, Theoretical Computer Science 535 (2014) 1–15. [15] B. Courcelle, S. Olariu, Upper bounds to the clique width of graphs, Discrete Appl. Math. 101 (2000) 77–114. [16] B. Courcelle, I. Durand, Computations by fly-automata beyond monadic second-order, Theoretical Computer Science 619 (2016) 32–67. [17] I. Durand, M. Raskin, TRAG System, http://trag.labri.fr/, 2018. Accessed: 2019-06-21.

286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314

10

There are no conflicts of interest.