Gabriel Valiente
valiente@lsi.upc.es
1/152
Gabriel Valiente
Schedule
1. Introduction 2. Intersection Graph Theory 3. Algorithms on Permutation Graphs 4. Algorithms on Circle Graphs 5. Algorithms on Interval Graphs 6. Algorithms on Chordal Graphs 7. Algorithms on Circular-Arc Graphs 8. Student Presentations 10 June 2003 03 June 2003 04 June 2003 04 June 2003 11 June 2003 13 May 2003 27 May 2003 28 May 2003 28 May 2003
2/152
Gabriel Valiente
Introduction
3/152
Gabriel Valiente
Introduction
Most graph problems of theoretical interest and practical relevance are intractable, even hard to approximate. However, NP-hard problems become polynomial-time solvable on special graph classes. A closer look will be taken in this course at some fundamental graph problems (clique, independent set, coloring, isomorphism). Understanding the structure of the graph classes that make them polynomial-time solvable. Drawing the boundary between P and NP-hard for them. Studying robust (certifying) algorithms. Identifying open problems. Graph classes will be studied from the point of view of intersection graph theory.
4/152
Gabriel Valiente
Introduction
Isomorphism expresses what is meant when two graphs are said to be the same graph. Denition Two graphs G and H are isomorphic, denoted by G = H, if there is a bijection h : V (G) V (H ) such that, for every pair of vertices u, v V (G), {u, v} E (G) if and only if {h(u), h(v)} E (H ). Two isomorphic graphs may be depicted in such a way that they look very different. Example The following two graphs are isomorphic.
5/152
Gabriel Valiente
Introduction
Nonisomorphism of graphs is not usually hard to prove, because several invariants or necessary conditions for isomorphism are not difcult to compute. These are properties that do not depend on the presentation or labeling of a graph. Denition An graph isomorphism invariant is a necessary condition for two graphs to be isomorphic. Example Two graphs cannot be isomorphic if they differ in their order, size, or degree sequence. Remark For input graphs G and H with V (G) = {u1 , . . . , un } and V (H ) = {v1 , . . . , vn }, a necessary condition for G = H is that the multisets {(ui ) | 1 i n} and {(vi ) | 1 i n} be equal.
6/152
Gabriel Valiente
Introduction
Invariants are not sufcient conditions for isomorphism. Nothing can be concluded about two graphs which share an invariant. Example The following two graphs are not isomorphic, although they have the same number of vertices, the same number of edges, and are both 4-regular.
7/152
Gabriel Valiente
Introduction
Example The following two graphs are not isomorphic, although they have the same number of vertices, the same number of edges, and are both 4-regular. {u0 , u1 }, {u0 , u2 }, {u0 , u4 }, {u0 , u6 }, {u1 , u3 }, {u1 , u5 }, {u1 , u7 }, {u2 , u3 }, {u2 , u8 }, {u2 , u10 }, {u3 , u4 }, {u3 , u6 }, {u4 , u5 }, {u4 , u7 }, E (G) = {u5 , u9 }, {u5 , u13 }, {u6 , u8 }, {u6 , u10 }, {u7 , u9 }, {u7 , u13 }, {u8 , u11 }, {u8 , u14 }, {u9 , u12 }, {u9 , u15 }, {u10 , u11 }, {u10 , u14 }, {u11 , u12 }, {u11 , u15 }, {u12 , u13 }, {u12 , u14 }, {u13 , u15 }, {u14 , u15 } {v0 , v1 }, {v0 , v2 }, {v0 , v4 }, {v0 , v6 }, {v1 , v3 }, {v1 , v5 }, {v1 , v7 }, {v2 , v3 }, {v2 , v8 }, {v2 , v10 }, {v3 , v9 }, {v3 , v11 }, {v4 , v5 }, {v4 , v8 }, E (H ) = {v4 , v12 }, {v5 , v9 }, {v5 , v13 }, {v6 , v7 }, {v6 , v10 }, {v6 , v12 }, {v7 , v11 }, {v7 , v13 }, {v8 , v9 }, {v8 , v14 }, {v9 , v15 }, {v10 , v11 }, {v10 , v14 }, {v11 , v15 }, {v12 , v13 }, {v12 , v14 }, {v13 , v15 }, {v14 , v15 }
8/152
Gabriel Valiente
Introduction
Example The following two graphs are not isomorphic, although they have the same number of vertices, the same number of edges, and are both 4-regular.
There are, in fact, only ve vertices at distance 2 of any given vertex of the graph to the left-hand side, but six vertices at distance 2 of any given vertex of the graph to the right-hand side.
Technical University of Catalonia 9/152 Gabriel Valiente
Introduction
Isomorphism of graphs is usually much harder to prove than nonisomorphism of graphs, because all known certicates or necessary and sufcient conditions for graph isomorphism are as difcult to compute as graph isomorphism itself. Denition An graph isomorphism certicate is a necessary and sufcient condition for two graphs to be isomorphic. From a complexity-theoretical point of view, graph isomorphism is one of the few NP problems believed neither to be in P nor to be NP-complete. NPC NP P GI
10/152
Gabriel Valiente
Introduction
Denition A subgraph isomorphism of a graph G into a graph H is an injection h : V (G) V (H ) such that, for every pair of vertices u, v V (G), {h(u), h(v)} E (H ) if {u, v} E (G). In an induced subgraph isomorphism, {u, v} E (G) if and only if {h(u), h(v)} E (H ). Denition The subgraph isomorphism problem is to determine, given two input graphs G and H, whether H has a subgraph which is isomorphic to G. Remark Subgraph isomorphism is a common generalization of many important graph problems. Clique (Kn ) Independent set (nK1 ) Hamiltonian cycle (Cn ) Matching (nK2 ) Girth (Pn ) Shortest path (Pn )
Technical University of Catalonia 11/152 Gabriel Valiente
Introduction
Denition Two graphs G and H are homomorphic, denoted by G H, if there is a mapping h : V (G) V (H ) such that, for every pair of vertices u, v V (G), {h(u), h(v)} E (H ) if {u, v} E (G). Denition The subgraph homomorphism problem is to determine, given two input graphs G and H, whether H has a subgraph which is homomorphic to G. Remark Graph homomorphism is a generalization of graph coloring, in which adjacent vertices obtain adjacent colors. Example G Kn if and only if G is n-colorable.
12/152
Gabriel Valiente
Introduction
Denition A graph G is homeomorphic to a graph H if G can be obtained from H by deleting degree-two vertices. Denition The subgraph homeomorphism problem is to determine, given two input graphs G and H, whether H has a subgraph which is homeomorphic to G. Remark Subgraph homeomorphism is the recognition problem for classes of graphs characterized by the absence of forbidden structures. Example (Kuratowski, 1930) Planar graphs are characterized by the absence of a subdivision of either K5 or K3,3 .
13/152
Gabriel Valiente
Introduction
Example Series-parallel graphs are characterized by the absence of a subdivision of K4 .
14/152
Gabriel Valiente
Introduction
Denition A graph G is a minor of a graph H if G can be obtained from a subgraph of H by contracting edges. Denition The minor containment problem is to determine, given two input graphs G and H, whether H (has a subgraph which) is a minor of G. Remark Minor containment is the recognition problem for classes of graphs characterized by the absence of forbidden minors. Example K5 is a minor of the Petersen graph.
15/152
Gabriel Valiente
Introduction
graph class
16/152
Gabriel Valiente
Introduction
Denition A certifying algorithm for a decision problem is an algorithm that provides a certicate with each answer that it produces. Example Consider the problem of recognizing bipartite graphs. Given an input graph G, a 2-coloring of G is an acceptance certicate, while an odd cycle in G is a rejection certicate.
Introduction
Martin C. Golumbic, Algorithmic Graph Theory and Perfect Graphs, New York: Academic Press, 1980. Klaus Simon, Efziente Algorithmen fr perfekte Graphen, Stuttgart: B. G. Teubner, 1992. Johannes Kbler, Uwe Schning, and Jacobo Turn. The Graph Isomorphism Problem: its Structural Complexity. Boston: Birkhuser, 1993. Ron Shamir. Advanced Topics in Graph Algorithms. Technical Report, Tel-Aviv University, 1994. Terry A. McKee and Fred R. McMorris, Topics in Intersection Graph Theory, Philadelphia: SIAM, 1999. Andreas Brandstdt, Van Bang Le, and Jeremy P. Spinrad, Graph Classes: A Survey, Philadelphia: SIAM, 1999. Gabriel Valiente. Algorithms on Trees and Graphs. Berlin: Springer-Verlag, 2002.
Technical University of Catalonia 18/152 Gabriel Valiente
19/152
Gabriel Valiente
Theorem (Marczewski, 1945) Every graph is an intersection graph. Theorem Every graph is the intersection graph of a family of subgraphs of a graph.
20/152
Gabriel Valiente
21/152
Gabriel Valiente
e1 e3 e4 e5
e2 e6
23/152
Gabriel Valiente
1 5
25/152
Gabriel Valiente
26/152
Gabriel Valiente
circle
chordal
permutation
interval
circular-arc
Technical University of Catalonia 27/152 Gabriel Valiente
28/152
Gabriel Valiente
29/152
Gabriel Valiente
Student Presentations
Prove the claimed relationships between the ve classes of intersection graphs (chordal, circle, circular-arc, interval, and permutation graphs). Wen-Lian Hsu, Ross M. McConnell. PC Trees and Circular-Ones Arrangements. Theoretical Computing Science, 296(1):99116, 2003. Wen-Lian Hsu. A Simple Test for the Consecutive Ones Property. Journal of Algorithms, 43(1):116, 2002. Emmanuel Gasse. A Proof of a Circle Graph Characterization. Discrete Mathematics, 173(13):277-283, 1997. Stephan Olariu. An Optimal Greedy Heuristic to Color Interval Graphs. Information Processing Letters, 37(1):2125, 1991. Wei-Kuan Shih, T. C. Chern, Wen-Lian Hsu. An O(n2 log n) Algorithm for the Hamiltonian Cycle Problem on Circular-Arc Graphs. SIAM Journal on Computing, 21(6):10261046, 1992.
30/152
Gabriel Valiente
31/152
Gabriel Valiente
33/152
Gabriel Valiente
34/152
Gabriel Valiente
35/152
Gabriel Valiente
36/152
Gabriel Valiente
Finding the index j takes O(log k) time, yielding the O(n log n) time bound.
Technical University of Catalonia 37/152 Gabriel Valiente
38/152
Gabriel Valiente
39/152
Gabriel Valiente
40/152
Gabriel Valiente
41/152
Gabriel Valiente
42/152
Gabriel Valiente
43/152
Gabriel Valiente
44/152
Gabriel Valiente
45/152
Gabriel Valiente
e1 e3 e4 e5
e2 e6
46/152
Gabriel Valiente
adjacency
A set of mutually disjoint, or contained in each other, intervals of I (G) models an independent set of G. A set of mutually overlapping intervals of I (G) models a clique of G.
47/152
Gabriel Valiente
P. J. Heawood (18611955)
Technical University of Catalonia 48/152 Gabriel Valiente
W. F. McGee (1937)
Technical University of Catalonia 49/152 Gabriel Valiente
n=1
r=1
51/152
Gabriel Valiente
n=2
r=2
52/152
Gabriel Valiente
n=3
r=4
53/152
Gabriel Valiente
n=4
r=8
54/152
Gabriel Valiente
n r
1 1
2 2
3 4
4 8
5 ...
55/152
Gabriel Valiente
n=5
r = 16
56/152
Gabriel Valiente
n r
1 1
2 2
3 4
4 8
5 16
6 ...
57/152
Gabriel Valiente
n=6
r = 31
58/152
Gabriel Valiente
59/152
Gabriel Valiente
v1
v2
v3
v4
v5
v6
v7
v8
v9
60/152
Gabriel Valiente
v1
v2
v3
v4
v5
v6
v7
v8
v9
61/152
Gabriel Valiente
62/152
Gabriel Valiente
6 7 8 9 10
3 2 1 14 13 1 2 3 4 5 6 7 8 9 10 11 12 13 14
11 12
63/152
Gabriel Valiente
6 7 8 9 10
3 2 1 14 13 2 3 4 5 6 7 8 9 10 11 12 13 14 1
11 12
64/152
Gabriel Valiente
6 7 8 9 10
3 2 1 14 13 3 4 5 6 7 8 9 10 11 12 13 14 1 2
11 12
65/152
Gabriel Valiente
6 7 8 9 10
3 2 1 14 13 4 5 6 7 8 9 10 11 12 13 14 1 2 3
11 12
66/152
Gabriel Valiente
6 7 8 9 10
3 2 1 14 13 5 6 7 8 9 10 11 12 13 14 1 2 3 4
11 12
67/152
Gabriel Valiente
6 7 8 9 10
3 2 1 14 13 6 7 8 9 10 11 12 13 14 1 2 3 4 5
11 12
68/152
Gabriel Valiente
6 7 8 9 10
3 2 1 14 13 7 8 9 10 11 12 13 14 1 2 3 4 5 6
11 12
69/152
Gabriel Valiente
6 7 8 9 10
3 2 1 14 13 8 9 10 11 12 13 14 1 2 3 4 5 6 7
11 12
70/152
Gabriel Valiente
6 7 8 9 10
3 2 1 14 13 9 10 11 12 13 14 1 2 3 4 5 6 7 8
11 12
71/152
Gabriel Valiente
6 7 8 9 10
3 2 1 14 13 10 11 12 13 14 1 2 3 4 5 6 7 8 9
11 12
72/152
Gabriel Valiente
6 7 8 9 10
3 2 1 14 13 11 12 13 14 1 2 3 4 5 6 7 8 9 10
11 12
73/152
Gabriel Valiente
6 7 8 9 10
3 2 1 14 13 12 13 14 1 2 3 4 5 6 7 8 9 10 11
11 12
74/152
Gabriel Valiente
6 7 8 9 10
3 2 1 14 13 13 14 1 2 3 4 5 6 7 8 9 10 11 12
11 12
75/152
Gabriel Valiente
6 7 8 9 10
3 2 1 14 13 14 1 2 3 4 5 6 7 8 9 10 11 12 13
11 12
76/152
Gabriel Valiente
77/152
Gabriel Valiente
vi
vk v
vk v
78/152
Gabriel Valiente
79/152
Gabriel Valiente
v2 w 2 x2 x1 w1 v1
x3 vn wn 3
n 3
80/152
Gabriel Valiente
v v j j 1 vi vk
vk + 1
vkvk1 vi
vj
v j 1 vi+1 vi
v j 1 vj
81/152
Gabriel Valiente
82/152
Gabriel Valiente
vj
+1
v2n
84/152
Gabriel Valiente
85/152
Gabriel Valiente
86/152
Gabriel Valiente
87/152
Gabriel Valiente
T (2)
T (3)
T ( 4)
T ( 5)
T (6) MIS(e5 )
T (7)
T (8)
T (9)
T (10)
T (11)
T (12) / 0
88/152
Gabriel Valiente
T (1) T (2) T (3) T (4) T (5) T (6) T (7) T (8) T (9) T (10)T (11)T (12)T (13)T (14) I (e1 ) I (e2 ) I (e3 ) I (e4 ) I (e5 ) I (e6 ) I (e7 ) / 0
e1 e2 e3 e4
e5
e6
e7
89/152
Gabriel Valiente
90/152
Gabriel Valiente
91/152
Gabriel Valiente
92/152
Gabriel Valiente
94/152
Gabriel Valiente
95/152
Gabriel Valiente
A set of mutually disjoint intervals of I (G) models an independent set of G. A set of mutually overlapping, or contained in each other, intervals of I (G) models a clique of G.
96/152
Gabriel Valiente
K2
Technical University of Catalonia
K4
K4
97/152
K2
K2
Gabriel Valiente
99/152
Gabriel Valiente
100/152
Gabriel Valiente
103/152
Gabriel Valiente
104/152
Gabriel Valiente
F A B C D E G H I J
105/152
Gabriel Valiente
106/152
Gabriel Valiente
F J I G H A B E D C
107/152
Gabriel Valiente
x1
x2
xn
108/152
Gabriel Valiente
109/152
Gabriel Valiente
1: procedure consecutive (X , F, ) 2: let be the set of all permutations of X 3: for all S F do 4: remove from those permutations in which the elements of S do not
occur as a subsequence 5: end procedure
110/152
Gabriel Valiente
1: procedure consecutive (X , F, ) 2: let T be the universal PQ-tree over X 3: for all S F do 4: reduce T using S 5: end procedure
The pattern matching procedure reduce attempts to apply from the bottom to the top of the PQ-tree a set of 11 templates, consisting of a pattern to be matched against the current PQ-tree and a replacement to be substituted for the pattern.
111/152
Gabriel Valiente
112/152
Gabriel Valiente
113/152
Gabriel Valiente
C1
C2
C3
C4
C5
C1
C2
C3
C4
C5
Therefore, the PQ-tree will have to be extended with more information about the structure of the interval graph.
Technical University of Catalonia 114/152 Gabriel Valiente
I4 I6
115/152
I8
Gabriel Valiente
116/152
Gabriel Valiente
C1
C2
C3
C4
C5
C1
C2
C3
C4
C5
and their labeled PQ-trees are not equivalent: (1, 2)(2, 3)(3, 4) 1 1 1 1 0 1 1 4 (1, 2)(2, 3)(2, 4)(3, 4) 0 2 2 1
117/152
Gabriel Valiente
119/152
Gabriel Valiente
120/152
Gabriel Valiente
1 5
122/152
Gabriel Valiente
123/152
Gabriel Valiente
124/152
Gabriel Valiente
g
Technical University of Catalonia
f
125/152
e
Gabriel Valiente
q x y z
126/152
Gabriel Valiente
127/152
Gabriel Valiente
128/152
Gabriel Valiente
129/152
Gabriel Valiente
130/152
Gabriel Valiente
131/152
Gabriel Valiente
f i=4
0 i=3
1 i=2
2 i=1
2
132/152
1
Gabriel Valiente
133/152
Gabriel Valiente
134/152
Gabriel Valiente
135/152
Gabriel Valiente
137/152
Gabriel Valiente
138/152
Gabriel Valiente
140/152
Gabriel Valiente
141/152
Gabriel Valiente
142/152
Gabriel Valiente
v4 e3 G = M (G)
v3
143/152
Gabriel Valiente
144/152
Gabriel Valiente
145/152
Gabriel Valiente
146/152
Gabriel Valiente
147/152
Gabriel Valiente
148/152
Gabriel Valiente
A set of mutually disjoint arcs of I (G) models an independent set of G. A set of mutually overlapping, or contained in each other, arcs of I (G) models a clique of G.
Technical University of Catalonia 149/152 Gabriel Valiente
150/152
Gabriel Valiente
Arcs ax and ay can cover the circle if and only if xy E and, for every w V N [x], wy E and N (w) N [y]. ay az aw aw ax
Technical University of Catalonia 151/152
ay
ax
az
Gabriel Valiente
152/152
Gabriel Valiente