a simple linear time algorithm for the domatic partition problem on strongly chordal graphs
DESCRIPTION
A Simple Linear Time Algorithm for the Domatic Partition Problem on Strongly Chordal Graphs. Shen-Lung Peng and Maw-Shang Chang. Speaker: Chuang-Chieh Lin ( 林莊傑 ) Computation Theory Laboratory Advisor: Professor Maw-Shang Chang. Information Processing Letters , 43 (1992), pp. 297-300. - PowerPoint PPT PresentationTRANSCRIPT
A Simple Linear Time Algorithm for the Domatic
Partition Problem on Strongly Chordal Graphs
Speaker: Chuang-Chieh Lin ( 林莊傑 )Computation Theory Laboratory
Advisor: Professor Maw-Shang Chang
Shen-Lung Peng and Maw-Shang Chang
Information Processing Letters, 43 (1992), pp. 297-300.
‧2‧
Outline
• Introduction• Strongly Chordal Graphs• Algorithm• Correctness• Complexity• Conclusions• References
‧3‧
Outline
• Introduction• Strongly Chordal Graphs• Algorithm• Correctness• Complexity• Conclusions• References
‧4‧
Dominating set
• A graph 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.
v2
v3
v1
v4v5 v8
v7v6v1
v4v5 v8
v7
D = {v1, v4, v5, v7, v8}
‧5‧
Dominating set
• Another dominating set
v2
v3
v1
v4v5 v8
v7v6v1
v4v5 v8
v7v2
v3
v6v2
D = {v2, v3, v6}D = {v3, v6}
Q: Is there another smaller dominating set?
‧6‧
Dominating set
• What is the dominating set of the following graph?
v2
v3
v1
v4v5 v8
v7v6v2
v3
v1
v4v5 v8
v7v6
‧7‧
Domatic number
• The domatic number of G, denoted by d(G), is the maximum number of pairwise disjoint dominating sets in G.
v3
v1
v4 v8
v7v6
v5
v2
{v1, v4, v5, v7, v8}, {v2, v3, v6}
v1
v4 v8
v7
v5v3
v6v2
‧8‧
Domatic number
• Another family of pairwise disjoint dominating sets in G:
v3
v1
v4 v8
v7v6
v5
v2
{v1, v4, v5, v7, v8}, {v3, v6}
v1
v4 v8
v7
v5v3
v6v2
‧9‧
Domatic number
• Another family of pairwise disjoint dominating sets in G:
v3
v1
v4 v8
v7v6
v5
v2
{v3, v5, v7, v8}, {v1, v4 , v6}
v3 v8
v7
v5
v2v1
v4
v6
The domatic number of the graph is “2”. (Why?)
‧10‧
The domatic partition problem
• The domatic partition problem is to partition V into d(G) disjoint dominating sets.
{{v1, v4, v5, v7, v8}, {v2, v3, v6}} is called a domatic partition.
v3
v1
v4 v8
v7v6
v5
v2v1
v4 v8
v7
v5v3
v6v2
‧11‧
• Another example:
5
1
2
3
46
7
8
{ {1, 5}, {2, 6}, {3, 8}, {4, 7}} is a domatic partition.
‧12‧
• Question:– Does any graph has a domatic partition?
‧13‧
• The domatic number was defined and studied by E. J. Cockayne and S. T. Hedetniemi [CH77].
• They showed that d(G) ≤ + 1, where is the minimum degree of vertices in G.
• G is domatically full if d(G) = + 1.
‧14‧
• Some special graph classes are domatically full, such as :– Trees, [CH77]
– Cliques, [CH77]
– Maximum outerplanar graphs, [CH77]
– Strongly chordal graphs, [F84]
– ……
‧15‧
Chord
• An edge is called a chord of a cycle if it connects two vertices of the cycle but is not itself an edge within the cycle.
1
54
2
3
G
‧16‧
Chord
• The subgraph of G induced by {1,2,3} has a cycle.
54
2
3
1
Any chord exists?
‧17‧
Chord
• The subgraph of G induced by {1,2,3,4} has cycles.
54
2
3
Any chord exists?
[2, 4], [1, 3]
1
‧18‧
Chord
• The subgraph of G induced by {1,2,4,5} has cycles.
3
Any chord exists?
[1, 4]
12
54
‧19‧
Hole
• A chordless cycle is sometimes also called a graph hole.
3
2
45
1
‧20‧
Chordal graphs
• A chordal graph is a simple graph possessing no holes (chordless cycles).
• That is, A graph is chordal if and only if every cycle of length greater than three has a chord.
‧21‧
A chordal graph:
A non-chordal graph:
3
62
7
4
1
5
1
54
2
3
62
7
4
1
5
A hole !
‧22‧
Outline
• Introduction• Strongly Chordal Graphs• Algorithm• Correctness• Complexity• Conclusions• References
‧23‧
Relax!
• 某天上李家同教授的科技英文課,他問:「我問你們,你們知道米開朗基羅是誰嗎?」
• 某同學回答:「忍者龜!」• 李教授正在感嘆學生人文素養不夠,正要開罵時,我補了一句:
• 「另外還有三隻忍者龜,叫多納太羅、拉斐爾和達文西。」
• 從此我變成大學生人文素養不夠的範例。
‧24‧
Odd chords
• Let (v1, v2, …, vk) be an even length cycle. Then an edge e = [vi, vj] is an odd chord of the even length cycle if e is a chord and i – j is odd.
2
34
5
61
(1, 2, 3, 4, 5, 6) is an even length cycle.
Any chord else?
‧25‧
Can you find an odd chord in the following graph?
• Is it a chordal graph?
2
34
5
61
‧26‧
Strongly chordal graphs
• 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 chordal and strongly chordal graphs are introduced in the following.
Why six?
‧27‧
Simplicial vertex
• N[v] = Adj(v){v} is called the closed neighborhood of v.
• A vertex v is called simplicial if the subgraph induced by N[v] is a clique.
v
w
x
y N[v] = {v, w, x, y}
v
w
x
y v is simplicial
‧28‧
3
62
7
4
1
5
Where are the simplicial vertices in the graph?Is vertex “1” a simplicial vertex?
{7, 6}
‧29‧
Perfect elimination ordering
• Rose [R70] showed that a graph G is chordal if and only if it is possible to order the vertices (v1, v2,…, vn) in such a way that, for each i{1, 2,…, n}, vi is a simplicial vertex of Gi = G({vi, vi+1,…, vn}), where Gi is a subgraph induced by the vertex set {vi, vi+1,…, vn}.
• Such an ordering is called a perfect elimination ordering.
‧30‧
62
7
1
6 → 7 → 2 → 1 → 3 →
3
4
4 →
5
5
(6, 7, 2, 1, 3, 4, 5) is called a perfect elimination ordering of the given graph.
‧31‧
Strong elimination ordering
• Let Ni[v] denote the closed neighborhood of v in Gi.
• The ordering of vertices (v1, v2,…, vn) is called a strong elimination ordering if it is a perfect elimination ordering and, for each i < j < k, if vj and vk belong to Ni[vi] in Gi then Ni[vj] Ni[vk].
• For example,
‧32‧
7 8
31 4
965
2 3
65
43
65
2
5
2 3
7 8
4
96
7
‧33‧
Strong elimination ordering (contd.)
• In other words, for each vertex vi we not only require that vi be simplicial in Gi but in addition insist that the ordering of the vertices in Ni[vi] be consistent with the ordering of this nested family (smallest to largest).
‧34‧
Why are we concerned for the strong elimination ordering?
• Farber [F83] showed that a graph is strongly chordal if and only if it admits a strong elimination ordering.
• To date (1992), the best-known time to recognize strongly chordal graphs is O(m log n). This algorithm additionally determines a strong elimination ordering. [PT87]
‧35‧
Outline
• Introduction• Strongly Chordal Graphs• Algorithm• Correctness• Complexity• Conclusions• References
‧36‧
Relax!如果你只剩下 3 天壽命 ......
某日,一位教授問學生:「如果你只剩下三天的壽命,你要怎麼利用?」 學生競相回答:
AA :「我要趁這幾天好好陪陪家人。」
BB :「我要和我女朋友大玩特玩。」
CC :「我要寫好遺囑。」
這時教授看見一個同學沈默不語,便問他:「 DD 你呢?你要怎麼利用這三天?」
DD :「教授,我想聽你的課。」
全班同學開始罵他狗腿,為了分數不擇手段等等,而教授聽了大喜,心想現在居然還有如此尊師重道的同學,不禁再問他:「為什麼呢?」
他突然正氣凜然的站起來:「因為聽你的課讓我有度日如年的感覺...」
一學期後,那同學被當了。
‧37‧
Preliminary of the algorithm
• A greedy approach is used to design this algorithm.
• First, we assume that a strong elimination ordering has been constructed for the strongly chordal graph G = (V, E).
• It has the property that the closed neighborhoods of the members of Ni[vi] form a nested family of sets.
‧38‧
Preliminary of the algorithm (contd.)
• The algorithm maintains + 1 disjoint sets. – Initially, these sets are empty.
• The algorithm visits vertices in the reverse ordering of the strong elimination ordering. A vertex is included in a set when it is visited.
‧39‧
Preliminary of the algorithm (contd.)
• We say that a vertex v is dominated by set S if there exists a vertex u S such that u N[v].
• A vertex v is completely dominated if v is dominated by + 1 dominating sets.
• Now let us see the algorithm.
‧40‧
Algorithm DP
• 1. Initially, Si = for 1≤ i ≤ + 1.
• 2. FOR i = n down to 1 DO
• 3. Find the largest k such that vk N[vi] and vk is not completely dominated;
• 4. Let Sj be a set that does not dominate vk ;
• 5. Include vi in Sj, i.e., Sj = {vi} Sj;
• 6. If no such set exists, then include vi to an arbitrary set.
• 7. ENDFOR
‧41‧
8
1
7
4
95
A strong elimination ordering: (preprocessing)
6
32
8
1
7
4
95 6
32
1 → 5 → 6 → 2 → 7 → 4 → 3 → 9 → 8
N1 [2] = {2, 3, 4, 5, 6, 7}
N1 [5] = {2, 3, 5, 6}
N1 [6] = {2, 3, 5, 6, 7}
‧42‧
1 4
5
2 3
8 96 7
1 ← 5 ← 6 ← 2 ← 7 ← 4 ← 3 ← 9 ← 8
= 2
S1 =
S2 =
S3 =
Algorithm DP :
‧43‧
1 4
5
2 3
8 96 7
S1 =
S2 =
S3 =
{8}
1 ← 5 ← 6 ← 2 ← 7 ← 4 ← 3 ← 9 ← 88
Algorithm DP :
‧44‧
1 4
5
2 3
8 96 7
S1 = {8}
S2 =
S3 =
{9}
1 ← 5 ← 6 ← 2 ← 7 ← 4 ← 3 ← 99 ← 8
Algorithm DP :
‧45‧
1 4
5
2 3
8 96 7
S1 = {8}
S2 = {9}
S3 = {3}
1 ← 5 ← 6 ← 2 ← 7 ← 4 ← 33 ← 9 ← 8
Algorithm DP :
‧46‧
1 4
5
2 3
8 96 7
S1 = {8}
S2 = {9}
S3 = {3}
{4, 8}
1 ← 5 ← 6 ← 2 ← 7 ← 44 ← 3 ← 9 ← 8
Algorithm DP :
‧47‧
1 4
5
2 3
8 96 7
S1 = {4, 8}
S2 = {9}
S3 = {3}
{7, 9}
1 ← 5 ← 6 ← 2 ← 77 ← 4 ← 3 ← 9 ← 8
Algorithm DP :
‧48‧
1 4
5
2 3
8 96 7
S1 = {4, 8}
S2 = {7, 9}
S3 = {3}
{2, 4, 8}
1 ← 5 ← 6 ← 22 ← 7 ← 4 ← 3 ← 9 ← 8
Algorithm DP :
‧49‧
1 4
5
2 3
8 96 7
S1 = {2, 4, 8}S2 = {7, 9}
S3 = {3}
{6, 7, 9}
1 ← 5 ← 66 ← 2 ← 7 ← 4 ← 3 ← 9 ← 8
Algorithm DP :
‧50‧
1 4
5
2 3
8 96 7
S1 = {2, 4, 8}S2 = {6, 7, 9}S3 = {3}
1 ← 55 ← 6 ← 2 ← 7 ← 4 ← 3 ← 9 ← 8
{3, 5}
Algorithm DP :
‧51‧
1 4
5
2 3
8 96 7
S1 = {2, 4, 8}S2 = {6, 7, 9}S3 = {3, 5}
Therefore we find a domatic partition { {2, 4, 8}, {6, 7, 9}, {1, 3, 5} }
11 ← 5 ← 6 ← 2 ← 7 ← 4 ← 3 ← 9 ← 8
S3 = {1, 3, 5}
Algorithm DP :
‧52‧
• Now let us proceed with the correctness of algorithm DP.
‧53‧
Outline
• Introduction• Strongly Chordal Graphs• Algorithm• Correctness• Complexity• Conclusions• References
‧54‧
Relax!
• 一個很虔誠的基督徒到非洲叢林探險,不幸脫隊迷失在叢林中,
• 接著更悲慘的事發生了,一隻獅子發現他,便開始追殺他,他沒命的跑啊跑啊。
• 終於讓他逃到一棵樹上,可是那獅子也不願放棄的在樹下等。
• 天黑了,他又餓又渴,於是他開始向上帝禱告:
– 『主啊!請您將這隻噬血的獅子變成基督徒吧!』
• 話說完,樹下的獅子說話了:
– 『親愛的上帝,謝謝您賜給我豐盛的晚餐。』
‧55‧
• To prove the correctness of the algorithm, we have to figure out some lemmas first.
‧56‧
Lemma 1
• Assume S {vi+1,…, vn}, vk N[vi], where 1≤ i ≤ n. If S does not dominate vk , then S does not dominate vj for all j < k and vj N[vi].
• To prove Lemma 1, we consider three cases as follows.
‧57‧
Case 1: i ≤ j < k
• In this case, the lemma holds by the definition of strong elimination ordering since Ni[vj] Ni[vk].
k
j
i
‧58‧
Case 2: j < i ≤ k
• If S dominates vj and does not dominate vk , then there exists a number k such that vk S and vk N [vj].
• Since Nj[vj] and Ni[vi] are cliques, we can derive that v
i is adjacent to vk and vk is adjacent to vk .
k
j
i
k
Then a contradiction occurs!
‧59‧
Case 3: j < k < i
• In this case, we also assume that S dominates vj and does not dominate vk . Then there exists a number k such that vk S and vk N [vj].
• This implies that vk is dominated by S by the property of Nj[vi] Nj[vk ].
• A contradiction then occurs. – Why?
(Notice the order of vk and S {vi+1,…, v
n})
k
j
i
k
‧60‧
• Therefore, the proof of Lemma 1 is done.
• Any question?
‧61‧
Corollary 1
• Assume S {vi+1,…, vn}, vk N[vi], where 1≤ i ≤ n. If S dominates vk, then S dominate vj for all j > k and vjN[vi].
• This corollary can be obtained easily from Lemma 1.
‧62‧
R[v] and ndom(v)
• R[v] = {x : x N[v] and x is not in any set}
– Residual neighborhood?
• ndom(v) denotes the number of sets that do not dominate v during execution of Algorithm DP.
‧63‧
1 4
5
2 3
8 96 7
S1 = {2, 4, 8}
S2 = {7, 9}
S3 = {3}
1 ← 5 ← 6 ← 22 ← 7 ← 4 ← 3 ← 9 ← 8
R[2] = {1, 5, 6}
R[1] = {1, 5, 6} , ndom[1] = 2
, ndom[2] = 0
‧64‧
Lemma 2
• Algorithm DP maintains the following invariant:
For each i {1, 2,…, n}, R[vi] ≥ ndom(vi)
• We prove this lemma by induction.
‧65‧
Proof of Lemma 2
• Initially, | R[vi] | = degree(vi) + 1 and ndom(vi) = +1.
– It is obvious that | R[vi] | ≥ ndom(vi) for all vi in V.
• Only values of | R[vj] | and ndom(vj), where vj N[vi], may be altered when vi is included in a set.
• A vertex is included in a set when it is visited by the algorithm.
‧66‧
Proof of Lemma 2 (contd.)
• The algorithm scans N[vi] to find the largest number k such that vk N[vi] and vk is not completely dominated.
• We can partition N[vi] into two sets:
– X = {vj : j > k and vj N[vi]}
– Y = {vj : j ≤ k and vj N[vi]}
‧67‧
Proof of Lemma 2 (contd.)
• Let S be a set that does not dominate vk.
• By Lemma 1, the vertices in Y are not dominated by S.
• Therefore, for each vertex vjY, both values of | R[vj] | and ndom(vj) are decremented by one after vafter vii is included is included
in S.in S.– Why?
X = {vj : j > k and vj N[vi]}
Y = {vj : j ≤ k and vj N[vi]}
‧68‧
Proof of Lemma 2 (contd.)
• By Corollary 1, the vertices in X are all completely dominated, i.e., ndom(vj) = 0.
• Thus the invariant is maintained.
– Notice that if no such vk exists, that is, all vertices in N[vi] are completely dominated, then ndom(vj) = 0, where vj N[vi]. Thus vi can be included in any set and the invariant still holds.
X = {vj : j > k and vj N[vi]}
Y = {vj : j ≤ k and vj N[vi]}
‧69‧
Theorem 1
• Algorithm DP correctly partitions a strongly chordal graph into + 1 disjoint dominating sets.
• Proof:– Upon termination, | R[vi] | = 0 for each i {1, 2,…, n}.
– By Lemma 2, | R[vi] | ≥ ndom(vi), thus ndom(vi) = 0 for all vi
’s in V.
– That is, all vi’s in V are dominated by all +1 dominating sets.
‧70‧
Outline
• Introduction• Strongly Chordal Graphs• Algorithm• Correctness• Complexity• Conclusions• References
‧71‧
Theorem 2
• Algorithm DP is linear.
• The proof is listed as follows.
‧72‧
Proof of Theorem 2
• In practical implementation, each vertex vi is associated with a variable ndom(i) and an array Li of size +1.
• Initially, ndom(i) = +1 and the values of entries in Li are all zero.
• If vi is dominated by Sj, then Li( j ) = 1.
‧73‧
Proof of Theorem 2 (contd.)
• Thus, for each vertex vi we can take O(di) time to determine vk , where di is the degree of vi and vk N[vi] is not completely dominated.
• Then we take O(+1) time to decide in which set vi should be included.
• Finally for each vj N[vi], we take O(1) time to update ndom(i) and Lj .
By checking Lk
O (1 di)
‧74‧
Proof of Theorem 2 (contd.)
• Therefore, the algorithm takes time of
).()1(1
nmOddOn
iii
‧75‧
Theorem 3 (Concluding theorem)
• Given the strong elimination ordering of a strongly chordal graph G, we can find a domatic partition of G in linear time.
‧76‧
Outline
• Introduction• Strongly Chordal Graphs• Algorithm• Correctness• Complexity• Conclusions• References
‧77‧
Conclusions
• We have learned the following knowledge:
– Chordal graphs, strongly chordal graphs
– Perfect elimination ordering and strong elimination ordering
– Greedy algorithm DP
‧78‧
Mutual encouragements
• Encouraging sentences
• Exercise more.
• Three states of our lives
‧79‧
• Think hard, not work hard.– Professor R. C. T. Lee
• Think hard and work smartly.– Professor M. S. Chang
• 件件工作反應自我,凡經我手必為佳作。– Dr. D. T. Lee
‧80‧
• 我國幾乎可以完全不重視學生的體能訓練。
• 我國學生的體能絕對低於歐美學生的體能。
- 節錄至李家同教授之“我國教育上的重大問題” 投影片
我國學生體能太差
‧81‧
• 某高中老師:「五千公尺不能在 22 分鐘內跑完的,就不是男人。」 (10 年前 )– 從前台南一中入學測驗包括一千五百公尺測驗
• 成功大學班際接力賽時有人連跑完 200M 都很勉強。 (6 年前 )
• 中正大學某次體育課測驗一千五百公尺時,不少人 ( 男 ) 接近 10 分鐘才勉強跑完。 ( 上個月 )
‧82‧
人生三種境界王國維
• 古今之成大事業、大學問者,必經過三種之境界:
– 昨夜西風凋碧樹。獨上高樓,望盡天涯路。
– 衣帶漸寬終不悔,為伊消得人憔悴。
– 眾裡尋他千百度,驀然回首,那人卻在,燈火闌珊處。
Thank you.
References• [B88] On the domatic number of interval graphs, A. A. Bertossi, Informati
on Processing Letters, 28 (1988), pp. 275-280.• [B85] Dominating sets and domatic number of circular arc graphs, M. A.
Bonuccelli, Discrete Applied Mathematics, 12 (1985), pp. 203-213.• [BJ82] Dominating sets in chordal graphs, K. S. Booth and J. H. Johnson,
SIAM Journal on Computing, 11 (1982), pp. 191-199.• [CH77] Towards a theory of domination in graphs, E. J. Cockayne and S.
T. Hedetniemi, Networks, 7 (1977), pp. 247-161.• [F83] Applications of l.p. duality to problems involving independence and
domination, M. Farber, Ph.D. Thesis, Rutgers University, New Brunswick, NJ, 1982.
• [F84] Domination, independent domination, and duality in strongly chordal graphs, M. Farber, Discrete Applied Mathematics, 7 (1984), pp. 115-130.
• [GJ79] Computers and Intractability: A Guide to the Theory of NP-Completeness, M. R. Garey and D. S. Johnson, Freeman, San Francisco, 1979.
• [G80] Algorithm Graph Theory and Perfect Graphs (Academic Press, New York, 1980), M. C. Golumbic.
• [LHC90] The Domatic Number Problem in Interval Graphs, T. L. Lu, P. H. Ho and G. J. Chang, SIAM Journal on Discrete Mathematics, 3 (1990), pp. 531-536.
• [PT87] Three Partition Refinement Algorithms, R. Paige and R. E. Tarjan, SIAM Journal on Computing, 16 (1987), pp. 973-989.
• [PC91] A New Approach for Domatic Number Problem on Interval Graphs, S. L. Peng and M. S. Chang, Proceedings of National Computer Symposium, 1991, Taipei, Republic of China, pp. 236-241.
• [R70] Triangulated Graphs and the Elimination Process, D. J. Rose, J. Math. Anal. Appl., 32 (1970), pp. 597-609.
• [RR89] Linear Algorithm for Domatic Number Problem on Interval Graphs, Information Processing Letters, 33 (1989), pp. 29-33.