R-Domination in Graphs
PETER
J. S L A T E R
National Bureau of Standards, Washington, D C
ABSTRACT. The problem of finding a minimumk-basis of graph G is that of selecting as small a set B of
vertices as possible such that every vertex of G is at distance k or less from some vertex in B Cockayne,
Goodman, and Hedetnleml previously developed a hnear algorithm to find a minimum 1-basis (a
minimum dominatingset) when G is a tree In this paper the k-basis problem is placed m a more general
setting, and a hnear algorithm is presented that solves the problem for any forest
K E Y W O R D S A N D PHRASES
tree
CR CATEGORIES
5
computational complexity, dominating set,
facllltylocation,
graph, k-basis,
32
1. Introduction
G i v e n a finite, simple graph G = (V, E) (that is, a n u n d i r e c t e d g r a p h w i t h o u t loops or
m u l t i p l e edges), a subset D of the set V of vertices is called a domtnating set [5] w h e n
every vertex not i n D is adjacent to at least one vertex i n D . More generally, i f B is a
s u b s e t of V t h e n B will be called a k-basis (k -> 1) w h e n for each vertex v of V there is
a t least one vertex b o r B such t h a t the distance b e t w e e n b a n d v i n G, denoted dv(b,
v), is less t h a n or equal to k. T h u s a d o m i n a t i n g set is a l-basis.
W h i l e t h e r e are m a n y applicatmns of these ideas, a n i n t e r p r e t a t i o n i n t e r m s of
c o m m u n i c a t i o n n e t w o r k s will be used here. If V represents a collection of cities a n d
a n edge r e p r e s e n t s a c o m m u n i c a t i o n link, t h e n , as i n [3], one m a y be interested i n
selecting a m i n i m u m n u m b e r of cities as sites for t r a n s m i t t i n g stations so t h a t every
city e i t h e r c o n t a i n s a t r a n s m i t t e r or can receive messages from a t least one of the
t r a n s m i t t i n g stations t h r o u g h the links. If only direct t r a n s m i s s i o n s are acceptable,
t h e n one wishes to find a m i n i m u m 1-basis. If c o m m u n i c a t i o n over p a t h s of k l i n k s
(but n o t of k + 1 links) is adequate i n q u a l i t y a n d rapidity, the p r o b l e m becomes t h a t
of d e t e r m i n i n g a m i n u n u m k-basts, i.e. a k-basis with the fewest possible vertices A
mtn~mal k-basts is a k-basis such t h a t no proper subset of it is also a k-basis.
I n [1] Cockayne, Goodman, a n d H e d e t n i e m i p r e s e n t a (linear) a l g o r i t h m for f i n d i n g
a m i n i m u m 1-basis of a tree (connected, acyclic graph). A n a b s t r a c t describing some
u n p u b l i s h e d work of M a t u l a a n d Kolde c o n c e r n i n g k-bases (and k-medians) of acyclic
g r a p h s appears i n [4]. I n the p r e s e n t paper a f u r t h e r g e n e r a l i z a t i o n of k-bases to the
concept of a n R - d o m i n a t i n g set is presented, a n d a n a l g o r i t h m t h a t finds the m i n i m u m n u m b e r of e l e m e n t s i n a n R - d o m i n a t i n g set of a forest (an acyclic graph) is
given. L e t t i n g p denote the n u m b e r of vertices i n V, a n O(p) ( t h a t is, linear) F o r t r a n
i m p l e m e n t a t i o n of the a l g o r i t h m is possible, as presented i n the Appendix.
Copyright © 1976, Association for Computing Machinery, Inc General perrnlsslon to repubhsh, but not
for profit, all or part of this material is granted provided that ACM's copyright notice is given and that
reference is made to the pubhcatlon, to its date of Issue, and to the fact that reprinting privileges were
granted by permlsmon of the Association for Computing Machinery
This work was done while the author was a National Academy of Sciences-National Research Council
Postdoctoral Research Associate at the National Bureau of Standards, Washington, D C 20234.
Author's present address Applied Mathematics Division 5121, Sandla Laboratories, Albuquerque, NM
87115.
Journal of the Assoclatlonfor Computing Machinery, Vol 23, No 3, July 1976,pp 446-450
R-DomLnatmn ~n Graphs
2.
447
R-Bases
Suppose G h a s p vertices, a n d label these with the n u m b e r s i t o p ; t h a t is, V = {1, 2,
•.. , p}. Suppose one is to select a collection B of vertices as sites for t r a n s m i t t i n g
stations R a t h e r t h a n a s s u m i n g t h a t each vertex t m u s t be w i t h i n a distance ofk from
a vertex i n B, suppose t h a t to each i there corresponds a n o n n e g a t i v e i n t e g e r a, such
t h a t the distance from ~ to B m u s t be a t most a,; t h a t is, dc(~, B) -< a, where de(t, B) =
mineeBdc(~,2) (If a, = 0, t h e n vertex ~ m u s t be i n B . ) One t h i n k s of a, as the "necessary
distance (of vertex i) to a s t a t i o n , " N D T S ( i ) = a,. If s u b s e t B ' of the vertices has been
selected to be part of B, t h e n the integers b, = de(t, B') are d e t e r m i n e d for all ~ ~ V.
One can t h i n k of b, as the "distance (of vertex t) to a n estabhshed station," D T S ( t ) =
b~.
G i v e n graph G with V = {1, 2, . . . , p}, suppose one has a n o r d e r e d p - t u p l e of ordered
pairs of integers, say R = ((a,, b,),(a2, b2), "'", (a,,, b,)), where a, -> 0 a n d b, >- 1 for 1 -<
l <- p. N o w B C V will be said to dominate ~ C V if a n d only if (iff) either (1) there is a
vertex b of B such t h a t dc(t, b) -< a, or (2) there is a vertex.] of V such t h a t d~(z,j) + be
-< a,. I f B d o m i n a t e s every vertex ~ ~ V, t h e n B will be said to be R-dom~natlng for G.
It will also be said t h a t B solves (G, R). Note t h a t the second conditmn is satisfied
with./ = z when b, -< a,, a n d If b, -< a, for every ~ t h e n the n u l l set is R - d o m i n a t i n g . If
condition (2) is m e t for vertex ~, t h e n a n established s t a t m n (at a distance of be from
vertex 2) is w i t h i n distance a, of vertex ~. Viewed in this way, the "established
stations" can be considered to exist e x t e r n a l to V, as follows.
G i v e n G a n d R , l e t H = (V*, E*) be the graph obtained by adding to each vertex ~ a
p a t h of l e n g t h b, (see F i g u r e 1), say v(~, 0), v(i, 1), . . . , v(~, b,) = t. For 0 -< h -< b, - 1,
let a,.(,.~) = b,, ,,) = h, a n d l e t E ' denote the set of endpoints o f H , n a m e l y E ' = {v(1, 0),
v (2, 0), ..., v (p, 0)}. Now B is R - d o m i n a t i n g for G iffB C V a n d given a n y ~ ~ V* there
is a vertex v ofB LJ E ' such t h a t d,(z, v) -< a,. I n F i g u r e 1, vertex 4 of G is the only one
for which NDTS(~) > d(t, E'). T h u s either {4} or {3} is R - d o m i n a t i n g
It is easy to prove t h a t if a, < b, for every vertex i of G, t h e n B solves (G, R) ifffor
each vertex t of G condition (1) is solved, t h a t is, dc(~, B) <- a,. I n p a r t i c u l a r , B is a kbasis f o r G iffB solves a (G, R ) w h e r e R is of the form ((k, t,), (k, t2), " •, (k, t~,)) with
eacht,->k +1.
A m t n i m a l R - d o m t n a t t n g set Is a n R - d o m i n a t i n g set B such t h a t no proper subset
of B is R - d o m i n a t i n g . Let the R - d o m t n a t m n n u m b e r of G, denoted 8(G, R), be the
smallest n u m b e r of vertices in a n y m i n i m a l R - d o m i n a t i n g set; such a set is called
m i n i m u m or optimum. Since V itself solves (G, R) for a n y R , one always has 0 -< 8 (G,
R)_< p.
S u p p o s e R , = ((a,, b,), -'. , (a,, b~,)) a n d R e = ((c,, d,), -.. , (c~,, d~,)). One w r i t e s R , ->
R= to indicate t h a t a, -< c, a n d b, >- d, for 1 -< ~ <- p.
PROPOSITmN 1. I f R, -> R2 a n d B solves (G, R,), then B solves (G, R2).
PROOF. For condition (1) one has c, >- a, >- da(~, b) for some b E B, a n d for condition
(2), one has c, >- a, -> de(i, j) + be -> de(t, .I) + de for s o m e j E V.
COROLLARY 1.1. I f R, -> R2, then 8(G, R,) >- 8(G, R2).
All of Ore's theorems [5, Ch. 13] concerning d o m i n a t i n g sets can be generalized, as
follows.
v(4, 2)
G
H
2
1/
3/~
v(3, O)
"~ v(5~2)
v(4, O)
v~5~1)
v(5, O)
,0)
14/----- v(l,2)
FIo 1
v(4, 1)
v~l,l)
v(l,O)
FormmgH whenR = ((3,3), (2,1), (3,1), (1,3), (2,3))
448
PETER J. SLATER
THEOREM 2. A n y R - d o m i n a t i n g set contains a m z n t m a l one.
THZOP~M 3. A n R - d o m i n a t i n g set B is a m i n i m a l R - d o m i n a t i n g set i f f for each
vertex i o r B there is a vertex ~* such that for a n y j ~ B - i one has dG(i*,j) > a,* a n d
for any h in V one has dG(i*, h) + bh > a¢.
THEOREM 4. I f G has no Isolated vertices a n d c: .~ 1 ~n R = ((c~, dl), "'" , (cp, dp))
for every i ~ V, then there exists an R - d o m i n a t i n g set B such that V - B is also R dominating.
PROOF. Let R~ = ((1, b), ..., (1, b)) where b -> m a x ~
d, and b -> 2. By [4, Th.
13.1.3] there is a s e t B such t h a t B and V - B areR~-dominating. NowR1 -> R implies
t h a t B and V - B are also R - d o m i n a t m g .
Let the R-domatic n u m b e r o f G, denoted dR(G), be the m a x i m u m n u m b e r of disjoint
R - d o m i n a t i n g sets [2]. Theorem 4 imples t h a t if there is no vertex which m u s t appear
in every R - d o m i n a t i n g set, then dR(G) ~ 2.
THEOREM 5. Suppose G has no ~solated verttces a n d a, -> 1 tn R for every vertex ~.
I f B is a m~n~mal R - d o m t n a t i n g set, then V - B is also an R-domtnat~ng set, tn fact a
1.basis.
PROOF. If i E V, let N ( 0 denote the set of all vertices in V which are adjacent to i.
To show t h a t V - B is R - d o m i n a t i n g and a 1-basis, it suffices to show t h a t for each
vertex i i n B there is a v e r t e x j m N ( 0 N (V - B) (because each a, -> 1). Suppose to the
contrary t h a t N(i) C B, and let ~* be as in Theorem 3. First, z* ~ t, for one can l e t j be
any vertex i n N ( 0 , which m e a n s t h a t j ~ B - i, and then dG(~*,J) > a~*-> 1 = de(t,./).
Second, i* ~ N(0, for dv(i* , i*) = 0 -< a,* implies ~* ~ B - i. T h u s ~* ~ V - (N(i) U
{i}). Now since B R-dominates G, sincej @ B - ~ imphes dr(t*, j) > a~*, and since for
a n y h in V one m u s t havedv(i*, h) + b~ > a,*, it follows t h a t da(t*, 0 = d -~ a,*. B u t
a path from ~* to i of length d contains a p a t h from ~* to s o m e j ~ N(~) C_ B - i of
length d - 1 < a,*. This contradiction shows t h a t ~* ~ V - (N(z) U {~}). T h u s N ( i ) ~ B.
THEOREM 6. I f G has no ~solated vertices a n d a, -> 1 for every a~ t n R , then for a n y
m i n i m a l R - d o m i n a t i n g set there ~s another dtsjo~nt from st. One therefore has 0 --<
8(G, R) -< p/2.
3.
S t a t e m e n t o f the A l g o r t t h m
Algorithm RB, for determining a m i n i m u m R - d o m i n a t i n g set of a forest, is given at
the end of this section. The proof of its correctness is contained in the following
lemmas. Proofs of the l e m m a s are relatively straightforward, and they are not
presented here.
LEMMA 7. I f i is an isolated vertex o f G a n d B is a m i n i m a l R - d o m l n a t t n g set,
then i E B t f f a~ < b ,
LEMMA 8. I f as = O, then B solves (G, R ) t f f B = B ' U {t} where B ' is a solution to
(G - i, R'), a n d R ' = ((a~. b~'), (a2, b2'), . " , (an-l. b ' , ) , (a,+l. b'~+l), .." , (ap. bp')) where
b / = b, i f j is not adjacent to t, a n d b,' = 1 t f j is adjacent to ~.
A vertex i is called unicliqual in G if the subgraph induced by N(i) is complete; t h a t
is, any two vertices adjacent to i are also adjacent to each other. In particular, a
vertex of degree one is unicliqual.
LEMMA 9. I f t tS nontsolated a n d zs untcltqual tn G, then there extsts an o p t i m u m
solutton B to (G, R) zn whtch ~ ~ B, t f f a~ ~ O.
For the following two l e m m a s it is assumed t h a t vertex t has degree one, a~ >- 1, and
v e r t e x . / i s adjacent to t.
LEMMA 10.1. A s s u m e b~ > a~. A selectmn B o f verttces wtth B C_ V - t t s a solution
to (G, R) t f f B ts a solutmn to (G - t, R') wtth b,~' = b,~ for every vertex n in V - t a n d
an' = an w h e n n ~ ./ a n d a / = mzn(a,, a~ - 1).
LEMMA 10.2. A s s u m e b~ ~- a~. A selectmn B o f vertices wtth B C V - ~ ~s a solution
to (G, R) zff B ts a solutmn to (G - l, R') wtth a,~' = a~ for every vertex n in V - ~ a n d
bn' = b~ w h e n n ~ j a n d b / = rain(b,, b~ + 1).
R-Domtnatton in Graphs
449
The following a l g o r i t h m can be used to find a n o p t i m u m s o l u t i o n B to (G, R), t h a t
is, a n R - d o m m a t i n g set B with 8(G, R) elements, if the removal of those vertices w i t h
a, = 0 produces a forest. I n particular, i f G is a forest, t h e n the a l g o r i t h m can be used
to find 6(G, R) for a n y R.
ALGORITHM RB
Step l
Set N = 0 and B = Q, the null set, and let H be the graph G
Step 2 Let ~ be a vertex of H wlth a, = 0 If there are none, go to step 3 Increase N by one and put
vertex ~in B For each vertexj whlch is adjacent to l, make bj = i LetH = H - ~ IfH has no vertices,
go to step 5, otherwme,go to step 2
Step 3 Let Lbe a vertex ofH of degree zero If there are none, go to step 4 If a, < b,, then mereaseN by
one and put vertex ~in B LetH = H - ~ IfH has no vertlces, go to step 5, otherwlse,go to step 3
Step 4 Let zbe a vertex ofH of degreeone (Notethat at thin point one has a, >- 1 ) Supposethatj is the
vertex adjacentto ~ Ifa, < b,, then let a~be the mmlmumof its present value and a, - I If b, -<a,, then
let be be the mmlmum of Its present value and b, + l Let H = H - ~, and go to step 2
Step 5
Stop An optlmumR-dommatlngset is B with cardmahty 6(G, R) = N
In t h e above a l g o r i t h m a vertex t is p u t into B only w h e n a, is, or h a s been reduced
to, zero or w h e n ~ is, or h a s become, a n isolated v e r t e x w i t h a, < b,.
Step 2 is justified by L e m m a 8. By a s s u m p t i o n , r e p e t i t i o n of step 2 will create a
forest I f F = ( V , E ) is a forest with vertex s e t V = {i, 2, ... , p } , t h e n V c a n be
a r r a n g e d as (i,, ~2, "" , t~,) such t h a t in G - {~,, ".. , ~k-1} v e r t e x ik h a s degree zero or
one. T h u s a t l e a s t one of step 2, step 3, and step 4 will always be applicable until one
h a s considered every vertex in H . Step 3 is justified by L e m m a 7. Step 4 is justified by
L e m m a s 9, I0.I, and 10.2.
Since each vertex is considered exactly once, a l i n e a r i m p l e m e n t a t i o n of A l g o r l t h m
RB is possible. A F o r t r a n i m p l e m e n t a t l o n of t h e a l g o r l t h m is contained in t h e
Appendlx.
I f one is i n t e r e s t e d in finding a k-basis, one can simply choose a, = k and b, = i + k
Appendix.
A Fortran Implementation of Algorithm R B
In the F o r t r a n i m p l e m e n t a t m n of A l g o r i t h m RB which follows, it will be a s s u m e d
t h a t graph G is a forest with vertex set V = 1, 2, .. , p. F u r t h e r m o r e , (i,, i2, "'" , ~p)
will be a l i s t m g of V such t h a t m G~ = G - {~,, ... , ik-,} vertex ~k has degree zero or
one If the degree of~k is zero in G~, letjk = ik; if the degree oftk Is one i n G~, letjk be
the vertex adjacent to ik i n G~.
It is a s s u m e d t h a t the p r o g r a m i n p u t consists of P (the n u m b e r of vertices i n G), R
(the P ordered pmrs (a,, b, ) which give N D T S (D a n d D T S (D), a n d the description of G
i n the form (~,,3 ~), (i2,J~), "'", (~p,jp). Several a r r a y s of l e n g t h P are created: N D T S (I)
a n d D T S ( I ) are as previously described; L I S T i ( I ) a n d LIST2(I) are the lists of
vertices (t2, ~, -'" , ~,,) a n d (J,,J2, "'" ,J,), respectively; a n d S E T ( I ) will be the list of
those vertices selected for the m i m m u m R - d o m i n a t i n g set.
For the code t h a t follows, it is assumed t h a t P -< 100, a n d some s t a t e m e n t s (such as
F O R M A T a n d WRITE s t a t e m e n t s ) are suppressed. To the r i g h t of each s t a t e m e n t is
listed the m a x i m u m n u m b e r of times it can be executed. L e t t i n g N1 be the n u m b e r of
connected components of G, one h a s A 4 + A5 = N1 a n d A 1 + A2 + A3 + A 4 + A 5 = P.
PROGRAM RB
INTEGER P, LISTI(IO0), LIST2(IO0), NDTS(iO0)
INTEGER DTS(IO0),BASIS, SET(iO0)
C
C
C
C
C
Assume that all arrays are lmtmhzed to zero
Read m P, R, and the hst of edges
READ P
DOll
I = 1, P
1
P+ 1
450
11
21
PETER J. SLATER
READ M, N
P
NDTS(I) = M
DTS(I) = N
P
P
CONTINUE
DO21 I=i,P
READ M, N
LISTI(I) = M
LIST2(1) = N
CONTINUE
P
P+I
P
P
P
P
I=0
BASIS
1
1
= 0
C
C
C
C
C
10
The remainder of the program works from the e n d p o m t and adjacency lists and
handles each vertex as necessitated by L e m m a s 7, 8, 9, 10 1, and 10 2
P+i
P + 1
P
I=I+l
IF(I GT P)GO TO 100
I F ( L I S T i ( I ) EQ L I S T 2 ( I ) ) GO TO 500
N = LIST2(I)
M = LISTi(1)
I F ( N D T S ( M ) NE 0) GO TO 601
BASIS = BASIS + 1
SET(BASIS) = LISTI(1)
DTS(N) = 1
P - N1
P - N1
P - N1
A1
A 1
A 1
GO TO 10
601
I F ( D T S ( M ) GT N D T S ( M ) ) GO TO 701
D T S ( N ) = M I N O ( D T S ( N ) , D T S ( M ) + 1)
701
NDTS(N)
GO TO 10
= MINOfNDTS(N),NDTS(M)
- l)
GO TO 10
500
I F ( ( N D T S ( M ) LT D T S ( M ) ) GO TO 600
GO TO 10
600
100
A1
P - N1 - A1
A2
A2
A3
A3
N1
A4
BASIS = BASIS + 1
SET(BASIS) = M
A5
A5
GO TO 10
PRINT IIRESULTS"
STOP
END
A5
1
1
The results are contained in BASIS,
which contains the R-domination
number of
G, and in SET, which is a hst of elements in one (not necessarily unique) mimmum
R-dominating
set of G.
The maximum number of statement executions is 17P + 9 ÷ 3A1 + 2A2 + 2A3 ÷ A4
+3A53 N l - < 2 0 P + 9.
REFERENCES
1
2
3
4
5
COCKAYNE, E J , GOODMAN, S E , AND HEDETNIEMI, S T A linear algorithm for the domlnatlan
n u m b e r of a tree Submitted for pubhcatlon
COCKAYNE,E J , AND HEDETNIEMI, S T Dominating partitions of graphs To appear
LIU, C I n t r o d u c t i o n to C o m b ~ n a t o r m l M a t h e m a t i c s McGraw-Hill, New York, 1968
MATULA,D W , AND KOLDE, R A Multiple facilities location-allocation m certain sparse networks
(abstract) S I A M R e v 14 (1972), 533-534
ORE, O TheorT o f G r a p h s A m e r M a t h Soc Colloquium P u b , Vol XXXVIII, A m e r M a t h Soc,
Providence, Rhode Island, 1962
RECEIVED APRIL
1975, REVISED SEPTEMBER 1975
Journal of the Assoclatlon for Computing Machinery, Vol 23, No 3, July 1976
© Copyright 2026 Paperzz