Advanced Topics in Algorithms Shamir
Advanced Topics in Algorithms Shamir
Technical Report
Lecturer: Ron Shamir
Edited by: Sariel Har-Peled
4.15 54
4.16 The case B = Y . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
5.1 The Graph . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
5.2 Some examples of Meyniel graphs (which are not chordal!) . . . . . . . . . . 59
5.3 Example-A Chain Graph . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
5.4 Ordering Q, in the same chain graph . . . . . . . . . . . . . . . . . . . . . . 61
5.5 Independent edges (broken lines denote non-edges) . . . . . . . . . . . . . . 61
5.6 Independent edges that form an induced C4 . . . . . . . . . . . . . . . . . . 62
5.7 C (G) for the graph G of Figure 5.3 . . . . . . . . . . . . . . . . . . . . . . . 62
5.8 a graph (left) with two possible layouts of cost 8 (center) and 6 (right) . . . 63
5.9 the graph G (left) and G' (right) . . . . . . . . . . . . . . . . . . . . . . . . 64
5.10 Example-Edges we have to add . . . . . . . . . . . . . . . . . . . . . . . . . 64
5.11 x and v . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
6.1 An example for maximal cliques in a graph . . . . . . . . . . . . . . . . . . . 67
6.2 Chromatic Number Calculation . . . . . . . . . . . . . . . . . . . . . . . . . 69
6.3 An example for nding maximal stable set . . . . . . . . . . . . . . . . . . . 70
6.4 some comparability graphs . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
6.5 An example for implication classes . . . . . . . . . . . . . . . . . . . . . . . 71
6.6 The triangle lemma . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
7.1 The composition graph of P3K3 K1 C4] . . . . . . . . . . . . . . . . . . . . 78
7.2 The composition graph of F1F2 F3 F4] . . . . . . . . . . . . . . . . . . . . . 78
7.3 The decomposition of a graph . . . . . . . . . . . . . . . . . . . . . . . . . . 80
7.4 Module in a graph . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81
7.5 Uniquely partially orderable graph . . . . . . . . . . . . . . . . . . . . . . . 82
7.6 A graph with a color class that induce all vertices . . . . . . . . . . . . . . . 83
7.7 A graph G-decomposition . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84
LIST OF FIGURES 9
7.8 Algorithm to construct G-decomposition . . . . . . . . . . . . . . . . . . . . 85
7.9 A triangle forcing the merge of two implication classes . . . . . . . . . . . . 86
7.10 The classes Fb Cb must be equal. . . . . . . . . . . . . . . . . . . . . . . . . . 87
7.11 Ab + Ac1 is an implication class in E n D
c. . . . . . . . . . . . . . . . . . . . . 87
7.12 A graph G and its quasi-transitive graph G (in G , edges (x y) $ (y x) are
0 0
not drawn) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90
8.1 A permutation graph for the permutation 4,2,6,1,3,5] . . . . . . . . . . . . . 94
8.2 An orientation on a permutation graph . . . . . . . . . . . . . . . . . . . . . 95
8.3 An F-graph . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96
8.4 Not an F-graph,point A have two values of the function. . . . . . . . . . . . 97
8.5 The air controllers strike problem. . . . . . . . . . . . . . . . . . . . . . . . 98
8.6 The composition of permutation diagrams. . . . . . . . . . . . . . . . . . . 100
8.7 A tolerance graph. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100
8.8 An unbounded tolerance graph. . . . . . . . . . . . . . . . . . . . . . . . . . 102
9.1 Code of The TRO Algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . 103
9.2 Example 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104
9.3 Example 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104
9.4 Example 3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104
9.5 Procedure EXPLORE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107
9.6 The main procedure of the algorithm . . . . . . . . . . . . . . . . . . . . . . 108
9.7 Two elements for each Edge- . . . . . . . . . . . . . . . . . . . . . . . . . . . 108
9.8 Example 4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109
9.9 Example 5 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110
9.10 Example 6 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110
9.11 Procedure EXPLORE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112
9.12 The main procedure of the algorithm . . . . . . . . . . . . . . . . . . . . . . 112
9.13 Example 7 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113
9.14 Example 8 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113
9.15 Example 9 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114
9.16 Example 10 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115
9.17 Example 11 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115
9.18 Example 12 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116
9.19 Example 13 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117
9.20 Example 14 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117
10.1 a) not SP poset b) - e) SP posets . . . . . . . . . . . . . . . . . . . . . . . 121
10.2 a) interval graph b) it's interval representation c) chordal, but not interval
graph . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121
10 LIST OF FIGURES
10.3 example for lemma . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122
10.4 example for theorem of Gilmore-Homan . . . . . . . . . . . . . . . . . . . . 123
10.5 a) interval graph b) it's clique matrix. . . . . . . . . . . . . . . . . . . . . . 124
10.6 Example for Lekkerkerker - Boland theorem . . . . . . . . . . . . . . . . . . 125
11.1 Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 128
11.2 Wegner 1967 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130
11.3 Example of function l h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132
11.4 a PQ-tree. The FRONTIER here is F J I G H A B E D C] . . . . . . . . . 134
11.5 Example of execution of CONSECUTIVE . . . . . . . . . . . . . . . . . . . 136
12.1 A consistent scenario . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 140
12.2 The 13-valued interval algebra A13. Single line: x interval. Double line: y interval. 140
12.3 Two interval realizations for Example 12.2 . . . . . . . . . . . . . . . . . . . 142
12.4 (a) The 5-chain (vi1 x1i vi2 x2i vi3 ). (b) An interval realization of the 5-chain. 144
12.5 Algorithm to construct Delta1-CONSISTENCY . . . . . . . . . . . . . . . . 147
12.6 Complexity of ISAT on all fragments of A3. T : satised by setting all intervals
disjoint or identical. The four asterisk cases were shown to be NPC by Webber
(1994). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 148
Chapter 1
Lecture 1
Advanced Topics in Graph Algorithms
c Tel-Aviv University
Spring Semester, 1994
Lecturer : Ron Shamir
Scribe : Kahn Shaul
Lecture 1 : April 21
11
12 CHAPTER 1. LECTURE 1
a b
a b d a
c d b c
c d
Let G = (V E ) be a graph with vertex set V and edge set E . The graph G 1 = (V E 1) is
; ;
xy 2 E 1 $ yx 2 E (x y 2 V ):
;
a c a c a c
b b b
Figure 1.2: Some orientations of a triangle.
Let G = (V E ) be an undirected graph. We dene the complement of G to be the graph
G = (V E ), where
E = f(x y) 2 V
V j x 6= y and (x y) 2= E g
A graph is complete if every two distinct vertices are adjacent. The complete graph on n
vertices is usually denoted by Kn , and is called a clique of size n.
A (partial) subgraph of a graph G = (V E ) is dened to be any graph H = (V E ) 0 0
satisfying V V and E E .
0 0
a e a e
c d c d
b f b
a graph G a (partial) subgraph of G
a
c d
f
the induced subgraph
G {a,c,d,f}
Figure 1.4: Examples of subgraphs.
14 CHAPTER 1. LECTURE 1
Let G = (V E ) be an undirected graph. Consider the following denitions :
A subset A V of r vertices is an r-clique@r-clique if it induces a complete subgraph,
i.e., if GA = K r . A single vertex is a 1-clique.
A clique K in G is maximal if there is no clique of G which properly contains K as a
subset.
A clique is maximum if there is no clique of G of larger cardinality.
!(G) is the number of vertices in a maximum clique of G, and is called the clique number
of G.
A clique cover of size k is a partition of the vertices V = A1 + A2 + ::: + Ak such that
each Ai is a clique.
k(G) is the size of a smallest possible clique cover of G. It is called the clique cover
number of G.
A stable set or independent set is a subset X of vertices no two of which are adjacent.
(G) is the number of vertices in an independent set of maximum cardinality. It is called
the stability number of G.
b c b b c a
a d a d
(a) (b) (c) (d)
Figure 1.5: (a) A graph G.(b) A maximal clique in G.(c) A maximum clique of G.(d) A
1-clique.
A proper ccoloring@c-coloring is a partition of the vertices V = X1 + X2 + ::: + Xc such
that each Xi is an independent set. In such a case, the vertices of Xi are "painted" with the
color i and adjacent vertices will receive dierent colors. If G has a proper c-coloring, we
say that G is ccolorable@c-colorable.
(G) is the smallest possible c for which there exist a proper c-coloring of G, it is called
the chromatic number of G.
In the graph G of gure 1.5 (a) : fb c dg and fag are a clique cover of size 2. fa cg is
an independent set in G.
Hence, !(G) = 3 k(G) = 2 (G) = 2 (G) = 3
It is always true that:
!(G) (G) and (G) k(G)
Since every vertex of a maximum clique must be contained in a dierent color class in
any minimum proper coloring, and every vertex of a maximum stable set must be contained
in a dierent clique in any minimum clique cover.
1.1. INTRODUCTION TO GRAPH THEORY 15
The following relations are sometimes called duality:
!(G) = (G) and (G) = k(G):
Let G = (V E ) be an arbitrary graph, consider the following denitions :
Chain: A sequence of vertices v0 v1 v2 :::vl] is a chain of length l in G if
vi 1vi 2 E or vivi 1 2 E for i = 1:::l:
; ;
Path: A sequence of vertices v0 v1 v2 :::vl] is a path from v0 to vl in G provided that
vi 1vi 2 E for i = 1::l. A path or a chain in G is called simple if no vertex occurs more than
;
once in the sequence. It is called trivial if l = 0. It is called chordless if the graph induced
by fv0 :::vlgis a path of length l. We denote the chordless path on n vertices by Pn .
Connected graph: A graph G is connected if between any two vertices there exists a chain
in G joining them.
Strongly connected graph : A graph G is strongly connected if for any two vertices x and y
there exists a path in G from x to y.
Cycle : A sequence of vertices v0 v1 v2 :::vl v0] is called a cycle of length l +1 ( or closed
path ) if vi 1vi 2 E for i = 1:::l and vlv0 2 E .
Simple cycle: A cycle v0 v1 v2 :::vl v0 ] is a simple cycle if vi 6= vj for i 6= j .
;
Chordless cycle: A simple cycle v0 v1 v2 :::vl v0] is chordless if vivj 2= E
for every i j such that f(i ; j ) > 1(mod l)g. A chordless cycle on n vertices is denoted
by Cn .
Bipartite graph: An undirected graph G = (V E ) is bipartite if its vertices can be parti-
tioned into two disjoint independent sets V = S1 + S2 i.e., every edge has one endpoint in
S1 and one in S2. We usually denote such graphs by (S1 S2 E ) to distinguish the two parts.
Complete bipartite graph: A bipartite graph G = (S1 S2 E ) is complete if for every
x 2 S1 and y 2 S2 we have xy 2 E . We denote by Km n the complete bipartite graph
(S1 S2 E ) with j S1 j= m and j S2 j= n.
Examples for using the above notation : K3 = C3 is called a triangle C 4 = 2K2 Kn n =
2Kn C5 = C 5.
P5
K
4,3
C6 K 2K 2
1,6
Figure 1.6: Graph examples.
2. Proper interval graph : A proper interval graph is constructed from a family of intervals
on a line such that no interval properly contains another.
In 1969 Roberts showed that a graph is a unit interval graph i it is a proper interval
graph.
5 2
3 2
4 5 1
6 1 6
3
(b)
5
3 1
2 2
1
4 5 4
(a)
3
(b)
Figure 1.8: (a) A graph G.(b) A circular-arc representation of G.
Example 1.1 The trac ow at the corner of Holly, Wood and Vine is pictured in the next
page in gure 1.9 (a). Two lanes are called compatible if trac can ow on both of them
simultaneously without collisions. Certain lanes are compatible with one another, such as c
and j or d and k, while others are incompatible, such as b and f. In order to avoid collisions,
we wish to install a trac light system to control the ow of vehicles. Each lane will be
assigned an arc on a circle representing the time interval during which it has a green light.
Incompatible lanes must be assigned disjoint arcs. The circle may be regarded as a clock
representing an entire circle which will be continually repeated.
An arc assignment for our example is given in gure 1.9 (c). In general if G is the
intersection graph of the arcs of such an assignment (see the gure 1.9 (b) ), and if H is the
compatibility relation dened on the pairs of lanes, then clearly G is a (partial) subgraph of
H . In our example, the compatible pairs (d k) (h j ) and (i j ) are in H but are not in G.
A proper circular arc graph is the intersection graph of a family of arcs none of which
properly contains another. In a dierent generalization of interval graphs Renz 1970] char-
acterized the intersection graphs of paths in a tree. Walter 1972], Buneman 1974], and
Gavril 1974] carried this idea further and showed that the intersection graphs of subtrees of
a tree are exactly the triangulated graphs (the graphs with no induced Ck for k
4).
A permutation diagram consists on n points on each of two parallel lines, and n straight
line segments matching the points. The intersection graph of the line segments is called a
permutation graph.
If the 2n points are located randomly around a circle, then the matching segments will
be chords of the circle, and the resulting class of intersection graphs properly contains the
permutation graphs. This class is called the class of circle graphs.
A simple argument shows that every proper circular-arc graph is also a circle graph. We
may assume that no pair of arcs together covers the entire circle. For each arc on the circle
18 CHAPTER 1. LECTURE 1
Wood Street
g e
f
j
k c da d
b i a b c e
l
(c) f
----------- ---------------
g
l
----------- ---------------
k
g Holly Street
k
f
l e j i h
h a
d Vine Avenue
i j
(a)
Figure 1.9: (a) The trac ow. (b) The intersection graph of the arcs. (c) The clock cycle.
1.1. INTRODUCTION TO GRAPH THEORY 19
draw the chord connecting its two endpoints. Clearly two arcs overlap i their corresponding
chords intersect.
1 2 3 4 5 6 1 6 5
2
4
4 3 6 1 5 2 3
Figure 1.10: The matching diagram of 4,3,6,1,5,2], and the corresponding permutation
graph.
Let G be the interval graph with vertices c1 c2 ::: cn and connect two vertices whenever
the temperature intervals of their corresponding compounds intersect. Intervals on a line
satisfy the Helly Tproperty : if a set S = fTi:::Tkg of intervals such that, Ti \ Tj 6= for
every i 6= j then ti S Ti 6= . Hence, if fci1 ci2 ::: cikg is a clique of G, then the intervals
2
20 CHAPTER 1. LECTURE 1
ftij tij ] j j = 1 2 ::: kg will have a common point of intersection, say t. A refrigerator set
0
at a temperature of t will be suitable for storing all of them. Thus, a solution to the problem
will be obtained by nding a minimum clique cover of G. This is a polynomial problem on
interval graph, although it is NP-hard for arbitrary graphs.
Interval graphs satisfy many interesting properties, one of them is that interval graph is
an hereditary property: An induced subgraph of an interval graph is an interval graph.
x
d
b c
y z
Figure 1.11: A triangulated graph which is not an interval graph.
Hereditary properties abound in graph theory, such as planarity and bipartiteness. The
next property of interval graphs is also an hereditary property.
Triangulated graph property :
Every simple cycle of length strictly greater than 3 possesses a chord. Graphs which
satisfy this property are called triangulated graphs.
Theorem 1.2 (Hajos1958]) An interval graph satises the triangulated graph property.
Proof: Suppose the interval graph G contains a chordless cycle v0 v1 v2 :::vl 1 v0] with
l > 3. Let Ik denote the interval corresponding to Vk . For i = 1 2 ::: l ; 1 choose a point
;
pi 2 (Ii 1 \ Ii). Since Ii 1 and Ii+1 do not overlap, the Pi constitute a strictly increasing
; ;
Not every triangulated graph is an interval graph. Consider the tree T given in gure
1.11, which certainly has no chordless cycles. The intervals Ia Ib and Ic of a representation
for T would have to be disjoint, and Id would properly include the middle interval, say Ib.
Where, then could we put Iy so that it intersects Ib but not Id ? Clearly we would be stuck.
Transitive orientation property.
Each edge can be assigned a one-way direction, in such a way that the resulting oriented
graph G = (V E ) satises the following condition :
( ab 2 E and bc 2 E )imply ac 2 E (8a b c 2 V ) ?
1.1. INTRODUCTION TO GRAPH THEORY 21
Theorem 1.3 (Ghouila - Houri 1962]). The complement of an interval graph satises the
transitive orientation property.
Proof: Let fIv j v 2 V g be an interval representation for G = (V E ). Dene an
orientation F of the complement G = (V E ) as follows :
22 CHAPTER 1. LECTURE 1
xy 2 F $ Ix < Iy (8xy 2 E ):
Here Ix < Iy means that the interval Ix lies entirely to the left of the interval Iy . (Remember,
they are disjoint). Clearly (?) is satised, since Ix < Iy < Iz implies Ix < Iz . Thus, F is a
transitive orientation of G.
1.1. INTRODUCTION TO GRAPH THEORY 23
Theorem 1.4 (Gilmore and Ho
man 1964) An undirected graph G is an interval graph
i G is a triangulated graph and its complement G is a comparability graph.
We will see the proof in a later lecture.
We have seen already that every interval graph satises the two conditions. Looking
back each of the graph in Figure 1.12 can be properly colored using three colors and each
contains a triangle. Therefore for these graphs, their chromatic number equals their clique
number. We will see later in the course that any triangulated graph and any comparability
graph also satises the following properties :
;Perfect property
For each induced subgraph GA of G, (GA ) = !(GA ).
The chordless cycles C5 C7 C9 are not - perfect. A dual notion of - perfection is the
following:
alphaperfect@ ;Perfect property
For each induced subgraph GA of G, (GA ) = k(GA ).
Theorem 1.5 The perfect graph theorem (Lova!sz 1972]).
A graph is ;perfect i it is ;perfect.
We will prove this theorem in lecture 2.
1 2 12 14
3
43 25
5 4
G 45 L(G)
equivalent.
Chapter 2
Lecture 2
Advanced Topics in Graph Algorithms
c Tel-Aviv University
Spring Semester, 1994
Lecturer : Ron Shamir
Scribe : Erez Hartuv
Lecture 2 : April 28
; ;
this maximum independent set of size , which does not intersect D, contradiction.
Lemma 2.5 8x 6= y (G x) ; y = (G ; y) x
Proof: Let x denote the new vertex (the copy of x). Both graphs has the same vertex
0
1. uv 2 E u 6= y v 6= y
2. v = x ux 2 E u 6= y
0
Assume that G satises (P1). Since x and x are nonadjacent, !(G x) = !(G). Let G
0
be colored using !(G) colors. Color x the same color as x. This will be a coloring of G x
0
(G x) = (G) + 1: (2.1)
Since K ffx gg covers G x, we have that
0
K x covers G x always
k(G x) k(G) + 1 (P=2) (G) + 1 equation
= 2:1 (G x) k(G x):
0
ff gg
maximum stable set in G x with cardinality greater by one. But that means x must be an
element in a maximum stable set in G, contradicting case 2 assumption).
Since each clique of K intersects a maximum stable set exactly once (Lemma 2.1), this
is true in particular for Kx. But x is not a member of any maximum stable set. Therefore,
D = Kx ; fxg intersects each maximum stable set of G exactly once, so by Lemma 2.3
(GV D ) = (G) ; 1:
; (2.3)
This implies that
2.1. PERFECT GRAPHS 29
= (GV D ) equation
k(GV D ) induction
; ; = 2:3 (G) ; 1 equation
= 2:2 (G x) ; 1.
Taking a clique cover of GV D of cardinality (G x) ; 1 along with the extra clique
D fx g, we obtain a cover of G x of cardinality (G x). Therefore we have a clique cover
;
0
Lemma 2.7 (Fulkerson1971], Lovasz1972]). Let G be an undirected graph each of whose
proper induced subgraphs satises (P2), and let H be obtained from G by multiplication of
vertices. If G satises (P3), then H satises (P3).
Proof: Let G satisfy (P3) and choose H to be a graph having the smallest possible
number of vertices which can be obtained from G by multiplication of vertices but which
fails to satisfy (P3) itself. Thus,
!(H ) (H ) < jX j (2.4)
where X denotes the vertex set of H , yet (P3) does hold for each proper induced subgraph
of H.
As in the proof of the preceding lemma, we may assume that each vertex of G was
multiplied by at least 1 and that some vertex u was multiplied by h
2. Let U = fu1 : : :uh g
be the vertices of H corresponding to u. The vertex u1 plays a distinguished role in the proof.
By the minimality of H , (P3) is satised by HX u1 , which gives
;
(P 3)
jX j ; 1 = jX ; u1j !(HX u1 ) (HX u1 )
; ;
!(H ) (H )
equation 2:4
jX j ; 1
Thus, equality holds throughout, and we can dene
p = !(HX u1 ) = !(H )
;
q = (HX u1 ) = (H )
;
and
pq = jX j ; 1: (2.5)
Since HX U is obtained from G;u by multiplication of vertices, and using the assumption
;
that every proper induced subgraph of G satises (P2), Lemma 2.6 (Berge) implies that
HX U satises (P2). Thus, k(HX U ) = (HX U ) (HX u1 ) = q. Therefore, HX U can
; ; ; ; ;
30 CHAPTER 2. LECTURE 2
be covered by a set of q complete subgraphs of H , say K1 : : : Kq (this is not necessarily a
minimum cover). Without lost of generality we may assume that these q cliques are pairwise
disjoint and that jK1j
jK2j
: : :
jKq j. Obviously,
q
X
jKi j = jX ; U j = jX j ; h equation
= 2:5
pq ; (h ; 1)
i=1
Since jKi j p, at most h ; 1 of the cliques fail to contribute p to the sum. Hence,
jK1j = jK2j = : : : = jKq h+1 j = p: ;
(P3):
!(H ) (H )
jX j: 0 0 0
(2.7)
But p = !(H )
!(H ), so 0
the denition of q.
Theorem 2.8 The Perfect Graph Theorem (Lovasz 1972]). For an undirected graph G =
(V E ), the following statements are equivalent:
(P1) !(GA ) = (GA) 8A V
(P2) (GA ) = k(GA ) 8A V
(P3) !(GA ) (GA )
jAj 8A V
Proof: The three statements hold for a one vertex graph. We may assume that the
theorem is true for all graphs with fewer vertices than G.
(P1) ) (P3). Suppose we can color GA in !(GA ) colors. Every optimal coloring (a
partition to stable sets) C1 : : : Cm satises:
m
X at most (GA ) vertices of a given color
jAj = jCij m max
i
jCij (GA ) (GA ) (P=1) !(GA ) (GA )
i=1
2.1. PERFECT GRAPHS 31
Therefore,
jAj !(GA ) (GA )
(P3) ) (P1). Let G = (V E ) satisfy (P3). Then each proper induced subgraph of G
satises (P3), and by induction satises (P1) (and also (P2)). It is sucient to show that
!(G) = (G).
If we had a stable set S of G such that !(GV S ) < !(G), we could then paint S in one
color and paint GV S in !(G) ; 1 other colors, and we would have !(G) = (G).
;
Now let's assume that such S does not exist. It means that for every stable set S of G
GV S has a clique K (S ) of size !(G). Let I be the collection of all stable sets of G. Keep
in mind that 8S 2I 9 ! ; clique K (S ) in GV S and in particular S \ K (S ) = .
;
1 h1
.
0 0 1 .
0 0 0
T 0 0 0 .
0 1 0
n hn
Figure 2.1: The matrix M: each row correspond to a vertex in V , and each column to an
! ; clique K (S )
For each xi 2 V , let hi denote the number of cliques K (S ) which contain xi(=the number
of ones in the i'th row). Let H = (X F ) be obtained from G by multiplying each xi by hi
if h = (h1 : : : hn), then H = G h]. On the one hand, by Lemma 2.7,
!(H ) (H )
jX j: (2.8)
32 CHAPTER 2. LECTURE 2
On the other hand,
X summing the matrix M every clique in I
over rows and columns: X
jX j = hi = jK (S )j is of size !:
= !(G)jIj: (2.9)
xi V
2 S 2I
(Note that the maximum stable set in H does not necessarily correspond to the maximum
stable set in G. The multiplicities may play a role too).
For each T , the sum above can be computed in two ways (gure 2.1):
1. Move row by row, but only for rows of vertices in T , and sum up the ones in each
row(= hi).
2. Move column by column, and sum up the the ones in each column which correspond
to vertices in T .
Hence, X X
max
T
hi = max
T
jT \ K (S )j]:
2I
xi T
2
2I
S 2I
T \ K (T ) = 0:
In the second way of summing, at least one term will be zero, and all terms are at most one
(compare gure 2.1). So we conclude:
X
(H ) = : : : = max
T
jT \ K (S )j] jIj ; 1: (2.11)
2I
S 2I
2.1. PERFECT GRAPHS 33
Let us summarize what we have shown:
jX j = !(G)jIj equation 2:9
(H ) jIj ; 1: equation 2:11
!(H ) !(G): equation 2:10
Then,
(H )!(H ) !(G)jIj ; 1] = jX j jIj ; 1 < jX j
jIj
contradicting equation 2.8.
(P2) , (P3). G satises (P2) duality
, G satises (P1) proved above
, G satises (P3) duality
, G
satises (P3).
Corollary 2.9 A graph G is perfect i its complement G is perfect.
Proof: By duality, G satises (P2) , G satises (P1) . By the Perfect Graph Theorem
each of these conditions is sucient and necessary for perfection.
Corollary 2.10 A graph G is perfect i every graph H obtained from G by multiplication
of vertices is perfect.
Proof: One direction is trivial. The other direction follows immediately from Lemma 2.6
and the Perfect Graph Theorem.
The last two corollaries are useful in checking perfection: we can choose to check the
complement, and we can reduce non-adjacent vertices with identical neighborhoods and
check on the resulting simpler graph.
34 CHAPTER 2. LECTURE 2
Chapter 3
Lecture 3
Advanced Topics in Graph Algorithms
c Tel-Aviv University
Spring Semester, 1994
Lecturer : Ron Shamir
Scribe : Dekel Tsur
Lecture 3 : May 5
35
36 CHAPTER 3. LECTURE 3
3.1.2 A Polyhedral Characterization of Perfect Graphs
Let A be an m
n matrix. We dene the two polyhedra
P (A) = fxjAx 1 x
0g
PI (A) = convex ; hull(fxjx 2 P (A) x integralg)
where x is an n-vector, 1 is the m-vector of all ones, and 0 is the n-vector of all zeros. Clearly
PI (A) P (A), and for (0 1) matrix A without zero columns, P (A) and PI (A) are bounded
in the unit hypercube in Rn . The clique matrix of a graph G = (V E ) is a (0 1) matrix where
if V = f1 2 : : : ng and C1 C2 : : : Cm are all the maximal cliques of G numbered arbitrarily,
then Aij = 1 i j 2 Ci. See Figure 3.1 for an example.
1
2 3
6
6
6
0 1 1 1 0 7
7
7
2 6
6 7
7
6
6
6
1 1 0 0 0 7
7
7
3 4 6 7
4
0 0 0 1 1 5
p
a b c d
x y q z
G1
g f e G2
r
Figure 3.2: Two graphs, the left one is triangulated, and the right one is not.
In Figure 3.2,
= a g b f c e d] is one of the perfect elimination orders of G1. In
contrast to this, G2 has no simplicial vertex, so obviously it has no perfect elimination order.
Denition A subset S V is called a vertex separator for nonadjacent vertices a b (or a-b
separator), if in GV S a and b are in dierent connected components. If no proper subset of
;
Proof:
(3) ! (2) Let a x b y1 : : : yk a] (k
1) be a simple cycle. Any minimal a-b separator must
contain vertices x and yi for some i, but from (3) it follows that xyi 2 E , which is a
chord of the cycle.
(1) ! (3) Let S be an a-b separator. We will denote GA GB the connected components of GV S
containing a and b respectively. Since S is minimal, every vertex x 2 S is a neigh-
;
bor of a vertex in A and a vertex in B . For any x y 2 S there exist minimal paths
x a1 : : : ar y](ai 2 A) and x b1 : : : bk y](bi 2 B ). Since x a1 : : : ar y b1 : : : bk x]
3.2. TRIANGULATED GRAPHS 39
is a simple cycle of length
4, it contains a chord. For every i j aibj 2= E (S is a-b
separator) and also aiaj 2= E bibj 2= E (by the minimality of the paths) Necessarily
xy 2 E is the chord.
To prove the rest of the theorem, we will rst prove the following lemma:
Lemma 3.4 (Dirac 61) Every triangulated graph G has a simplicial vertex. If G is not
complete then it has two nonadjacent simplicial vertices.
Proof: If G is complete the lemma is trivial. We will prove the lemma for noncomplete
graphs by induction on the number of vertices in G. The lemma is trivial for graphs with
1 or 2 vertices. Assume the statement is correct for graphs with n ; 1 vertices and let G
be a triangulated graph with n vertices. Let a b be two nonadjacent vertices in G, and let
S be minimal a-b separator. Denote by GA GB the connected components of GV S which ;
(2) ! (1) Let C be a simple cycle in G. Let x be the rst vertex from C to appear in the perfect
elimination order. In the induced graph before eliminating x, the two neighbors of x
in the cycle still exist, and since x is simplicial in that graph, these two vertices form
a chord in the cycle. Hence, every cycle in G contains a chord.
40 CHAPTER 3. LECTURE 3
3 2 1 2
7 6
5 8 5 4
6 9 8 7
1 4 9 3
Figure 3.4: Two dierent possible running of the MCS algorithms.
3.2. TRIANGULATED GRAPHS 41
Time Complexity
Let Si be the set of all vertices v that have not been numbered yet, and have label(v) = i.
Each Si is represented by a doubly linked list. The set of active Si-s (all those Si-s which
were non-empty at some point) will also be represented by a doubly linked list in increasing
order of i,with a pointer to the non-empty set with largest label. For each vertex we will
store its label i and a pointer to its position in Si. When v receives a number we take v
out of its list and move each neighbor of v one list upwards. This takes O(1 + degree(v)),
therefore the overall time complexity is O(jV j + jE j).
42 CHAPTER 3. LECTURE 3
Chapter 4
Lecture 4
Advanced Topics in Graph Algorithms
c Tel-Aviv University
Spring Semester, 1994
Lecturer : Ron Shamir
Scribe : Izik Pe'er
Lecture 4 : May 12
1 which is a PEO.
Proof:
) Trivial.
( We shall prove the claim by induction on the number of vertices n.
1We shall refer to each permutation simply as a one-to-one function from f1 : : : ng to V , so that (1)
is the rst vertex in the order, (2) is the second, etc. Surely, for each vertex v, ;1(v) is v's serial number
in the order.
43
44 CHAPTER 4. LECTURE 4
The theorem is trivially true for n = 1. Assume correctness for every graph with less
than n vertices. Let G(V E ) be a triangulated graph with n vertices, and let
be
the permutation generated by the MCS algorithm with input G. According to the
induction hypothesis it suces to show that the vertex v =
(1) is simplicial.
Claim 4.2 G cannot contain an induced chordless path = u = v0 v1 : : : vk w] for
k
1 so that
8i 1 i k :
1(vi) <
1(u) <
1(w)
; ; ;
(4.1)
Proof: Assume, by contrary, that such a path exists. Let be a path satisfying 4.1,
such that
1(u) is maximal. u was numbered before vk , despite the fact that w is a
;
neighbor of vk and not of u. According to the maximum cardinality rule, this implies
there exists a vertex x, such that x is a neighbor of u and not of vk , and x was numbered
before u, as in gure 4.1.
v v u w
0 k
Figure 4.1: The path . Vertices appear ordered from left to right according to the MCS
algorithm output.
Let j be the maximal index such that vj is a neighbor of x. Surely j is well dened,
since u = v0 is a neighbor of x, and j < k, by the denition of x. It follows from
the maximality of j that the induced path = x vj : : : vk w] is chordless (xw 62 E ,
0
chordality).
If
1(x) <
1(w) (as in gure 4.3), then for each j i k,
1(vi) <
1(u) <
; ; ; ;
1(x), so the path meets the condition 4.1, and contradicts the maximality of
; 0
1(u), since
1(x) >
1(u). Hence
1(x) >
1(w) (as in gure 4.4), and the
; ; ; ; ;
v v v u w
j 0 k
vj v u x w
k
v v u w x
j k
v u w
It follows that the path u v w] satises 4.1 of Claim 4.2, yielding a contradiction.
begin
1. for each vertex v do A(v)
2. for i 1 to n ; 1 do
3. v
(i)
4. X fx 2 Adj (v)j
1(v) <
1(x)g
; ;
5. 6 then
if X =
6. u
(minf
1(x)jx 2 X g)
;
8
3 4 ‘2
5 7
only if in stage 8 at that iteration there exists an unnumbered vertex w 2 A(u) n Adj (u).
The vertex w was added to A(u) at stage 7 of a prior iteration, number
1(v). It
;
follows that
1(v) <
1(u) <
1(w), for u w 2 Adj (v), but since uw 62 E (as in
; ; ;
gure 4.5),
is not a PEO.
48 CHAPTER 4. LECTURE 4
) Suppose
is not a PEO, and the algorithm returns TRUE. Let v be a vertex with
maximal
1(v), such that the set Xv = fwjw
Adj (v)
1(v) <
1(w)g does not
; ; ;
induce a clique. The vertex v is well dened, because if all of the Xv 's are cliques, then
is a PEO. Let u be the vertex dened in stage 6 of iteration
1(v). In stage 7 of this
;
iteration, Xv n fug is added to A(u). Since the algorithm returns TRUE in stage 8 of
iteration number
1(u), the condition of stage 8 (i.e. The condition A(u) Adj (u))
;
prior to u, Xu is a clique, so all u's neighbors in Xv n fug are adjacent to each other
(as in gure 4.8, hence Xv is a clique, and a contradiction follows.
v u
xvu
be implemented in O(jAdj (v)j + jA(v)j) by holding a bit vector Test of length n, and the
condition A(v) n Adj (v) = is implemented in the following way :
1. for each w 2 Adj (v), set the bit Test(w) to 1.
2. for each w 2 A(v), if Test(w) is 0, return FALSE.
3. for each w 2 Adj (v), clear the bit Test(w) to 0.
4. return TRUE
4.2. TRIANGULATED GRAPHS AS INTERSECTION GRAPHS 49
The resulting overall complexity is O(jV j + P v 2 V jAdj (v)j + P v 2 V jA(v)j), where
jA(v)j is the last (maximal) size of A(v), including the duplicates. For each v 2 V , Adj (v)
adds vertices only to one list A(u), and the number of added vertices is at most jAdj (v) ; 1j.
Therefore P v 2 V jA(v)j < P v 2 V jAdj (v)j = O(jE j) and the overall time complexity is
O(jV j + jE j).
Corollary 4.5 There is a linear time algorithm for checking whether a given graph is tri-
angulated.
g f
c g
e
i d
c
h
d e i
a b b
Figure 4.9: The intersection graph of a set of subtrees of a host tree is triangulated
A1
1to2 1 2 3
A1 A2
AtoB AtoD
C1 D2
BtoC 2to3
A1 B1 C1 A2 D2 D3
Figure 4.10: An evolutionary tree describing the properties A B C D 1 2 3, and the cor-
responding triangulated intersection graph
4.2. TRIANGULATED GRAPHS AS INTERSECTION GRAPHS 51
4.2.2 Triangulated Graphs as Intersection Graphs
Denition Let S = fTigi I be a family of subsets of a set T . S has the Helly property if
and only if for every J I , if 8i j 2 J : Ti \ Tj 6= then j\J Tj 6= 0. (gure)
2
Figure 4.11: The left family has the Helly property, while the right family does not
Lemma 4.6 Suppose that fTigi S is a set of subtrees of T , and that there exist points a b c
on T , such for each i 2 S , Ti contains at least two of them, then i\S Ti 6=
2
Proof: Denote: P1 the simple path from a to b in T , P2 the simple path from b to c in
T , and P3 the simple path from c to a in T . Since T is a tree, P1 \ P2 \ P3 6= (otherwise
P1 ; P2 ; P3 contains a cycle). Every Ti contains at least one of the paths Pi i = 1 2 3.
Hence, i\S Ti P1 \ P2 \ P3 6= .
2
a
b
Proof:
(3) ) (2) Let T be a tree satisfying (3). We shall prove that vw 2 E , TK
v \ TK
w 6= :
) If v w 2 V , vw 2 E , then for some maximal clique C 2 K , v w 2 C so TK
v \
TK
w 6= .
( If TK
v \ TK
w 6= then there are maximal cliques that contain both w and v, so
vw 2 E .
It follows that G is an intersection graph of the family fTK
v gv V of subtrees of T .
2
Suppose that G contains an induced chordless cycle v0 v1 : : : vk 1 v0], for k > 3. Let
the corresponding subtrees be T0 T1 : : :Tk 1, respectively. It is obvious that ji ; j j
;
(throughout, indices are mod k). We would like to prove that the ai's form a cycle,
4.2. TRIANGULATED GRAPHS AS INTERSECTION GRAPHS 53
10 2 5 7
1 9
4 11 8
K2
K3 K6
E )
Figure 4.13: The tree T = (K
54 CHAPTER 4. LECTURE 4
but we have to \throw away" possible branches, which are not on the main cycle, but
that the ai's may lie on. Let bi be the last common point in the simple paths ai ! ai 1
and ai ! ai+1. The path ai ! ai 1 is in Ti and the path ai ! ai+1 is in Ti+1, therefore
;
bi 2 Ti \ Ti+1.
;
Denote by Pi the simple path from bi 1 to bi. It follows that Pi Ti, hence Pi \ Pj =
for every ji ; j j > 1. On the other hand, Pi \ Pi+1 = fbig for every i. We have shown
;
k
that i=1Pi is a simple cycle in T , contradicting T being a tree.
T
1
a a
1 0 T
a b 0
3 3
b
1
P
1 b
T 0
3 P
3 P
2
T b a
2 2 2
B
A
(1) ) (3) We shall prove the claim by induction on n, the number of vertices in G. Assume
correctness for every graph with less then n vertices.
4.2. TRIANGULATED GRAPHS AS INTERSECTION GRAPHS 55
{ If G is the complete graph then K = V , and T contains one vertex making the
claim trivial (this applies also for n = 1).
{ If G is not connected with connected components G1 : : : Gk , then by the induc-
tion hypothesis for each Gi there is a host tree Ti satisfying (3), for i = 1 : : : k.
For each i = 1 : : : k ; 1, connect Ti to Ti+1 by adding an arbitrary edge. The
resulting graph is a tree T satisfying (3).
{ If G is a connected, not complete, triangulated graph, then let a be a simplicial
vertex in G. The set A = fag Adj (a) is a maximal clique in G. Denote
U = fu 2 AjAdj (u) Ag and Y = A n U .
U 6= because a 2 U .
Y 6= because G is not complete.
V n A 6= because G is connected and not complete.
The graph G = GV U is triangulated and contains less than n vertices, therefore,
0
spond to the maximal cliques in G , in a way that for each vertex u 2 V n U , the
0
Let us examine the connection between K and K , the sets of maximal cliques in
0
Proof: Clearly (G)
(GS +Ai ) for each i, (because GS +Ai is an induced subgraph of
G) , so
(G)
k = maxi (GS+Ai ) On the other hand, G can be colored using exactly k colors, as
follows:
First, color GS , (S is a clique, so there is only one way to do it).
57
58 CHAPTER 5. LECTURE 5
a clique , and also each GS +Ai is perfect (because this is an induced subgraph of a perfect
0
graph). If v 2 Ai , S is still a clique , and GS+Ai v is perfect. In both cases, from the
;f g
induction hypothesis , G is perfect . This implies that for every proper induced subgraph
0
H , (H ) = w(H ) .
Now prove that (G) = w(G) .
(G) = maxi (GS+Ai ) (using theorem 5.1).
maxi (GS+Ai ) = maxi w(GS+Ai ) (because every GS+Ai is perfect),
w(G) = maxi w(GS+Ai ) (using theorem 5.1 again),
Thus, (G) = w(G) .
5.1. TRIANGULATED GRAPHS ARE PERFECT 59
Theorem 5.4 (Berge 1960, Hajnal-Suranyi 1958)
Every triangulated graph is perfect .
Proof: By induction on the number of vertices in the graph. Let G be a triangulated
graph. We shall assume it is connected, otherwise we consider each component individually.
If G is complete, it is perfect.
Otherwise let S be a minimal vertex separator for a pair a b of nonadjacent vertices.
By theorem 3.3, S is a clique. Each of the subgraphs GS+Ai (dened in theorem 5.1) is
triangulated (a hereditary property) and thus by induction hypothesis using corollary
5.2, G is perfect.
Figure 5.2: Some examples of Meyniel graphs (which are not chordal!)
V1 V2 V3 V4
P
the Gaussian elimination of symmetric matrices. (When looking for an elimination with
a maximal number of zeros in the matrix in each step - the problem arises in numerical
algebra). In the book of Garey and Johnson, the minimum ll in problem (called there
Chordal Graph Completion) is mentioned as a major open problem, shortly after the book
was published, Yannakakis showed that the problem is NP complete.
V1 V2 V3 V4
P
Q
U3 U1 U2 U4
a b c d
i j
k l
Theorem 5.8 A bipartite graph G is a chain graph i G does not contain two independent
edges.
Proof: (=)) Let ij and kl be independent edges. Then Adj (i) 6 Adj (k), Adj (i) 6 Adj (k)
and G is not a chain graph.
((=) If this isn't a chain graph, there must be two vertices: i k 2 P so that
62 CHAPTER 5. LECTURE 5
u x
v y
V
4 π(4)
V
3
V
1
V
2 π(1)
5 4
3 4 5 1 2
3 2 1
3 5 4 2 1
Figure 5.8: a graph (left) with two possible layouts of cost 8 (center) and 6 (right)
AdjG((p)) Q and Q is a clique, so AdjG((p)) is a clique in C (G). P ; (p) P and P
is a clique, so P ; (p) is a clique in C (G). Also, since Adj ((p)) Adj (v) for every v 2 P ,
all the nodes of P are adjacent to all nodes of Adj ((p)) . Therefore Adj ((p)) is a clique
0
is to decide, given a graph G and an integer k, whether there exists a linear arrangement
of G with cost c() k . This problem is NP-complete.
, and Q contains two vertices e1 and e2 for every edge e of G, and a set R(v) of n ; d(v)
vertices for every vertex v of N , where n = jN j and d(v) is the degree of v in G. If e = (u v)
is an edge of G, then the nodes e1 e2 that correspond to e are adjacent to u and v. The
nodes in R(v) are adjacent to v. In Fig 5.9 we see an example of this construction.
64 CHAPTER 5. LECTURE 5
Let A = n (n2 1) ] ; 2m, where m is the number of edges in G. The constant for CGC will
2 ;
be k = k + A. Let l(G) be the minimum cost of a linear arrangement of G, and h(G ) the
0 0
minimum number of edges whose addition to G gives a chain graph. We shall prove that
0
h(G ) = l(G) + A Thus l(G) k () h(G ) k + A. which will prove the correctness of the
0 0
v u v
P
e
u Q
1 2 3 4 e1 e2
Conversely, suppose that F is a set of edges such that G (F ) = (P Q E F ) is a chain graph
0 0
generality that 1(u) < 1(v). The number of edges of H () incident to each of the two
; ;
Q P
x
= 1(u) +
(e ) ; 2
;
X X
h() = 1(v) ; 1]
;
(5.1)
v N x R(v)
2 2
X
+ 1(v) + 1(u) +
(e ) ; 4]
; ;
(5.2)
e=uv E2
X
= (n ; d(v))( 1(v) ; 1);
(5.3)
v N
2
X X
+ d(v)( 1(v)) +
;
(e ) ; 4m (5.4)
v N
2 e E
2
X X
= n 1(v) ; 1] +
;
d(v) + c() ; 4m (5.5)
v N
2 v N
2
= c() + n (n2; 1) ] ; 2m
2
(5.6)
the last equality follows X
d(v) = 2m (5.7)
v N
2
66 CHAPTER 5. LECTURE 5
and
1(v) ; 1] = 0 + 1 + 2 + ::: + (n ; 1) = n(n ; 1) ]
X ;
(5.8)
v 2 N 2
5.2.3 Problems
Maximum Chordal subgraph: Remove minimum number of edges from a graph,
until you get a triangulated graph. This problem is still open. There exists an algorithm
for nding a maximal ll in (not maximum), it's time complexity is O(mn) where
m = jE j , n = jV j (Ohtsuki, 1976).
Approximating the ll in: Find in polynomial time a ll-in set (i.e. a set F such 0
that (V E +F ) is chordal) such that if F is an optimal ll in, E + F ] f (n). The best
0
p
0 j j j j
E+Fj j j j
f(n) known today is O( klog4n) for graph with max degree k (Klein et al., 1990). Can
one get better approximation, or prove lower bounds on the achievable approximation,
assuming P 6= NP ?
parametric ll-in problem: How fast can we solve the ll in problem for xed k?
Simple enumeration of all possible sets of size takes O(n2k m). Two better algorithms
are known (Kaplan,Shamir,Tarjan 94) of complexity O(ck m) and O(k5mn + Ck ). Both
Ck and ck are, of course, exponential in k.
Chapter 6
Lecture 6
Advanced Topics in Graph Algorithms
c Tel-Aviv University
Spring Semester, 1994
Lecturer : Ron Shamir
Scribe : Rotem Erlich
Lecture 6 : May 26
be a perfect elimination order for G. Every maximal clique in G is of the form: Xu fug
where Xu = fx 2 Adj (u)j
1(u) <
1(x)g.
; ;
4 8 7 5 3
1 6 2
1(u)g).
;
In phase
1(v) Xu = Xv ; fug is concatenated to A(u).
;
1. 1
2. for all vertices v do S (v) 0
3. for i 1 to n do
begin
4. v
(i).
5. X fx 2Adj(v)j
1(v) <
1(x)g
; ;
1 5 8 6
3 7 4
Proof: The set y1 y2 : : : yt is stable since if yi yj 2 E for i < j , then yj 2 Xyi , which
cannot be. Thus (G)
t.
On the other hand, since fY1 Y2 : : : Ytg is a set of cliques which together cover G, we
get k(G) t.
Since (G) k(G) we get: (G) = k(G) = t, and we have produced the desired
maximum stable set and minimum clique cover.
The method above, with a slight modication in the algorithm of section 6.1.1, nds a
maximum stable set and a minimum clique cover in time complexity of O(jV j + jE j).
6.2. COMPARABILITY GRAPHS 71
6.2 Comparability Graphs
6.2.1 Some Denitions
An undirected graph G = (V E ) is a comparability graph if there exists an orientation (V F )
of G satisfying
F \ F 1 = ,
;
F + F 1 = E
;
yes yes no
relation on E , and hence partitions E into what we shall call the implication classes of G.
Thus edges ab and cd are in the same implication class i there exists a sequence of edges
ab = a0b0;a1b1; : : : ;ak bk = cd k
0. Such a sequence is called a ;-chain from ab to cd,
and we say that ab (eventually) forces cd whenever ab; cd.
c d e
b
Figure 6.5: An example for implication classes
72 CHAPTER 6. LECTURE 6
For example, the 8 implication classes in the graph of gure 6.5 are: A1 = fabg, A2 =
fcd1g, A3 = fac ad aeg, A4 = fbc bd beg, A1 1 = fbag, A2 1 = fdcg, A3 1 = fca da eag,
; ; ;
Notice that ba;dc () ab;cd and ba; dc () ab; cd, by denition. Notice also that
ab;ab (by our convention that G contains no self-loops), but not ab;ba necessarily.
Let I (G) denote the collection of implication classes of G. We dene I^(G) = fA^jA 2
I (G)g, where A^ = A A 1 (the symmetric closure of A^): The members of I^(G) are called
;
Proof: We dened ; in order to capture the fact that, for any transitive orientation F
of G, if ab;a b and ab 2 F , then a b 2 F . Applying this property repeatedly, we obtain
0 0 0 0
F \ A = or A F .
If F \ A = ) A F 1 ) A 1 F ) F \ A^ = A 1
; ; ;
If A F ) A 1 F 1 ) F \ A 1 = (since F \ F 1 = ) ) F \ A^ = A.
; ; ; ;
We shall prove later that the converse of Theorem 6.6 is also valid, namely if A \ A 1 =
;
of G. For example, in a simple triangle abc, fabg fbcg and fcag are implication classes
satisfying the condition but the resulting orientation is cyclic.
Lemma 6.7 If ab; cd, then there exists a ;-chain from ab to cd of the form
ab = a0b0;a1b0;a1b1;a2b1 : : : ;ak bk = cd
Proof: In the ;-chain in the lemma the indices change for the ai -s in the odd ";"-s, and
for the bi-s in the even ones. Let us look at any ;-chain between ab and cd. If in that chain
there is a group of 3 or more sequential edges with the same index changed - in particular in
that group the rst and last edges directly force each other. We shall take for "our" chain
those rst and last edges - so we got only 2 edges in a row with the same index changed.
We shall do that for every such group of 3 or more edges in a row, and will get the desired
;-chain.
A ;-chain satisfying the lemma is called a canonical ;-chain.
6.2. COMPARABILITY GRAPHS 73
6.2.3 The Triangle Lemma
Lemma 6.8 (The Triangle Lemma) Let A B and C be implication classes of an undi-
rected graph G = (V E ) with A =6 B and A =6 C 1 and having edges ab 2 C , ac 2 B and
;
bc 2 A
(i) If b c 2 A then ab 2 C and ac 2 B
0 0 0 0
a
a
b0 c0
b0 c0
2
a 1 1
b 1
b1 c 1 b1 c 1
2
a 2 b2
a k
bk ck
bk ck
B
(1) A (2)
C
bc = b0c0;b1c0;b1c1 : : : ;bk ck = b c 0 0
ab = a0b0;a1b0;a1b1; : : : albl = a b 0 0
aa1 2= E ac 2 B ) a1c 2 B .
The triangle a1bc has the same characteristics as the original triangle abc. By induction
we get that the triangle albc = a bc has also the same characteristics. From (i) (with: a
0 0
instead of a) we get a c 2 B .0 0
of ; for any cd 2 A cd; ab i dc; ba. Since ; is an equivalence relation and ab; ba, cd; dc
Finally, A is an implication class of A^, so by Theorem 6.6 A and A 1 are the only ;
Example 7.1 See gure 7.1 for an undirected example of a composition graph. See gure
7.2 for a directed example of a composition graph.
h i
Theorem 7.2 Given n + 1 undirected graphs G0 : : : Gn , let G = G0 G1 : : : Gn denote
their composition graph. Then, G is a comparability graph if and only if, all the graphs
Gi 0 i n are comparability graphs.
Proof: ((=) Clearly, if one of the Gi i = 0 : : : n is not a comparability graph, then G
can not be a comparability graph.
77
78 CHAPTER 7. LECTURE 7
F1 F2 F3 F4
Example 7.3 See gure 7.3 for an example of various decompositions of a graph.
Theorem 7.4 Let G0 : : : Gn be n disjoint, undirected graphs, and let G = G0G1 : : : Gn ]
be their composition. Let Ab be a color class of G, then exactly one of the following holds:
Ab Ej for a single value of 1 j n.
Ab \ Ej = for all 1 j n.
1 1
3 4 5 3 4 5
2 G 2
P[
2 , ]
1 1
3 4 5 3 4 5
2 2
P[
3 , , ]
P[
2 , ]
Figure 7.3: The decomposition of a graph
7.1. UNIQUELY PARTIALLY ORDERABLE GRAPHS 81
2. The edge cd is an external edge. This is not possible, because then the set C =
fa bg fc dg having three vertices, induce a triangle in G, contradicting the fact that
cd;ab.
Thus the only remaining possibility is that cd 2 Ej , and by the connectivity of Ab , it follows
that Ab Ej .
Denition Let G = (V E ) be an undirected graph. A set Y V is called a module or
a partitive set if for all x 2 V n Y either Y \ Adj (x) = or Y Adj (x). The set Y is a
non-trivial module if 1 < jY j < jV j.
Example 7.10 See gure 7.5 for an example of a uniquely orderable graph
Corollary 7.11 A graph G is UPO i
G have a single color-class.
Theorem 7.12 (Shevrin-Filippov '70) Let G be a connected comparability graph. The
following conditions are equivalent:
1. The graph G is UPO.
7.1. UNIQUELY PARTIALLY ORDERABLE GRAPHS 83
2. Every non-trivial module in G is an independent set.
3. In any proper decomposition of G, every inner-factor is an independent set (Explicitly,
all the edges in G are external).
Figure 7.6: A graph with a color class that induce all vertices
Proof: (2) () (3) Follow immediately from the natural equivalence between a module
and a inner factor in a decomposition, as stated in corollary 7.7.
If there is a non-trivial module Y , which is not stable, there is a decomposition of G,
with inner factor GY , which is not stable.
If GY is an inner factor in a given proper decomposition, then Y is a module, thus if GY
is not stable, then the set Y is a non-stable module.
(1) =) (3) If G is UPO, then in G there is a color-class, Ab, which contains all the
edges of G. Thus by theorem 7.4, it follows that all the edges are external in any non-trivial
decomposition of G (because no non-trivial inner factor can contain all the edges of Ab, thus
such an inner factor, has a n empty intersection with Ab = E (G)).
(2) =) (1) Assume, for the sake of contradiction, that G is not UPO. Then G has more
than one color-classes (Since G is a comparability graph). From claim 7.9 it follows that
there is a color-class which spans a proper subset Y of V . By claim 7.8 it follows that Y is
a module of G. But Y is not a stable set (Y is dened as these vertices that are spanned by
a color-class, which is connected). A contradiction.
2 5
1 3
4 G B1 B2 B3
C1 C2 C3
Example 7.14 The following are examples for the decomposition schemes for gure 7.7:
2 3
35
6 24 13 7
For the top G-decomposition: 664 12 14 23
7
5.
7
43
h i
For the bottom G-decomposition: 12 13 43
Remark 7.15 A G-decomposition of a graph can have several decomposition-schemes, but
the decomposition scheme uniquely denes the G-decomposition. We will present algorithms
to calculate both.
See gure 7.8 for a description of the G-decomposition algorithm.
7.2. CHARACTERIZATIONS AND RECOGNITION ALGORITHMS 85
b b
A C A C
c B a c B a
A F
A C
B B
b Cb must be equal.
Figure 7.10: The classes F
A C
c B a
Corollary 7.17 If A is an implication class, such that A = Ab, then there is no triangle with
three colors such that Ab is one of its colors.
We leave this proof as an exercise. This claim implies, that for any triangle containing
Ab, the two other edges in the triangle are colored by the same color.
Corollary 7.18 If A is an implication of G = (V E ) such that A = Ab then all the other
implication classes of G are implication classes in E n Ab.
Proof: By theorem 7.16 if E n Ab contains two implication classes from E that where
merged, then these two class with Ab induce a three colored triangle in G, which is impossible
by Corollary 7.17.
Theorem 7.19 (characterizations of comparability graphs) (Gilmore and Ho
-
man 1964, Ghouilla-Houri 1962)
Let G = (V E ) be an undirected graph with G-decomposition, E = Bc1 + + Bck . The
following conditions are equivalent:
1. G is a comparability graph.
2. For all implication classes A of E , A \ A 1 = .
;
3. Bi \ Bi 1 = for i = 1 : : : k .
;
88 CHAPTER 7. LECTURE 7
4. Any circuit v1v2 v2v3 : : : vq v1 in E (not necessarily simple), such that vq 1 v1 2= E ,
vq v2 2= E and vi 1vi+1 2= E i = 2 : : : q ; 1 has even length,
;
We assume the claim holds for all G-decomposition of graphs that include less than k
sets. Specically, the claim holds for E n Bci. Let D by an implication class of E n Bci. By
theorem 7.16 two cases are possible:
The class D is an implication class of E , then by the induction hypothesis it follows
D \ D 1 = .
;
By theorem 6:9 it follows that B1 is transitive. If k = 1 then we are done, else assume
correctness to all G-decomposition of less than k sets. It follows that F = B2 + + Bk is a
transitive orientation of E n Bc1. We have to prove that B1 + F is transitive orientation of G.
Let ab bc 2 B1 + F . If both edges belong to B1 or to F , then the edge ac exists and must
belong to the corresponding set by the fact that both B1 F are transitive. Thus, assume
that ab 2 B1 and bc 2 F . Since B1 \ B1 1 = , if ac 2= E then ab;cb thus cb 2 B1 thus
;
graph.
Denition Given an undirected graph G = (V E ) we dene a graph G = (V E ) in the
0 0 0
following manner -
V = f(i j ) (j i)jij 2 E g
0
G.
Example 7.20 See gure 7.12 for an example of a graph and the resulting quasi-transitive
graph. The gure omits some the edges of the form (ij ji).
Theorem 7.21 (Ghouilla-Houri, 1962) The following claims are equivalent:
1. The graph G is a comparability graph
2. The graph G have a quasi-transitive orientation.
3. The graph G is bipartite.
0
Proof: (1) =) (2) Trivial, since G has a transitive orientation and this orientation is also
quasi-transitive.
(2) =) (1) Let F be a quasi transitive of G, and let C be an odd cycle. The cycle C
must contain two adjacent edges in F : y ! z x ! y and then because of the quasi-transitive
property xz 2 E . Thus (1) follows from theorem 7.19 since we found a short chord.
(1) () (3) We will use GH characterization (Any odd cycle contains a short-chord).
The vertices of a cycle in G correspond to adjacent edges in G (with common vertex), that
0
graph.
By the above theorem it is possible to check if a graph is a comparability graph, as
follows: Construct the graph G , and check if it is bipartite. The size of G is : jV j = 2jE j,
0 0 0
and -
90 CHAPTER 7. LECTURE 7
12 23 34
25 56
3
G
1 2 4
54 45
G
6 5
65 52
43 32 21
Figure 7.12: A graph G and its quasi-transitive graph G (in G , edges (x y) $ (y x) are
0 0
not drawn)
7.2. CHARACTERIZATIONS AND RECOGNITION ALGORITHMS 91
X n o
jE j = jE j + 2
0
w x wv 2 E vx 2 E wx 2= E = O(jV j3)
v V
2
Thus the complexity of constructing the graph is O(jV j3). Check if G is bipartite can
0
One can obtain a transitive orientation of G by taking the orientation of edges whose
vertices belong to one part of the bipartite graph G . In particular, G is UPO i G is
0 0
connected and bipartite. We shell give more ecient algorithms for recognizing comparability
graph later in the course.
92 CHAPTER 7. LECTURE 7
Chapter 8
Lecture 8
Advanced Topics in Graph Algorithms
c Tel-Aviv University
Spring Semester, 1994
Lecturer : Martin Golumbic
Scribe : Shimon Shahar
Lecture 8 : June 5
1 4
2 2
3 6
2 1 3
4 1
5 3 4 6 5
6 5
Remark 8.1 It is easy to build the permutation graph directly from the permutation.
8i j i < j and
(i) >
(j )] , (i j ) 2 E .
Theorem 8.2 A permutation graph G = (V E ) is transitively orientable.
Proof: Let
be the permutation of f1 : : : ng generating G = (V E ), where V =
f1 2 : : : ng. For every (i j ) 2 E , dene F as follows :
(i j ) 2 F i i < j .
We shall prove that D = (V F ) is transitively orientable.
Let (i j ) 2 F (j k) 2 F , then by Remark 8.1, since (i j ) 2 E , then
1(j ) <
1(i), and
; ;
1(k) <
1(j ). Hence
1(k) <
1(i), and therefore (i k) 2 F .
; ; ; ;
1 4
2 2
3 6
2 1 3
4 1
5 3 4 6 5
6 5
Denition If
is a permutation, we say that
is the opposite permutation, meaning that
(i) =
(n + 1 ; i). For example
= 5 6 7 2 3 8 1 9 4],
= 4 9 1 8 3 2 7 6 5].
Theorem 8.3 If G is a permutation graph generated by
, then G is also a permutation
graph, generated by
.
Proof: We shall prove that the graph H = (V F ) generated by
is G .
For every i,j2V, (i j ) 2 E i (i-j)(
1 (i) ;
1(j )) < 0. But since
1(i) <
1(j ) i
; ; ; ;
(i) >
1(j ) and (i,j)2F i (i-j)(
1(i) ;
1(j )) >0 , we obtain that (i,j)2E , (i,j)62F,
; 1 ; ; ;
so H=G .
Theorem 8.4 (Pnueli Lempel Even 1971) G is a permutation graph i both G and G are
transitively orientable.
Proof:
) Trivial from the previous two theorems.
( Wasn't proved in class.
96 CHAPTER 8. LECTURE 8
1 4
2 2
4 3
3 6
4 1 1 6
2 5
5 5 Corresponding F-graph
6 3
Function Diagram
8.1.3 F -Graphs
Denition An F-diagram consists of n points, on each of two parallel lines, and n continuous
function curves ending in the points. The intersection graph of the functions segments is
called a function graph, or an F-graph (See Fig. 8.3). Note the requirement that each curve
segment is a function (See Fig. 8.4 for negative example).
1 1
2 5
3 A 6
4 4
5 2
6 3
Proof:
(2) ) (1) Trivial, each piecewise-linear path (connecting the point numbered i in all the orders),
is a continuous function. Therefore it is an F-Graph.
(1) ) (3) We shall dene H = (V F ) an orientation of G as follows : (i,j) 2F if the i-th path in
the diagram is completely below the j-th path. More formally :
(i,j)2F if 8 x fi(x) < fj (x) and (j,i) if 8 x fj (x) < fi(x), otherwise the edge is not in
F.
If (i j ) 2 E , than obviously the function fi (x) ; fj (x) changes sign at least once.
Therefore (i,j) 62 F , and vice versa. So F = E . We should now prove that F is
transitive orientation for G .
98 CHAPTER 8. LECTURE 8
Milwakee Albany
Newark
Chicago
Philadelphia
Indianapolis Baltimore
Richmond
Nashville
Wilmington
Birmingham Charleston
4
7 7
5
6 4
1 7
5 3 1 5 7
1
4 5
2 2
3
2 6 4
6 6 Corresponding graph
2
3 3
1
Composition of permutations
0 1 2 3 4 5 6 7 8 9 10 E D
Line realization
0 1 2 3 4 5 6 7 8 9 10 E D
Line realization
A B C
The intervals of vertices A-E appear in
alphabetic order, from top to bottom. Corresponding graph.
0. initialize i ; 1 Ei ; E F ;
1. arbitrarily pick an edge xiyi 2 Ei
2. enumerate the implication class Bi of Ei containing xiyi
if Bi \ Bi 1 = 0 then add Bi to F
;
103
104 CHAPTER 9. LECTURE 9
b
a e
d c
Example: Let us run the algorithm on the graphs shown in gures 9.2, 9.3 and 9.4. The
run of the algorithm on the rst graph will be as the following :
a
c d e
e c
a b
TRO.
The edges we choose in step (1) in the algorithm determine which transitive orientation
of the set of transitive orientations of the graph will be the output of the algorithm. If we
run the algorithm several times, and in every time we choose dierent edges in step (1) we
may get dierent transitive orientations, but one can prove that the number of iterations of
the algorithm in every run will be the same.
This data structure requires O(jV j + jE j) space. Let us compute the time complexity
of the algorithm: In executing the 'for' command in EXPLORE (i j ) we use two pointers:
one points to Adj (i) and the other points to Adj (j ). These two pointers will scan these two
sets in parallel looking for a vertex m which satises the condition of the 'for' command and
then the value of CLASS will be updated. The loop will take O(di + dj ). The complexity
of the second loop is similar because it is executed in the same way. The algorithm calls the
procedure EXPLORE twice for every edge, hence the time complexity of the algorithm is
X
C (di + dj ) 2 O(
jE j)
vi vj E
2
In summary :
Theorem 9.1 Comparability graph recognition and nding a transitive orientation can be
done in O(
jE j) time and O(jV j + jE j) space, where
is the maximum degree of a vertex.
9.2. THE COMPLEXITY OF COMPARABILITY GRAPH RECOGNITION 107
procedure EXPLORE(i,j):
for each m 2 Adj (i) such that m 62 Adj (j ) or jCLASS (j m)j < k do
begin
if CLASS (i m) is undened then
begin
CLASS (i m) ; k CLASS (m i) ; ;k
EXPLORE(i m)
end
else
if CLASS (i m) = ;k then
begin
CLASS (i m) ; k FLAG ; 1
EXPLORE(i m)
end
end
for each m 2 Adj (j ) such that m 62 Adj (i) or jCLASS (i m)j < k do
begin
if CLASS (m j ) is undened then
begin
CLASS (m j ) ; k CLASS (j m) ; ;k
EXPLORE(m j )
end
else
if CLASS (m j ) = ;k then
begin
CLASS (m j ) ; k FLAG ; 1
EXPLORE(m j )
end
end
return
begin
initialize : k ; 0 FLAG ; 0
for each edge vivj in E do
if CLASS (i j ) is undened then
begin
k ; k + 1
CLASS (i j ) ; k CLASS (j i) ; ;k
EXPLORE(i j )
end
end
ADJ(i) j k
CLASS(i,j) = k
ADJ(j) i -k
1 1
3 2
c f d
c f d
Theorem 9.3 (Dilworth 1950) Let (X ) be a partially ordered set, the minimum number
of chains needed to partition (cover) X is equal to the maximum cardinality of a antichain
in X .
Proof: (X ) corresponds to comparability graph G which is a perfect graph, hence
k(G) = (G). k is equal to the minimum number of chains needed to partition X , because
9.3. COLORING AND OTHER PROBLEMS ON COMPARABILITY GRAPHS 111
a vertex set S induces a clique in G i there is a path in X passing through all vertices in S .
is equal to the maximum cardinality of an antichain. So, the minimum number of chains
needed to partition X is equal to the maximum cardinality of antichain.
For example consider the partial order that is shown in gure 9.9. The number of chains
which partition the partial order is 3, also, the maximum cardinality of antichains is 3.
Corollary 9.4 In a comparability graph with transitive orientation F , optimal proper col-
oring and maximum clique can be calculated in O(jE j + jV j) time.
We shall illustrate this by solving a slightly more general problem.
procedure EXPLORE(v):
if Adj (v) = then
W (v) = w(v)
POINTER(v) ; ^
return
else for all x 2 Adj (v) do
if x is unexplored then
EXPLORE(x)
end for all
select y 2 Adj (v) such that W (y) = maxfW (x)jx 2 Adj (v)g
W (v) ; w(v) + W (y)
POINTER(v) ; y
return
end.
c w=1 g w=3
b w=6 w=7 f
e w=4
a w=5 d w=2
equal to k(G), the size of the smallest covering of the vertices by cliques. This value is
equal to (G), the maximum cardinality independent set since every comparability graph is
perfect.
Example: The orders L1 = (a b c d e) L2 = (a c b e d) L3 = (a b c e d) are linear
extensions of the partial order in gure 9.14. fL1 L2g is realizer of this partial order.
d e
b c
f f’
c d e c’ d’ e’
b b’
a
a’
P P’
x
are linear extensions of the partial order P in gure 9.15, fL1 L2g is the realizer of P ,
dim(P ) = 2. And
L1 = (b e d c f ) L2 = (b c d e f )
0 0 0 0 0 0 0 0 0 0 0 0
are linear extensions of P in gure 9.15, fL1 L2g is the realizer of P , dim(P ) = 2.
0 0 0 0 0
are linear extensions of the partial order P in gure 9.16, fL1 L2 L3g is realizer of P , and
dim(P ) = 3. To Show this, let us assume that dim(P ) = 2, then there are two linear
extensions l1 l2, that in one of them, say l1, the elements (a b c) will be ordered: a b c.
Then in l2 these three elements must be ordered: c b a . l1 must contain the subsequent
a b c b a and l2 must contain the subsequent c b a b so we see that both extensions have
0 0 0
b b , a contradiction.
0
Lemma 9.6 Let (X P ) be partial order. For every subset Y of X , Y X we have
dim(PY ) dim(PX )
Proof: Let L be a realizer of P . Restricting L to the elements of Y yields a realizer of
Py . L is a minimum realizer for P so dim(PY ) dim(P )
Theorem 9.7 (Hiraguchi 1951) Let P = P0P1 P2 : : : Pk ] be a composition of a disjoint
partial orders (Xi Pi) i = 0 1 : : : k then dim(P ) = maxfdim(Pi)j0 i k g
9.4. THE DIMENSION OF PARTIAL ORDERS 115
c’ b’ a’
a b c
P1 P2
P0
1 5 6
L01 ={ab} L11 = {1,2,3} L21 ={5,6,4}
L02 ={ba} L12 = {1,3,2} L22 ={6,5,4}
2 3 4
P 1 5 6
L1 = 1,2,3,5,6,4
L2 = 6,5,4,1,3,2
2. G is transitive
0
To prove 2, note that if ab bc ca 2 E , it is obvious that ab bc ca cannot be in the
0
same set (all in F or all in P ), because F P are transitive. So, two of these three edges
are in the same set (F or P ), say bc ab ab 2 F and by transitivity of F , we see that
ac 2 F so ca 62 P . (1) and (2) imply that G is a complete order on V . Because of the
0
dim(P ) <= 2.
( : Assume that dim(P ) 2. Let L = fl1 l2g be a realizer of P . Dene F = l1 ; P =
(l2 ; P 1) (the equality holds because L is a realizer. To calculate l1 ; P we look at
;
l1 as a complete directed graph and remove all the edges from P , see gure 9.18)
f
f
c d e c d e
P b b
y x a g y x a y
l =gaxybcdef F = li - P
L = { l , l‘}
l‘ = y x a g b e d c f
1 4
1 2 3 4 5
2 1
3 3 2 5 3 1 4
1 5
4 5
5 2 2 3 4
realizer fl1 l2g we can construct the matching diagram in the same way.
The theorem of Dushnik-Miller tells that for two partial orders which have the same
comparability graph, the dimension of both 2 or the dimension of both 2.
a b
a
a c
c
d e e e
d d
b G b
P P‘
c
Some of the known comparability invariants are: the dimension, length of maximum
chain (because it is !(G)), minimum number of chains ( or anti-chains ) needed for covering
of P (because they are k(G) (G) in correspondence), and the number of linear extensions
of P .
In 1991 Brightwell and Winkler showed that the problem of counting the number of linear
extensions of a poset is #P - complete.
Denition Let P = (V E ) be poset, L = (V E ) is linear extension. Without loss of
0
generality order for E is v1 < v2 < : : : < vn: The jump number (JP) of L is the number of
0
119
120 CHAPTER 10. LECTURE 10
pairs (vi vi+1) such that fvi vi+1g 62 E .
More generally:
J (P L) =j fi j (L 1(i) L 1(i + 1)) 62 E g j
; ;
The jump number of P is the least jump number over all linear extensions of P i.e.
J (P ) = minfJ (P L) j L is a linear extension of P g:
The jump number is known to be a comparability invariant. In 1991 Syslo proved that
calculating J (P ) is NP - complete.
Theorem 10.2 ( Habib, 1982] ) Property is comparability invariant i the following
is true:
(1) (P ) = (P 1) 8 poset P .
;
a) b) c)
d) e)
Figure 10.1: a) not SP poset b) - e) SP posets
a) b) c)
d) e)
Figure 10.2: a) interval graph b) it's interval representation c) chordal, but not interval
graph
For examples see Figure 10.2.
Theorem 10.7 (Gilmore - Ho
man 1964]) The following are equivalent:
(1) G is an interval graph.
122 CHAPTER 10. LECTURE 10
(2) G contains no induced C4 and G is a comparability graph.
(3) It is possible to order the maximal cliques in G so that for every vertex v 2 V the
cliques that contain v appear consecutively in this order.
Proof:
(1) )(2) Immediate, because it is easy to see that an interval graph G contains no induced C4
and a transitive orientation for G is obtained by taking an interval realization of G,
fIv gv V and setting (u v) 2 E (G ) , Iu is completely to the left of Iv .
2
A1 a A2
b
c d
Figure 10.3: example for lemma
Interval graphs 123
A1
A2 A
x 3
w z
y
( ) if fx zg 62 E then the lemma implies that (x z) 2 F and because F is a transitive
orientation for G we get (w z) 2 F and, hence, A1 < A2.
( ) if fw yg 62 E then analogously we get (w y) 2 F and A1 < A2.
( ) fx zg fw yg 2 E . G contains no C4 and therefore fw zg 62 E . It follows that,
since F is transitive, (w z) 2 F . Hence, A1 < A3.
We have shown that < is complete order (linear) on the maximal cliques of G.
Let x 2 V . Suppose that there exist Ai < Aj < Ak such that x 2 Ai Ak and
x 62 Aj :
(x 62 Aj ) ) 9y 2 Aj : fx yg 62 E
(Ai < Aj ) ) (x y) 2 F
(Aj < Ak) ) (y x) 2 F
We have a contradiction. Therefore the claim is true.
(3) )(1) Let I (x) be the set of maximal cliques of G that contain x. By (3) each such set is
an interval
T in complete order (C <) of maximal cliques. 8x y 2 V fx yg 2 E ,
I (x) I (y) 6= , because two vertices are neighbors i they are contained together in
some maximal clique.
124 CHAPTER 10. LECTURE 10
a) 2 4
6 7
1
5
3
1 2 3 4 5 6 7
{1, 2, 3} 1 1 1 0 0 0 0
0 1 1 1 1 0 0
b) {2, 3, 4, 5}
{3, 4, 5, 6} 0 0 1 1 1 1 0
{6, 7} 0 0 0 0 0 1 1
I I
z x
? Iy
We assume that the preference relation is acyclic. In fact we would want it to be transitive.
Thus we require that P be a partial order.
One way of formalizing preference relations (in utility theory) is the notion of Semiorder.
Denition Given
> 0, a real-valued function u : V ! R is called a utility function of
semiorder if 8x y 2 V , xy 2 P , u(x)
u(y ) +
Remark: If P has a utility function of semiorder then P is a partial order (irreex-
ive,transitive).
127
128 CHAPTER 11. LECTURE 11
Let us now characterize the partial orders that have a utility function of semiorder. We
rst state without proof a fundamental result from utility theory:
Theorem 11.1 ( Scott - Suppes 1958] ) A binary relation (V P ) has a utility function
of semiorder i 8x y z w 2 V
(S1) P is irreexive
(S2) If xy 2 P , zw 2 P then either xw 2 P or zy 2 P
(S3) If xu 2 P , yz 2 P then either xw 2 P or wz 2 P
Denition An interval order is a binary relation (V P ) such that 8i 2 V ,we can match an
interval Ii on the real line, such that ij 2 P , Ii < Ij (i.e Ii \ Ij = and Ii is on the left
side of Ij )
Claim 11.2 A partial order (V P ) is an interval order i it satises (S1),(S2).
(The proof of this claim is left as an exercise)
The claim implies: If (V P ) is an oriented graph, (V E ) is an undirected graph, and
P + P 1 + E is the edge set of the complete graph on V then if (V P ) is a semiorder then
;
a b c a b c
d d
G G
a b c
d
Figure 11.1: Example
Denition An interval graph G = (V E ) is called a proper interval graph if it has a
realization fIv gv V such that no interval properly contains another.
2
11.1. PREFERENCE AND INDIFFERENCE 129
Theorem 11.3 ( Roberts 1969] ) Let G = (V E ) be an undirected graph. The following
statements are equivalent:
(1) There exists a real valued function u : V ! R such that 8xy 2 V , x 6= y , xy 2 E ,j
u(x) ; u(y) j< 1
(2) There exists a semiorder (V P ) such that E = P + P 1 ;
(6) ) (5) In a unit-interval realization of G, no interval can properly contain another, because
they all have length 1. Therefore this realization will be proper.
(5) ) (4) Let fIxgx V be a proper interval realization of G. Suppose G contains an induced sub-
graph G y z1 z2 z3 isomorphic to K1 3 where fz1 z2 z3g is a stable set and y is adjacent
2
f g
to each zi. Without lost of generality, suppose that Iz1 < Iz2 < Iz3 . Then Iy must
properly contain Iz2 , a contradiction. Thus, G can have no induced copy of K1 3.
(4) ) (3) Since G is an interval graph, G = (V E ) is a comparability graph. Let F be a transitive
orientation of G . It is easy to show that F satises (S 1) (S 2). Now we will see that it
also satises (S 3). By Scott-Suppes Theorem this will imply F is a semiorder.
Assume to the contrary that xy 2 F , yz 2 F , xw 62 F , wz 62 F . By the transitivity
of F it follows that: wx 62 F , zw 62 F , wy 62 F , yw 62 F . But xz 2 F . Thus Gx y z w
induces a K1 3, a contradiction.
(3) ) (2) Immediate.
(2) ) (1) If (V P ) is a semiorder, then by denition there exist a real valued function u~ : V ! R
and a constant
> 0 such that xy 2 P , u~(x) ; u~(y)
. Denoting u(x) = u~(x) we get
xy 2 P , u(x) ; u(y)
1, and because P + P 1 = E we get that xy 2 E , xy 62 P
;
Let G = (V E ) be an interval graph. Then other equivalent conditions to G being unit
interval are:
The clique matrix of G satises the consecutive 1's property for rows and for columns.
Let A (G) be the adjacency matrix of G when we add 1's on the diagonal. Then A (G)
There exists a layout L of G such that for every vertex v, L(Adj (v)) = fL(v);kv L(v);
kv + 1 : : : L(v) ; 1 L(v) + 1 : : : L(v) + lv g ( Deng, Hell, Huang 1992 )
Some hard optimization problems involving unit interval graphs are:
Adding a minimum number of edges to a graph to get a unit interval graph is NP -
complete. ( Golumbic, Kaplan, Shamir 1993 )
Removing a minimum number of edges to get a unit interval graph is NP -complete.
( Golumbic, Kaplan, Shamir 1993 )
11.2. RECOGNIZING INTERVAL GRAPHS 131
11.2 Recognizing interval graphs
Theorem 11.4 G = (V E ) is an interval graph i it has a layout L that satises:
L(u) < L(v) < L(w) uw 2 E ] ) vw 2 E (11.1)
(The proof of this theorem is left as an exercise).
Theorem 11.5 Let G = (V E ) be a co-comparability graph, and let F be a transitive ori-
entation of G . We denote d(u) the out-degree of u in (V F ). If L is a layout of G such
that
d(u) > d(v) ) L(u) < L(v) (11.2)
then G is an interval graph i L satises condition 11.1
Proof:
) If condition 11.1 holds then according to Theorem 11.4 G is an interval graph.
( Assuming, to the contrary that L satises condition 11.2 but not condition 11.1, we
will prove that G contains an induced C4:
(a) if uv 2 F then by transitivity of F , d(u) > d(v), and thus L(u) < L(v).
(b) if L(u) < L(v) and uv 62 E then uv 2 F (else vu 2 F and from (a) we get
L(v) < L(u)).
From (b) and the transitivity of F it follows that:
L(u) < L(v) < L(w) uv 62 E vw 62 E ] ) uw 62 E (11.3)
Theorem 11.6 Let G = (V E ) be a graph with a layout L, and let us dene functions
l h : V ! f0 : : : j V jg:
l(u) = vmin
N u]
2
L(v)
8
>
>
>
>
>
max L(v) fv j L(v) < L(u) v 62 N (u)g 6=
< v N u]
h(u) = > L(v)<L(u)
62
>
>
>
>
: 0 otherwise
then L satises condition 11.1 i 8w 2 V h(w) < l(w)
l(v) 1 1 3 2 3
h(v) 0 0 2 0 2
Figure 11.3: Example of function l h
Proof:
) If L does not satisfy condition 11.1 then there exist u v w such that L(u) < L(v) <
L(w), and uw 2 E , but vw 62 E . Thus l(w) L(u) < L(v) h(w).
( If there exists w 2 V such that l(w) < h(w) then taking u = L 1(l(w)), v = L 1 (h(w))
; ;
gives us vertices u v w such that L(u) < L(v) < L(w), and uw 2 E , but vw 62 E , thus
contradicting condition 11.1.
J I A B
G H E D C
Figure 11.4: a PQ-tree. The FRONTIER here is F J I G H A B E D C]
The null tree T0 has no nodes and CONSISTENT (T0) = . The universal tree has one
internal P -vertex, the root, and a leaf for every member of X .
The relation between the consecutive arrangement problem and PQ-trees is as follows:
Let ' be a collection of subsets of a set X , and let )(') be the collection of all permu-
tations of X such that the members of each I 2 ' occur consecutively in .
11.2. RECOGNIZING INTERVAL GRAPHS 135
Theorem 11.7 ( Booth - Leuker 1976] )
1. For every collection of subsets ' of X there exists a PQ-tree T such that )(') =
CONSISTENT (T ).
2. For every PQ-tree there exists a collection of subsets ' such that
)(') = CONSISTENT (T ).
The role of the Q-vertices is to restrict the number of permutations by making some of
the brother relationships rigid.
The main approach of the algorithm is as follows:
Begin with the collection of all possible permutations. Introduce the subjects one at a
time, reducing the tree to those permutations that also satisfy the constraints of the next
subset. Below is an implementation of the algorithm:
Procedure CONSECUTIVE(X '):
begin
T universal tree
for each I 2 ' do
T REDUCE(T,I)
return T
end
The routine REDUCE attempts to apply on the existing tree, one of 11 templates,
according to the tree and the set I , and replaces a part of the tree accordingly. The templates
are applied from the bottom to the top of the tree. We omit the details here. gure 11.5
gives an example of the execution of the algorithm.
Theorem 11.8 ( Booth - Leuker 1976] ) The collection of permutations P )(') can be
calculated (when implemented with a PQ-tree) in time O(j ' j + j X j + I ' j I j).
2
Corollary 11.9 A (0 1)-valued matrix Am n with f 1's can be checked for the consecutive
720 permutations
A B C D E F
16 permutations
I={A,D,F}
E
D
144 permutations
A F B C
B C E
A D F I={B,E}
I={B,C,D}
D C B E
A F 4 permutations
Figure 11.5: Example of execution of CONSECUTIVE
11.3. MORE ABOUT THE CONSECUTIVE 1'S PROPERTY 137
If a matrix satises the circular 1's property for the columns, then after switching 0's
with 1's in a column, the property still holds.
Theorem 11.11 (Tucker 1971) ] Given a (0,1)-valued matrix M , switch 0's with 1's in
every column that has 1 in the k -th row. Denote the new matrix M . 0
M satises the circular 1's property i M satises the consecutive 1's property.
0
Proof:
) If M satises the circular 1's property then M satises the circular 1's property. Move
0
the k-th row to the rst row by rotating the rows cyclicly. In this row there will be 0's
only in M . Hence, M satises the consecutive 1's property.
0 0
( If M satises the consecutive 1's property then it satises the circular 1's property,
0
Theorem 11.12 ( Booth 1975] ) A (0,1)-valued matrix Am n, with f 1's can be checked
for the circular 1's property in time O(m + n + f ), assuming that the matrix is given as a
list of the 1's for each row.
Proof: Let k be the row with the smallest number of 1's, and let M be the matrix
0
obtained from M by switching 0's with 1's in every column that has 1 in the k-th row.
M has at most 2f 1's, because in every row the number of 1's is at most doubled (the
0
number of 0's that become 1's is not larger than the original number of 1's in the row).
Then apply the algorithm for consecutive 1's on M . According to the previous theorem, M
0 0
satises the consecutive 1's property i M satises the circular 1's property.
such that for each si there exists a consecutive interval of length j si j in G which contains
all letters in si.
It is obvious that the problem is NP . to show that it is NP -complete we will show
a reduction from the Hamiltonian-path problem: S given a graph G = (V E ) we will dene
; = V + E , B = 2 j E j +1, si = f< vi > x Adj(vi)(vi x)g 8i = 1 : : : n.
2
) If there exists a Hamiltonian path, without lost of generality v1 : : : vn, then we can
produce the chain:
v1 (|v1 ) (v1 ){z : : : (v1 v2)} v2 (|v2 ) : :{z: (v2 v3)} v3 : : : vn (|vn ) :{z: : (vn )} :
all edges of v1 the other edges of v2 the other edges of vn
The length of the chain: j V j +2 j E j ;(j V j ;1) = B .
( If there exists a chain with length B , since for every two sets si sj , si 6 sj , j si \ sj j
1, it follows that the length of the chain is at least:
n
X
j si j ;(n ; 1) = n + 2 j E j ;(n ; 1) = B
i=1
Therefore: if there exists a chain of length B, it matches a Hamiltonian cycle (there is
an edge between each pair of adjacent si sj ).
Remarks
The problem is NP -complete even if 8i, j si j= 4 (the same reduction from a 3-regular
graph).
the problem is polynomial if 8i, j si j= 2. (exercise)
Finding a polynomial approximation is an open problem.
Theorem 11.16 (Goldberg, Golumbic, Kaplan, Shamir 1993) ] Given a
(0 1)-valued matrix, deciding there exists a permutation of the rows that gives at most k
blocks of 1's in every column is NP -complete, for every k
2.
Chapter 12
Lecture 12
Advanced Topics in Graph Algorithms
c Tel-Aviv University
Spring Semester, 1994
Lecturer : Ron Shamir
Scribe : Michael Seltser
Lecture 12 : June 30
P S T
B
Figure 12.1: A consistent scenario
f m m 1 o o 1 s s 1 f f 1 d d 1 g
; ; ; ; ;
to express the relative position of two intervals (See Figure 12.2). We will call this the
13-valued interval algebra A13 .
x overlaps y o
y overlapped-by x o 1
;
x starts y s
y started-by x s 1
;
x during y d
y includes x d 1;
x nishes y f
y nished-by x f 1;
x equals y
Figure 12.2: The 13-valued interval algebra A13. Single line: x interval. Double line: y interval.
From these we dene the 3-valued interval algebra A3 whose elements are called its atomic
relations
A3 : f \g
Here X \Y denotes that events ( intervals ) x and y have a non-empty intersection, i.e.,
any one of the eleven relations excluding and in Allen's algebra may hold between x
and y. The choice of which algebra to use depends on the nature of the application.
12.2. INTERVAL SATISFIABILITY PROBLEMS 141
12.2 Interval satisability problems
We now dene our temporal reasoning problems in the context of constraint satisability.
For each pair of events x and y, let D(x y) be a set of atomic relations in the algebra Ai.
The semantics here is that we do not know precisely the relationship between x and y, but
it must be one of those in the set D(x y). (In the language of constraint satisability, there
is a variable v(x y) representing the relation between x and y, and its value must be taken
from those in the set D(x y) corresponding to its domain.)
For example, we read D(x y) = f og as x is either before or overlaps y. We also call a
set of atomic relations a relation set. Occasionally we shall use the notation xD(x y)y for
short. For example, D(x y) = f d 1 g and xf d 1 gy both mean \either x ends
; ;
before y starts, or y is during x, or the two are equal". We omit braces and commas when
there is no ambiguity, e.g., xy or x\y.
In particular, relation sets in A3 will be presented by concatenation of the atomic rela-
tions. Hence, xy denotes x and y are disjoint, x\y denotes xf \gy, etc.
An instance (or input) for all the problems studied in this paper consists of n events,
and a relation set D(x y) for every pair of distinct events x y. Without loss of generality,
we assume that for each pair of events x and y, the relation sets D(x y) and D(y x) given
as input are consistent, i.e., for each atomic relation R, R 2 D(x y) , R 1 2 D(y x):
;
Otherwise, it is a simple matter to restrict the relation sets further so that they satisfy these
properties or are shown to be unsatisable. Hence, we can assume that the input contains
for each pair of events x y only one relation set, say D(x y), and that the other relation set
D(y x) is given implicitly by the above rule.
Remark 12.2 The size of an instance is the number s of non-trivial relation sets in it, and
is linearly equivalent to the binary input length for each Ai . We will assume that relation
sets which are trivial (i.e., contain all the atomic relations) are not listed explicitly as part
of a problem input, and that each event is involved in at least one non-trivial relation set.
Hence, the input size s of a problem with n events satises s = O(n2 ) and s = *(n).
An interval realization for the instance fD(x y)g is an assignment of intervals on the real
line to events, so that for each pair of events, one of the atomic relations in their relation
set holds. Since the algebras discussed here are concerned with topological properties only,
a realization can be viewed also as a complete weak order of the interval endpoints, thereby
identifying all realizations which dier in metric only. Two realizations are distinct if the
orders of the endpoints in them dier. The input data fD(x y)g is consistent (or satisable)
if it admits at least one realization.
The interval satisability problem (ISAT) is determining the existence of (and nding)
one instantiation that is consistent with the input data fD(x y)g. Occasionally, we shall
make an additional distinction between the decision version of ISAT, whose output is only
142 CHAPTER 12. LECTURE 12
a yes/no answer, and the constructive version, whose output is the answer 'no' if the input
is inconsistent and a solution if it is consistent.
The minimal labeling problem (MLP) is to determine the minimal sets D (x y) D(x y)
0
such that the set of realizations is unchanged, and every remaining atomic relation partici-
pates in some solution.
Example 12.3 xf m ogy, yf gz, zff sgx.
Here xoy yz zsx, and xy yz zfx are both consistent with the input, as shown in
Figure 12.3. On the other hand, y z and z y are impossible. The minimal labeling for
this problem is xf m ogy , yz, zff sgx.
x x
z y z y
I: xoy yz zsx II: xy yz zfx
Figure 12.3: Two interval realizations for Example 12.2
The all-consistent-realizations problem (ACRP) is nding of all the consistent realizations.
Here there may be exponentially many solutions, but we would like to generate them in time
polynomial per each new realization.
A fragment of an algebra (A3 or A13 ) is a collection of relation sets in that algebra. A
problem is restricted to a fragment F if all relation sets participating (implicitly or explicitly)
in the instance belong to F . We will denote the problem A restricted to fragment F by A(F ).
Example 12.4 In the problem ISAT ( ), for every pair of events x, y either xy or
xy. Clearly the input is consistent i the relation is a linear order, as no intersections
are allowed. This can be checked in linear time.
Example 12.5 ISAT ( ) is polynomial by a similar argument. Here the instance is
consistent i is a partial order.
Example 12.6 ISAT ( \) is equivalent to interval graph recognition: Form a graph G
with a vertex for each event with an edge between x and y i x\y . The instance has a
realization i G is an interval graph. Hence the problem is solvable in linear time by the
algorithm of Booth and Leuker (1976).
Theorem 12.7 (Golumbic - Shamir, 93) For each of A13 A3, MLP and ACRP are poly-
nomially equivalent to ISAT.
12.3. INTERVAL SANDWICH PROBLEMS AND ISAT 143
J.Allen dened a constraint propagation polynomial heuristic for solving ISAT on A13.
If the algorithm returns a negative answer then it is correct, but a positive answer may be
incorrect. He conjectured that ISAT is NP-complete on A13. This was proved by Vilain and
Kautz (1986). Vilain, Kautz and van Beek (1989) have shown that Allen's algorithm always
gives the correct answer if the input data is restricted to a fragment of A13. Nokel (1988)
has given another polynomial algorithm on a dierent fragment of A13.
Applications of interval satisability problems are numerous. They include planning,
molecular biology (DNA), knowledge representation, natural language processing, informa-
tion systems (databases), articial intelligence, behavioral psychology, archaeology (seri-
ation), graph theory and others.
Notice that this is a special case of the sandwich problem where E 1 = E and F =
f(u v) j c(u) = c(v)g is given implicitly by the coloring.
Theorem 12.9 The colored interval sandwich problem is NP-complete.
Proof: Reduction from BETWEENNESS, where the vertex set and E = E 1 is dened
as in Theorem 12.8 and the coloring is c(x1i ) = c(x2i ) = i (i = 1 : : : m) and c(v1) = c(v2) =
= c(vn) = m + 1. A slight modication of the arguments in Theorem 12.8 proves the
result.
Remark 12.10 Golumbic, Kaplan, and Shamir (1993) have shown that the analog problems
to Theorem 12.8 and 12.9, with the additional condition that all intervals have the same
length, are still NP-complete.
Corollary 12.11 ISAT( \ \ ) is NP-complete.
Proof: Just consider V = f events g, (i j ) 2 E 1 , i\j , (i j ) 2 F , ij ,
(i j ) 2 E 2 , i\j .
Corollary 12.12 ISAT( A3 ) is NP-complete.
Proof: Follows from Corollary 12.11 since ISAT( \ \) is a restriction of
ISAT( A3 ).
Corollary 12.13 ISAT, MLP, ACRP are NP-hard for A3 and A13.
Theorem 12.14 ISAT( \ ) is polynomial.
Proof: exercise.
Algorithm: 1-CONSISTENCY
begin
1. construct G(J ) according to rules (12.4) - (12.7).
2. if G(J ) contains a cycle - J is not satisable. Otherwise, it is.
end construct G-decomposition
Proof: Since G is bipartite, a cycle must contain vertices both from R and from L. In
particular, it must contain an RL-arc, so the claim follows by Remark 12.16.
An algorithm for solving ISAT(1) is described in gure 12.5
Lemma 12.18 Suppose G(J ) = (V E ) is acyclic. Then a linear order on V is consistent
with the partial order G(J ) if and only if it is a realization of J .
Proof: Take any linear order P which extends the partial order G. P is an ordering of
all the endpoints, which by Lemma 12.15 satises all the relations in the input, so P gives
a realization for J . On the other hand, every realization of J gives a linear order of the
endpoints, in which each of the input relations must be satised, by Lemma 12.15. Hence,
the linear order must be consistent with the partial order G(J ).
Theorem 12.19 Algorithm 1-CONSISTENCY correctly recognizes if an instance of
ISAT(1) is satisable in linear time.
Proof: Validity: By Lemma 12.15, each arc reects the order relation of a pair of interval
endpoints as prescribed by the input relations.
If G contains a cycle, then by Lemma 12.17 that cycle contains a strict arc. Hence,
that cycle must satisfy ri < lj : : : ri, which implies that the input relations cannot be
satised. In case G is acyclic,
Lemma 12.18 implies that J is satisable.
Complexity: Constructing G(J ) requires O(s) steps, where s is the number of input
relation sets, since the eort is constant per relation. Checking if G is acyclic can be done,
for example, by depth rst search, in time linear in jE j, the number of arcs.
Since jE j 2s + n, using remark 12.2 we conclude that the algorithm is linear.
In a similar way one can construct algorithms for MLP(1) and ACRP(1) in the fol-
lowing manner: An algorithm for MLP is obtained by calculation of transitive closure of G.
The algorithm for ACRP(1) is based on nding of all linear extensions of G.
Remark 12.20 ISAT is polynomial if all events are points ( A3 = A13 in that case ).
148 CHAPTER 12. LECTURE 12
Proof: Exercise.
Remark 12.21 One can handle additional metric constraints in A3 ; , by solving the
linear programming problem dened by (12.1) - (12.3) with additional metric constraints on
the endpoints.
\ \
; T T Poly
interval graph
Poly Poly Poly Poly
linear order interval order acyclic graph
\ T T NPC* NPC*
\ T T T NPC
interval sandwich
\ Poly Poly NPC* NPC*
\ Poly Poly Poly NPC
\ \ T T NPC NPC
\ \ Poly Poly NPC NPC
Figure 12.6: Complexity of ISAT on all fragments of A3. T : satised by setting all intervals
disjoint or identical. The four asterisk cases were shown to be NPC by Webber (1994).
Figure 12.6 summarizes results from Golumbic - Shamir (1993) and Webber (1994) on
the complexity of ISAT on all fragments of A3.
BANDWIDTH problem is to decide for a given graph G and integer k, if bw(G) k . This
problem has been studied intensely because of its application to sparse matrix algebra. It
is known to be NP-complete even for binary trees ( Garey, Graham, Johnson, and Knuth,
1978 ) and for caterpillars with hair length at most three ( Monien, 1986 ). On the other
hand, it is solvable in O(nk ) for arbitrary k and in linear time for k = 2 ( Garey, Graham,
Johnson, and Knuth, 1978 ).
150 CHAPTER 12. LECTURE 12
Lemma 12.25 ( Kaplan - Shamir, 94 ) For every graph G, the proper pathwidth of G is
one less than the least clique size of any proper interval supergraph of G.
Proof: Suppose X = (X1 : : : Xl) is a proper path decomposition of G and pwX (G) =
ppw(G) = k. On the linear order 1 < 2 < < l, let I (v) be the interval s(v) e(v)]. Then
fI (v)gv V is a representation of an interval graph G . G is proper since no interval is strictly
2
0 0
contained in the other, by property (4) in the denition of a proper path decomposition. G is 0
Conversely, suppose k + 1 is the least clique size of any proper interval supergraph of
G. Let fI (v)gv V be a proper interval representation of such supergraph G = (V E ) with
2
0 0
!(G ) = k + 1, in which all endpoints are distinct, and I (v) = l(v) r(v)]. Order the 2n
0
endpoints from left to right p1 : : : p2n. Dene Xi = fv 2 V j pi 2 I (v)g for i = 1 : : : 2n.
(Here and throughout n = jV j). We claim that (X1 : : : X2n ) is a proper path decomposition
of G. Checking the four requirements from a proper path decomposition one can observe
that (1) is immediate. (2) follows since E E , and if (u v) 2 E and l(u) < l(v) then
0 0
l(v) 2 I (v) \ I (u). In other words, every edge in E is represented in some Xi. Since G
0 0
is a proper interval graph, it follows that s(v) = l(v) and e(v) = r(v) satisfy (3) and (4).
Since the clique size of G is k + 1, each point pi can meet at most k + 1 intervals in the
0
L(u) = l(u) for all u 2 V . Suppose L(u) ; L(v) > k for some (u v) 2 E , where L(v) = i.
Then fL 1 (i) : : : L 1(i + k + 1)g form a clique of size k + 2 in G , a contradiction. Hence,
; ; 0
be the intersection graph of that set of intervals. Clearly E E since if (u v) 2 E then
2
0
jL(u) ; L(v)j k, so I (u) \ I (v) 6= . Since the maximum clique size for G is at most k + 1,
0
xed.
C. Deciding whether the proper pathwidth of a graph is not greater than two can be done in
linear time.
These results follow immediately from known results on bandwidth, using Theorem 12.26.
We nish by mentioning two parametric results. The rst deals with the unit interval
sandwich problem mentioned above:
Theorem 12.28 ( Kaplan-Shamir 94 ) Deciding if a sandwich instance admits a proper
interval sandwich graph with clique size at most k can be done in O(Ck nk ) time, and in
particular in polynomial time when k is xed. Furthermore, it cannot be solved in O(Ck n )
where is independent of k , unless deciding if a given graph has an independent set of size
k can be solved in O(Ck n ).
0
0
In contrast to that negative result, the completion problem for proper interval graphs is
tractable, in the parametric sense:
Theorem 12.29 ( Kaplan, Shamir, Tarjan 94 ) Given a graph G = (V E ), one can
decide if there exists a proper interval graph G = (V E ) with E E and jE n E j k in
0 0 0 0