DISCRETE APPLIED MATHEMATICS ELSEVIER
Discrete
The algorithmic Jean Dunbar”,
Applied
Mathematics
complexity
68 (1996)
73-84
of minus domination
in graphs
Wayne Goddard’, Stephen Hedetniemi ‘. Alice McRae”, Michael A. Henning d.*
aDepartment of Mathematics. Cornzrse College, Spartarrburg. SC 179302.0006. USA b Depurtment of Muthemutics, University of‘ Nutal, Durban. South A~fricu ’ Department of Computer Science. Clemson Udoersity, Clemson, SC 29634-1906. USA d Department qf Mathematics, Unicersity of Natal. P. 0. Bus 375. Pietermarit:hury. South A,jriccr Received
3 November
1993; revised
19 October
1994
Abstract A three-valued function f defined on the vertices of a graph G = ( V, E), f : V 4 {-I. 0. I }, is a minus dominating function if the sum of its function values over any closed neighborhood is at least one. That is, for every 1~t V, ,f(N[o]) > 1, where N[c] consists of I: and every vertex adjacent to 1’. The weight of a minus dominating function is f(V)= c f(u), over all vertices L:t V. The minus domination number of a graph G, denoted y--(G). equals the minimum weight of a minus dominating function of G. The upper minus domination number of a graph G. denoted T-(G), equals the maximum weight of a minimal minus dominating function of G. In this paper we present a variety of algorithmic results. We show that the decision problem corresponding to the problem of computing y- (respectively, r- ) is NP-complete even when restricted to bipartite graphs or chordal graphs. We also present a linear time algorithm for finding a minimum minus dominating function in an arbitrary tree.
1. Introduction
In with I(v), l(u)
this paper we shall use the terminology of [3]. Specifically, if T is a rooted tree root r and L’is a vertex of T, then the level rzunzber of v, which we denote by is the length of the unique r--u path in T. If a vertex 2! of T is adjacent to u and > l(o), then u is called a child of v, and v is the parent of u. A vertex ~$1is a descendant of I: (and v is an ancestor of w) if the level numbers of the vertices on the F-~V path are monotonically increasing. We will refer to an end-vertex of T as a IeLcf. A chord of a cycle is an edge joining two vertices on the cycle that arc not adjacent on the cycle. A graph in which every cycle of length greater than 3 contains a chord is called a chordal graph.
* Corresponding
Cl166-218X/96/$1
author.
5.00
Q 1996 Elsevier
SSDI 0 166-2 18X(95)00056-Y
Science
N.V. All right:.
reserved
74
J. Dunbar et al. I Discrete Applied Mathematics 68 (1996)
73-84
Let G = (V,E) be a graph and let u be a vertex in V. The closed neighborhood N[v] of u is defined as the set of vertices within distance 1 from v, i.e., the set of vertices {U 1d(u, V) < l}. The open neighborhood N(v) of v is N[v] - {v}. For a set S of vertices, S and the closed
we define the open neighborhood neighborhood
inating set if N[S]
=
N[S]
= N(S)
N(S)
= UN(v)
over all v in
U S. A set S of vertices
V. The domination number of a graph
is a dom-
G, denoted
y(G),
cardinality of a dominating set in G. Similarly, the upper domination number T(G) is the maximum cardinality of a minimal dominating set
is the minimum
in G. Let g : V -+ (0, l} be a function which assigns to each vertex of a graph an element of the set (0, 1). To simplify notation we will write g(S) for c g(v) over all v in the set S of vertices, and we define the weight of g to be g(V). We say g is a dominating function if for every v E V, g(N[v])a 1. We say g is a minimal dominating function if there does not exist a dominating function h # g, for which h(u) < g(u) for every LJ E V. This is equivalent
h : V + (0, l), to saying that a
dominating function g is minimal if for every vertex v such that g(v) > 0, there exists a vertex u E N[u] for which g(N[u]) = 1. The domination number and upper domination number of a graph G can be defined as y(G) = min{g( V) ( g is a dominating function on G} and T(G) = max{g( V) 1g is a minimal dominating function on G}. A minus dominating function has been defined similarly in [6]. A function g : V -+ {-l,O, 1) is a minus dominating function if g(N[v])2 1 for every u E V. A minus dominating function is minimal if and only if for every vertex v E V with g(u)> 0, there exists a vertex u E N[v] with g(N[u]) = 1. The minus domination number for a graph G is y-(G) = min{g( V) ( g is a minus dominating function on G} and the
upper minus domination number for a graph G is T-(G) minus dominating
function
on G}. In [6] various
number are presented. There is a variety of possible
applications
= max{g( V) 1g is minimal properties of the minus domination
for this variation
of domination.
By as-
signing the values - 1,O or + 1 to the vertices of a graph we can model such things as networks of positive and negative electrical charges, networks of positive and negative spins of electrons, and networks of people or organizations in which global decisions must be made (e.g. positive, negative or neutral responses or preferences). In such a context, for example, the minus domination number represents the minimum number of people whose positive votes can assure that all local groups of voters (represented by closed neighborhoods) have more positive than negative voters, even though the entire network may have far more people who vote negative than positive. Hence this variation of domination studies situations in which, inspite of the presence of negative vertices, the closed neighborhoods of all vertices are required to maintain a positive sum. In this paper we present a variety of algorithmic results on the complexity of minus domination in graphs.
J. Dunbar et al. 1 Discrete
2. Complexity
Applied Mathematics
68 119%)
73-84
75
issues for minus domination
The following
decision
be NP-complete,
problem
for the domination
even when restricted
to bipartite
number
of a graph is known to
graphs (see [5]) or chordal graphs
(see [l, 21). Dominating Instance: Question:
set (DM) A graph G = (V,E)
and a positive
Does G have a dominating
We will demonstrate domination problem. Minus domination
a polynomial
integer k d 1V /.
set of cardinality time reduction
k or less?
of this problem
set (MD)
Instance:
A graph H = (V, E) and a positive
integer j < / V 1.
Question:
Does H have a minus dominating
set of cardinality
Theorem 1. Minus or chordal
Proof.
to our minus
domination
set is NP-complete,
j or less’?
eCe?l kvhen restricted
to bipartite
graphs.
It is obvious
that MD is a member
of NP since we can, in polynomial
time,
guess a function f : V 4 { - 1, 0, 1} and verify that f has weight at most j and is a minus dominating function. We next show how a polynomial time algorithm for MD could be used to solve DM in polynomial time. Given a graph G = (C’,E) and a positive integer k construct the graph H by adding to each vertex of G a path of length 3. It is easy to see that the construction of the graph H can be accomplished in polynomial time. Note that if G is a bipartite or chordal graph, then so too is H. Lemma 1. y(H)
= y(H)
Proof.
Among
assigns
the value
= y(G) + (V(G)I.
the minimum
minus
dominating
- 1 to as few vertices
functions
as possible.
of H, let g be one which
Let 11E V(G) c V(H),
and let
t:, w.x, v be the path of length 3 added to ~1.Clearly, g(v) >, 0 and g(x) 3 0. If g(~‘) = - 1, then g(N[x]) > 1 implies that g(y) = y(x) = 1. However, the function f : V(H ) { -1.0, l} defined by f(x) = f(w) = 0 and f(u) = g(u) for all remaining vertices u in V(H) is a minus dominating function of H of weight g(V(H)) that assigns the value -1 to fewer vertices than does g, contradicting our choice of g. Hence g(w) 3 0. Furthermore, if g(v) = - 1, then g(N[w]) 2 1 implies that g(x) = g(w) = 1. However, defining the function f : V(H) --_$ { - 1, 0, 1} by f(c) = J‘(w) = 0 and .f’(u) = g(u) for all remaining vertices u in V(H), we once again contradict our choice of g. Hence g(c) 3 0. It follows that g : V(H ) + (0, 1} is a dominating function of H, SO i’(H) d g( V(H)) = l’-(H). On the other hand, if S is a minimum dominating set of H, then the characteristic function h of S (defined by h(u)= 1 if u ES and h(u) = 0 if u $ S) is a minus dominating function of H, so :1-(H) < h( V(H)) = ;$H ). Cl Consequently, y-(H) = y(H). Clearly, y(H) = y(G) + IV(G)\.
J. Dunbar et al. I Discrete Applied Mathematics 68 (1996)
76
73-84
Lemma 1 implies that if we let j = k+ (V(G) j, then y(G) 6 k if and only if y-(H) This completes
the proof of Theorem
Next we consider T-(G).
the decision
If a graph G is bipartite
problem
cardinality
maximum
set problem
families
of graphs,
corresponding
of an independent can be solved
so too can the problem
chordal. We show that the decision
d j.
0 to the problem
of computing
or chordal, then it is known that P(G) = T(G),
/3(G) is the maximum independent
1.
where
set of G (see [4, 81). Since the in polynomial
of finding
T(G)
time for these two
for G either bipartite
or
problem
Upper minus dominating set (UMD) kstance: A graph G = (V, E) and a positive integer k < 1VI. Question: Is there a minimal minus dominating function of weight at least k for G? is NP-complete, even when restricted to bipartite or chordal graphs, by describing a polynomial
transformation
from the following
known
NP-complete
decision
problem
[71: One-in-three 3SAT (OneIn3SAT) Instance: A set U of variables,
and a collection C of clauses over U such that each clause c E C has ]c( = 3 and no clause contains a negated variable.
Question: Is there a truth assignment
for U such that each clause in C has exactly
one true literal?
Theorem 2. Upper minus dominating set is NP-complete, even when restricted to bipartite graphs. Proof. It is obvious that UMD is a member of NP since we can, in polynomial time, guess at a function f : V ---) {-l,O, l} a n d verify that f has weight at least k and is a minimal minus dominating function. when restricted to bipartite graphs, we OneIn3SAT. Let 1 be an instance of {cl,. . . f c,} of three literal clauses in
To show that UMD is an NP-complete problem will establish a polynomial transformation from Oneln3SAT consisting of the (finite) set C = the n variables ui, ~2,. . . , un. We transform I to
the instance (GI, k) of UMD in which k = 2n + 3m and Gr is the bipartite constructed as follows.
graph
Let H be a 4-cycle u, vi, ~2,213,u and let H,,H2,. . . ,H, be n disjoint copies of H. Corresponding to each variable ui we associate the graph Hj. Let ui,vi,i, zii,2,ui,3 be the names of the vertices of Hi that are named u, VI, v2 and ~3, respectively, in H. Corresponding to each 3-element clause cj we associate a path Fj on three vertices with the center vertex labelled cj. The construction of our instance of UMD is completed by joining the vertex cj to the three special vertices that name the three literals in clause cj. Let GI denote the resulting bipartite graph. The graph GI associated with (ui V 243V 2.44)A (~1 V ~42V 2~) A (242 V 2.43V us) is depicted in Fig. 1. It is easy to see that the construction can be accomplished in polynomial time. All that remains to be shown is that I has a one-in-three satisfying truth assignment
J. Dunbar et al. I Discrete
Applied Mathematics
6X
(1996) 73-84
77
F, Fig. 1. The graph G, for (UI V u3 V ~4) A (~1 v u2 v UJ) A (~2 V IQ V us).
if and only if G[ has a minimal k = 2n + 3m.
minus
dominating
function
of weight
at least
First, suppose that I has a one-in-three satisfying truth assignment. We construct a minimal minus dominating function J’ of Gr of weight f(V(G1)) = 2n + 3m. This GI) >2n + 3m. For each i = 1,2,. . , n, do the following.
will show that r-(
If ui = T,
then let f(ui) = f(Zli.2) = 0 and let f( ui, 1) = J’(ui.3) = 1. On the other hand, if u 1= F, then let f(ui) = -1 and let J‘(tli.1) = J’( 1~2) = f’(ui.3) = 1. For each ,j = 1,2 , . , m, let f‘(v) = 1 for each vertex r of F,. Then for every vertex c of GI with f(o)30, there exists a vertex u E N[L~] with f(N[u]) = 1. The only vertices whose closed neighborhoods under f give any doubt are the vertices cj. But the closed neighborhoods
of these vertices under
f have a sum of 1 because I has a one-in-three
satisfying truth assignment. Hence, f is a minimal minus dominating function of weight 2n + 3m. This shows that GI has a minimal minus dominating function of weight at least 2n + 3m. Conversely, assume inating
function
that T-(GI)>Zn
of weight
g( V(G1))22n
+ 3m = k. Let g be a minimal + 3m. If g( 142) = -1,
minus
then g(V(H,))
dom label(y) if the level oj’ vertex w is less than the level oj vertex y. [Note: the root of T is labeled n.] Output:
A nzinirnurn minus dominating
,function
f : V -
{ -1,O. 1).
Begin For i -
1 to n do 1. If i = n then MinSum(i) +- 1 else MinSum(i) + 0.
2. If vertex i is a leaf and i < n then ChildSum - 0 else Child&m(i) +- (sum of the values of the children of vertex i). 3. If ChildSum < MinSum(i) then 3.1. Increase the values of the children of vertex i (so that each value remains at most 1) until ChildSum = MinSum(i) - 1.
J. Dunbar et al. I Discrete Applied Mathematics 68 (1996)
80
3.2. f(i)
73-84
+- 1.
3.3. Child&m(i)
t MinSum(i) - 1. 4. If ChildSum 2 MinSum(i) then 4.1. if vertex i has a child w with Sum(w) = 0 then f(i) + 1 4.2. else if vertex i has a child w with Sum(w) = 1 then f(i) +- 0 4.3. else if Child&m(i) = MinSum(i) then f(i) t 0 4.4. else f(i) +- -1. 5. Sum(i) + ChiZdSum(i) + f(i). end for end MD We now verify the validity
of Algorithm
MD.
Theorem 4. Algorithm MD produces a minimum minus dominating function in a non-
trivial tree. Proof. Let T = (V,E) be a nontrivial tree of order II, and let f be the function produced by Algorithm MD. Then f : V + {-l,O, 1). Lemma 2. When Algorithm MD assigns a value f (r’) to the root r’ of a subtree (or
tree) T’, the following three conditions will hold: 1. For any vertex v E T’ - {r’}, f(N[v])> 2. Sum(r’) >MinSum(r’).
1.
3. The initial value assigned to r’ is the minimum value it can receive given the values of its descendants under f. Proof.
We proceed by induction
first vertex assigned
on the order in which the vertices were labeled. The
a value will be a leaf. Vacuously,
the first condition
holds. In the
case of a leaf i, ChildSum = 0 and MinSum(i) = 0, and the else if ChildSum = MinSum(i) part of the if statement in Step 4.3 will be executed. The leaf i will be assigned
the value 0, so Sum(i) = MinSum(i) = 0 and the second and third conditions
hold. Next we assume that Algorithm MD assigns values to the first k vertices so that Conditions 1, 2 and 3 hold. We show that these conditions hold after the (k + 1)-th vertex is assigned a value. We begin with Condition 1. Before the (k + 1)-th vertex is assigned a value, all its descendants, other than its children, satisfy Condition 1. These descendants will continue to satisfy Condition 1 after the (k + I)-th vertex is assigned a value, because even if some children of the (k + 1)-th vertex are reassigned values in Step 3.1 of
J. Dunbar et al. IDiscrete Applied Mathematics 68 (19961 73-84
the algorithm,
their closed neighborhood
tive hypothesis, Sum(w)
sums will not decrease.
81
Also, by the induc-
any child w of vertex k + 1 will have Sum(w)bMinSum(w)
= 0. If
= 0, then one of the cases in Step 3 or Step 4.1 hold. In either case, the
(k + 1)-th vertex will be assigned
the value
1. So f(N[w])
= 1. If Sum(w) = 1, then
holds and the (k + 1 )-th vertex will be assigned
the case in Step 4.2 of the algorithm
either the value 0 (in Step 4.2) or possibly
the value 1 (if one of the cases in Steps 3
or 4.1 also hold). In either case, f(N[w])>, 1. If Sum(w) > 1, then ~(N[Jv]) 3 1, regardless of what value is assigned to vertex kf 1. Thus, all descendants of the (k+ 1 )-th vertex will satisfy Condition 1. We show next that after the (k+ 1)-th vertex is assigned a value, Sum( k+ 1) > A4inS.m (k + 1). This is enforced in Steps 3 and 4 of the algorithm.
In Step 3, if Childsum(k
+
1) < MinSum(k + l), then the (k + 1 )-th vertex is given the value 1 and the values assigned to its children are increased as much as necessary to bring Sum(k + I ) up to MinSum(k + 1). If ChildSum(k + 1) = MinSum(k + l), then the (k + 1 )-th vertex will be assigned the value 1 or 0 in one of the Steps 4.1, 4.2, or 4.3. If Chi/dSum(k+ 1) > MinSum(k + 1). then Sum(k + 1) 3MinSum(k + 1). regardless of what value is assigned to the (k + 1)-th vertex. Thus the vertex Y’ satisfies Condition 2. It remains
to consider
Condition
3. Let ~1= Y’. Suppose
the initial
value assigned
to u is 1. If 11was assigned the value 1 in Step 3.2, then the values assigned to its children were increased until Child&m(a) = MinSum(r) - 1. Thus Chi/dSum( c) = - 1 if 2~is not the root of T; otherwise, Child&m(E) = 0 if I’ is the root of T. It follows that for J‘ to be a minus dominating function of T, the value for ,f(~) must be 1. If z’ was assigned
the value
1 in Step 4.1, then ~1has a child M’ with Sum(w) = 0.
Thus 1