A Guide To Graph Algorithms by Ton Kloks
A Guide To Graph Algorithms by Ton Kloks
A Guide To Graph Algorithms by Ton Kloks
A Guide to
Graph Algorithms
A Guide to Graph Algorithms
Ton Kloks • Mingyu Xiao
A Guide to Graph
Algorithms
Ton Kloks Mingyu Xiao
Computer Science and Engineering Computer Science and Engineering
University of Electronic Science University of Electronic Science
and Technology of China and Technology of China
Chengdu, Sichuan, China Chengdu, Sichuan, China
© The Editor(s) (if applicable) and The Author(s), under exclusive license to Springer Nature
Singapore Pte Ltd. 2022
This work is subject to copyright. All rights are solely and exclusively licensed by the Publisher,
whether the whole or part of the material is concerned, specifically the rights of translation,
reprinting, reuse of illustrations, recitation, broadcasting, reproduction on microfilms or in any
other physical way, and transmission or information storage and retrieval, electronic adaptation,
computer software, or by similar or dissimilar methodology now known or hereafter developed.
The use of general descriptive names, registered names, trademarks, service marks, etc. in this
publication does not imply, even in the absence of a specific statement, that such names are
exempt from the relevant protective laws and regulations and therefore free for general use.
The publisher, the authors and the editors are safe to assume that the advice and information in
this book are believed to be true and accurate at the date of publication. Neither the publisher nor
the authors or the editors give a warranty, expressed or implied, with respect to the material
contained herein or for any errors or omissions that may have been made. The publisher remains
neutral with regard to jurisdictional claims in published maps and institutional affiliations.
This Springer imprint is published by the registered company Springer Nature Singapore Pte Ltd.
The registered company address is: 152 Beach Road, #21-01/04 Gateway East, Singapore
189721, Singapore
Contents
Preface XI
Acknowledgments XV
Graphs 1
1.1 Isomorphic Graphs . . . . . . . . . . . . . . . . . . . 2
1.2 Representing graphs . . . . . . . . . . . . . . . . . . 2
1.3 Neighborhoods . . . . . . . . . . . . . . . . . . . . . 3
1.4 Connectedness . . . . . . . . . . . . . . . . . . . . . 4
1.5 Induced Subgraphs . . . . . . . . . . . . . . . . . . 4
1.6 Paths and Cycles . . . . . . . . . . . . . . . . . . . 5
1.7 Complements . . . . . . . . . . . . . . . . . . . . . . 7
1.8 Components . . . . . . . . . . . . . . . . . . . . . . . 7
1.8.1 Rem ’ s Algorithm . . . . . . . . . . . . . . . 7
1.9 Separators . . . . . . . . . . . . . . . . . . . . . . . . 10
1.10 Trees . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
1.11 Bipartite Graphs . . . . . . . . . . . . . . . . . . . . 12
1.12 Linegraphs . . . . . . . . . . . . . . . . . . . . . . . 14
1.13 Cliques and Independent Sets . . . . . . . . . . . . 14
1.14 On Notations . . . . . . . . . . . . . . . . . . . . . . 15
Algorithms 17
2.1 Finding and counting small induced subgraphs . . . 18
2.2 Bottleneck domination . . . . . . . . . . . . . . . . . 20
2.3 The Bron & Kerbosch Algorithm . . . . . . . . . . . 22
2.3.1 A Timebound for the B & K – Algorithm . 28
2.4 Total Order! . . . . . . . . . . . . . . . . . . . . . . . 30
2.4.1 Hypergraphs . . . . . . . . . . . . . . . . . . 34
V
VI Contents
Bibliography 327
Index 335
Preface
XI
About the authors
XIII
Acknowledgments
XV
Graphs
s s
A
s
s As
@
This book provides an introduction to the research area of @s
graph algorithms. — To start — in this chapter we review
some graph – theoretic concepts.
Figure 1.1: Kloks’ Teacher,
Professor Jaap Seidel, once
Definition 1.1. A graph G is an ordered pair of finite sets told him that this was his
favorite graph. (The point
in the middle was added on
G = (V , E).
only when he grew older.)
The elements of the nonempty set V are called points — or
vertices . 1 The set E is a subset of the unordered pairs of 1
We have: one vertex, and
two vertices.
points
E ⊆ { {a, b} | {a, b} ⊆ V } 2
An edge is a set with two
elements, which are two ver-
and the elements of E are called lines — or edges . 2
tices.
© The Author(s), under exclusive license to Springer Nature Singapore Pte Ltd. 2022 1
T. Kloks, M. Xiao, A Guide to Graph Algorithms, https://doi.org/10.1007/978-981-16-6350-5_1
2 Graphs
∃k∈N |V| 6 k.
N = { 1, 2, . . . }.
{ x , y } ∈ E( G1 ) ⇔ { π( x ) , π( y ) } ∈ E( G2 ) . (1.1)
Exercise 1.1
Show that ‘ being isomorphic ’ is an equivalence relation —
that is to say — show that
1 if { x , y } ∈ E( G ) , and
∀x∈V ∀y∈V Ax, y = (1.2)
0 otherwise.
1.3 Neighborhoods 3
1.3 Neighborhoods
d( x ) = | N( x ) | . (1.5)
N[ x ] = N( x ) ∪ { x } (1.6)
Figure 1.2: The Petersen
graph is regular with degree
to denote the ‘ closed neighborhood ’ of a vertex x . For a 3.
nonempty set W of vertices we write
!
[
N( W ) = N( w ) \W
w∈W
= {y | y ∈ V \ W and N( y ) ∩ W 6= ∅ } . (1.7)
1.4 Connectedness
1. t > 2,
2. all Vi 6= ∅,
4. ∪Vi = V.
V( H ) = W and
E( H ) = { { a , b } | { a , b } ⊆ W and { a , b } ∈ E( G ) } .
1.6 Paths and Cycles 5
G − W = G[ V \ W ] , when V \ W 6= ∅ . (1.9)
V( P ) = { x 1 , · · · , x t } ⊆ V( G ) .
`( P ) = | E( P ) | = | V( P ) | − 1 .
{ c i , c j } ∈ E( G ) \ E( C )
Exercise 1.3
Show that a graph G is regular with all vertices of degree two, if
and only if every component of G induces a cycle.
Exercise 1.4
Show that C̄5 and C5 are isomorphic. Are there other cycles isomor-
phic to their complement?
1.8 Components 7
1.7 Complements
Strawberries and cream
complement each other
Let G be a graph. The complement of G is the graph Ḡ with nicely!
V( Ḡ ) = V(G) and s s
E( Ḡ ) = { { a , b } | { a , b } ⊆ V( G ) and {a, b} ∈
/ E( G ) }. s s
s
Unions of connected graphs — without any additional edges A
between them — create new graphs. The constituent parts of s As
the new graph are called its components . s s
Definition 1.9. A component of a graph G is a maximal set Figure 1.6: This is the house.
It is the complement of P5 :
of vertices W ⊆ V( G ) such that G[ W ] is connected. P̄5 .
∀k δ( k ) 6 k and
Exercise 1.5
Prove the correctness of Rem ’ s algorithm in Algorithm 1.
Show that it runs in O( n 2 ) time. Implement and test it on
the graph shown in Figure 2.2 on Page 23 — that is the graph
with — say 20 — disjoint triangles .
Exercise 1.6
Design an algorithm that — using Rem ’ s algorithm as a
subroutine — checks whether two vertices x and y are in the
same component of a graph G .
Hint: Analyze what happens to their components if you add
the edge { x , y } to the graph.
Exercise 1.7
Suppose we measure the ‘efficiency’ of the algorithm by the maximal
number of times one has to apply the function δ to a vertex to find
its component’s number. The efficiency of Rem’s algorithm seems
to depend on the order in which we add the edges. Is there a clever
choice?
Hint: Suppose G is a path. Analyze different orderings in which to
add the edges.
1.8 Components 9
Algorithm 1: Rem ’ s
1: procedure Rem Algorithm
2:
3: for i ∈ [n] do
4: δ(i) ← i
5: end for
6:
7: for {p, q} ∈ E(G) do
8: p0 , q0 ← p, q
9: p1 , q1 ← δ(p0 ), δ(q0 )
10:
11: while p1 6= q1 do
12: if p1 < q1 then
13: δ(q0 ) ← p1
14: q0 , q1 ← q1 , δ(q1 )
15: else
16: δ(p0 ) ← q1
17: p0 , p1 ← p1 , δ(p1 )
18: end if
19: end while
20:
21: end for
22: end procedure
10 Graphs
1.9 Separators
s s
Exercise 1.8 A
s As s
Let a and b be nonadjacent vertices in a graph. Prove that @
@s
there is exactly one minimal a | b - separator contained in N( a ) .
1.10 Trees s
s
Definition 1.11. A connected graph T is a tree if it contains s
A
no cycles — that is — if no induced subgraph of T is a cycle. s As
Remark 1.12. Notice that Definition 1.11 implies that every Figure 1.8: A tree
connected induced subgraph of a tree is a tree.
1.10 Trees 11
Exercise 1.10
Prove or disprove: A connected graph is a tree if and only if every
minimal separator in it has cardinality 1. What are graphs in which
every connected induced subgraph with at least three vertices has
a cutvertex?
[x1 ··· xn ]
such that
Exercise 1.11
Design an algorithm that checks whether a graph given as
input is a tree.
V( G ) → C
χ( G )
Exercise 1.14
Design an algorithm that checks whether a graph is bipartite.
Hint: It doesn’t seem clever to use Theorem 1.19.
| V( C ) | = | E( C ) | = t is even . (1.16)
B = V \ A.
1.12 Linegraphs
Exercise 1.15
Describe the linegraphs of trees (with at least one edge).
Notice that linegraphs are graphs without claws (see Figure 2.11).
For any fixed graph H, a graph is H-free if it does not have an
induced subgraph isomorphic to H.
C ⊆ V
ω( G ) = α( Ḡ ) .
ω( G ) = χ( G ) = 1 and α( G ) = | V( G ) | .
1.14 On Notations
© The Author(s), under exclusive license to Springer Nature Singapore Pte Ltd. 2022 17
T. Kloks, M. Xiao, A Guide to Graph Algorithms, https://doi.org/10.1007/978-981-16-6350-5_2
18 Algorithms
Phase 3. if no diamond was found then remove all vertices of low degree.
Let G∗ be the graph that remains.
m2
O D·m+ + nα .
D
√
Choose D = m.
20 Algorithms
Exercise 2.2
Use a similar technique to show there is an algorithm to check if a
connected graph is claw-free that runs in O(m(α+1)/2 ) = O(m1.69 ).
6 6
The claw is shown in Fig-
√ ure 2.11 on Page 84. It is a
Hint: If a graph is claw-free then every vertex has at most 2 m tree with 4 vertices of which
√ 3 are leaves.
neighbors. When every vertex has at most 2 m neighbors then
do a fast matrix multiplication for each neighborhood and check
for a K̄3 . This step can be performed in time proportional to
X √ X
d(x)α 6 (2 m)α−1 · d(x) 6 2α · m(α+1)2 .
x x
max { w(x) | x ∈ V }.
Exercise 2.3
Prove the following theorem.
Let
ρ = max { m(x) | x ∈ V }.
Exercise 2.4
Show that D is a total dominating set if it is a dominating set and
G[D] has no isolated vertices.
Exercise 2.5
Prove the following theorem.
and let
ρ0 = max { m0 (x) | x ∈ V }.
∀ x ∈/ C ∃ y ∈ C {x, y} ∈
/ E. (2.1) s
s
For a graph G let
A
Ω( G ) s As
s @s
represent the set of maximal cliques in G .
Figure 2.1: A clique is maxi-
mal if it is not contained in
a larger one. Obviously, this
The algorithm of Bron and Kerbosch lists all the maximal doesn’t mean that there is
cliques in a graph. In this section we describe a variant of the no larger one! This graph is
original Bron and Kerbosch – algorithm and we analyze its time called the net. Edges inci-
dent with pendant vertices
complexity. are maximal cliques. The
largest maximal clique is the
When a graph G has only vertices of degree at most 2 triangle. A largest maximal
clique is called a maximum
then each component of G is a path or a cycle. In that clique.
case the number of maximal cliques is at most n . It seems
that when a graph has a lot of maximal cliques it has a lot
of vertices of high degree.
Exercise 2.6
Show that a graph G is high degree if and only if every
induced subgraph of G is that . r r r
...
rAAr rAAr rAAr
Ω( 1 · · · 1 ) = { { x 1 } } , Ω( 1 · · · 2 ) = { { x 1 } , { x 2 } } , and
Ω( 1 · · · 3 ) = { { x 1 , x 3 } , { x 2 } } .
Ω( 1 · · · n ) = { { x n } ∪ C | C ∈ Ω( 1 · · · n − 2 ) }
[
{ { x n−1 } ∪ C | C ∈ Ω( 1 · · · n − 3 ) } . (2.2)
Exercise 2.7
Implement this algorithm to list all maximal cliques in the
complement of a path.
For the number of maximal cliques in P̄n we have the recurrence
P( 1 ) = 1 P( 2 ) = 2 P( 3 ) = 2 and
P( n ) = P( n − 2 ) + P( n − 3 ) for n > 4 ,
n
where P( n ) = | Ω( P̄n ) | . This solves as O 43 . (The
architect Dom van der Laan considered this the ideal fraction of
measurements for his buildings.)
24 Algorithms
Exercise 2.8
Design a similar algorithm to list all the maximal cliques in the
complement of a cycle.
Hint: Can you adapt the algorithm for paths?
Part I
Let us first show that — indeed — among all graphs these Consider the high degree-
graphs are the ones with the most maximal cliques. graph G in Figure 2.2. This
graph is the complement of
n
3 triangles. Show that
n
Lemma 2.8. Let G be a graph which is not high degree. Then
|Ω(G)| = 31/3
= (1.442 · · · )n .
| Ω | 6 µ · 3 n/3 (2.3)
By induction also
| Ω( G − x ) | 6 3 (n−1)/3 .
It follows that 11 11
Since G is not high de-
gree we may assume n > 4.
When x is isolated, we have,
| Ω( G ) | 6 3 (n−4)/3 + 3 (n−1)/3
for some µ ∈ (0, 1), since
= ( 3−4/3 + 3−1/3 ) · 3 n/3 n > 4,
Proof. There is an algorithm that runs in O n 2 time and
that computes the components of Ḡ . 12 Since G is high degree, 12
We assume that G is suit-
ably represented.
26 Algorithms
Ω( G ) = { S1 ∪ · · · ∪ Sk |
∀i Si is a clique in the component G[ Wi ] } . (2.5)
Exercise 2.10
Implement and run the algorithm described above for C5 .
Algorithm 3: The
1: procedure B & K( R, P, X ) Bron – Kerbosch Algorithm
2: if P ∪ X = ∅ then report R
3: else
4: if P = ∅ then skip
5: else
6: if G[ P ] is high degree then
7: Compute Ω( G[ P ] ) using Algorithm A and
8: extend them with R
9: else
10: Choose x ∈ P such that | N(x) ∩ P | < | P | − 4
11: B & K( R ∪ {x}, P ∩ N(x), X ∩ N(x) )
12: B & K( R, P \ {x}, X ∪ {x} )
13: end if
14: end if
15: end if
16: end procedure
1. R = ∅ or R is a clique in G.
P ∪ X = { y | R ⊆ N( y ) }
Exercise 2.11 s s
A A
Implement and run the Bron – Kerbosch algorithm for the 5- s As As
wheel W5 in Figure 2.3 and for the Petersen graph (Figure 1.2 @
@s
on Page 3).
O( n 2 · 3 n/3 ) time .
t( n ) = t ∗ ( n ) + r( n ),
t ∗( p ) 6 t ∗( p − 4 ) + t ∗( p − 1 ) + O p 2 .
(2.7)
2.3 The Bron & Kerbosch Algorithm 29
Exercise 2.12
This idea can be built into the algorithm by replacing the
second recursive call (in Line 12) by a loop during which all
nonneighbors of x are tried. In order to minimize the number
of recursive calls Tomita et al. choose a vertex x with the most
neighbors.
∀x∈P x 6 x 6 is reflexive,
∀x∈P ∀y∈P (x 6 y & y 6 x) ⇒ x = y antisymmetric,
∀x∈P ∀y∈P ∀z∈P (x 6 y & y 6 z) ⇒ x 6 z and transitive.
(a, b, c) ∈ V 3 .
Algorithm 4: Kahn ’ s
1: procedure Kahn( G = ( V , A ) ) Topological Sort
2:
3: L←∅
4: S ← { x ∈ V | ∀y∈V ¬ ( y → x ) } . S is the set of sources.
5:
6: while S 6= ∅ do
7: x←∈S
8: S←S\ {x}
9: L←L+ {x} . x is added at the end of L.
10:
11: for (x, y) ∈ A do
12: A ← A \ { (x, y) }
13: if ∀z ¬ ( (z, y) ∈ A ) then . y is a new source.
14: S←S ∪ {y}
15: end if
16: end for
17:
18: end while
19:
20: if A 6= ∅ then
21: G has a cycle : Report defeat
22: else
23: Report L
24: end if
25:
26: end procedure
Exercise 2.14
Prove that any start – node may start a topological sort of a
DAG .
2.4 Total Order! 33
Exercise 2.15
Prove that upon completion of the algorithm described above
— that is when S = ∅ — any remaining arc implies that G
has a cycle.
Hint: The remaining digraph — if any — has no source.
b : V → { true , false }
2.4.1 Hypergraphs
rank( H ) = max { | e | | e ∈ E } ,
where E = E( H ) denotes the set of hyperedges of H . (2.11)
A hypergraph is called
k-uniform if all its hyper-
The 2 – coloring problem for hypergraphs H = ( V , E ) is to edges have k vertices.
find a partition of its vertices — say { A , B } — such that
each hyperedge has a nonempty intersection with A and B ,
ie,
∀e ∈ E e ∩ A 6= ∅ and e ∩ B 6= ∅. (2.12)
When H is 2 – uniform then H is a graph and then the
2 – coloring problem is easy to solve . 21 21
See exercise 1.14.
Exercise 2.17
Orient the graph in Figure 2.4 into a DAG . Implement Kahn ’ s
algorithm, and find a topological sort.
V( H ) = { h1 , · · · , hn } and
E( H ) = { ( ai , bi , ci ) | { ai , bi , ci } ⊆ V and 1 6 i 6 t }
[
{ ( dj , ej ) | { dj , ej } ⊆ V and 1 6 j 6 p } . (2.13)
36 Algorithms
V ∗ = V( H ) ∪ { x } ∪ { yi | ( ai , bi , ci ) ∈ E( H ) } . (2.14)
( ai , yi , bi ) ∈ R and ( y i , x , ci ) ∈ R . (2.15)
between f( ai ) and f( bi ) .
If sign( f( ai ) ) 6= sign( f( bi ) ) , then
f( yi ) ∈ ( −1, 0 ) ∪ ( 0, 1 )
Exercise 2.19
Check that also all betweenness constraints ( yi , x , ci ) are
satisfied.
( di , ei ) ∈ E( H )
( ai , bi , ci ) ,
Exercise 2.20
Check all four cases, that no hyperedge { a , b , c } ∈ E( H ) is
monochromatic.
Exercise 2.21
Implement Opatnrý ’ s reduction — Start with the following
hypergraph ( V , E ) :
V = [n] (2.21)
E = {{i, i + 1, i + 2} | 1 6 i 6 n − 2} . (2.22)
2.5 NP – Completeness
a decision problem . 24 24
Usually, the decision vari-
ant of a problem is sufficient
to solve it. For example, to
We would like to have a fast algorithm — eg, polynomial compute ω(G) in polyno-
mial time, it would be suf-
— to solve P . The question whether we can do that concerns ficient to have a polynomial-
the — complexity — of the problem. time algorithm that checks
if ω(G) > k, for each k ∈
[n].
2.5 NP – Completeness 39
Exercise 2.22
Let G be a splitgraph and let {K, S} be a partition of V(G) such
that K induces a clique and S induces an independent set. For a
vertex x ∈ K define
Chromatic index
The chromatic index of a graph is the minimal number that is
needed to color the edges of a graph such that no two edges with a
nonempty intersection have the same color. The chromatic index is
denoted as χ0 (G). By Vizing’s theorem the chromatic index of a
graph is either ∆ or ∆ + 1, where ∆ is the maximal degree of a
vertex in the graph.
Exercise 2.23
Assume that G is triangle - free. Show that
q(G) = χ0 (G).
Exercise 2.24
Let G be a cubic graph. Construct a graph G0 as follows.
Introduce a new vertex xe for every edge e ∈ E(G). Make a new
vertex xe adjacent to the two endpoints of e.
Show that
χ0 (G) = 3 ⇔ q(G0 ) = 3.
Exercise 2.25
Let G be a cubic graph and let G∗ be the graph constructed as
above.
χ0 (G) = 3 ⇔ q(G∗ ) = n + 2 A. Blokhuis and T. Kloks,
On the equivalence covering
where n = |V(G)|. number of splitgraphs, In-
formation Processing Letters
This proves the following theorem. 54 (1995), pp. 301–304.
42 Algorithms
e · (d + 1) 6 2 k−1
A1 ··· An
P( ∩ Āi ) > 0.
When the events are independent then their complements Āi are
also independent. In that case
Y
P( ∩ Āi ) = P( Āi ) > 0
The local lemma deals with the case where the events are ‘almost’
independent. To formalize this we make use of a dependency graph.
The dependency graph has a vertex for each subset of variables that
determines an event. Two vertices are adjacent in the graph when
the intersection of the two subsets is nonempty.
44 Algorithms
{ Aj | { i, j } ∈
/ E }.
Then Y Y
P( ∩ Āi ) > (1 − xi ) > 0.
P( Ai | ∩j ∈ J Āj ) 6 xi .
J1 = { j ∈ J | ( i, j ) ∈ E .} and let J 2 = J \ J1
Exercise 2.26
Prove the claim we made at the start of this section: Let H be a
k-uniform hypergraph and assume that every hyperedge intersects
at most d other hyperedges. When e(d + 1) 6 2k−1 then H is
2-colorable.
For a graph G with all degrees at least a let γa,b (G) be the
smallest number of elements in an (a, b)-dominating set in G.
γa,b 6 α · n.
least n/N times among the vertices of G. Say red is such a color
and write V \ red for the vertices that are not red.
We claim that
V \ red
is with positive probability an (a, b)-dominating set.
For a vertex x define a bad event Ax as a coloring of N[x] such
that either one of the following holds.
1 X
b−1
r
P(Ax ) = · (N − 1)i +
Nr+1 i
i=0
X r
a−1
!
(N − 1) · (N − 1)i . (2.24)
i
i=0
e · P · r2 6 1,
C:N → A,
such that for each node a its children are labeled by elements of
N̄( [a] ).
• If there is a vertex a in the tree T i+1 with C(i) ∈ N̄( [a] ) then
choose a such that it is furthest from the root. Attach a new
child to a and label it as C(i).
τ( t ) = T 1.
Lemma 2.41. The probability that a witness tree T passes its check
is Y
P( [a] ).
a ∈ V(T )
P1 P2 ···
This process ends when no new vertices are created in some round.
Define
Y
x0 ( B ) = x( B ) · (1 − x( C )).
C ∈ N( B )
Lemma 2.43. Let T be a proper witness tree with its root labeled
A. The probability that the Galton-Watson process described above
produces exactly T is
1 − x( A ) Y
PT = · x0 ( [a] ).
x( A )
a ∈ V(T )
Proof. For a ∈ V(T ) let Wa be the set of elements in N̄( [a] ) that
do not appear as the label of a child of a. The probability that
the Galton-Watson process produces T is
1 Y Y
PT = · x( [a] ) · (1 − x( [u] )).
x( A )
a ∈ V(T ) u ∈ Wa
1 − x( A ) Y x( [a] ) Y
PT = · · (1−x( [u] )).
x( A ) 1 − x( [a] )
a ∈ V(T ) u ∈ N̄( [a] )
1 − x( A ) Y Y
PT = · x( [a] ) · (1−x( [u] )) =
x( A )
a ∈ V(T ) u ∈ N( [a] )
1 − x( A ) Y
· x0 ( [a] ).
x( A )
a ∈ V(T )
Proof. Let TA be the set of all proper witness trees that have root
A. We find for the expected number of times that an event A
appears in the log C:
X
E( NA ) = P( T appears in C ) 6
T ∈ TA
X Y X Y
P( [a] ) 6 x0 ( [a] ) =
T ∈ TA a ∈ V(T ) T ∈ TA a ∈ V(T )
x( A ) X x( A )
· PT 6 .
1 − x( A ) 1 − x( A )
T ∈ TA
The first inequality follows from Lemma 2.42. The second inequality
follows from the assumptions in Theorem 2.36. The third inequality
follows from Lemma 2.43. The last inequality holds because the
Galton-Watson process produces exactly one tree at a time.
This proves the theorem.
Exercise 2.27
Show that {X, Y} is -regular when d(X, Y) 6 3.
2.7 Szemerédi’s Regularity Lemma 55
(a) |V0 | 6 · n;
Exercise 2.28
Assume G has at most 4 · n2 edges. Show that any equitable
partition with |V0 | 6 · n is -regular.
Important modification:
When π = {V0 , · · · , Vk } is a partition with an exceptional class V0
then we define index(π) as the index of the refined partition where
each element of V0 forms a class by itself (so index(π) is the index
of a partition with |V0 | + k classes).
Exercise 2.29
Show that
1
0 6 index(π) 6 .
2
|V0 | = t − 1.
We first show that the index does not decrease in any refine-
ment. — Below (in Lemma 2.51) — we show that the increase
is substantial when there are ‘irregular pairs’ — that is — pairs
{Vi , Vj } with subsets Vi0 and Vj0 that satisfy
Rewrite this as
|X1 | 2 |X2 | 2
d2 (X, Y) 6 · d (X1 , Y) + · d (X2 , Y). (2.27)
|X| |X|
Exercise 2.30
The Cauchy-Schwartz inequality says that for any real numbers ai
and bi ,
then
X |Xi ||Yj |
· d2 (Xi , Yj ) > d2 (X, Y) + 4 .
|X||Y|
58 Algorithms
We have
X |Xi ||Yj |
4 6 · (d(Xi , Yj ) − d(X, Y))2 =
|X||Y|
X |Xi ||Yj | X |Xi ||Yj |
· d2 (Xi , Yj ) − 2 d(X, Y) · d(Xi , Yj ) +
|X||Y| |X||Y|
d2 (X, Y) =
X |Xi ||Yj |
· d2 (Xi , Yj ) − d2 (X, Y).
|X||Y|
|Vi1 | > |Vi |, |Vj1 | > |Vj |, | d(Vi1 , Vj1 ) − d(Vi , Vj ) | > .
{ Vi,1 , · · · , Vi,ki }.
2.7 Szemerédi’s Regularity Lemma 59
Then ki 6 2k — so — |π0 | 6 k · 2k .
By (2.28) and Lemma 2.49 we have for all irregular pairs {Vi , Vj }
Xki X
kj
|Vi,a ||Vj,b | 2
· d (Vi,a , Vj,b ) >
a=1
n2
b=1
|Vi ||Vj | 2 |Vi ||Vj | 4
· d (Vi , Vj ) + · .
n2 n2
Since there are more than k2 irregular pairs — and since for
i > 1: |Vi | > (1−)·n
k — we find
index(π0 ) >
((1−)n/k)2 4 1 5
index(π) + k2 · · > index(π) + ·
n2 4
(since we may assume that 0 < 6 1/2).
This proves the lemma.
1
However, any index is bounded from above by 2. Therefore, the
process ends in at most 2 · −5 iterations.
Notice that the increase of the exceptional set is smaller than
1 6 1
· · n · 2 · −5 = · · n,
4 2 Let a function f : N → N
— that is — since the original exceptional class satisfies be defined by
l f(1) = t and
m
f(k + 1) = 46 · f(k)2f(k) .
1
|V0 | 6 · · n, The number of classes in
2 the -regular partition πk
we obtain an -regular partition. The number of classes is bounded produced by the algorithm
satisfies
by a function of and t.
|πk | 6 f(d2−5 e).
This proves the regularity lemma.
Clearly, this is also the lower
bound for n.
Proof. Let the color classes be A and B. Assume |A| = |B| = n and
d(A, B) = 12 − n12 .
Assume the graph contains K n2 , n2 . Then there are sets X and Y of
size n/2 and d(X, Y) = 1. This implies
1
| d(X, Y) − d(A, B) | > ,
2
which shows that the graph is not -regular with = 1/2.
Assume that the graph is not -regular with = 1/2. Then there
are sets X and Y of size at least n2 that satisfy
1 1 1
| d(X, Y) − + | > .
2 n2 2
Notice that this is only possible when d(X, Y) = 1 — that is —
{X, Y} represents a complete bipartite subgraph (with at least n/2
vertices in each color class).
This proves the lemma.
3
|Y| > ·n and σ(Y) > ·n (2.29)
2
I. d < 3 · n;
4
II. | {y | y ∈ B and | deg(y) − d | > 4 · n } | > 8 · n;
4 4
|A0 | > · |A| and |B0 | > · |B| and
4 4
| d(A0 , B0 ) − d(A, B) | > 4 .
2.7 Szemerédi’s Regularity Lemma 63
Y0 = {y ∈ Y | |deg(y) − d| < 4 · n }.
X X X X
σ(y, y0 ) = σ(Y) · |Y|2 − σ(y, y0 )
y0 ∈Y 0 y∈Y y0 ∈Y\Y 0 y∈Y
y6=y0 y6=y0
3 4
> · n · |Y|2 − · n · |Y| · n.
2 8
(Here we use Y’s property that σ(Y) > 3 ·n/2 and the assumption
4
that II does not occur which implies |Y \ Y 0 | 6 8 · n.)
Since |Y 0 | 6 |Y| and |Y| > · n, we have
X 3 4 2 3 3
σ(y, y0 ) > · n · |Y| − ·n > · · n · |Y|. (2.30)
2 8 8
y∈Y
We claim
4
| {y | y∈Y and σ(y, y0 ) > 24 · n } | > · n.
4
(2.31)
Otherwise
X 4
σ(y, y0 ) < · n2 + |Y| · 24 · n
4
y∈Y
3 3 3
6 · n · |Y| + 24 · n · |Y| 6 · · n · |Y|
4 8
and this contradicts (2.30).
It follows from (2.31) that there exists a set B0 ⊆ Y \ {y0 } which
satisfies
4 d2
|B0 | > · n and ∀b∈B0 | N(b) ∩ N(y0 ) | > + 24 · n.
4 n
64 Algorithms
We claim
| d(A0 , B0 ) − d(A, B) | > 4 .
To see that notice
X
d2
e(A0 , B0 ) = | N(y0 ) ∩ N(b) | > + 24 · n · |B0 |.
n
b∈B0
It follows that
d2
1 d
d(A0 , B0 ) − d(A, B) > + 24 · n · −
n |A0 | n
d2 d
> + 24 − =
n(d + 4 · n) n
d4
24 − > 4 .
d + 4 · n
(In the second line we use the fact that |A0 | 6 n since A0 ⊆ A and
the fact that |A0 | = |N(y0 )| < d + 4 · n since y0 ∈ Y 0 .)
An algorithm to compute the sets A0 and B0 proceeds by com-
puting for all y0 ∈ B with | deg(y0 ) − d | < 4 · n the set
Exercise 2.31
Let d be the average degree of a bipartite graph with color classes
A and B of size n. Assume d < 3 · n (Case I of Lemma 2.57).
Prove that the graph is -regular.
Hint: See Exercise 2.27.
2.7 Szemerédi’s Regularity Lemma 65
Exercise 2.32
Let the color classes A and B of a bipartite graph satisfy |A| = n
and |B| = n. Show that the graph is -regular if for all X ⊆ A and
Y⊆B
4
| { y ∈ B | | deg(y) − d | > 4 · n } | 6 · n.
8
If the graph is not -regular then there exists a set Y ⊂ B which
satisfies (2.29) ie
3
|Y| > ·n and σ(Y) > · n. (2.32)
2
Proof. Assume that no set Y ⊆ B, |Y| > · n satisfies (2.32). We
show that the graph is -regular.
Let X ⊆ A and Y ⊆ B and let
We show that
| d(X, Y) − d(A, B) | 6 .
We claim
X d
2
2
| N(x) ∩ Y | − · |Y| 6 e(A, Y) + |Y|2 · σ(Y) + 5 · n3 .
n 5
x∈X
To see that write (mi,j ) for the bipartite adjacency matrix. Then
66 Algorithms
X d
2
|N(x) ∩ Y| − · |Y| 6
n
x∈X
X d
2
|N(x) ∩ Y| − · |Y| =
n
x∈A
2
X X d X X d2
mx,y − · |Y| = m2x,y + 2 · |Y|2 +
n n
x∈A y∈Y x∈A y∈Y
X 2d X
· |Y| ·
mx,y · mx,y0 − mx,y =
n
y,y0 ∈Y y∈Y
y6=y0
d2 X 2d
e(A, Y) + · |Y|2 + | N(y) ∩ N(y0 ) | − · |Y| · e(A, Y) =
n 0
n
y,y ∈Y
y6=y0
d2 X d2
2d
e(A, Y) + · |Y|2 + σ(y, y0 ) + − · |Y| · e(A, Y) 6
n 0
n n
y,y ∈Y
y6=y0
2d2 2d
e(A, Y) + σ(Y) · |Y|2 + · |Y|2 − · |Y| · e(A, Y).
n n
To prove the claim, we must show
d2 d 5
· |Y|2 − · |Y| · e(A, Y) 6 · n3 ,
n n 5
that is,
d 5 · n3 1
we need to show that: d(A, Y) > − · 2.
n 5d |Y|
X d
2
| N(x) ∩ Y | − · |Y| >
n
x∈X
!2
1 X d
( | N(x) ∩ Y |) − · |X| · |Y| .
|X| n
x∈X
| d(X, Y) − d(A, B) | 6
25
1
· e(A, Y) + |Y|2 · σ(Y) + · n3 .
|X| · |Y| 5
and we find
| d(X, Y) − d(A, B) |2 6
4 · n2 3 · n 25
1
· (d + 4
· n) · |Y| + + · |Y|2
+ · n3
6
|X| · |Y|2 8 2 5
n + 4 · n 4 · n2 3 · n 25 · n3
2 2
+ 3 3+ + 6
·n 8 · n 2 · n 53 · n3
2 · (1 + 4 ) 92 5
+ + 6 2 .
16 10 128
Assume
1
2 · n− /4
1
< < .
16
There exists an algorithm that runs in O(M(n)) time and that
verifies that H is -regular or finds sets A0 ⊆ A and B0 ⊆ B that
satisfy
4 4
|A0 | > · n, |B0 | > · n, | d(A0 , B0 ) − d(A, B) | > 4 . (2.33)
16 16
Proof. If d 6 3 · n, then we are done; we can check that in O(n2 )
time and report that H is -regular.
Next if
4
| { y | y ∈ B | deg(y) − d | > 4 · n } | > · n,
8
then the degrees of at least half of them deviate from d in the same
direction. — That is — we can find a set B0 ⊆ B that satisfies
4
|B0 | > 16 · n and that satisfies
3
|Y| > · n and σ(Y) > · n. (2.34)
2
By Lemma 2.57 there exists an O(M(n)) algorithm to compute
these sets A0 and B0 when Y exists.
Assume that proofs are given as part of the input of more than γ·k2
pairs of classes showing that they are not γ-regular. 33 There is 33
By ‘proofs’ we mean ‘wit-
an algorithm that runs in O(n) time that produces a refinement Π1 nesses’ ie subsets of the
color classes that violate γ-
of Π0 satisfying regularity.
|Π1 | = k · 4k .
1 5
index(Π1 ) > index(Π0 ) + ·γ .
4
Proof. By Lemma 2.51 there is a linear-time algorithm that com-
putes a refinement Π0 of Π0 (leaving the exceptional class unaltered
but which may have other classes of unequal size) satisfying
1 5
|Π0 | 6 k · 2k and index(Π0 ) > index(Π0 ) + ·γ .
4
This increases the size of the exceptional class of Π0 (and of Π0 ) by This increases the excep-
tional class by at most
at most n/2k .
n − |C0 |
n
|Π0 |· 6 .
k · 4k 2k
n − |Ci0 |
n
ki ·2ki · 6 k .
Notice that ki · 4ki 2 i
γ5
index(Πi ) > index(Π1 ) + (i − 1) · .
4
So — since the index cannot exceed 1/2 — the algorithm ends in
at most 1 + 2 · γ−5 iterations.
2.7 Szemerédi’s Regularity Lemma 71
2·T
} and assume
Let T = f 1 + b2 · γ−5 c , let N = max{ 2·T ·4 2·T , γ
that n > N.
2·T 2 · k1
n > N > > ⇒
γ γ
γ·n
|C10 | < k1 6 .
2
This show that the claim is true for i = 1.
We have
n n n
|Ci+1
0 | − |C0 |
i
6 and we show: < γ· .
2ki 2ki 2i+1
This is true for i = 1 by the assumption (2.36) and
γ · ni > 1.
γ · ni > 2 · (1 − γ) > 1.
72 Algorithms
ni > 42ki .
We have
Exercise 2.33
Assume that G is a graph which is not empty. Show that
δ 1
6 φ(G) 6 ,
m α(G)
where m is the number of edges and δ is the minimal degree of a
vertex in G and α(G) is the size of a largest independent set in G.
2.8 Edge - thickness and stickiness 73
Exercise 2.34
(iii) Assume that G has no isolated vertices. Show that there exists
a thickness function λ that realizes the thickness of G and that
has a range
φ
{ 0, φ, }.
2
Exercise 2.36
If G has an isolated vertex then φ(G) = 0 otherwise
2
φ(G) = .
n + s(G)
Computing stickiness
Let G be a graph. Construct a bipartite graph G0 as follows.
Create two copies of a vertex x ∈ V — say x1 and x2 . For
A ⊆ V write Ai = { xi | x ∈ A }. The set of vertices of G0 is
V 1 ∪ V 2 . The edges of G0 are
1
is equal to 2 · (1 − 1/ω).
σ( G ) 6 σ( X ) + σ( C ∪ S̄ ) Exercise 2.37
< |X| + |C ∪ S| ( since C ∪ S is connected ) Prove the first inequality.
Hint: Show that every mini-
= n.
mal clique separator is one in
G[X ∪ S] or one in G[C ∪ S].
Exercise 2.38
T( n ) 6 T( n − 1 ) + O n 2 T( n ) = O n 3 .
⇒ (2.41)
78 Algorithms
Algorithm 5: Feasible
1: procedure FP ( G ) Partition
2:
3: if G is a clique then
4: there is no partition
5: else
6: R ←∈ { x | x ∈ V and d(x) < n − 1 }
7: C ← {R}
8: S ← N(R)
9: X ← V \ N[C]
10:
11: while ∃y∈S X 6⊂ N(y) do
12: C ← C ∪ {y}
13: S ← ( S \ {y} ) ∪ ( N(y) ∩ X )
14: X ← X \ N(y)
15: end while
16:
17: report { X , S , C }
18: end if
19:
20: end procedure
2.9 Clique Separators 79
2.9.2 Intermezzo
Back to Business:
JJ
minimal clique separators in C ∪ S̄ that are cliques in G .
t qq t J
tH qq Jty
HHH
x
q
Ht t
The recursions take place on subsets of V that form a partition JH
JJt t
Exercise 2.39
Let G be a graph. Consider the following set R of betweenness
relations :
(x, y, z) ∈ R ⇔
there is a minimal clique separator that
contains y and separates x and z . (2.42)
Design an algorithm that finds a total ordering 6 of V
satisfying
(a , b , c ) ∈ R ⇔ a < b < c or c < b < a.
s
s
2.9.3 Another Intermezzo: Trivially perfect graphs s @ @s
Exercise 2.40
Let G be a connected graph and assume it has a t-ranking. There
exists at most one vertex that has color t.
Exercise 2.41
What is the rank of C4 ? What is the rank of P4 ? What is χr (G)
when G is trivially perfect?
Exercise 2.42
Let G be a graph which is not a clique. Show that
Exercise 2.43
Exercise 2.44
Let G be a permutation graph and let S be a minimal separator
in G. In any model for G there exists a scanline s such that the
vertices of S are the line-segments that cross s.
Corollary: the number of minimal separators in a permutation
graph is O(n2 ).
Hint: Consider a permutation model. Remove the vertices of S from
the model. Let C1 and C2 be two components of G − S such
that every vertex of S has a neighbor in both. For the scanline
s take any line-segment in the model that lies between any two
line-segments of C1 and C2 and that crosses no other line-segments.
That line-segment must exist since C1 and C2 form connected parts
in the diagram. Since a vertex of S has a neighbor in C1 and in
C2 it must cross s. The only vertices that were removed from the
model are in S so all line-segments that cross s are in S.
2.11 Cographs r
r r r r r
r @r
Definition 2.78. A cograph is a graph without induced P4 .
Figure 2.11: The figure
shows the claw, ie, K1,3 , on
the left and P4 on the right.
One important observation is that cographs are closed
under complementation. — That is — when G is a cograph
then so is its complement Ḡ . That is so because
Exercise 2.45
Characterize bipartite cographs.
Exercise 2.46
Design an efficient algorithm to compute the rank χr of a cograph.
Exercise 2.47
Let G be a graph and let ∆ be the ‘odd triples in G’ — that is —
the set of triples in V that carry an odd number of edges between
them. Show that this is a two-graph.
86 Algorithms
Exercise 2.48
Let G be a graph and let S ⊆ V. A switch of G with respect
to S replaces all edges that have one end in S by nonedges and all
nonadjacent pairs with one end in S by edges. Show that a switch
does not change the set of odd triples.
Exercise 2.49
A two-graph is the switch equivalence - class of a cograph if and
only if it does not contain the pentagon — that is — the set of
odd triples of the C5 .
Exercise 2.50
Show that a graph can be switched to a cograph if and only if it
does not contain C5 , the bull, the gem or the cogem as an induced
subgraph — that is — no subgraph with 5 vertices switches to
C5 .
Exercise 2.51
Design a linear - time algorithm to compute χ for graphs in the
switch - class of cographs. You may assume that a tree - model is
given as input.
Hint: Show that χ = ω for any graph that switches to a cograph.
Exercise 2.52
The rank of the adjacency matrix of a cograph
::::::
is equal to the
number of distinct non - zero rows. 47 47
For graphs in general this
For a proof of this see eg the following paper. is an upperbound.
Exercise 2.53
Show that there is an algorithm that checks if a graph G has
a set S ⊆ V — | S | 6 k — such that G − S is a cograph —
where k ∈ N is a parameter.
::::::::
Your algorithm should run in The algorithm is a function
of k.
O 4k · n3 .
Hint: First design an O n 3 algorithm that finds an induced
P 4 — if there exists one — eg , using a matrix multiplication.
Next, if P is an induced P 4 , then branch, each time putting
a different point of P in S . Since | S | 6 k , the depth of the
recursion is k .
Notice that c is a constant; (not a parameter); the run - time A constant is a natural num-
ber.
of a fixed parameter algorithm is a polynomial
:::::::::
in the size of the
instance of problem P. The influence of the parameter k on the
run - time is some arbitrary function f(k). The algorithm runs
in polynomial - time if we let the parameter k be a constant (then
f(k) disappears in the Big-Oh). When P is NP - complete the
function f is not a polyno-
mial.
There are problems that can not be solved by a fixed parameter -
algorithm. The ‘good guys’ are called fixed parameter - tractable.
Nobody knows of an algo-
rithm that solves the pa-
Definition 2.85. Let (P, k) be a parameterized problem. The rameterized problem ω > k
and that runs in time O(nc )
problem is fixed parameter tractable ( FPT ) if there is a fixed where c does not depend on
parameter - algorithm that solves (P, k). k. The clique problem is
W[1] - hard.
90 Algorithms
e ∈ E(G) ⇒ e ∩ S 6= ∅.
The search tree (with root e) branches at the root into two subtrees;
each subtree is labeled with an endpoint of e. The subtrees are
evaluated as follows.
The size of the search tree is O(2k ) (since the depth of the search
tree is at most k and every node has at most two children). This
proves the following theorem.
2.13 The bounded search technique 91
Exercise 2.54
Let M be a minimum edge dominating set. Then V(M) is a vertex
cover.
Exercise 2.55
Prove or disprove:
Let S be a minimal
:::::::
vertex cover. A minimum edge dominating set
M which satisfies S ⊆ V(M) can be computed in polynomial time
92 Algorithms
The exercises show that our job is done if we can find the right
minimal vertex cover.
In the previous two examples we made use of the fact that a small
‘local’ part of the graph contain a solution. The feedback vertex
problem lacks this property. A solution is some ‘small’ set
of vertices that hits all cycles
of the graph. What happens
to the feedback vertex set
It is always a good idea to reduce the graph before going problem if we assume that
the graph has no induced cy-
on a venture that takes exponential time — so — that’s what cles of length more than 3?
we do.
1. if a vertex is not in any cycle then we delete the vertex from the
Exercise: Show that the
graph reductions take polynomial
time and that they are ‘safe:’
2. if there are two vertices with more than two edges running between the graph has a solution
if and only if the reduced
them then we delete one of those edges
graph has a solution.
2.13 The bounded search technique 93
4. if x has only one neighbor y and if there are at least two edges
between x and y then we remove x and we add a loop at y
Define the set of high - degree vertices as the set of the first d3k/2e
vertices in this order:
H = { v1 , . . . , vd3k/2e }.
The induced graph G[F] is a forest and the number of edges in G[F]
is at most |F| − 1. Thus, the number of edges that run between F
and X is at least
d3k/2e(a − 1) + 2f + 1 6 k · a.
and this leads to a < 3. This contradicts the fact that each vertex
in G has degree at least 3.
Reduce the graph. The vertices of high degree in the reduced graph
form the root of a branching. A selected vertex is put in the solution
set and deleted from the graph.
Exercise 2.56
For the feedback vertex set problem, there is a 2.7k nO(1) -time
randomized algorithm by Li and Nederlof. There is also a 3.46k nO(1) -
time deterministic algorithm by Iwata and Kobayashi.
96 Algorithms
References
J. Chen, I. Kanj and G. Xia, Improved upper bounds for vertex cover ,
Theor. Comput. Sci. 411 (2010), pp. 3736 – 3756.
s s
A A
2.14 Matchings s As As
@
A matching in a graph G is a set of edges of which no pair @s
shares an endpoint.
Figure 2.12: The 5-wheel
Definition 2.92. Let G be a graph with at least one edge.
A set Exercise 2.57
S ⊆ E Check Definition 2.92 with
the text above it.
is a matching if S is an independent set in L( G ).
ν( G ) = α ( L(G) ) .
A = { u → v | ∃x∈V { u, x } ∈ E and { x, v } ∈ M }.
is a flower if
1. t is odd
Let B the the blossom of a flower. The graph G/B replaces the
set of vertices of B by one new vertex. We call this new vertex B.
The edges of the graph G/B are
{ u, B } ∈
/ M/B.
Lemma 2.97. When two white vertices — both having two black
neighbors — are adjacent then they have a common black neighbor.
Proof. Let x and y be two white vertices that are adjacent. Notice
that
| ( N(x) ∪ N(y) ) ∩ B | > 4
implies a claw with one of the two whites as a center (since the
black vertices form an independent set). This is a contradiction.
1. it is incident with a white vertex that has only one black neighbor
Proof. The graph would have a claw when the number of edges in
{p, q, r} were 0 or 2 (either with b as a center or the one of p, q
and r that is adjacent to the other two ).
This approach has the advantage that we can reduce the graph:
Let s and t be two white vertices that are not adjacent and that have
each exactly one black neighbor. In the search for an augmenting
s ∼ t-path we can remove all white neighbors of s and t and all
other white vertices that have only one black neighbor. We refer to
this graph as the reduced structure.
s s
Minty first shows that the neighborhood of any regular back s @s s @
@s
vertex has a partition into two classes such that all nonedges run @s @@s s @@s
between vertices in different classes. For a regular vertex b that is @s @s
@
adjacent to s or to t one of the two classes is s or t and the other @s s
@
s@s
@
class is N(b) \ {s, t}. The following lemma concerns itself with the s s
regular vertices that are incident with at least three tipped wings.
Figure 2.15: A claw-free
graph; this one is a domino:
Lemma 2.101. Let b be a black vertex that is incident with at every vertex is in two maxi-
mal cliques.
least three tipped wings. There exists a unique partition of N(b)
into at most two parts such that all nonedges that run between
whites in different wings have their endpoints in different parts and
all edges between whites in different wings have their endpoints in
similar parts.
102 Algorithms
First notice that — when each triple in a graph is odd — then the
graph is a union of at most two cliques. In that case we are done.
2. a is not adjacent to w0 ∈ W0 and b is not adjacent to wn+1 ∈ Figure 2.17: This is the sun.
Wn+1 The sun is claw-free. It is the
linegraph of the net.
3. consecutive white vertices wi ∈ Wi and wi+1 ∈ Wi+1 are nonad-
jacent.
Exercise 2.59
The problem to find α( G ) in a triangle – free graph is NP -
— complete. Reduce this problem to the clique problem in
claw – free graphs. Thus , finding ω( G ) in claw – free graphs
is NP – complete.
2.16 Dominoes
A natural generalization of the class of linegraphs of bipartite
graphs, is the class of dominoes .
49
I spell: ”one domino” and
Definition 2.104. A graph is a domino if every vertex is in ”two dominoes.”
at most two maximal cliques.
Exercise 2.61
Show that the class of dominoes is hereditary — that is — a
graph G is a domino if and only if every induced subgraph of
G is a domino.
1. G is a domino
Exercise 2.62
Let G be a graph. Call two vertices equivalent if they have A binary relation is an
equivalence relation if it
the same closed neighborhood. Show that this defines an equiva-
is reflexive, symmetric,
lence relation on V( G ). The representative R( G ) of a graph and transitive. To be precise,
G is the graph with a binary relation ∼ is an
equivalence relation if ∼
satisfies
V( R ) = { X | X ⊆ V(G) is an equivalence class }.
1. ∀x x ∼ x,
2. ∀x ∀y x ∼ y ⇒ y ∼ x,
Two vertices of R are adjacent if a pair of elements of the
3. ∀x ∀y ∀z (x ∼ y and y ∼
classes are adjacent. Design a linear – time algorithm that com- z) ⇒ x ∼ z.
putes the representative of a graph. The sets of mutually equiv-
alent vertices are called
equivalence classes.
106 Algorithms
Exercise 2.63
A graph is strongly regular if there are numbers k , λ and µ
such that
(i) all vertices have the same degree — that is — the graph is
regular with degree k :
∀x∈V d( x ) = | N( x ) | = k
(ii)
∀x∈V ∀y∈V x 6= y ⇒
λ if { x , y } ∈ E
| N( x ) ∩ N( y ) | =
µ if { x , y } ∈
/ E.
The dual
Exercise 2.64
Assume that G has an edge which is in only one triangle. Say the
triangle has edges e1 , e2 and e3 . Then G has a partition if and
only if G − {e1 , e2 , e3 } has a partition.
Exercise 2.65
Show that there is a linear-time reduction to the case where the
graph G is biconnected — that is — henceforth we assume that
G is biconnected. Furthermore we may assume that every vertex
of G has at least three neighbors. 52 52
A graph is biconnected if
each minimal separator has
at least two vertices.
1. G is biconnected
Type 2. the three edges of S are in triangles of P with the third vertex
outside S
2.17 Triangle partition of planar graphs 109
Exercise 2.66
If a separating triangle S is even then it is of Type 1 or Type 2
in any partition.
Hint: Let S be a separating triangle and let P ve a partition of the
edges of G into triangles. Let G0 be the graph induced by S and
the vertices inside S. When S ∈ P then S is even (otherwise G0 has
no partition).
Let {x, y} ∈ E(S) and assume that {x, y} is in a triangle of P with
the third vertex outside S. Assume that the two other edges of S
are in triangle with their third vertex inside S. (So S is of Type 3.)
Remove the edge {x, y} from the graph G0 . There is a partition of
the edges of G0 − {x, y} into triangles — and so — the degree of
x and y must be even in G0 − {x, y}. But then S is not an even
triangle in G.
54
Jiawei Gao, Ton Kloks
and Sheung-Hung Poon, Tri-
Exercise 2.67 angle - partitioning edges
of planar graphs, toroidal
All even separating triangles can be found in linear time. graphs, and k-planar graphs,
Springer - Verlag, Lecture
Hint: Use Baker’s method to partition V(G) into layers. (See Notes in Computer Science
Theorem 4.246 on Page 323.) 54 7748 (2013), pp. 194–205.
Type b. the edges of the boundary are in triangles of P that have their
third vertex outside.
C1 ··· Ct
Consider the (0, 1) - matrix with V as its columns and the maximal
cliques in G as its rows and that has a 1 precisely when a vertex
is in a clique. Then the rows can be permuted so that all the ones
in a column are consecutive.
Exercise 2.68
Design an algorithm:
Input: A graph G and the set of all the maximal cliques in G —
say — {C1 , · · · , Ct }.
Output: A permutation of the cliques such that the (clique -
vertex) - incidence matrix has all ones in each column consecutive.
Hint: Build a PQ - tree. Start with a tree that has all its leaves
adjacent to the root and identified with C1 , · · · Ct . Label the root
as a P - node. Add the vertices one by one and rebuild the tree
to satisfy the consecutive ones property.
2.18 Games
2.18.1 Snake
Snake is a thrilling game played on a graph as follows. — Johan Cruijff was once
Of course — the game is played between two players. The ‘game the greatest football player
in Holland. One of his
- board’ is a graph G. The two players take turns in making (legal) proverbs was: “Football is
moves. The player who can’t make a legal move loses the game. a game of mistakes. Who-
ever makes the fewest wins!”
The two players together build a path in the graph. One endpoint
of the path is the ‘head’ and the only legal
::::
moves that are available
to a player (when it is his turn) extend the path with one vertex
that is adjacent to the head. 55 A newly added vertex becomes the 55
Of course, only legal
moves are allowed. A player
head of the path.
is allowed to make a legal
Player 1 makes the first move and he chooses one point in the move when it is his turn.
Exercise 2.69
Show that player 1 can easily win the game if the graph has an
isolated vertex. C. Berge, Combinatorial
games on a graph, Discrete
Mathematics 151 (1996),
pp. 59–65.
We are interested in the question whether player 1 has a winning
strategy.
Exercise 2.70
Suppose that G has no perfect matching. Show that player 1
has a winning strategy.
Let there be k piles and let the number of stones in these piles be
n1 ··· nk .
n1 ⊕ ··· ⊕ nk .
To obtain the nim - sum add the ni with the following addition
rule
Exercise 2.72
In this game the board is a forest F of k rooted trees. On the
root of each tree lies a coin. A legal move chooses one tree in the
forest and moves the coin in this tree to a point that is further
away from the root.
d1 ⊕ ··· ⊕ dk .
Exercise 2.73
Suppose there is only one coin that is showing head. Show that
the game is equivalent to NIM with one pile of stones. How many
stones are there in the pile of the NIM-game?
Hint: If there is only one coin that shows head then a legal move
is the same as ‘shifting the head to the left.’ So, it is equivalent to
NIM with one pile of stones. The number of stones on the pile in
NIM is the number of positions the head can move to the left; if it
is in position k then it can move k − 1 positions to the left. (If the
head is in position 1 player 1 loses the game; accordingly g(1) = 0.)
Proof. A difficulty arises only when two coins are turned that are
both head. In a ‘perfect’ simulation of the coin - turning game
the two piles would ‘disappear.’ The two piles in the NIM - game
become of equal size — that is — they have the same number of
stones and so the sum of their Grundy values equals 0.
This proves the claim.
Exercise 2.74
Suppose the coin - turning game is played on an n × m - grid. Call
(n, m) - corner of the grid the North - East. One each point of
the grid lies a coin which shows head or tail.
A legal move turns all coins of a subgrid subject to the condition
that the North - East - corner of the subgrid turns from head to
tail.
Show that the Grundy value can be expressed as
M
g(a), (2.44)
a∈A
where A is the set of vertices of the grid on which the coin shows
head. (What is g(a)?)
Exercise 2.75
Let (P, ) be a poset. Define the coin - turning game analogously
to the above. Show that there is an efficient way to decide if player 1
wins this game.
Hint: Introduce a turning set for each element in the poset. All
:::::::::
coins in a turning set T (a) turn when a player turns the coin in
a. In this game we assume that each element a is the unique
maximal element of its turning set T (a).
A legal move flips all coins of a turning set T (a) provided that the
coin in a shows head. Show that the Grundy value of the game can
be expressed as in (2.44).
118 Algorithms
Theorem 2.118 (The sum theorem). The Grundy value of the sum
of two games A + B is
A×B = { (a × B) + (A × b) + (a × b) | a ∈ A and b ∈ B }.
(n0 ◦ m) ⊕ (n ◦ m0 )⊕
(a1 ◦ b1 ) + (a2 ◦ b2 ) + · · · + (a2t+1 ◦ b2t+1 ).
(n0 ◦ m0 ).
(a0 ◦ b) + (a ◦ b0 ) + (a0 ◦ b0 ),
2.18.7 P3 - Games
Exercise 2.76
Let L be the collection of P3 -convex sets. Define the hull
operator σ : 2V → L by
S ← σ(S + x)
(At each point of the game prior to a move the set of labeled
vertices S is P3 -convex.)
Exercise 2.77
Prove the following theorem.
n 6= 2.
Exercise 2.79
n = 0 mod 6.
Exercise 2.80
Show that player 1 loses the game on a triangle. Show that the
Grundy value for Chomp on Kn equals n mod 3.
Exercise 2.81
Show that there is an efficient way to decide the winner of a game
of chomp on K+ n which consists of a clique with n vertices and one
extra vertex that is adjacent to exactly one vertex in the clique.
2. σ2 = σ.
{x | σ(x) = x }.
Lemma 2.122 (The flipping lemma). The Grundy value for chomp
on G equals the Grundy value on any kernel of a flip.
φ(G) = n2 + 2 · m2 , (2.46)
where n2 and m2 are the numbers of vertices and edges of the graph
modulo two.
Exercise 2.82
Exercise 2.83
Is there a polynomial time - algorithm to decide the winner of a
game of chomp played on a cograph?
Hint: Every cograph is either one vertex or the join or the union
of two smaller cographs. — Clearly — the Grundy value of the
graph is the nim - sum of the Grundy values of its components.
Problem Formulations
© The Author(s), under exclusive license to Springer Nature Singapore Pte Ltd. 2022 125
T. Kloks, M. Xiao, A Guide to Graph Algorithms, https://doi.org/10.1007/978-981-16-6350-5_3
126 Problem Formulations
∀A⊆V ∀B⊆V
( A 6= ∅ ∧ B 6= ∅ ∧ A ∩ B = ∅ ∧ V = A ∪ B ) ⇒
∃ a ∈ V ∃ b ∈ V ( a ∈ A ∧ b ∈ B ∧ { a, b } ∈ E ) . (3.1)
∀ and ∃.
A sentence consists of
1. Logical symbols:
2. and Parameters:
Exercise 3.1
Show that having a Hamiltonian Cycle is a problem that can
be expressed in MS2 . Can you also express it in MS1 ?
Hint: A Hamiltonian cycle is a of edges that form a cycle —
and — that covers all vertices.
Exercise 3.2
The language MS2 is more powerful than MS1 . Therefore, if
we let MSi stand for the class of graphs, for which all MSi -
– problems can be solved in universal – constant polynomial
time, then we have
MS2 ⊆ MS1 .
— Find other problems — that are expressible in MS2 but not
in MS1 .
Recent Trends
4.1 Triangulations
A triangulation of a graph is an embedding of it in a chordal
graph.
q q q q q
q AA AA A @ @q
@@q Aq Aq AAq
4.1.1 Chordal Graphs
Figure 4.1: A chordal graph
We could say that chordal graphs are { C n } – free graphs, Exercise 4.1
(for all n > 4 ), except that this notation looks a bit weird Prove that every connected
chordal graph, with at least
(since it is not finite). Trees are well – known examples of two vertices, has a simpli-
chordal graphs and in general — one could say — that chordal cial vertex, that is, a ver-
graphs have a ‘ tree - like ’ – structure. tex whose neighborhood is a
clique.
Hint: Consider a feasible par-
The way in which the structure of chordal graphs resembles tition, see Definition 2.69 on
that of trees is best conveyed via their minimal separators. page 76.
© The Author(s), under exclusive license to Springer Nature Singapore Pte Ltd. 2022 129
T. Kloks, M. Xiao, A Guide to Graph Algorithms, https://doi.org/10.1007/978-981-16-6350-5_4
130 Recent Trends
Equivalently — we have —
x1 ··· xn —
∀i x i is simplicial in G[ x i · · · x n ].
Exercise 4.2
Prove that every chordal graph that is not a clique has at
least two simplicial vertices.
132 Recent Trends
Exercise 4.4
Construct a clique – tree for the graph in Figure 4.1 on Page 129.
Which chordal graphs have a clique – tree that is a path?
Hint: Chordal graphs that have a clique – tree which is a path
are called interval graphs . Consider the intersection graph of
a set of intervals on the real line .
Exercise 4.5
{ Tx | x ∈ V( G ) }
such that
{ x , y } ∈ E( G ) ⇔ V( Tx ) ∩ V( Ty ) 6= ∅ .
Exercise 4.6
S = { Ci ∩ Cj | { Ci , Cj } ∈ E( T ) }. (4.1)
4.2 Treewidth
Definition 4.8. A chordal embedding or triangulation of a
graph G is a chordal graph — say H 8 — with 8
Hi!
V( H ) = V( G ) and E( G ) ⊆ E( H ) . (4.2)
tw(G) + 1 = b(G)
b(G) = ω(G).
Then Ti is a subtree of T .
Every pair Bi and Bj touch. This implies
V(Ti ) ∩ V(Tj ) 6= ∅.
Exercise 4.9
Show that any graph G satisfies
b(G) 6 tw(G) + 1.
Exercise 4.10
b(G) = tw(G) + 1.
Further reading
Exercise 4.11
Show that a graph G has a nice tree - decomposition — that is
— a tree - decomposition (T , {Xi }) which satisfies the following.
Partitions of a set
B∗k = Bk+1 .
2. an introduce node i has exactly one child j and the bags satisfy
Xj ⊂ Xi and Xi has exactly one vertex that is not in Xj
3. a forget node i has exactly one child j and the bags satisfy
Xi ⊂ Xj and Xj has exactly one vertex that is not in Xi
4. a join node i has two children p and q and the bags at these
nodes satisfy Xi = Xp = Xq .
- is equal to a part in P or
Exercise 4.13
Show that a table for the node i can be computed in O(B2k+2 · k)
time where k = tw(G).
Exercise 4.14
Let i be an introduce node with child j and let x ∈ Xi \ Xj .
Consider partitions of Xj with a 2-coloring on its parts. Let the
parts of one color union with x to make up one part in a partition
4.2 Treewidth 143
(2)
X
k
k
Bk = · Bj · Bk−j .
j
j=0
(2)
Show that Bk 6 Bk · Bk+1 .
Vp ∪ Vq = Vi and Vp ∩ Vq = Xi
Ep ∪ Eq = Ei and Ep ∩ Eq = Ei .
Conclusion
The cases described above add up to prove the theorem of Chimani,
Mutzel and Zey. We are not aware of any
(nontrivial) lowerbounds. —
Theorem 4.17. There is an algorithm that takes O(k · B2k+1 · n) Perhaps — there is room for
improvement.
time to solve the Steiner tree problem for graphs with treewidth k.
Exercise 4.15
How many pairs (α, β) of permutations in Sn are there that have A connected graph is a cac-
cycles Cα and Cβ such that the union of α \ Cα and β \ Cβ is tus if any two cycles share at
most one vertex. so every
a tree of cycles — that is — a cactus ? block is an edge or a cycle.
@
Consider a circle in the Euclidean plane. A chord of the circle @
is a line segment that connects two points of the circle.
Crossing Separators
Definition 4.20. One minimal separator S 1 crosses another
one S 2 if there exist two components of G − S 2 — each
containing a vertex of S 1 .
s i , s i+1 , · · · , s i+t−1
w( i , t ) = min max { w( i , j ), w( i + j − 1 , t − j + 1 ), F( i , j ) }
26j<t
(4.5)
where
1
F( i , j ) = · ( c( i , i + j − 1 ) + c( i + j − 1 , i + t − 1 )+
2
c( i , i + t − 1 ) ) . (4.6)
tw( G ) = w( 0 , ` ) − 1 .
Proof. There are O n 2 diagonals in P . A check whether
a diagonal of P and a chord of G cross each other can be
achieved in O(1) time. Thus — to compute the numbers c( i , j )
of chords that cross a diagonal ( si , sj ) takes O n 3 time.
Exercise 4.18
Describe all minimal triangulations of the circle graph in the figure
on Page 149. What is the treewidth of this graph?
18
Rankwidth is a
18 parametrization of the
I have not given you the definition of rankwidth yet but
class of distance - hereditary
— for the record — I put down the following research problem graphs.
here .
Exercise 4.20
Let C be a carving of a finite set V, |V| > 2. Show that there exists
a ternary tree T and a 1-1 map V(G) → leaves(T ) such that C ∈ C
if and only if there exists an edge e in T such that C is identified
with the set of leaves in one of the two components of T \ e.
max { |δ(X)| | X ∈ C }.
P
Let p : E → Z>0 . For A ⊆ E let p(A) = e∈A p(e). 24 The 24
Z>0 = N ∪ {0}. We
p-carving width of a graph with at least 2 vertices is the minimum could replace each edge of
G by p(e) parallel lines and
over all carvings C of V of the maximum p(δ(A)) for A ∈ C. compute the carving width
of this auxiliary ‘graph.’
We show below that the p-carving width of a connected planar However it is our aim to find
a ‘strongly polynomial’ al-
graph is at least k if and only if either gorithm for p-carving width
— the timebound of our al-
1. there exists a vertex v satisfying p(δ(v)) > k gorithm is a polynomial in
n + m (which gives a much
2. it has an ‘antipodality’ of p-range at least k. better bound than a polyno-
mial Pof the same degree in
n + p(e)).
In other words the minimal k ∈ N ∪ {0} such that there is a
carving C of V(G) satisfying
∀X∈C p(δ(X)) 6 k
Next, we will show that there is a very easy algorithm (using the min carvingwidth =
concept of ‘round set’) to find an antipodality of maximal p-range. max antipodality
4.3.1 Antipodalities
A walk in a graph is a sequence
v0 e1 v1 e2 v2 e3 ··· ek vk
v0 e1 ··· ek vk
where fi = e∗i .
(A1) for each edge e ∈ E(G) the subgraph α(e) does not contain an
endpoint of e
(A2) if an edge e and a region r are incident then α(r) ⊆ V(α(e)) and
every component of α(e) has a vertex in α(r)
{ Xi | i ∈ I }.
Assume
Exercise 4.21
Prove the following. Let Z be round and let Z ⊆ S. Assume that
there exists a vertex x ∈ S that has no neighbors in S ∩ Xj for some
j ∈ NN (i). Then Z ⊆ S \ {x}.
Hint: If x ∈ Z ∩ Xi then it must have a neighbor in Z ∩ Xj ⊆ S ∩ Xj
since Z is round.
Exercise 4.22
Define the bipartite graph H as follows. The two color classes of H
are I and V(M). A vertex x ∈ V(M) is adjacent to j ∈ I if x ∈ Xi
and i adjacent to j in N.
Design an algorithm that find a maximal round set in M. Your
algorithm should run in
d(x, j) = | NM (x) ∩ Xj | .
Exercise 4.23
Let G be a connected plane graph with a dual G∗ . Let p : E → Z>0 . 28
The p-distance is the
shortest p-length of a path
For two vertices x, y ∈ V(G∗ ) denote their p-distance in G∗ as
(that runs between two ver-
d∗ (x, y). 28 tices in the dual graph).
4.3 On the treewidth of planar graphs 155
Exercise 4.24
Design an algorithm to compute the following.
Input: A connected plane graph G with a dual G∗ . A function
p : E → Z>0 and integer k ∈ Z>0 .
Output: The graph φ(e) and a list of the components of φ(e) for
every edge e ∈ E(G).
Your algorithm should run in O(m2 ) time.
Hint: Frederickson shows that the all pairs shortest paths problem
can be solved on planar graphs in O(n2 ) time.
Xr = { (r, x) | x ∈ V }
Xe = { (e, C) | C ∈ Ce }.
156 Recent Trends
α(e) = ∪ { C ∈ Ce | (e, C) ∈ Z }
α(r) = { v ∈ V | (r, v) ∈ Z }.
Then α satisfies the first and third condition. It satisfies the second
condition of Definition 4.28 on Page 152 exactly when Z is round.
4.3 On the treewidth of planar graphs 157
The selected α(e) and α(r) are not empty exactly when Z 6= ∅.
30 — That is — the graph G has an antipodality of p-range > k 30
Notice that when one of
exactly when Z is round in M and Z 6= ∅. the α(e) and α(r) is empty
then they are all empty. This
follows from the second an-
This proves the theorem.
tipodality condition.
(b) κ is submodular
(B2) X, Y, Z ∈ B ⇒ X ∪ Y ∪ Z 6= V
(B3) |X| = 1 ⇒ X ∈ B.
2. there is a bias B.
/ B contradicts the
— So — assuming that all three X(v, ei ) ∈
assumption that B is a bias.
4.3 On the treewidth of planar graphs 159
This shows a small part of the proof. For the sake of brevity
we direct the reader to ‘Graph Minors X’ for the remainder of the
proof.
Proof. Let
κ(X) = p(δ(X)) − k + 1.
ins(C) ⊆ ins(C0 ).
160 Recent Trends
(S2) Let P1 , P2 and P3 be three paths of length < k that run between
two vertices u and v but that are otherwise vertex disjoint.
Then
r ⊆ ins(C).
Exercise 4.25
Show that the dual of a bond is the set of edges of a circuit in G∗ .
α(r) = { v ∈ V | v ∗ ⊆ Σ − N r∗ }
V(α(e)) = { v ∈ V | v∗ ⊆ Σ − Nx(e) }
E(α(e)) = {f ∈ E | f ∗
⊆ Σ − Nx(e) }.
Σ − Nr∗ ⊆ Σ − Nx(e) .
4.3 On the treewidth of planar graphs 163
Take a deep breath: it’s time to start the proof of the ‘if’ -
part of Theorem 4.33 on Page 157.
(i) X ∈ C ⇒ V \X∈C
(ii) if X ∈ C and |X| > 2 then X has a unique partition {Y, Z} with
Y, Z ∈ C. 40 40
So —
(a) Y, Z 6= ∅
Hint: Use Exercise 4.20 on Page 150. A routing tree is ternary.
(b) Y ∩ Z = ∅
The set X is the set of leaves of a branch and X has at least two
(c) Y ∪ Z = X.
leaves. (A branch of a tree is a component of the forest obtained
The fact that Y, Z ∈ C im-
by removing one edge of the tree.) plies (also) that Y, Z 6= ∅.
164 Recent Trends
Exercise 4.27 41
Abuse! We mean of
course that G[X] is con-
A carving C is a bond - carving if and only if X is connected for
nected when C is a bond
all X ∈ C. 41 carving and X ∈ C.
For disjoint sets X and Y denote the set of edges that have one
endpoint in X and the other in Y as δ(X, Y). Let C be a carving
of G. A triad is a partition {X, Y, Z} of V with X, Y, Z ∈ C. —
Clearly — each X ∈ C is in at most one triad. It is in a (unique)
triad when
|X| 6 n − 2.
C0 = (C \ { A1 ∪ A2 , B1 ∪ B2 } ) ∪ { A1 ∪ B1 , A2 ∪ B2 }.
Proof.
µ(C) − µ(C0 ) =
µ(A1 ∪ A2 , B1 , B2 ) + µ(A1 , A2 , B1 ∪ B2 )
::::::::::::::::
− µ(A1 ∪ B1 , A2 , B2 ) − µ(A1 , B1 , A2 ∪ B2 ).
( µ(A1 ∪ B1 , A2 , B2 ) − ( |B2 | − 1 ) ) +
( µ(A1 , B1 , A2 ∪ B2 ) − ( |B1 | − 1 ) ) > 0.
δ(B1 , B2 ) ⊆ δ(B1 , A2 ∪ B2 ) = ∅ ⇒
µ(A1 ∪ A2 , B1 , B2 ) = |A1 ∪ A2 | − 1.
166 Recent Trends
µ(A1 ∪B1 , A2 , B2 )+|A1 |−1 > |A1 ∪A2 |−1+|B1 ∪B2 |−1 ⇒
µ(A1 ∪ B1 , A2 , B2 ) > |A2 ∪ B1 ∪ B2 | − 1 >
max { |A2 | − 1, |B2 | − 1 }. (4.9)
i. δ(A1 , A2 ) = ∅
V(α(ei )) ∩ P = ∅.
Then V(α(ei−1 )) ∩ P 6= ∅. Let H be a component of α(ei−1 ) with
V(H) ∩ P 6= ∅. Then v ∈ / V(H) since α(ei−1 ) does not contain an
endpoint of ei−1 (since α is an antipodality).
Since δ(P) ⊆ δ(v) and v ∈
/ V(H) and H is connected
V(H) ⊆ P.
This implies
2. P1 ∩ P2 = {v}
3. δ(P1 \ v, P2 \ v) = ∅
4. P1 \ v 6= ∅ and P2 \ v 6= ∅.
Choose e incident with v such that P ∩ V(α(e)) 6= ∅. Then one of
P1 ∩ V(α(e)) and P2 ∩ V(α(e)) is 6= ∅. — That is — (P1 , v) or
(P2 , v) is a limb. This contradicts the choice of (P, v) as a limb with
P minimal.
This proves the lemma.
Exercise 4.29 48
An edge forms a 2-
connected subgraph. So
Show that P \ {v} 6= ∅ and that δ(P \ {v}, v) 6= ∅. B contains at least v
and a neighbor of v in P.
Let B be a maximal 2-connected subgraph of G that contains v and Since B is 2-connected and
δ(P)) ⊆ δ(v) B does not
a neighbor of v in P. 48 Since δ(P) ⊆ δ(v) contain any vertex outside P;
otherwise B would contain
V(B) ⊆ P. a cutvertex; namely v.
170 Recent Trends
N[v] ∩ P ⊆ V(B).
Exercise 4.30
For X ⊆ B show that there exists a unique set X̃ that satisfies
Exercise 4.31
/ X then X̃ ⊆ P \ {x}.
When v ∈
Exercise 4.32
Let a graph H be a subgraph of a graph G. Let p : E → N. Show
that the p-carving width of G is at least the p-carving width of H.
Hint: Let T be a routing tree for G. Remove leaves that are not in
V(H). Let T 0 be the result of this. How can we change T 0 into a
routing tree for H?
Define
C0 = {X ∈ C | v ∈
/X and ∃ e∈δ(X̃) V(α(e)) ∩ X̃ 6= ∅}.
Lemma 4.48. C0 6= ∅.
V(α(e)) ∩ X̃ 6= ∅.
E(C) = { f∗ | f ∈ D }
and e∗ , f∗ ∈ E(C).
The circuit C has p-length p(D) < k. By the antipodality condition
A3 : f ∈
/ E(α(e)).
This proves the lemma.
V(α(e)) ∩ X̃1 = ∅.
δ(X̃1 ) ∩ X̃ 6= ∅.
/ C0 we have
— So — we may choose e1 ∈ δ(X̃1 ). Since X1 ∈
V(α(e1 )) ∩ X̃1 = ∅.
V(H) ⊆ X̃1 .
V(H) ∩ α(ri ) 6= ∅
4.3 On the treewidth of planar graphs 173
The same argument shows that V(α(e)) ∩ X̃2 = ∅ for all e ∈ δ(X̃).
Since {X1 , X2 } is a partition of X V(α(e)) ∩ X̃ = ∅ for all e ∈ δ(X̃).
This contradicts the assumption that X ∈ C0 .
{ Tx | x ∈ V}
such that
Hint: Two vertices are adjacent only if they are in a maximal clique
— that is — only if their subtrees share a leaf.
Exercise 4.34
Let G be a graph without isolated vertices 52 and let C be a 52
If x is an isolated ver-
tex let Tx be a subtree that
collection of maximal cliques that cover the edges of G — that is
contains only one (arbitrary)
— every edge of G is contained in one of the cliques of C. The vertex.
4.4 Tree - degrees of graphs 175
Say that G has an edge clique - cover with k cliques. Show that
G is the edge intersection graph of a tree with maximal degree k.
Exercise 4.35
Let G be connected. Show that τ(G) = 1 if and only if G is a
clique with at least two vertices.
Exercise 4.36
Show that interval graphs are chordal.
176 Recent Trends
53
A collection of intervals on the real line satisfies The Helly property also
holds for subtrees of a tree:
the Helly property: if any pair of a collection of intervals
when C is a collection of sub-
intersects then they they all contain a common point on the real trees of a tree T of which
line. 53 Suppose we scan the line from left to right and for each every pair intersects in some
point of T . Then T contains
point we record all the intervals that contain that point. That will a point that in in all the sub-
give us a list of the cliques of G. trees of C. The same is
not true when we consider
edge - intersections: for ex-
ample, consider three paths
Exercise 4.37 in a claw each connecting
one pair of leaves.
Show that a graph G is an interval graph if and only if its maximal
cliques can be put in a linear order 54 54
Since G is chordal it
has at most n maximal
cliques. The linear order
C1 ··· Ct
of maximal cliques is called
a consecutive clique arrange-
such that for any vertex the cliques that contain it form an interval. ment.
Exercise 4.38
Let G be an interval graph and let C1 , · · · , Ct be a consecutive
clique arrangement. Show that the collection
{ Ci ∩ Ci+1 | 1 6 i < t }
Exercise 4.39
A graph satisfies τ 6 2 if and only if it is an interval graph.
A graph satisfies τ 6 3 if and only if it is a chordal graph.
4.5 Modular decomposition 177
A module is a spacelab.
Let’s start with a definition; then we know what we are
talking about.
Exercise 4.40
Every graph has a partition of its vertices with parts that are strong
modules.
Exercise 4.41
Exercise 4.42
Exercise 4.43
Show that a decomposition tree (as defined below) has the following
property. The leaves of a branch are a module in G.
The node is a prime node and labeled as G[U]. Its children are
the roots of a decomposition tree for the parts in P.
Can two adjacent nodes in a
modular decomposition tree
be of the same type?
Exercise 4.44
Let G be a cograph. What are the strong modules in G?
Hint: The cotree is a modular decomposition (without any prime
nodes). Every branch in a cotree is a module. Every induced
subgraph has a module with two vertices.
We describe three
::::
procedures to achieve this. As an invariant The invariant is a relaxation
we have an ordered partition of the vertices (each part is a set of of the desired result.
leaves in a tree) which satisfies the condition that all the strong
modules that do not contain x appear in ::::::::::
consecutive::::::
parts. Below we add a second in-
variant that describes the po-
sitions of the strong modules
that contain x.
Refinement
Exercise 4.45
After a refinement the strong modules that do not contain x appear
in consecutive parts.
Exercise 4.46
Upon termination of the refinement - procedure the strong modules
that contain x are exactly the nodes that do not have marked
children.
Algorithm 6: Part 1 of re-
fine: decide on left-split,
input an ordered list of trees: right-split, and marker
Exercise 4.47
Let M be a strong module that contains x and a vertex at distance
> 2 from x. Then M = V. This shows that the second invariant
is true for the initial set of trees
Promotion
Algorithm 8: Promotion
while there is a root r and child c both marked left do
Move the branch with root c to the left of r
end while;
while there is a root r and child c both marked right do
Move the branch with root c to the right of r
end while;
If a marked root has only one child then replace it with that child;
Delete all marked roots that have no children;
Remove all marks
Exercise 4.48
Upon termination of the promotion - procedure the ordered list of
trees is a factorizing permutation.
4.5 Modular decomposition 185
Assembly
where {Ci } are the cocomponents of G[N0 ] and {Ci0 } are the
components of G[Ni ] for i > 0. The strong components that
contain x form a nested family of intervals.
Conclusion
Exercise 4.49
Further reading
4.5.3 Exercise
Exercise 4.50
Design an algorithm to check if a graph is a probe permutation
graph. You may assume that a partition of the vertices into probes
and nonprobes is a part of the input.
58
The rows of a cutmatrix
form elements of a vector
4.6 Rankwidth space over GF[2]; the Ga-
lois field with two elements
0 and 1. (BTW Évariste
Galois was a French math-
Let G be a graph and let C be a carving of G. The cut matrix ematician.) The rank of
of a set X ∈ C is the submatrix of the adjacency matrix with X as a cutmatrix is the maximal
number of rows of which
rows and V \ X as columns. Let rank(X) be the rank over GF[2] no nonempty subset adds up
of the cutmatrix associated with X. 58 59 to 0. (Addition of vectors
is element-wise and obeys
0 + 0 = 0, 1 + 0 = 1, and
1 + 1 = 0).
Definition 4.64. A graph has rankwidth 6 k if it has a carving
59
The routing tree is re-
C such that for every X ∈ C rank(X) 6 k.
stricted so that internal
nodes have degree 3. This
is of importance; a star
would allow a decomposition
of rankwidth 1 of any graph.
188 Recent Trends
Exercise 4.51
Let C be a carving of a graph G of rankwidth 6 k. Show that every
X ∈ C has a partition into at most 2k classes such that the vertices
of each class all have the same neighbors in V \ X.
Show that the class of graphs that are distance - hereditary is closed
under the following operations.
Exercise 4.54
Let T be a routing tree for a graph G of rankwidth k > 1. Let the
graph G0 be obtained from G by adding one new vertex that gets
the same (open or closed) neighborhood as a vertex of G. (That is;
G0 is obtained from G ‘by creating a twin.’) Construct a routing
tree for G0 (of width k).
Exercise 4.55
When G is distance - hereditary then every neighborhood induces
a cograph. 65 65
Recall Chapter 2.11: a
graph is a cograph if it does
not contain a path with 4 ver-
tices as an induced subgraph.
190 Recent Trends
4.6.3 χ - Boundedness
Exercise 4.56
Let k ∈ N. Design a monadic second-order formula that checks if a
graph G can be (properly) colored with at most k colors — that
is — the formula expresses χ(G) 6 k.
Hint: A graph is k-colorable if there exists a partition of V(G)
into at most k classes that are all independent sets in G.
χ 6 f(ω) (4.12)
for some function f : N → N such that (4.12) holds true for all graphs
of rankwidth 6 k.
Many classes of graphs are
χ - bounded; for example
Definition 4.71. A class of graphs G is χ-bounded if there exists
intersection graphs of axis -
a function f : N → N such that parallel boxes in d - space;
graphs without odd holes;
χ(G) 6 f(ω(G)) graphs without long holes;
graphs that do no contain a
subdivision of a tree. Circle
for all G ∈ G. graphs are polynomially χ -
bounded.
Z. Dvořák and D. Král’,
Classes of graphs with small
In this section we show that for k ∈ N the class of graphs of rank decompositions are χ-
bounded , Manuscript on
rankwidth 6 k is χ-bounded. arXiv: 1107.2161, 2011.
Exercise 4.57
Show that the class of distance hereditary - graphs is χ-bounded.
Hint: Design an algorithm that colors a distance hereditary - graph
with ω colors.
4.6 Rankwidth 193
Proof. We may assume that the graph G has no false twins; ie the
graph has no two vertices x and y with N(x) = N(y). 72 72
Otherwise we can remove
an element x of a twin
Let T be a routing tree. To facilitate the description of the {x, y}; compute the parti-
tion for the graph G − x;
partitioning - procedure we give T a root r which is a leaf and
and put x in the same class
not a vertex of G. 73 as y. In a similar manner
we could reduce the graph so
The tree T is ternary so we can label the lines of T with labels that it contains no pendant
from {1, 2, 3} such that each internal point of T is incident with vertices either.
73
That is, we let T be a
an edge of each label. 74 routing tree for a graph G +
r in which r ∈ / V(G) is
For v ∈ V(T ) let Vv denote the set of vertices of G that are leaves added as an isolated vertex
of the subtree Tv rooted at v. Since T has rankwidth k we can fix (a ‘root’) to the graph G.
74
a partition That is so because a tree
0 is bipartite and so its line-
Vv = Vv , Vv1 , · · · , Vvd graphs is perfect.
such that
(b) all vertices of Vvj for j > 0 have the same neighbors outside Vv
(c) d < 2k .
0 < β < 2k .
Let e = {x, y} ∈ E(T ) and let x be the parent of y. Let ρ(e) : [k] → [k]
be a function which assigns ρ(e) (i) = j if
D0 ⊆ D1 ··· ⊆ Dp
such that
1. D0 = C
proof.
• the class T0 has only one element which is a tree with one
node. The class T3|F| is the class of all edge - labeled trees with
labels from F
We claim that
This claim implies the lemma: let Ti be the set of trees with
edge - labels in F that have complexity i.
Exercise 4.59
Let A, B ⊆ F and assume that A ∩ B 6= ∅. If A and B are forward
Ramsey then so is A ∪ B. Recall the definition 4.77 of
forward Ramsey - subsets of
F.
Assume that the level of (T , ρ) is 1 — that is — T has a split of
height one: t(x) = 1 for all x ∈ V(T ). Let’s start with the base
case.
4.6 Rankwidth 201
Exercise 4.60
Let y ∈ V(T ) be a child of the root and let Ay ⊆ F be those
elements of F that are assigned by ρ to edges of the subtree rooted
at y. The set Ay is forward Ramsey.
Hint: Let z be a child of y. The elements of wz are forward Ramsey.
All words wz contain the element ρ(r, y). The previous exercise
shows that Ay ∪ {ρ(r, y)} is forward Ramsey. This implies that Ay
is forward Ramsey.
Exercise 4.61
For every child y of the root the complexity of the tree rooted at
y is at most one.
Hint: Take a factorization into single nodes. All factors have
complexity zero and the quotient tree is just the tree Ty . By the
previous exercise it is Kruskalian. This shows that the complexity
of (T , ρ) is at most two because we can take a factorization with
the root as one factor and each subtree rooted at a child y of r as
a factor. Then the quotient is shallow.
This proves (†) for the base case; when the level of T is one. That base case was easy
enough; let’s get on with the
Induction step: Assume that the level of (T , ρ) is ` > 1 and let t induction step; I bet it goes
be a split of T of height `. Define X ⊆ V(T ) as follows ‘in the same way.’ (After
all; we only have a short list
of ingredients to cook the
X = { x ∈ V(T ) | t(x) = ` }. proof.)
D0 ⊆ D1 ··· ⊆ Dp
such that
1. D0 = C
be the class of graphs that have at most two vertices then C∗ is the
class of cographs.
For each part Gi partition the levels of T in odd and even. This
defines two spanning subgraphs of Gi — say Gi0 and Gi1 where Gi0
has the edges of Gi defined by the nodes in even levels of T and Gi1
has the edges of Gi defined by nodes in odd levels of T .
Since the labeling is a constant function Gi0 and Gi1 are both in C∗ .
4.6.8 Exercise
Exercise 4.62
Show that the class of AT - free graphs is linearly χ - bounded. Permutation graphs and in-
terval graphs are AT - free.
Hint: Every connected AT - free graph has a dominating pair — These classes are perfect; so
χ = ω. These classes are
that is a pair {a, b} of vertices with the property that every path complements of comparabil-
that runs between a and b is a dominating set in the graph. ity graphs. That is ; they are
intersection graphs of contin-
uous functions f : [0, 1] → R.
(This implies that cocompa-
rability graphs are AT - free.)
Remark 4.85. Graphs of bounded :::::
linear rankwidth are linearly χ AT - free graphs are not per-
- bounded. fect as C5 is AT - free.
In 2018 Jan van den Heuvel and David Wood proved the
theorem below. In this chapter we take a look at the proof.
{vi , vj } ∈ E ⇒ |i − j| 6 k.
206 Recent Trends
Exercise 4.63
Let k ∈ N and let G be a connected graph that has a BFS - tree
with at most k leaves. Show that the bandwidth of G is at most k.
Hint: Notice that each layer has at most k vertices. Take a linear
order
V0 V1 ··· V` .
Exercise 4.64
Let G be a connected graph and let T be a BFS - tree of G. Let S
be a BFS - subtree of T with k leaves. Every vertex of G has at
most 2k neighbors in V(S).
To compute H as mentioned
in Lemma 4.92 construct a
Lemma 4.92. Let G be a connected graph, let A ⊆ V(G) and let BFS - tree rooted at a ver-
tex of A. Extract a min-
|A| = k > 2. There exists an induced subgraph H which satisfies imal subtree that spans all
all the items mentioned in Lemma 4.91 and which — furthermore vertices of A. Repeatedly
— has the property that every vertex in G has at most 2k − 2 remove vertices that are not
in A and that are not
neighbors in V(H). cutvertices.
(d) Hi can be colored with colors red and blue such that
In 2018 Chung - Hung Liu and Sang-il Oum found that the
cluster chromatic number of Kt - minor graph graphs is at most
3(t − 1). 83 83
The cluster numbers of
these colorings are very
C.-H. Liu and S.-i. Oum, Partitioning H - minor free graphs into large.
three subgraphs with no large components, Journal of Combinatorial
Theory 128 (2018), pp. 114–133.
In their paper Van den Heuvel and Wood show that Kt - minor
free graphs can be colored with t−1 colors and defect t−2. Edwards
et al. show that the class of Kt - minor free graphs has defective
chromatic number :::::
equal to t − 1. A class of graphs has defec-
tive chromatic number k if
The paper of Edwards et al. shows — also — that the class of there exists d ∈ N such that
every graph in the class has
graphs without topological Kt minor is colorable with t − 1 colors a coloring with k colors and
and defect O(t4 ). defect d.
Exercise 4.66
Let T be a tree not necessarily finite with a root. Define the run -
out of a point x in T as the supremum of the lengths of paths in T
that have x as endpoint.
Prove Kőnig’s infinity lemma:
If every point of T has finite out - degree and some point P has
infinite run - out then there is an infinite path that starts in P.
This proof is not construc-
Notice that the condition that the out - degree is finite is essential. tive; only a proof by contra-
diction shows the existence
Hint: At any point P with infinite run - out there must be a of a successor. So it is
successor Q which has also infinite run - out. not a proof in the sense of
L.E.J. Brouwer.
w i = w i[ 1 ] w i[ 2 ] ... w i[ k ]
214 Recent Trends
Assume that the vertices of each tree have been labeled with elements
from some finite set — say [ k ] — for k ∈ N. 86 86
To spell: ‘labeling’ and ‘la-
belling’ are both OK.
Kruskal ’s theorem says that there exist i < j such that Ti can
be ‘ embedded ’ into Tj . This is defined as follows.
The theorem remains true when the trees are labeled with elements
of a well - quasi order. Nash – Williams gives an elegant proof of
Kruskal’s theorem.
216 Recent Trends
• T is a rooted tree
• f : V(T ) → Q
• a : E(T ) → [k].
3. for any edge e = {x, y} ∈ E(T ): a(e) 6 b(e0 ) for all e0 ∈ E(R) that
lie on the path from η(x) to η(y).
The theorem remains valid
when N is replaced with —
Theorem 4.101. Let (Q, 6) be a well - quasi order and let k ∈ N. say — N ∪ {i, 0, ∞}.
The collection T of labeled trees — as defined above — is well -
quasi -ordered by the relation .
I. Tzameret, Kruskal - Fried-
man gap embedding theorems
over well - quasi - orderings.
Remark 4.102. Above we assume that the edge - labels are from a Thesis, Tel Aviv University
2002.
totally ordered set [k]. Tzameret shows that this can be relaxed
— but — not ‘all the way.’
4.9 Threshold graphs and threshold - width 217
Label each vertex x with a (0, 1)-vector `(x) of length k with the
ith entry 1 if x ∈ Ni . Then G has a linear order of its vertices
such that each vertex x is — either
(ii) adjacent to exactly all vertices y that come after x for which
`(x) · `(y) = 0.
(Here `(x) · `(y) denotes the inner product of the two labels; it is not
zero when x and y occupy a similar independent set Ni .)
Identify a graph with a sequence of labels in an elimination order
as above. Notice that if a graph H has a sequence which is a
subsequence of the sequence of the graph G then H is isomorphic
to an induced subgraph of G. 90 90
Exercise !
F1 F2 ··· (4.14)
Remark 4.109. Theorem 4.108 can also be proved via the formula-
tion of an elimination order — that is — a graph has threshold
- width 6 k if and only if every induced subgraph has an isolated
vertex or a vertex x which is adjacent to all other vertices except
those that are in one of the k independent sets that contain x.
This property be formulated in monadic second order logic.
4.9 Threshold graphs and threshold - width 221
94
L. Kou, L. Stockmeyer
Lemma 4.110. K - Width is NP-complete. and C. Wong, Covering
edges by cliques with regard
Proof. The problem is equivalent to finding a cover of the edges of to keyword conflicts and in-
Ḡ with a minimal number of cliques. Kou, Stockmeyer, and Wong tersection graphs. Commu-
nications of the ACM 21
proved that this is NP-complete. 94 (1978), pp. 135–139.
(b) add one more vertex ω and make it adjacent to all vertices of
G.
Exercise 4.70
Show that a graph is a threshold graph if and only if for any pair
of its vertices x and y
x1 ··· xn
such that
Exercise 4.71
Let G be a graph and let {N1 , · · · , Nk } be a ‘witness’ — ie — a
collection of k independent sets in G. Design an algorithm to check
if G can be embedded into a threshold graph H such that every
edge of H which is not an edge of G has both endpoints in some Ni .
Hint: Define a k-universal vertex as a vertex for which the sets
Ni that contain it cover all its nonneighbors.
4.9 Threshold graphs and threshold - width 223
Exercise 4.72
Let G be a graph of threshold - width 6 k. Let N1 , · · · , Nk be k
independent sets in G that witness this. The witness {N1 , · · · , Nk }
is well-linked if every Ni is a maximal independent set in G.
Prove that every graph of threshold - width 6 k has a well-linked
witness.
Exercise 4.73
Assume G has a well-linked witness {N1 , · · · , Nk } and a threshold
embedding H. Label each vertex as in the proof of Theorem 4.105
with a vector `(x) of length k. Assume two vertices x and y satisfy
NH (x) ⊆ NH [y]. Then
1. |M| > 3 and every pair of vertices in M is a false twin (in the
graph)
τ(G) 6 k ⇔ τ(G − x) 6 k.
|M \ x| > 2.
224 Recent Trends
2k+1 + k.
NH (xi+1 ) ⊆ NH [xi ].
4.9 Threshold graphs and threshold - width 225
Partition each Mi into sets of vertices that have the same label.
95 These ‘label-sets’ are modules in G. Since there is no k-probe 95
Two vertices have the
module each label-set has at most 2 vertices when it is independent same label if every Ni con-
tains both of them or nei-
and at most k + 2 when it is a clique. It follows that for each i ther of them.
Exercise 4.74
Let U be a set of labeled vertices. As usual; each label is a (0, 1)-
vector of length k and for each entry i the vertices — say Ni —
that have a 1 in that entry form an independent set.
The set U is a probe clique if the inner product of any two labels
of elements in U is zero — that is — if the nonedges of U are
exactly the pairs that share some Ni .
U0 = U ∪ N(x)
Assume there exists a vertex x that can be labeled such that N(x)
extends the universal set in such a way that it does not increase the
number of label-sets. By Exercise 4.74 the algorithm can safely
extend the probe universal set with N(x). Next the algorithm
removes the vertex x and tries to find another greedy extension.
Exercise 4.75
Define a width - parameter for the class of distance-hereditary graphs
as follows. A graph G has DH-width 6 k if it has k independent
sets N1 , · · · , Nk and an embedding H which is distance-hereditary
such that every edge of H which is not an edge of G has both
endpoints in some Ni .
Exercise 4.76
Show that the black and white - coloring problem can be solved in
linear time on graphs of bounded treewidth.
228 Recent Trends
Exercise 4.77
Show that there is a polynomial-time algorithm to solve the black
and white - coloring problem on cographs.
Hint: Define a boolean variable φ(G, b, w) with value true if the
graph G has a black and white coloring with b black vertices and
w white vertices.
Let G1 and G2 are two cographs and let G be the join or union
of the two. Express φ(G, w, b) as a function of φ(G1 , w1 , b1 ) and
φ(G2 , w2 , b2 ).
This leads to an (n5 ) algorithm to check if a cograph has a black
and white coloring (for any values b and w). Improve your algorithm
to solve the black and white - coloring problem on cographs so that
it runs in O(n3 ).
V0 = V(G) \ Ω.
assume that.
Notice that H has an inverse black and white coloring with
k k+1
b = k and w = k + = (4.15)
2 2
To see that — color all vertices of V 0 black. They are in H adjacent
to all edges in S that have both ends in Ω and to all vertices of
C \ V 0.
For the converse assume that the splitgraph H has an inverse black
and white coloring with b and w as in Equation (4.15). Since S
is an independent set all colored vertices of S are the same color.
First assume that S contains no white vertices. Then C contains a
set W of white vertices and vertices in C \ W are black. However
w > 2k = n (since n > 6) — so — this is not possible. So the
inverse black and white - coloring has white vertices in S.
Let Sw be the set of white vertices in S and let V 0 ⊆ C be the set
of k black vertices. If an edge of G is in Sw then it is not incident
with a vertex of V 0 . All those edges are incident with vertices in
V(G) \ V 0 . Since |V \ V 0 | = k and |Sw | = k2 the only possibility
99
4.11 k – Cographs A graph is a cograph if it
has no induced P4 .
4.
{ x, y } ∈ E( G ) ⇔
the least common ancestor of f(x) and f(y) in T is labeled ⊗ .
(4.16)
V.
{ x , y } ∈ E( G ) ⇔
the lowest common ancestor of f(x) and f(y) is labeled σ ,
with σ such that
σ ( label( f( x ) ) , label( f( y ) )) = true . (4.17)
Exercise 4.78
Show that — for each k ∈ N — the class of k – cographs is
hereditary .
Hint: Let G be a k – cograph and let ( T , f ) be a decompo-
sition tree for G. For an induced subgraph H consider the
subtree of T that contains all vertices of H .
4.11 k – Cographs 231
Exercise 4.79
Show that a class of k – cographs is closed under creating twins.
A twin is a pair of vertices — say x and y — such that 102 102
When the pair is adja-
cent, the twin is called a true
twin. When the pair is non-
N[x] = N[y] if x and y are adjacent
adjacent, it is called a false
N( x ) = N( y ) otherwise. twin.
G1 , G2 , ··· .
T 1, T 2, ···
O | Sk | · n t+2 = O n t+2
,
where t = max { | V( S ) | | S ∈ Sk } . (4.18)
Exercise 4.80
Prove that any graph is a k - cograph , for some k ∈ N . Define
the
Exercise 4.81
Prove the following lemma.
Exercise 4.82
Prove the following lemma.
Exercise 4.83
Design a linear – time algorithm that computes the treewidth of
cographs. You may assume that a cotree is part of the input .
4.12 Minors
3. edge contractions
Exercise 4.84
Prove that a graph H is a minor of a graph G if and only if
V(G) can be partitioned into sets
V 1, V 2, ··· , V h where V( H ) = [ h ]
— such that —
1. each G[ V i ] is connected
4.12 Minors 235
2.
{ i , j } ∈ E( H ) ⇒ ∃ vi ∈V i ∃ vj ∈V j { v i , v j } ∈ E( G ) .
G ∈ G and H minor G ⇒ H ∈ G.
G ∈ G ⇔ ∀O ∈ O ¬ (O minor G).
/ G
O ∈ and ∀ O0 (O0 minor O and O 0 6= O ) ⇒ O0 ∈ G.
which is a contradiction.
Exercise 4.85
Show that the following classes of graphs are closed under taking
minors;
{ K 5 , K3, 3 }
2. S = ∪x Sx
{ Sm | m ∈ M } is a partition of S.
Exercise 4.86
Show that a graph is a general partition graph if and only if it
has a set C of cliques such that
Exercise 4.87
Show that every cograph is a general partition graph.
Exercise 4.88
Let G be a graph. Let the graph H be obtained from G by adding
one vertex to every edge in G and making that adjacent to the two
endpoints of the edge. Then H has only one clique - cover with
|E(G)| maximal cliques. Furthermore every maximal independent 110
It can be shown that an
AT-free graph satisfies the
set hits every clique in this cover. So H is a general partition graph.
triangle condition if and only
if it is a general partition
At some point in history it was discovered that general graph. This can be checked
on AT-free graphs in polyno-
partition graphs satisfy the triangle condition : 110 mial time. It is conjectured
that the triangle condition is
co-NP-complete.
238 Recent Trends
Exercise 4.89
Design an algorithm to check if a planar graph satisfies the triangle
condition. 111 111
T. Kloks, C. Lee, J. Liu
and H. Müller, On the recog-
nition of general partition
graphs. Proceedings WG
Exercise 4.90
2003, Springer-Verlag, Lec-
ture Notes in Computer Sci-
Not all graphs that satisfy the triangle condition are general
ence 2880 (2003), pp. 273–
partition graphs. For example the figure on Page 149 shows a 283.
circle graph that satisfies the triangle condition but is not a general
partition graph.
Show that every general partition graph satisfies the triangle condi-
tion.
Let C be the set of tolerable cliques ( ie those that are not intolera-
ble). We have that G is a general partition graph if and only if C
covers all edges of G.
Proof. By the graph minor theorem the class G has a finite obstruc-
tion set F. This set is not empty since G does not contain all graphs.
Let
k = min { |V(F)| | F ∈ F }.
Exercise 4.91
4.14 Tournaments
A player wishes to find a winning probability distribution — that Figure 4.13: The paper, scis-
sors and stone game
is — he wishes to find a probability distribution which satisfies
where I(x) and O(x) are the sets of vertices that beat x (so the
arrows point from I(x) towards x) and are beaten by x (the arrows
point away from x towards O(x)). 115 115
A winning distribution
has the property that for ev-
Fisher and Ryan show that every tournament has a winning ery x ∈ V(T ) it is at least
as likely to beat x as it is to
probability distribution. In this section we show their proof.
lose to x.
| { (vi , vj ) ∈ E | i < j } |.
Exercise 4.92
Let v1 · · · vn be a median order of the vertices of a digraph.
1
| f(A) ∩ I | < · | I | + 1.
2
Exercise 4.93
Let A be a branching on n vertices and let T be a tournament
with 2(n − 1) vertices. Then A has an M - embedding in T for
every median order M of T .
Hint: Use Lemma 4.141.
244 Recent Trends
Then f is an M - embedding of A in T .
This proves the lemma.
Proof. For any root that we choose in A we may assume that the
number of forward arcs is at least the number of backward arcs —
otherwise — we consider the problem of embedding the ‘inverse’ of
A. 117 117
The inverse is obtained by
replacing every arc (x, y) by
We may assume that A is not a branching. Choose a root r in its inverse (y, x).
A which minimizes d. We may assume that r is a source. — To
see that — assume there is a vertex v incident with an arc (v, r).
If we choose v as the root then d decreases or else (if {v, r} is one
backward component) the tree is well rooted with v as a root and
the same value d.
Since A is well - rooted we can apply Lemma 4.144: A is 2(n + d)
- embeddable. We have
n−1 n−3
b 6 and c > 1 ⇒ d 6 .
2 2
Further reading
4. when e and f are edges of H and e 6= f then η(e) and η(f) are
edge - disjoint.
Exercise 4.94
Let H and G be graphs.
::::::
Show that H immerses
::::::::
in G if and only
0
if H is an induced subgraph of a graph G obtained from G via a
sequence of edge lifts.
An edge - lift takes two edges that share an endpoint — say {x, a}
and {x, b} — and replaces it with one edge {a, b}.
The same is not true for digraphs. To see that consider the set of
even length cycles and orient the edges so that there is no directed
path with more than two vertices. No element of this set immerses
in another one.
v1 ··· vn
Remark 4.148. The two statements are also equivalent with this: t
there exists k ∈ N such that every vertex of a tournaments in S is @
I
@
in at most k edge - disjoint directed cycles. t
@t
Exercise 4.95
Let H be a cyclic triangle. The tournaments in which H does not Figure 4.14: A transitive
tournament
immerse are the transitive tournaments. Transitive tournaments
have cutwidth 0. An orientation of a graph
is transitive if xy and yz
imply xz. A comparability
graph is a graph that allows
We first show that it is sufficient to prove that tournaments a transitive orientation of its
of cutwidth at most k are well - quasi ordered. edges.
S = T \ {T1 }.
Linked layouts
µ = x1 ··· xn
The layout µ is linked if for all h < j such that |Fh | = Fj | = t and
for all h 6 i 6 j |Fi | > t there are t edge - disjoint directed paths
from Bh to Aj .
ns = | { i | |Fi | = s } |.
|N+ (Br )| + |N+ (P)| > |N+ (Br ∩ P)| + |N+ (Br ∪ P)| that is
|Fr | + |F| > |F0i | + |N (Br ∪ P)|
+
> |F0i |
+ |F|
and this implies
|F0i | 6 |Fr |.
It follows that |F0i | 6 k for i < p and similarly |F0i | 6 k for i > p.
Since F0p = F and |F| 6 k this proves that µ0 has cutwidth k.
We claim that n0s > ns for s < t. Let 0 6 s 6 t − 1 and let r be
such that |Fr | = s. We actually have that F0r = Fr . To see that
observe that we must have r < h or r > j. Assume r < h. Then
Br ⊆ P and so B0r = Br and F0r = Fr .
This shows that n0s = ns for all s < t and
Gap sequences
Let (Q, ) be a quasi - order and let k ∈ N. A (Q, k) - gap
sequence is a triple (P, f, a) where
• P is a path
• f is a map V(P) → Q
such that
4.14 Tournaments 251
• for all i: if e = pi pi+1 then a(e) 6 b(e0 ) for all e0 ∈ E(R) that
are on the path from rs(i) to rs(i+1) .
Marches
A march µ is a sequence
e1 ··· ek
• |µ1 | = |µ2 |
• |ν1 | = |ν2 |
Codewords
A codeword of type k is a pair (P, f) where
• P is a path say P = p1 · · · pn
– |νi | = |µi+1 |
– |µ1 | = |νn | = 0.
The cutsize function a : E(P) → {0, · · · , k} maps each edge (pi , pi+1 )
to |νi | = |µi+1 |.
x1 ··· xn
The following lemma makes sure that we can find marches with
support Fi such that the sth elements of them are edges of Ps .
Exercise 4.96
Prove Lemma 4.152.
Hint: Fix t. Let i(1) < · · · < i(`) be the indices i with |Fi | = t.
For j = 1, · · · , ` choose the march µi(j) (ie choose a linear order of
the elements of Fi(j) ) such that the sth element extends the path Ps .
Encoding
Let G be a tournament and let g1 · · · gn be a layout of G with
cutwidth k. Map G to a codeword of type k as follows.
4.14 Tournaments 253
Let G denote the path with vertices g1 , · · · , gn . Define µ0 = µn = We use the same symbol G
∅ and let µi be a march as in Lemma 4.152. Let g be the map for the tournament and its
layout.
g(gi ) = (µi−1 , µi )
for i ∈ [n]. Then (G, g) is a codeword of type k.
(b) the first edge of Pi (e) is in Er(i) and it has tail gr(i) if and only
if e has tail hi
(c) the last edge of Pi (e) is in Er(i+1) and it has head gr(i+1) if and
only if e has head hi+1
(e) let e be the sth term of march νi . The first edge of Pi (e) is the
sth term of µr(i) and the last edge of Pi (e) is the sth term of
µr(i+1)−1 .
(g) all the paths in {η(e) | e = hh hj where h < j} are pairwise edge -
disjoint
(h) if e is the sth term of νh then the first edge of η(e) is the sth
term of µr(h)
(i) if e is the tth term of νj−1 then the last edge of η(e) is the tth
term of µr(j)−1 .
Exercise 4.97
Every acyclic digraph has a unique independent dominating set.
the :::::::::
transitive ::::::
closure of the set of arcs of each color. — Clearly — A digraph is an orientation
of a graph. So it has no loops,
this may introduce multiple arcs between pairs of vertices.
no multiple arcs and no di-
rected cycles of length two.
256 Recent Trends
Ti = {x | w(N−
i [x]) > 1/2k }.
j k
ln(ε)
Define the function g(ε) = ln(1−ε) + 1.
Since wB (N− [x]) > ε for all x ∈ C we have that N− [x] intersects
N+ [S] for all x ∈ C. By transitivity this implies that S dominates
C.
4.15 Immersions
Exercise 4.99
Show that K5 is a minor of the Peterson graph but that it is not
a topological minor.
Remark 4.163. Grohe, Marx, Wollan, and Kawarabashi show that
finding a topological minor is fixed parameter - tractable: there
exists a cubic algorithm to test if a graph H of ‘constant size’ is a
topological minor of a graph G.
Exercise 4.100
Let D be a digraph in which every thread is a directed path.
Then D is obtained from a directed path or cycle (possibly of length
two) by multiplying edges.
262 Recent Trends
Exercise 4.101
Let (Di ) be a sequence of digraphs without 1-alternating thread.
Let (Q, 6) be a well quasi - order and let φi : V(Di ) → Q. There
exist j < j0 such that there is a strong immersion η of Dj in Dj0
which satisfies
Step number two is a proof of the fact that ::: one::- ::::
way :::::
series
-::::::::
parallel ::::::
triples are well quasi - ordered by strong immersions.
A biconnected multigraph is
a two - terminal graph if and
Definition 4.167. A triple (D, s, t) is a two - terminal graph if only if it is confluent. That
D is a multigraph and s, t ∈ V(D) and either is, for any two edges ev-
ery cycle that contain them,
meets the endpoints in the
• V(D) = {s, t} and E(D) = {{s, t}}
same relative order. A multi-
graph is confluent if and only
• D is a series composition: there exist two - terminal graphs if it contains no subgraph
(D1 , s1 , t1 ) and (D2 , s2 , t2 ) and s = s1 and t = t2 and D is which is a subdivision of K4
— so — its underlying sim-
obtained from the union of D1 and D2 by identifying t1 and s2
ple graph has treewidth two.
Exercise 4.102
Any 2-tree has an orientation which is acyclic.
block is incident with at most two cutvertices, and there are two
blocks that are incident with exactly one cutvertex.
Series compositions are not easy to deal with since immersions may
‘stretch out’ the domain. To handle this we introduce series -
parallel trees. Figure 4.17 suggests an en-
coding of one way series par-
allel triple as a ‘word’ over
Rooted digraphs (D, r) are digraphs with a root. We let strong an alphabet which is the set
immersions of rooted digraphs preserve the root. of blocks and to use Hig-
man’s lemma - with - a - gap.
Definition 4.173. A set of rooted digraphs is well - behaved if for The alphabet (set of blocks)
is well quasi - ordered by
any well quasi - order (Q, 6) and any sequence in the set of rooted
homeomorphic embedding.
digraphs (Di , ri ) with a labeling φi : V(Di ) → Q there exist j < j0
such that there is a strong immersion η of (Dj , rj ) in (Dj0 , rj0 )
which satisfies η(rj ) = rj0 and
of edges with one end in X and the other end in Y is equal to the
maximal number of edge - disjoint threads between x and y. A {X, Y} is a minimum cut.
truncation is the series parallel triple obtained by ::::::::
shrinking one of
the two parts X or Y to one vertex.
Let F be a set of one way series parallel - triples and assume that The series extensions of F is
the set F ∗ of which the ele-
F is well - simulated. Let Fs denote the set of all series extensions
ments in a word are chained
of elements of F. The following exercise initiates a proof to show by identifying ti and si+1 .
that Fs is well - simulated.
Exercise 4.103
Let F be a set of one way series parallel triples which is well -
simulated;
268 Recent Trends
• Fs is the set of one way series parallel triples that are series
extensions of elements of F
4.15.5 A well quasi - order for one way series parallel - triples
In this section let F be a set of one way series parallel triples. For
k ∈ N let Fk ⊆ F be the set of one way series parallel triples that
do not contain a k-alternating path.
Exercise 4.104
Let (D, s, t) be a one way series parallel triple. Design an algorithm
to calculate the maximal number k ∈ N for which (D, s, t) has a
k-alternating path.
Proof. Cover the set F with the following collections of one way
series parallel triples.
2. A0,0 = A0
5. Ak+1 ⊆ F is the set of one way series parallel triples that have
no (k + 1) - alternating path that starts in s or t
(e) let k > 0 and ` > 0. All truncations of elements of Ak,` are
elements of Ak,` .
(f) for k, ` > 0 if Ak,0 is well - simulated then Ak,` is well - simulated.
Exercise 4.105
Let G be a graph of treewidth
::::::::
w. Let S be a collection of subsets
of V and assume that G[S] is connected for each S ∈ S. Let k ∈ N.
One of the two following statements holds true.
Hint: We may as well assume that G is a w - tree. First consider the The subtrees are vertices in
a chordal graph. When ev-
case w = 1 — that is — G is a tree. The Erdős - Pósa property
ery pair of subtrees intersects
says the following. Let A be a collection of subtrees of G. For every then they have a point in
k either A has k elements that are vertex - disjoint or G has a common.
• V(P) ∩ Z 6= ∅.
4.15 Immersions 271
Let f(t) = 4(w + 1). (This is a function of t; we show below that Hint: There are t + 2 steps
whose orientation from one
this works.) stringer to the other is the
same.
Let P be a t - alternating path in D. Let k ∈ N and let G be a
graph. Either the treewidth
• when t is odd then let m denote the pivot in the middle of G is at most k or G has
an f(k) × f(k) - grid as a
• when t is even then let m and m0 denote the two middle - pivots. minor, for some function f :
By symmetry we may assume that m is a sink and m0 is a N → N. This is the grid
minor - theorem.
source.
Then Q3,1 ⊆ A.
To see that first assume that Q3,1 contains {s, t}. Then we can
replace the part that passes through s and t by a thread in B. The
result should be a directed path from m3 to P1 \ {m1 }. However,
(B, A) is not a series parallel separation and so B contains a thread
between s and t that is not a directed path. This proves Q3,1 ⊆ A.
P1 ∪ P3 ⊆ A0 and P2 ⊆ B0
A1 ⊆ B2 and A2 ⊆ B1 .
A1 s2
P20
t1
4.15.7 Coda
Let’s get in the mood and start with an easy exercise. “In the mood” is a tune by
Glen Miller. In a future edi-
tion of this book we will let
you listen to it!
Exercise 4.106
Let D be a digraph whose underlying graph is biconnected. Let r,
x and y be three vertices of D and assume that every thread from
r to {x, y} is a directed path. Then for one of x and y there are
directed paths to and from r.
Hint: See the figure.
• r is not a cutvertex
Exercise 4.107
1. Ftb ⊆ Ft ⊆ F∗
P
2. ∅ ⊆ Ft,0 ⊆ · · · ⊆ Ft,t+1 = k>0 Ft,k .
Exercise 4.108
If Ft,t+1 behaves well then Ft ∪ Ft∗ behaves well.
Lemma 4.183. If Ftb behaves well then so does Ft,k for every
integer k > 0.
4.15 Immersions 277
Proof. We leave it as an exercise to check that Ft,0 behaves well. Hint: Ft,0 = ∅.
Label the vertices of D0i with elements of a well quasi - order (Q0 , 60 )
as follows.
1. if x ∈
/ Si then label x with φi (x)
Exercise 4.109
Let F be a collection of rooted digraphs and assume that F behaves
well. For s ∈ N let Fs be the collection of rooted digraphs (D, r)
for which there exists
A B
the monster
2. r0i
3. the two terminals s and t for every one way series parallel triple
(A, s, t) for which ... for which A has been re-
placed by a handle and for
- A ∪ B = Di which Zi ∩ (A \ B) 6= ∅.
- (A, B) ∈ Si
- V(A ∩ B) = {s, t}
- |V(A) \ V(B)| > 2
- Zi has a vertex in A \ B.
Notice that Zi0 hits every (t − 1) - alternating path in Di0 . Exercise! Hint: Assume
there is a (t−1) - alternating
Let Di∗ = D0i − Z0i and let ri∗ be an arbitrary vertex of D∗i . By the path P 0 in Di0 that misses Z0i .
Replace parts in handles by
previous observation (Di∗ , ri∗ ) ∈ Ft−1
∗
.
threads in Di and construct
an (t − 1) - alternating path
Let F∗ be the set of rooted digraphs (D, r) which satisfy
in Di that misses Zi .
2. (D − Z, r0 ) ∈ Ft−1
∗
for some r0 ∈ V(D) \ Z.
Then F∗ behaves well and (D0i , r0i ) ∈ F∗ . Exercise 4.109 shows that F ∗
behaves well.
Proof. By Lemma 4.184 Ftb behaves well and so Ft∗ behaves well
(by Exercise 4.108 and Lemma 4.183).
4.15.8 Exercise
Exercise 4.110
A graph is AT - free if it
Let (Pi )i∈N be a sequence of permutation graphs. Show that there has no ::::::::
asteroidal ::::
triple —
exist j < j0 such that Pj immerses strongly in Pj0 . that is — if it has no three
vertices of which every pair
Show that the class of AT - free graphs is well quasi - ordered by is connected by a path that
avoids the closed neighbor-
strong immersions.
hood of the third.
Exercise 4.111
Let G be a graph. Then
X
α(G) = 1 + max α(Ci )
x∈V
i
Exercise 4.112
Let G be AT-free. Let x ∈ V and let C be a component of
G − N[x].
X
α(C) = 1 + max α(I(x, y)) + α(Ci )
y∈C
i
Exercise 4.113
Let G be AT-free and let I(x, y) be an interval in G. When
I = ∅ then α(I) = 0. Otherwise
X
α(I) = 1 + max α( I(x, s) ) + α( I(y, s) ) + α(Ci )
s∈I
i
Exercise 4.114
Prove the following theorem.
Exercise 4.115
Show that the computation of the clique number ω is NP - complete
on AT - free graphs.
Hint: The independence number α is NP - complete for the class of
triangle - free graphs.
4.16 Asteroidal sets 285
4.16.3 Exercise
Exercise 4.116
Let k ∈ N. Show that there is a polynomial - time algorithm to
check if χ 6 k for AT - free graphs.
Exercise 4.117
Show that tK2 - free graphs satisfy κ 6 2 · t − 1.
Exercise 4.118
Show that circle graphs satisfy
κ 6 28 · ω.
286 Recent Trends
Exercise 4.119
Prove or disprove: there exists k ∈ N such that every circle
graph can be colored conflict free with k colors.
Remark 4.190. For any graph H the class of graphs that do not
contain H as a ::::::
vertex ::::::
minor has bounded rankwidth if and only
if H is a circle graph.
J. Geelen, O. Kwon, R. McCarty, and P. Wollan, The grid theorem
for vertex - minors. Manuscript on arXiv: 1909.08113, 2020.
1
bw(G) > · ( |N(x) ∪ N(y)| − 1 ) .
3
Proof. Let L be an optimal layout. Assume L(x) < L(y). Consider
the three sets S1 , S2 , and S3 :
S1 = { z ∈ N | L(z) 6 L(x) }
S2 = { z ∈ N | L(x) 6 L(z) 6 L(y) }
S3 = { z ∈ N | L(z) > L(y) }
Then
X
bw(G) > max |Si | − 1 and |Si | = |N| + 2.
i
i
The width of L is
di di+1
max L(bi+1 ) − L(bi ) = max + .
i i 2 2
By Lemma 4.193
1
bw(T ) > · max di + di+1 + 1.
3 i
3
This implies that the width of L is at most 2 · bw(T ).
This proves the lemma.
Exercise 4.121
Prove the following lemma.
Hint: Use the fact that a connected AT-free graph has a dominating
pair — that is — a pair of vertices such that any path that connects
them is a dominating path.
width(G, L) 6 width(T 4 , L)
6 4 · width(T , L)
3
6 4 · bw(T )
2
6 6 · bw(G).
Exercise 4.122
A graph is AT-free if and only if every minimal triangulation is an
interval graph.
290 Recent Trends
4.16.6 Antimatroids
1. ∅ ∈ C and V ∈ C
2. if A ∈ C and B ∈ C then A ∩ B ∈ C
2. a root of a 6 - chain
3. a midpoint of P5
while α 6= V do
α ← αx
end while
Exercise 4.123
Let G be a chordal graph. The collection of simplicial elimination
orders of G is an antimatroid. Please describe a concise betweenness
relation that defines this antimatroid.
between any two of its ends. (Three leaves in a net are an asteroidal N[y] ⊆ N[x].
triple.)
Exercise 4.124
The simple elimination orders of an :::::::
interval::::::
graph are the words of
an antimatroid. Describe a betweenness relation that defines this
antimatroid.
Exercise 4.125
A paired dominating set in a graph is a dominating set that has a
perfect matching.
Further reading
Exercise 4.126
Define a betweenness which generates an antimatroid on triangle
graphs. Design a greedy algorithm to compute γ on triangle graphs
(γ is the domination number). Let T be a rooted binary,
tree. The leaves are labeled
as 0 or 1. Internal nodes (in-
cluding the root) are labeled
with variables xi . Given
4.17 Sensitivity input x ∈ {0, 1}n the tree
is evaluated as follows. If
the root is a leaf then out-
put its label 0 or 1. Other-
In 2019 Hao Huang proved the sensitivity conjecture! wise query the value of the
root variable xi . If it is 0
then evaluate the left sub-
tree — otherwise — eval-
In this chapter we take a look at the proof. uate the right subtree. The
tree T ‘computes’ a Boolean
function f : {0, 1}n → {0, 1}
A decision tree is an algorithm that evaluates a Boolean func-
if the algorithm described
tion f : {0, 1}n → {0, 1} by a sequence of queries. A query reads above gives output f(x) for
one bit xi of an input x ∈ {0, 1}n . The choice of a query depends all x ∈ {0, 1}n . The depth
of f is the smallest depth of
on the outcome of previous queries. a tree that evaluates f.
4.17 Sensitivity 297
For x ∈ {0, 1}n and S ⊆ [n] let xS be the word obtained from x by
flipping all bits in S.
Noam Nisan showed (in 1989) the following sandwich Exercise: Show that bs(f) >
s(f).
4.17.3 Hypercubes
Exercise 4.127
Define a sequence (An ) of {0, −1, +1} - matrices as follows. If we flip all −1’s in An to
+1 we get the adjacency ma-
! !
trix of the hypercube Qn .
0 1 An−1 I
A1 = and An = .
1 0 I −An−1
√ √
Show that the eigenvalues of An are n and − n both of
multiplicity 2n−1 .
Remark: An n × n con-
Hint: An satisfies A2n = n · I. ference matrix C has ze-
ros on the diagonal and +1
or -1 everywhere else and
::::::::::::
satisfies CT C = (n − 1)I.
Exercise 4.128 Van Lint and Seidel show
that a symmetric conference
Let G be a graph. Let A be a :::::::::
symmetric matrix whose rows and matrix can only exist if n =
columns are indexed by V(G) and which has entries in {0, −1, +1} 2 mod 4 and n − 1 is a sum
of two squares.
such that
A(x, y) 6= 0 ⇒ {x, y} ∈ E(G) 132
λ1 (A) is the largest
132 eigenvalue of A and ∆(G)
Then ∆(G) > λ1 (A).
is the largest degree of a ver-
tex in G.
Remark: A matrix H is
Proof. Let An be the {0, −1, +1} - matrix as defined in Exer- Hadamard if all
:
its entries
cise 4.127. Change all the −1 - entries in An to +1. Then the are +1 or -1 and HHT =
n · I. When H is hadamard
matrix becomes the adjacency matrix of the hypercube Qn . — So then so is H H
H −H .
— we may assume that there is a 1-1 correspondence between rows
and columns of An and Qn .
300 Recent Trends
Exercise 4.129
Prove Lemma 4.212 below.
Hint: This lemma is ‘the principle of inclusion - exclusion.’
Then X
f(x) = g(y) · (−1)n(x)−n(y) , (4.23)
y6x
When f : {−1, +1}n → {−1, +1} is a Boolean map then all of the
2n coefficients satisfy −1 6 αx 6 +1. Gotsman and Linial call the
coefficient αx the Fourier
transform of f at x.
Definition 4.213. The degree of a Boolean map f : {−1, +1}n →
{−1, +1} is
δ(f) = max{ |x| | αx 6= 0 }.
2. any Boolean function f : 2[n] → {−1, +1} satisfies s(f) > h(δ(f)).
Exercise 4.130
Show that
dG (x) = n − s(g(x)).
1
P
Let E(g) = 2n · x∈2[n] g(x).
Exercise 4.131
Show that the statements in the lemma are equivalent with the
following pair of statements.
2’. for any Boolean function f: if s(f) < h(n) then δ(f) < n.
Y
n
g(x) = f(x) · xi .
1
f and g represent induced
subgraphs with vertex sets
Call the coefficients αx ( x ∈ 2[n] ) in (4.24), for the boolean that partition V(Qn ).
functions f and g: f̂x and ĝx .
Exercise 4.132
(b) Show that the coefficients f̂x and ĝx of Equation (4.24) for
the Boolean functions f and g satisfy
(c)
E(g) = ĝ∅ = f̂[n] .
1.0 ⇒ 2.0 :
Assume δ(f) = n. Then f̂[n] 6= 0 — so — E(g) 6= 0. By 1.0 there
exists x ∈ 2[n] such that s(g(x)) 6 n − h(n). This implies that
there exists x ∈ 2[n] such that s(f(x)) > h(n).
2.0 ⇒ 1.0 :
Assume that for all x ∈ 2[n] s(g(x)) > n−h(n). Then s(f) < h(n).
By 2.0 δ(f) < n — and so —
The sensitivity conjecture stems from this paper. The paper shows
(Lemma 7) that bs(f) 6 2 · δ(f)2 . (Tal’s lemma removes the factor
2.)
N. Nisan and M. Szegedy, On the degree of Boolean functions as
real polynomials, Computational Complexity 4 (1994), pp. 301–313.
4.18 Homomorphisms
Definition 4.216. Let G and H be two graphs . A homo-
morphism
G → H
is a map h : V( G ) → V( H ) with the property
∀ e ∈ E( G ) h( e ) ∈ E( H ) ,
where — for a set A ⊆ V( G ) we write
h( A ) = { h( a ) | a ∈ A } . (4.25)
4.18 Homomorphisms 305
Exercise 4.133
Define hom as the quasi – order defined on graphs by
C3 , C5 , C7 , · · ·
Exercise 4.134
Show that for any graph G and k ∈ N
G → Kk ⇔ χ( G ) 6 k (4.26)
Kk → G ⇔ ω( G ) > k . (4.27)
4.18.1 Retracts
G and H have the same clique number, chromatic number and odd
girth. A graph G retracts to Kk if and only if χ(G) = ω(G) = k.
{ y1 , yi } ∈ E(H) ⇒
{ γ(y1 ), γ(yi ) } = { x` , x1 } ∈ E(G) ⇒ x` 6= x1 .
ρ2 ◦ ρ1 : G → B and γ1 ◦ γ2 : B → G. (4.28)
Furthermore,
Remark 4.223. Assume that we are given, for each pair Gi and Hj
whether Gi retracts to Hj or not. Then, to check if G retracts to H,
we may consider a bipartite graph B defined as follows. One color
class of B has the components of G as vertices and the other color
class has the components of H as vertices. There is an edge between
Gi and Hj whenever Gi retracts to Hj . To check if G retracts to H,
we can let an algorithm compute a maximum matching in B. There
is a retraction only if the matching exhausts all components of H
and if ω(G) = ω(H).
4.19 Products
but this lower bound is not sharp not even for threshold graphs.
139 139
P. Jha and S. Klavžar, In-
dependence in direct - prod-
uct graphs, Ars Combinato-
Cographs are perfect. But the product of two cographs is not ria 50, 1998.
necessarily perfect. As an example let G be isomorphic to the
paw (see Figure 2.8 on Page 80) and let H be isomorphic to K3 .
Then G × H contains C5 as an induced subgraph. 140 140
Check !
Exercise 4.135
Exercise 4.136
Let G and H be cographs and assume that G is diconnected.
Say G = G1 ⊕ G2 (G is the union
:::::
of G1 and G2 ). Show that
Exercise 4.137
Let G and H be cographs and assume that both are connected.
Say G = G1 ⊗ G2 and H = H1 ⊗ H2 (G and H are joins
::::
of the
constituents). Show that
Exercise 4.138
Show that there is a polynomial - time algorithm to compute the
independence number of G × H when G and H are splitgraphs.
Exercise 4.139
Show that
r(G × H) > max { r(G), r(H) }.
|I|
a(G) = max
|I| + |N(I)|
Theorem 4.230.
Θ(G) = a∗ (G).
Equivalently for any graph
a∗ (G2 ) = a∗ (G).
Let G and H be graphs.
Tóth showed that
The value a(G) is then obtained from the table at the root as
k
a(G) = max .
k k + `(k)
Exercise 4.140
Show that there is an O∗ (3n/3 ) algorithm to compute the tensor
capacity of a graph.
Independence domination
Definition 4.233. Let G be a graph. A set B ⊆ V dominates a
set A ⊆ V when
[
A ⊆ N[x].
x∈B
G = G1 ⊗ G2 or G = G1 ⊕ G2 .
Exercise 4.141
When G is a cograph with at least two vertices then
min { γ(G ), γ(G ), 2 } if G = G ⊗ G
1 2 1 2
γ(G) =
γ(G1 ) + γ(G2 ) if G = G1 ⊕ G2 .
Exercise 4.142
When G is a cograph then γi (G) is the number of components
of G.
Exercise 4.143
Let k ∈ N. Design a polynomial - time algorithm to compute γi
for graphs of rankwidth 6 k. Wing-Kai Hon, T. Kloks,
H. Liu, S. Poon and Yue-
Li Wang, On independence
domination. Manuscript on
Exercise 4.144 arXiv: 1304.6450, 2013.
Show that there is a polynomial - time algorithm to compute γi
for permutation graphs.
4.19 Products 319
4.19.5 θe (Kn × Kn )
Exercise 4.145
Show that θe is the minimal size of a set of cliques that has the
property that every edge is contained in at least one of them.
i 6= k and j 6= `.
Exercise 4.146
Show that any graph satisfies
θe > m/(ω).
2
320 Recent Trends
Corollary 4.236.
Exercise 4.147
Let p be prime and let u 6 p. Show that
Exercise 4.148
For n > 2
Show that the class of outerplanar graphs is closed under taking Figure 4.29: A MOP
minors. The obstruction set is
O = { K 4 , K2, 3 } .
322 Recent Trends
Exercise 4.150
A recursive definition of a MOP is the following. 144
144
Show that every MOP is
(i) A graph consisting of a single edge is a MOP, Hamiltonian.
L1 , L2 , ···
X
α( G ) = Li ∩ M (4.32)
i
1 X
k X
= · Lj ∩ M (4.33)
k−1
i=1 j6=i mod k
1 X
k
6 · α( G i ) (4.34)
k−1
i=1
1
6 · k · max { α( G i ) | 1 6 i 6 k } (4.35)
k−1
k−1
⇒ max α( G i ) > · α( G ). (4.36)
i k
Coming soon!
[3] Alon, N., R. Yuster and U. Zwick, Finding and counting given
length cycles. Algorithmica 17 (1997), pp. 209–223.
[5] Backus, J., Can programming be liberated from the Von Neu-
mann style? A functional style and its algebra of programs.
Communications of the ACM 21 (1978), pp. 613–641.
[8] Berge, C., Two theorems in graphs. Proc. Nat. Acad. Sci. 43
(1957), pp. 842–844.
© The Author(s), under exclusive license to Springer Nature Singapore Pte Ltd. 2022 327
T. Kloks, M. Xiao, A Guide to Graph Algorithms, https://doi.org/10.1007/978-981-16-6350-5
328 Bibliography
[22] Edmonds, J., Path, trees and flowers. The Canadian Journal
of Mathematics 17 (1965), pp. 449–467.
[47] Dom Van der Laan, H., Het plastische getal, XV Lessen over
de grondslagen van de architectonische ordonnantie. Leiden,
E. J. Brill, 1967.
[57] Rem, M., Algorithmen. (eds. Van Oers and J. Peters) Tech-
nische Hogeschool Eindhoven, College Dictaat 2.292, 1981.
© The Author(s), under exclusive license to Springer Nature Singapore Pte Ltd. 2022 335
T. Kloks, M. Xiao, A Guide to Graph Algorithms, https://doi.org/10.1007/978-981-16-6350-5
336 Index