Information Processing North-Holland
Letters
19 October
43 (1992) 297-300
1992
A simple linear time algorithm for the domatic partition problem on strongly chordal graphs * Shen-Lung
Peng and Maw-Shang
Institute of Computer
Science and Information
Chang
Engineering,
National
Chung Cheng lJnil,ersity, Chiayi 62107, Taiwan, ROC
Communicated by D. Gries Received 16 April 1992 Revised 22 July 1992
Abstract Peng, S.-L. and M.-S. Chang, A simple linear time algorithm Information Processing Letters 43 (1992) 297-300.
for the domatic
partition
problem
on strongly
chordal
graphs.
Let m and n be the number of edges and vertices in a graph. We use a greedy method to design an O(m + n) time algorithm to partition the vertex set of a strongly chordal graph into S + 1 disjoint dominating sets, where 6 is the minimum degree of the graph. Keywords:
Algorithms;
dominating
set; domatic
partition;
1. Introduction A set of vertices D is a dominating set of a graph G = (V, E) if every vertex in V- D is adjacent to a vertex in D. The domatic number of G, denoted by d(G), is the maximum number of pairwise disjoint dominating sets in G. The domatic partition problem is to partition I/ into d(G) disjoint dominating sets. The domatic number was defined and studied in [5]. They showed that d(G) f 6 + 1, where 6 is the minimum degree of vertices in G. G is domatically,full if d(G) = 6 + 1. Some special classes
Correspondence to: M.-S. Chang, Institute of Computer Science and Information Engineering, National Chung Cheng University, Chiayi 62107, Taiwan, ROC. * This research was supported by the National Science Council of the Republic of China under grant NSC 82.0408E-194-007. 0020-0190/92/$05.00
0 1992 - Elsevier
Science
Publishers
NP-hard;
strongly
chordal
graph
of graphs are determined as domatically full, such as trees, cliques, and maximal outerplanar graphs [5], where a clique is a maximal set of vertices that are all mutually adjacent. The domatic number of a graph has an application in the optimum location of facilities in a network. Let m,n be the number of edges and vertices in a graph. The domatic partition problem of a graph is NP-hard on general graphs [91. In [l], Bertossi solved this problem in time O(n2.‘) for interval graphs and time O(n log n> for proper interval graphs. Recently, [ill and [El gave O(m + n) algorithms for interval graphs, and [13] gave an O(n) algorithm for interval graphs with sorted intervals. In [2], Bonuccelli showed that this problem remained NP-hard for circular-arc graphs and gave an O(n2 log n) time algorithm for proper circular-arc graphs. Most algorithms determine the domatic number of a graph constructively, by using an algo-
B.V. All rights reserved
297
Volume
43. Number
6
INFORMATION
PROCESSING
rithm to partition the vertex set into k disjoint dominating sets and showing that d(G) = k [1,2,5]. But Farber 183 showed that strongly chordal graphs are domatically full without giving any domatic partition algorithm. Following the proof of Farber, it may be possible to design a polynomial time algorithm to solve the domatic partition problem on strongly chordal graphs: But such an algorithm does not seem simple and efficient [4]. The main results of this paper are to give a simple and linear time algorithm to partition the vertex set of a strongly chordal graph into 6 + 1 disjoint dominating sets. The remainder of this section is devoted to a brief review of chordal graphs and strongly chordal graphs. Further details are available in [3,6-8,10,14]. An edge is a chord of a cycle if it connects two vertices of the cycle but is not itself an edge within the cycle. A graph is chordal if and only if every cycle of length greater than three has a chord. Let (u ,, L:~,. . . , ~3~)be an even length cycle. Then an edge e = [L’;, L;] is an odd chord of the even length cycle if i -j is odd. A graph is strongly chordal if it is chordal and every even length cycle of length six or more has an odd chord. Other useful properties that characterize these graphs are given in the following. For any graph G and I’ E I’, the closed neighborhood N[u] of ~1 is the set of all vertices that are adjacent to z’ and include 1%.A vertex L’ is called simplicial if the subgraph induced by N[L’] is a clique. Rose [I41 showed that a graph G is chordal iff it is possible to order the vertices ~I’,;‘~‘~~ -j 13~) in such a way that, for each i E , l-, is a simplicial vertex of Gj = inGil I>;.,~~1 I, . . . , z*,)>, where Gj is a subgraph duced by the vertex set (c,, l’;+ ,, . . , ~1,). Such an ordering is called a perfect elimination ordering. The ordering of vertices CL’,, L’*,. . . , l:,,) is called a strong elimination ordering if it is a perfect elimination ordering and, for each i
LETTERS
19 October
1992
ing of this nested family (smallest to largest). Farber [7] showed that a graph is strongly chordal iff it admits a strong elimination ordering. The class of strongly chordal graphs properly includes trees, powers of trees, and directed path graphs [6]. Farber [6,7] designed an O(n”) algorithm to recognize a strongly chordal graph and construct a strong elimination ordering on the vertices, if one exists. Moreover, the ordering can be found in linear time for trees, powers of trees (when the underlying tree is known), and directed path graphs (given an appropriated path representation) 161. To date, the best-known time to recognize strongly chordal graphs is O(m log n). This algorithm additionally determines a strong elimination ordering [ 121.
2. The algorithm
for domatic
partition
We use a greedy approach to design an algorithm for domatic partition on strongly chordal graphs. First, we assume that a strong elimination ordering has been constructed for the strongly chordal graph G = (VI E). It has the property that the closed neighborhoods of the members of N;[r:,] form a nested family of sets. In other in the strong elimination ordering words, Cl?,, L’2,. . . , lsn), for each i
ck E N[
~1~1
and L’~
Volume
43, Number
INFORMATION
6
PROCESSING
Let S, be a set that does not dominate ala; Include ci in S,, i.e. S, = {vi} U Sj; If no such set exists, then include c’~ to an arbitrary set.
3. Correctness
and time complexity
Before we prove the correctness rithm, we show some lemmas.
of the algo-
Lemma 3.1. Assume S c {[I,+ ,, .‘., c'n13 L'kE N[ql, where 1 < i < tz. If S does not dominate uk, then S does not dominate
1; for all j < k and
L;
E
N[c,].
Proof. There are three cases. Case 1: i k and L; E N[ ci]. Let R[ r] = {x Ix E N[ v] and x is not in any set} and ndom(r1) be the number of sets that do not dominate ~1 during execution of Algorithm DP. Then we have the following lemma. Lemma 3.3. Algorithm
DP maintains
the following
invariant: ForeachiE{1,2,...,n),
IR[uj]I
>ndom(u,).
Proof. We prove this lemma by induction. Initially, I R[ LI;]I = degreecc,) + 1 and ndom(ci) =
LETTERS
19 October
1992
6 + 1. Obviously, I R[ ui] I a ndom(u,) for all L'~in 1/. Only values of IR[L:,]I and ndom(r;), where L:~E N[ ci],may be altered when ci is included in a set. A vertex is included in a set when it is visited by the algorithm. The algorithm scans N[L’,] to find the largest number k such that ck E N[cil and ck is not completely dominated. We can partition N[r:,] into two sets: X = (L!~Ij > k and z; E NIL’,]} and X’ = (v, I j < k and 1; E N[ll;]}. Let S be a set that does not dominate ck. By Lemma 3.1, the vertices in X’ are not dominated by S. Therefore, for each vertex L; EX’, both values of IR[ L;] I and ndom(r;) are decremented by one after L‘, is included in S. By Corollary 3.2, the vertices in X are all completely dominated, i.e. ndom(l;) = 0. Thus, the invariant is maintained. If no such ck exists, that is, all vertices in N[u;] are completely dominated, then ndom(L;) = 0, where 1; E N[ u,].Thus, ~1;can be included in any set and the invariant still holds. q Theorem
3.4. Algorithm
DP correctly partitions
a
strongly chordal graph into 6 + 1 disjoint dominating sets.
Proof. The correctness of this algorithm follows from Lemma 3.3. Upon termination, I R[cil I = 0 for each iE(1, 2,..., n}. By Lemma 3.3, I R[cil I > ndom( ui). Thus ndom(LTi) = 0 for all ~1~‘sin I/. That is, all 12,‘s in V are dominated by all 6 + 1 dominating sets. This completes the proof. q Theorem 3.5. Algorithm
DP is linear.
Proof. For each vertex L'~,a vertex ~1~ is found in N[ ui] that is not completely dominated, a set S, is selected that does not dominate L'~, and L’, is included in S,. In a practical implementation, each vertex ci is associated with a variable ndom(i) and an array Lj of size 6 + 1. Initially, ndom(i) = 6 + 1 and the values of entries in Li are all zero. If L’, is dominated by Sj, then Lj(j) = 1. Thus, for each vertex we can take O(d,) time to test ndom(i) to determine L’~, where di is the degree of ci. We then take O(6 + 1) time to decide which set c’~should go. Finally, for each tij 299
Volume
43, Number
6
in N[u,], we take and L,. Therefore,
INFORMATION
O(1) time to update the algorithm takes
PROCESSING
n&m(j)
i
[4] [5]
0
[6]
To summarize, we give the main results paper in the following theorem. Theorem
of this
3.6. Given the strong elimination
ordering of a strongly chordal graph of G, we can find a domatic partition
of G in linear time.
Acknowledgment
[7] [81
[91
References
Inform.
[lOI
[2] M.A.
300
[Ql [131
[I41
On the domatic number of interval graphs, Lett. 28 (1988) 275-280. Bonuccelli, Dominating sets and domatic number Process.
Discrefe
Appl.
Math.
12 (1985)
and J.H. Johnson, Dominating sets in chordal graphs, SIAM .I. Cornpur. 11 (1982) 191-199. G.J. Chang, Private communication, 1991. E.J. Cockayne and S.T. Hedetniemi. Towards a theory of domination in graphs, Networks 7 (1977) 247-261. M. Farber, Applications of 1.~. duality to problems inr~oll~ing independence and domination, Ph.D. Thesis, Rutgers University, New Brunswick. NJ, 1982. M. Farber, Characterizations of strongly chordal graphs, Discrete Math. 43 (1983) 173-189. M. Farber, Domination, independent domination, and duality in strongly chordal graphs. Discrete Appl. Murh. 7 (1984) 115-130. M.R. Garey and D.S. Johnson, Computers und Irztractability:
[Ill
The authors thank Gerard J. Chang, David Gries, and the anonymous referees for their helpful comments and innumerable valuable suggestions for improving the presentation of the paper.
[l] A.A. Bertossi,
arc graphs,
1992
[3] K.S. Booth
i
time.
of circular
1Y October
203-213.
;$di+(6+l)+d,) =O(m+n)
0
LETTERS
[I51
A Guide
to the
Theory
of NP-Completeness
(Freeman, San Francisco, CA, 1979). M.C. Golumbic, Algorithm Graph Theory and Perfect Graphs (Academic Press, New York, 1980). T.L. Lu, P.H. Ho and G.J. Chang, The domatic number problem in interval graphs, SIAM J. Discrete Math. 3 (1990) 531-536. R. Paige and R.E. Tarjan, Three partition refinement algorithms, SIAM J. Compuf. 16 (1987) 973-989. S.L. Peng and M.S. Chang. A new approach for domatic number problem on interval graphs. in: Proc. National Computer Syrnp. IY91, Taipei, Republic of China, pp. 236-241. D.J. Rose, Triangulated graphs and the elimination process, .I. Math. Anal. Appl. 32 (1970) 597-609. A. Srinivasa Rao and C. Pandu Rangan, Linear algorithm for domatic number problem on interval graphs, Inform. Process. Lrtt. 33 (1989) 29-33.