Treewidth 1A: Introduction
Saket Saurabh
The Institute of Mathematical Sciences, India

ASPAK 2014, March 3-8
Motivation

Most interesting graph problems are NP-complete.
Many algorithms developed for special classes of graphs.
Important classes of graphs: decomposable in some way; like
trees.
Introduction and definition
Part I: Algorithms for bounded treewidth graphs.
Part II: Graph-theoretic properties of treewidth.
Part III: Applications for general graphs.
Part IV: Irrelevant Vertices – Planar Vertex Deletion.
The Party Problem

The Party Problem
Problem: Invite some colleagues for a party.
Maximize: The total fun factor of the invited people.
Constraint: Everyone should be having fun.
Do not invite a colleague and his direct boss at the same
time!
The Party Problem

The Party Problem
Problem: Invite some colleagues for a party.
Maximize: The total fun factor of the invited people.
Constraint: Everyone should be having fun.
Do not invite a colleague and his direct boss at the same
time!
The Party Problem
The Party Problem
Problem: Invite some colleagues for a party. Maximize:
The total fun factor of the invited people.
Constraint: Everyone should be having fun.
Do not invite a colleague and his direct boss at the same
time!

2
6

5

4

4

6

Input: A tree with
weights on the
vertices.
Task: Find an
independent set of
maximum weight.
The Party Problem
The Party Problem
Problem: Invite some colleagues for a party. Maximize:
The total fun factor of the invited people.
Constraint: Everyone should be having fun.
Do not invite a colleague and his direct boss at the same
time!

2
6

5

4

4

6

Input: A tree with
weights on the
vertices.
Task: Find an
independent set of
maximum weight.
Solving the Party Problem
Dynamic programming paradigm: We solve a large number of
subproblems that depend on each other. The answer is a single
subproblem.
Tv : the subtree rooted at v .
A[v ]: max. weight of an independent set in Tv
B[v ]: max. weight of an independent set in Tv that does not
contain v
Goal: determine A[r ] for the root r .
Method:
Assume v1 , . . . , vk are the children of v . Use the recurrence relations
k

B[v ] = i=1 A[vi ]
A[v ] = max{B[v ] , w (v ) +

k
i=1

B[vi ]}

The values A[v ] and B[v ] can be calculated in a bottom-up order
(the leaves are trivial).
Solving the Party Problem
Dynamic programming paradigm: We solve a large number of
subproblems that depend on each other. The answer is a single
subproblem.
Tv : the subtree rooted at v .
A[v ]: max. weight of an independent set in Tv
B[v ]: max. weight of an independent set in Tv that does not
contain v
Goal: determine A[r ] for the root r .
Method:
Assume v1 , . . . , vk are the children of v . Use the recurrence relations
k

B[v ] = i=1 A[vi ]
A[v ] = max{B[v ] , w (v ) +

k
i=1

B[vi ]}

The values A[v ] and B[v ] can be calculated in a bottom-up order
(the leaves are trivial).
We continue with Maximum Independent Set, now we try to
solve the problem for an arbitrary graph G . The idea is again to
perform dynamic programming, but this time instead of going from
leaves to the root, we go via separating set of vertices.
We continue with Maximum Independent Set, now we try to
solve the problem for an arbitrary graph G . The idea is again to
perform dynamic programming, but this time instead of going from
leaves to the root, we go via separating set of vertices.
Let us fix an ordering σ = (v1 , v2 , . . . , vn ) of the vertices of G . For
j ∈ {1, 2, . . . , n}, we use Vj to denote the set of the first j vertices
of σ.
We continue with Maximum Independent Set, now we try to
solve the problem for an arbitrary graph G . The idea is again to
perform dynamic programming, but this time instead of going from
leaves to the root, we go via separating set of vertices.
Let us fix an ordering σ = (v1 , v2 , . . . , vn ) of the vertices of G . For
j ∈ {1, 2, . . . , n}, we use Vj to denote the set of the first j vertices
of σ.
G [Vn ] = G . The boundary of Vj is the subset of vertices of Vj
adjacent to vertices outside Vj .
a

b

b

e

d

e

c

d

c

f

g

a

abc

a

b

c

d

e

ab
f

g

h

i

i

bcd
bc

d

i

h

cde

bcde

hi

e

h

deg
de

ehi

e

degf
eh

deg
de
deh

Figure : A graph.

For example, for σ = (a, b, c, d, e, f , g , h, i) and j = 5, we have
Vj = {a, b, c, d, e} and ∂(Vj ) = {d, e}. Every path from v ∈ Vj to
u ∈ Vj contains an edge with one endpoint in Vj and the other in
V (G )  Vj , and hence every uv -path contains a vertex from ∂(Vj ).
In other words ∂(Vj ) separates Vj from the other vertices of G .
a

b

b

e

d

e

c

d

c

f

g

a

abc

a

b

c

d

e

ab
f

g

h

i

i

bcd
bc

d

i

h

cde

bcde

hi

e

h

deg
de

ehi

e

degf
eh

deg
de
deh

Figure : A graph.

For example, for σ = (a, b, c, d, e, f , g , h, i) and j = 5, we have
Vj = {a, b, c, d, e} and ∂(Vj ) = {d, e}. Every path from v ∈ Vj to
u ∈ Vj contains an edge with one endpoint in Vj and the other in
V (G )  Vj , and hence every uv -path contains a vertex from ∂(Vj ).
In other words ∂(Vj ) separates Vj from the other vertices of G .
a

b

b

e

d

e

c

d

c

f

g

a

abc

a

b

c

d

e

ab
f

g

h

i

i

bcd
bc

d

i

h

cde

bcde

hi

e

h

deg
de

ehi

e

degf
eh

deg
de
deh

Figure : A graph.

For example, for σ = (a, b, c, d, e, f , g , h, i) and j = 5, we have
Vj = {a, b, c, d, e} and ∂(Vj ) = {d, e}. Every path from v ∈ Vj to
u ∈ Vj contains an edge with one endpoint in Vj and the other in
V (G )  Vj , and hence every uv -path contains a vertex from ∂(Vj ).
In other words ∂(Vj ) separates Vj from the other vertices of G .
What do we want?

For an ordering σ, let tσ = max1≤j≤n |∂(Vj )|.
What do we want?

For an ordering σ, let tσ = max1≤j≤n |∂(Vj )|.
We want an algorithm for Maximum Independent Set running
in time 2O(tσ ) nO(1) .
What do we want?

For an ordering σ, let tσ = max1≤j≤n |∂(Vj )|.
We want an algorithm for Maximum Independent Set running
in time 2O(tσ ) nO(1) .
Let us change track and do something else :D
t-boundaried graphs
A t-boundaried graph is a graph with n vertices and at most t
special vertices X ⊆ {x1 , . . . , xt }. X is called the boundary of G .
Special vertices are ∂(Vj ).
t-boundaried graphs
A t-boundaried graph is a graph with n vertices and at most t
special vertices X ⊆ {x1 , . . . , xt }. X is called the boundary of G .
Special vertices are ∂(Vj ).

X
x1

x2
x3
Dynamic Table: Generalization of Party Argument
For every subset S of the boundary X , T [S] is the size of the
largest independent set I such that I ∩ X = S, or −∞ if no such

X
x1

x2
x3
Dynamic Table
The size of the largest independent set I such that I ∩ X = S, or
−∞ if no such set exists.

X
x1

x2
x3

T [∅]
T [x1 ]
T [x2 ]
T [x3 ]
T [x1 , x2 ]
T [x1 , x3 ]
T [x2 , x3 ]
T [x1 , x2 , x3 ]

4
4
3
3
−∞
3
3
−∞
Dynamic Table
The size of the largest independent set I such that I ∩ X = S, or
−∞ if no such set exists.

X
x1

x2
x3

T [∅]
T [x1 ]
T [x2 ]
T [x3 ]
T [x1 , x2 ]
T [x1 , x3 ]
T [x2 , x3 ]
T [x1 , x2 , x3 ]

4
4
3
3
−∞
3
3
−∞
Dynamic Table
The size of the largest independent set I such that I ∩ X = S, or
−∞ if no such set exists.

X
x1

x2
x3

T [∅]
T [x1 ]
T [x2 ]
T [x3 ]
T [x1 , x2 ]
T [x1 , x3 ]
T [x2 , x3 ]
T [x1 , x2 , x3 ]

4
4
3
3
−∞
3
3
−∞
Dynamic Table
The size of the largest independent set I such that I ∩ X = S, or
−∞ if no such set exists.

X
x1

x2
x3

T [∅]
T [x1 ]
T [x2 ]
T [x3 ]
T [x1 , x2 ]
T [x1 , x3 ]
T [x2 , x3 ]
T [x1 , x2 , x3 ]

4
4
3
3
−∞
3
3
−∞
Dynamic Table
The size of the largest independent set I such that I ∩ X = S, or
−∞ if no such set exists.

X
x1

x2
x3

T [∅]
T [x1 ]
T [x2 ]
T [x3 ]
T [x1 , x2 ]
T [x1 , x3 ]
T [x2 , x3 ]
T [x1 , x2 , x3 ]

4
4
3
3
−∞
3
3
−∞
Introduce
Add a vertex xi ∈ X to X . The vertex xi can have arbitrary
/
neighbours in X but no other neighbours.

X
x1

x4

x2
x3
Introduce
Add a vertex xi ∈ X to X . The vertex xi can have arbitrary
/
neighbours in X but no other neighbours.

X
x1

x4

x2
x3
Introduce: Updating the Table T

Suppose xi (here x4 ) was introduced into X , with closed
neighbourhood N[xi ]. We update the table T .


T [S]
if xi ∈ S,
/

T [S] = −∞
if xi ∈ S and S ∩ N(xi ) = ∅,


1 + T [S  xi ] if xi ∈ S and S ∩ N(xi ) = ∅.
Update time: O(2t )
Introduce: Updating the Table T

Suppose xi (here x4 ) was introduced into X , with closed
neighbourhood N[xi ]. We update the table T .


T [S]
if xi ∈ S,
/

T [S] = −∞
if xi ∈ S and S ∩ N(xi ) = ∅,


1 + T [S  xi ] if xi ∈ S and S ∩ N(xi ) = ∅.
Update time: O(2t )
Forget Operation
Pick a vertex xi ∈ X and forget that it is special (it loses the name
xi and becomes nameless).

X
x1

x4

x2
x3
Forget Operation
Pick a vertex xi ∈ X and forget that it is special (it loses the name
xi and becomes nameless).

X
x4
x1

x2
x3
Forget Operation
Pick a vertex xi ∈ X and forget that it is special (it loses the name
xi and becomes nameless).

X
x1

x2
x3
Forget: Updating the Table T

Forgetting xi (here x4 ).

T [S] = max T [S], T [S ∪ xi ]
Update time: O(2t )
Our algorithm?

For an ordering σ, let tσ = max1≤j≤n |∂(Vj )|. We wanted an
algorithm for Maximum Independent Set running in time
2O(tσ ) nO(1) .
Our algorithm?

For an ordering σ, let tσ = max1≤j≤n |∂(Vj )|. We wanted an
algorithm for Maximum Independent Set running in time
2O(tσ ) nO(1) . Did we get this? Let us go to the drawing board all
over again.
Defining a graph Parameter

For an ordering σ, let tσ = max1≤j≤n |∂(Vj )|.
vertex separation number of a graph G
vsn(G ) = min{tσ | σ is a permutation of V (G )}
Defining a graph Parameter

For an ordering σ, let tσ = max1≤j≤n |∂(Vj )|.
vertex separation number of a graph G
vsn(G ) = min{tσ | σ is a permutation of V (G )}
What we have shown is that we can find a maximum independent
set in a graph in time 2vsn(G ) · n if the corresponding permutation
is given.
Some Questions:

Two important questions are not answered so far
How to find a good permutation?
While the vertex separation number of a tree can be arbitrarily
large, the dynamic programs we used on trees and on graphs
with small separation numbers, are quite similar. Is it possible
to combine both approaches?
Some Questions:

Two important questions are not answered so far
How to find a good permutation?
While the vertex separation number of a tree can be arbitrarily
large, the dynamic programs we used on trees and on graphs
with small separation numbers, are quite similar. Is it possible
to combine both approaches?
Some Questions:

Two important questions are not answered so far
How to find a good permutation?
While the vertex separation number of a tree can be arbitrarily
large, the dynamic programs we used on trees and on graphs
with small separation numbers, are quite similar. Is it possible
to combine both approaches?
In what follow we provide answers to both questions. The answer
to the questions will be given by making use of tree
decompositions and treewidth.
Pathwidth
A path decomposition of graph G is a sequence of bags
Xi ⊆ V (G ), i ∈ {1, . . . , , r },
(X1 , X2 , . . . , Xr )
such that
(P1)

1≤i≤r Xi = V (G ). In other words, every vertex of
G is in some (maybe several) bags.

(P2) For every vw ∈ E (G ), there exists i ∈ {1, . . . , , r }
such that bag Xi contains both v and w .
(P3) For every v ∈ V (G ), let i be the minimum and j be
the maximum indices of the bags containing v . Then
for every k, i ≤ k ≤ j, we have v ∈ Xk . In other
words, the indices of the bags containing v form an
interval.
Pathwidth
A path decomposition of graph G is a sequence of bags
Xi ⊆ V (G ), i ∈ {1, . . . , , r },
(X1 , X2 , . . . , Xr )
such that
(P1)

1≤i≤r Xi = V (G ). In other words, every vertex of
G is in some (maybe several) bags.

(P2) For every vw ∈ E (G ), there exists i ∈ {1, . . . , , r }
such that bag Xi contains both v and w .
(P3) For every v ∈ V (G ), let i be the minimum and j be
the maximum indices of the bags containing v . Then
for every k, i ≤ k ≤ j, we have v ∈ Xk . In other
words, the indices of the bags containing v form an
interval.
Pathwidth
A path decomposition of graph G is a sequence of bags
Xi ⊆ V (G ), i ∈ {1, . . . , , r },
(X1 , X2 , . . . , Xr )
such that
(P1)

1≤i≤r Xi = V (G ). In other words, every vertex of
G is in some (maybe several) bags.

(P2) For every vw ∈ E (G ), there exists i ∈ {1, . . . , , r }
such that bag Xi contains both v and w .
(P3) For every v ∈ V (G ), let i be the minimum and j be
the maximum indices of the bags containing v . Then
for every k, i ≤ k ≤ j, we have v ∈ Xk . In other
words, the indices of the bags containing v form an
interval.
Pathwidth
A path decomposition of graph G is a sequence of bags
Xi ⊆ V (G ), i ∈ {1, . . . , , r },
(X1 , X2 , . . . , Xr )
such that
(P1)

1≤i≤r Xi = V (G ). In other words, every vertex of
G is in some (maybe several) bags.

(P2) For every vw ∈ E (G ), there exists i ∈ {1, . . . , , r }
such that bag Xi contains both v and w .
(P3) For every v ∈ V (G ), let i be the minimum and j be
the maximum indices of the bags containing v . Then
for every k, i ≤ k ≤ j, we have v ∈ Xk . In other
words, the indices of the bags containing v form an
interval.
Pathwidth
A path decomposition of graph G is a sequence of bags
Xi ⊆ V (G ), i ∈ {1, . . . , , r },
(X1 , X2 , . . . , Xr )
such that
(P1)

Xi = V (G ). In other words, every vertex of
G is in some (maybe several) bags.
(P2) For every vw ∈ E (G ), there exists i ∈ {1, . . . , , r }
such that bag Xi contains both v and w .
(P3) For every v ∈ V (G ), let i be the minimum and j be
the maximum indices of the bags containing v . Then
for every k, i ≤ k ≤ j, we have v ∈ Xk . In other
words, the indices of the bags containing v form an
interval.
The width of a path decomposition (X1 , X2 , . . . , Xr ) is
max1≤i≤r |Xi | − 1. The pathwidth of a graph G , denoted by
pw(G ), is the minimum width of a path decomposition of G .
1≤i≤r
An Example

a

b

e

d

e

c

b

d

c

f

g

a

abc

a

b

c

d

e

ab
f

g

h

i

i

bcd
bc
hi

d

e

i

h

cde

bcde

deg
de

ehi

e
h

degf
eh

Figure : A graph and its path-decompositions.

deg
de
deh
Separation Property

Lemma
Let (X1 , X2 , . . . , Xr ) be a path decomposition. Then for every
j ∈ {1, . . . , r − 1}, ∂(X1 ∪ X2 · · · ∪ Xj ) ⊆ Xj ∩ Xj+1 . In other words,
Xj ∩ Xj+1 separates X1 ∪ X2 · · · ∪ Xj from the other vertices of G .

Proof.
On board.
Separation Property

Lemma
Let (X1 , X2 , . . . , Xr ) be a path decomposition. Then for every
j ∈ {1, . . . , r − 1}, ∂(X1 ∪ X2 · · · ∪ Xj ) ⊆ Xj ∩ Xj+1 . In other words,
Xj ∩ Xj+1 separates X1 ∪ X2 · · · ∪ Xj from the other vertices of G .

Proof.
On board.
By above Lemma, an intersection of two consecutive bags
separates the vertices to the “left” from the vertices to the “right”.
This makes the pathwidth to look very similar to the vertex
separation number. Let us formalize these similarities.
Nice Decompositions

It is more convenient to work with nice decompositions.
A path decomposition (X1 , X2 , . . . , Xr ) of a graph G is nice if
|X1 | = |Xr | = 1, and
for every i ∈ {1, 2, . . . , r − 1} there is a vertex v of G such
that either Xi+1 = Xi ∪ {v }, or Xi+1 = Xi  {v }.
Nice Decompositions

It is more convenient to work with nice decompositions.
A path decomposition (X1 , X2 , . . . , Xr ) of a graph G is nice if
|X1 | = |Xr | = 1, and
for every i ∈ {1, 2, . . . , r − 1} there is a vertex v of G such
that either Xi+1 = Xi ∪ {v }, or Xi+1 = Xi  {v }.
Thus bags of a nice path decomposition are of the two types. Bags
of the first type are of the form Xi+1 = Xi ∪ {v } and are introduce
nodes. Bags of the form Xi+1 = Xi  {v } are forget nodes.
An Example

a

b

b

e

d

e

c

d

c

f

g

a

abc

a

b

c

d

e

ab
f

g

h

i

i

bcd
bc
hi

d

e

i

h

cde

bcde

h

deg
de

ehi

e

degf
eh

Figure : A graph, its path and nice path decompositions.

deg
de
deh
An Example
a

b

b

e

d

e

c

d

c

f

g

a

abc

a

b

c

d

e

ab
f

g

h

i

i

bcd
bc
hi

d

e

i

h

cde

bcde

h

deg
de

ehi

e

degf
eh

deg
de
deh

Figure : A graph, its path and nice path decompositions.

Exercise: Construct an algorithm that for a given path
decomposition of width p constructs a nice path decomposition of
width p in time O(p 2 n).
VSN vs PW

It appears that vertex separation number of a graph is exactly the
pathwidth of a graph.
VSN vs PW

It appears that vertex separation number of a graph is exactly the
pathwidth of a graph.

Lemma
For any graph G , vsn(G ) = pw(G ).

Proof.
On the board.
Another Definition of Pathwidth

The pathwidth(pw(G )) of G is the minimum
boundary size needed to construct G from the
empty graph using introduce and forget
operations... -1
Have seen: Maximum Independent Set
can be solved in O(2p n) time if a construction
of G with p labels is given as input.
Tractable Problems on Graphs of Bounded Pathwidth

Independent Set
Dominating Set
q Coloring
Max Cut
Odd Cycle Transversal
Hamiltonian Cycle
Partition into Triangles

O(2p n) time
O(3p n) time
O(q p n) time
O(2p n) time
O(3p n) time
O(p p n) time
O(2p n) time
Pathwidth

Introduced in the 80’s as a part of Robertson
and Seymours Graph Minors project.
(Bodlaender and Kloks 96) Graphs of pathwidth
k can be recognized in f (k)n time — FPT
algorithm.
Another Operation: Join Operation

Given two t-boundaried graphs G1 and G2 , the join operation glues
them together at the boundaries.
Another Operation: Join Operation
Given two t-boundaried graphs G1 and G2 , the join operation glues
them together at the boundaries.

X

X

x1

x1

x2

x3

x2
x3
Another Operation: Join Operation
Given two t-boundaried graphs G1 and G2 , the join operation glues
them together at the boundaries.

X

X

x1

x1

x2

x3

x2
x3
Another Operation: Join Operation
Given two t-boundaried graphs G1 and G2 , the join operation glues
them together at the boundaries.

X

X

x1
x2
x2
x3
x3
Joining G1 and G2 : Updating the Table T for Maximum
Independent Set
Have a table T1 for G1 and T2 for G2 , want to compute the table
T for their join.

T [S] = T1[S] + T2[S] − |S|
Update time: O(2t )
Tree Decomposition

A tree decomposition of a graph G is a pair T = (T , χ), where T
is a tree and mapping χ assigns to every node t of T a vertex
subset Xt (called a bag) such that
(T1)

t∈V (T ) Xt

= V (G ).

(T2) For every vw ∈ E (G ), there exists a node t of T
such that bag χ(t) = Xt contains both v and w .
(T3) For every v ∈ V (G ), the set χ−1 (v ), i.e. the set of
nodes Tv = {t ∈ V (T ) | v ∈ Xt } forms a connected
subgraph (subtree) of T .
Tree Decomposition

A tree decomposition of a graph G is a pair T = (T , χ), where T
is a tree and mapping χ assigns to every node t of T a vertex
subset Xt (called a bag) such that
(T1)

t∈V (T ) Xt

= V (G ).

(T2) For every vw ∈ E (G ), there exists a node t of T
such that bag χ(t) = Xt contains both v and w .
(T3) For every v ∈ V (G ), the set χ−1 (v ), i.e. the set of
nodes Tv = {t ∈ V (T ) | v ∈ Xt } forms a connected
subgraph (subtree) of T .
Tree Decomposition

A tree decomposition of a graph G is a pair T = (T , χ), where T
is a tree and mapping χ assigns to every node t of T a vertex
subset Xt (called a bag) such that
(T1)

t∈V (T ) Xt

= V (G ).

(T2) For every vw ∈ E (G ), there exists a node t of T
such that bag χ(t) = Xt contains both v and w .
(T3) For every v ∈ V (G ), the set χ−1 (v ), i.e. the set of
nodes Tv = {t ∈ V (T ) | v ∈ Xt } forms a connected
subgraph (subtree) of T .
Tree Decomposition

A tree decomposition of a graph G is a pair T = (T , χ), where T
is a tree and mapping χ assigns to every node t of T a vertex
subset Xt (called a bag) such that
(T1)

t∈V (T ) Xt

= V (G ).

(T2) For every vw ∈ E (G ), there exists a node t of T
such that bag χ(t) = Xt contains both v and w .
(T3) For every v ∈ V (G ), the set χ−1 (v ), i.e. the set of
nodes Tv = {t ∈ V (T ) | v ∈ Xt } forms a connected
subgraph (subtree) of T .
Tree Decomposition
A tree decomposition of a graph G is a pair T = (T , χ), where T
is a tree and mapping χ assigns to every node t of T a vertex
subset Xt (called a bag) such that
(T1)

t∈V (T ) Xt

= V (G ).

(T2) For every vw ∈ E (G ), there exists a node t of T
such that bag χ(t) = Xt contains both v and w .
(T3) For every v ∈ V (G ), the set χ−1 (v ), i.e. the set of
nodes Tv = {t ∈ V (T ) | v ∈ Xt } forms a connected
subgraph (subtree) of T .
The width of tree decomposition T = (T , χ) equals
maxt∈V (T ) |Xt | − 1, i.e the maximum size of it s bag minus one.
The treewidth of a graph G , tw(G ), is the minimum width of a
tree decomposition of G .
Separation Property

For every pair of adjacent nodes of the path of a path
decomposition, the intersection of the corresponding bags is a
separator.
Treewidth also has similar properties,
Separation Property

For every pair of adjacent nodes of the path of a path
decomposition, the intersection of the corresponding bags is a
separator.
Treewidth also has similar properties,
Separation Property
For every pair of adjacent nodes of the path of a path
decomposition, the intersection of the corresponding bags is a
separator.
Treewidth also has similar properties,

Lemma
Let (T , χ) be a tree decomposition and st be an edge of T . The
forest T − st obtained from T by deleting st contains two
connected components Ts and Tt . Let Vs and Vt be the vertices
of G contained in bags of Ts and Tt , correspondingly. Then
∂(Vs ) ⊆ Xs ∩ Xt . Thus Xs ∩ Xt separates Vs and Vt . In other
words, every path in G with one endpoint in Vs and one in Vt
contains a vertex from Xs ∩ Xt .

Proof.
On board.
A rooted tree decomposition T = (T , χ) of a graph G is nice if
each of its nodes is one of the following four types.
Leaf node: a node i with |Xi | = 1 and no children.
Introduce node: a node i with exactly one child j such that
Xi = Xj ∪ {v } for some vertex v ∈ Xj ; we say that v
is introduced in i.
Forget node: a node i with exactly one child j such that
Xi = Xj  {v } for some vertex v ∈ Xi ; we say that v
is forgotten in i.
Join node: a node i with two children j1 , j2 such that
Xi = Xj1 = Xj2 .
A rooted tree decomposition T = (T , χ) of a graph G is nice if
each of its nodes is one of the following four types.
Leaf node: a node i with |Xi | = 1 and no children.
Introduce node: a node i with exactly one child j such that
Xi = Xj ∪ {v } for some vertex v ∈ Xj ; we say that v
is introduced in i.
Forget node: a node i with exactly one child j such that
Xi = Xj  {v } for some vertex v ∈ Xi ; we say that v
is forgotten in i.
Join node: a node i with two children j1 , j2 such that
Xi = Xj1 = Xj2 .
Every tree decomposition of width t can be turned into a nice tree
decomposition of width t in time O(t 2 · n).
Treewidth

The treewidth(tw(G )) of G is the minimum
boundary size needed to construct G from the
empty graph using introduce, forget and join
operations... -1
Have seen: Independent Set can be solved
in O(2t n) time if a construction of G with t
labels is given as input.
In what follows we will see several examples
of dynamic programming on graphs of
bounded treewidth. Any Questions until
now?

Introduction to Treewidth

  • 1.
    Treewidth 1A: Introduction SaketSaurabh The Institute of Mathematical Sciences, India ASPAK 2014, March 3-8
  • 2.
    Motivation Most interesting graphproblems are NP-complete. Many algorithms developed for special classes of graphs. Important classes of graphs: decomposable in some way; like trees.
  • 3.
    Introduction and definition PartI: Algorithms for bounded treewidth graphs. Part II: Graph-theoretic properties of treewidth. Part III: Applications for general graphs. Part IV: Irrelevant Vertices – Planar Vertex Deletion.
  • 4.
    The Party Problem TheParty Problem Problem: Invite some colleagues for a party. Maximize: The total fun factor of the invited people. Constraint: Everyone should be having fun. Do not invite a colleague and his direct boss at the same time!
  • 5.
    The Party Problem TheParty Problem Problem: Invite some colleagues for a party. Maximize: The total fun factor of the invited people. Constraint: Everyone should be having fun. Do not invite a colleague and his direct boss at the same time!
  • 6.
    The Party Problem TheParty Problem Problem: Invite some colleagues for a party. Maximize: The total fun factor of the invited people. Constraint: Everyone should be having fun. Do not invite a colleague and his direct boss at the same time! 2 6 5 4 4 6 Input: A tree with weights on the vertices. Task: Find an independent set of maximum weight.
  • 7.
    The Party Problem TheParty Problem Problem: Invite some colleagues for a party. Maximize: The total fun factor of the invited people. Constraint: Everyone should be having fun. Do not invite a colleague and his direct boss at the same time! 2 6 5 4 4 6 Input: A tree with weights on the vertices. Task: Find an independent set of maximum weight.
  • 8.
    Solving the PartyProblem Dynamic programming paradigm: We solve a large number of subproblems that depend on each other. The answer is a single subproblem. Tv : the subtree rooted at v . A[v ]: max. weight of an independent set in Tv B[v ]: max. weight of an independent set in Tv that does not contain v Goal: determine A[r ] for the root r . Method: Assume v1 , . . . , vk are the children of v . Use the recurrence relations k B[v ] = i=1 A[vi ] A[v ] = max{B[v ] , w (v ) + k i=1 B[vi ]} The values A[v ] and B[v ] can be calculated in a bottom-up order (the leaves are trivial).
  • 9.
    Solving the PartyProblem Dynamic programming paradigm: We solve a large number of subproblems that depend on each other. The answer is a single subproblem. Tv : the subtree rooted at v . A[v ]: max. weight of an independent set in Tv B[v ]: max. weight of an independent set in Tv that does not contain v Goal: determine A[r ] for the root r . Method: Assume v1 , . . . , vk are the children of v . Use the recurrence relations k B[v ] = i=1 A[vi ] A[v ] = max{B[v ] , w (v ) + k i=1 B[vi ]} The values A[v ] and B[v ] can be calculated in a bottom-up order (the leaves are trivial).
  • 10.
    We continue withMaximum Independent Set, now we try to solve the problem for an arbitrary graph G . The idea is again to perform dynamic programming, but this time instead of going from leaves to the root, we go via separating set of vertices.
  • 11.
    We continue withMaximum Independent Set, now we try to solve the problem for an arbitrary graph G . The idea is again to perform dynamic programming, but this time instead of going from leaves to the root, we go via separating set of vertices. Let us fix an ordering σ = (v1 , v2 , . . . , vn ) of the vertices of G . For j ∈ {1, 2, . . . , n}, we use Vj to denote the set of the first j vertices of σ.
  • 12.
    We continue withMaximum Independent Set, now we try to solve the problem for an arbitrary graph G . The idea is again to perform dynamic programming, but this time instead of going from leaves to the root, we go via separating set of vertices. Let us fix an ordering σ = (v1 , v2 , . . . , vn ) of the vertices of G . For j ∈ {1, 2, . . . , n}, we use Vj to denote the set of the first j vertices of σ. G [Vn ] = G . The boundary of Vj is the subset of vertices of Vj adjacent to vertices outside Vj .
  • 13.
    a b b e d e c d c f g a abc a b c d e ab f g h i i bcd bc d i h cde bcde hi e h deg de ehi e degf eh deg de deh Figure : Agraph. For example, for σ = (a, b, c, d, e, f , g , h, i) and j = 5, we have Vj = {a, b, c, d, e} and ∂(Vj ) = {d, e}. Every path from v ∈ Vj to u ∈ Vj contains an edge with one endpoint in Vj and the other in V (G ) Vj , and hence every uv -path contains a vertex from ∂(Vj ). In other words ∂(Vj ) separates Vj from the other vertices of G .
  • 14.
    a b b e d e c d c f g a abc a b c d e ab f g h i i bcd bc d i h cde bcde hi e h deg de ehi e degf eh deg de deh Figure : Agraph. For example, for σ = (a, b, c, d, e, f , g , h, i) and j = 5, we have Vj = {a, b, c, d, e} and ∂(Vj ) = {d, e}. Every path from v ∈ Vj to u ∈ Vj contains an edge with one endpoint in Vj and the other in V (G ) Vj , and hence every uv -path contains a vertex from ∂(Vj ). In other words ∂(Vj ) separates Vj from the other vertices of G .
  • 15.
    a b b e d e c d c f g a abc a b c d e ab f g h i i bcd bc d i h cde bcde hi e h deg de ehi e degf eh deg de deh Figure : Agraph. For example, for σ = (a, b, c, d, e, f , g , h, i) and j = 5, we have Vj = {a, b, c, d, e} and ∂(Vj ) = {d, e}. Every path from v ∈ Vj to u ∈ Vj contains an edge with one endpoint in Vj and the other in V (G ) Vj , and hence every uv -path contains a vertex from ∂(Vj ). In other words ∂(Vj ) separates Vj from the other vertices of G .
  • 16.
    What do wewant? For an ordering σ, let tσ = max1≤j≤n |∂(Vj )|.
  • 17.
    What do wewant? For an ordering σ, let tσ = max1≤j≤n |∂(Vj )|. We want an algorithm for Maximum Independent Set running in time 2O(tσ ) nO(1) .
  • 18.
    What do wewant? For an ordering σ, let tσ = max1≤j≤n |∂(Vj )|. We want an algorithm for Maximum Independent Set running in time 2O(tσ ) nO(1) . Let us change track and do something else :D
  • 19.
    t-boundaried graphs A t-boundariedgraph is a graph with n vertices and at most t special vertices X ⊆ {x1 , . . . , xt }. X is called the boundary of G . Special vertices are ∂(Vj ).
  • 20.
    t-boundaried graphs A t-boundariedgraph is a graph with n vertices and at most t special vertices X ⊆ {x1 , . . . , xt }. X is called the boundary of G . Special vertices are ∂(Vj ). X x1 x2 x3
  • 21.
    Dynamic Table: Generalizationof Party Argument For every subset S of the boundary X , T [S] is the size of the largest independent set I such that I ∩ X = S, or −∞ if no such X x1 x2 x3
  • 22.
    Dynamic Table The sizeof the largest independent set I such that I ∩ X = S, or −∞ if no such set exists. X x1 x2 x3 T [∅] T [x1 ] T [x2 ] T [x3 ] T [x1 , x2 ] T [x1 , x3 ] T [x2 , x3 ] T [x1 , x2 , x3 ] 4 4 3 3 −∞ 3 3 −∞
  • 23.
    Dynamic Table The sizeof the largest independent set I such that I ∩ X = S, or −∞ if no such set exists. X x1 x2 x3 T [∅] T [x1 ] T [x2 ] T [x3 ] T [x1 , x2 ] T [x1 , x3 ] T [x2 , x3 ] T [x1 , x2 , x3 ] 4 4 3 3 −∞ 3 3 −∞
  • 24.
    Dynamic Table The sizeof the largest independent set I such that I ∩ X = S, or −∞ if no such set exists. X x1 x2 x3 T [∅] T [x1 ] T [x2 ] T [x3 ] T [x1 , x2 ] T [x1 , x3 ] T [x2 , x3 ] T [x1 , x2 , x3 ] 4 4 3 3 −∞ 3 3 −∞
  • 25.
    Dynamic Table The sizeof the largest independent set I such that I ∩ X = S, or −∞ if no such set exists. X x1 x2 x3 T [∅] T [x1 ] T [x2 ] T [x3 ] T [x1 , x2 ] T [x1 , x3 ] T [x2 , x3 ] T [x1 , x2 , x3 ] 4 4 3 3 −∞ 3 3 −∞
  • 26.
    Dynamic Table The sizeof the largest independent set I such that I ∩ X = S, or −∞ if no such set exists. X x1 x2 x3 T [∅] T [x1 ] T [x2 ] T [x3 ] T [x1 , x2 ] T [x1 , x3 ] T [x2 , x3 ] T [x1 , x2 , x3 ] 4 4 3 3 −∞ 3 3 −∞
  • 27.
    Introduce Add a vertexxi ∈ X to X . The vertex xi can have arbitrary / neighbours in X but no other neighbours. X x1 x4 x2 x3
  • 28.
    Introduce Add a vertexxi ∈ X to X . The vertex xi can have arbitrary / neighbours in X but no other neighbours. X x1 x4 x2 x3
  • 29.
    Introduce: Updating theTable T Suppose xi (here x4 ) was introduced into X , with closed neighbourhood N[xi ]. We update the table T .  T [S] if xi ∈ S, /  T [S] = −∞ if xi ∈ S and S ∩ N(xi ) = ∅,   1 + T [S xi ] if xi ∈ S and S ∩ N(xi ) = ∅. Update time: O(2t )
  • 30.
    Introduce: Updating theTable T Suppose xi (here x4 ) was introduced into X , with closed neighbourhood N[xi ]. We update the table T .  T [S] if xi ∈ S, /  T [S] = −∞ if xi ∈ S and S ∩ N(xi ) = ∅,   1 + T [S xi ] if xi ∈ S and S ∩ N(xi ) = ∅. Update time: O(2t )
  • 31.
    Forget Operation Pick avertex xi ∈ X and forget that it is special (it loses the name xi and becomes nameless). X x1 x4 x2 x3
  • 32.
    Forget Operation Pick avertex xi ∈ X and forget that it is special (it loses the name xi and becomes nameless). X x4 x1 x2 x3
  • 33.
    Forget Operation Pick avertex xi ∈ X and forget that it is special (it loses the name xi and becomes nameless). X x1 x2 x3
  • 34.
    Forget: Updating theTable T Forgetting xi (here x4 ). T [S] = max T [S], T [S ∪ xi ] Update time: O(2t )
  • 35.
    Our algorithm? For anordering σ, let tσ = max1≤j≤n |∂(Vj )|. We wanted an algorithm for Maximum Independent Set running in time 2O(tσ ) nO(1) .
  • 36.
    Our algorithm? For anordering σ, let tσ = max1≤j≤n |∂(Vj )|. We wanted an algorithm for Maximum Independent Set running in time 2O(tσ ) nO(1) . Did we get this? Let us go to the drawing board all over again.
  • 37.
    Defining a graphParameter For an ordering σ, let tσ = max1≤j≤n |∂(Vj )|. vertex separation number of a graph G vsn(G ) = min{tσ | σ is a permutation of V (G )}
  • 38.
    Defining a graphParameter For an ordering σ, let tσ = max1≤j≤n |∂(Vj )|. vertex separation number of a graph G vsn(G ) = min{tσ | σ is a permutation of V (G )} What we have shown is that we can find a maximum independent set in a graph in time 2vsn(G ) · n if the corresponding permutation is given.
  • 39.
    Some Questions: Two importantquestions are not answered so far How to find a good permutation? While the vertex separation number of a tree can be arbitrarily large, the dynamic programs we used on trees and on graphs with small separation numbers, are quite similar. Is it possible to combine both approaches?
  • 40.
    Some Questions: Two importantquestions are not answered so far How to find a good permutation? While the vertex separation number of a tree can be arbitrarily large, the dynamic programs we used on trees and on graphs with small separation numbers, are quite similar. Is it possible to combine both approaches?
  • 41.
    Some Questions: Two importantquestions are not answered so far How to find a good permutation? While the vertex separation number of a tree can be arbitrarily large, the dynamic programs we used on trees and on graphs with small separation numbers, are quite similar. Is it possible to combine both approaches? In what follow we provide answers to both questions. The answer to the questions will be given by making use of tree decompositions and treewidth.
  • 42.
    Pathwidth A path decompositionof graph G is a sequence of bags Xi ⊆ V (G ), i ∈ {1, . . . , , r }, (X1 , X2 , . . . , Xr ) such that (P1) 1≤i≤r Xi = V (G ). In other words, every vertex of G is in some (maybe several) bags. (P2) For every vw ∈ E (G ), there exists i ∈ {1, . . . , , r } such that bag Xi contains both v and w . (P3) For every v ∈ V (G ), let i be the minimum and j be the maximum indices of the bags containing v . Then for every k, i ≤ k ≤ j, we have v ∈ Xk . In other words, the indices of the bags containing v form an interval.
  • 43.
    Pathwidth A path decompositionof graph G is a sequence of bags Xi ⊆ V (G ), i ∈ {1, . . . , , r }, (X1 , X2 , . . . , Xr ) such that (P1) 1≤i≤r Xi = V (G ). In other words, every vertex of G is in some (maybe several) bags. (P2) For every vw ∈ E (G ), there exists i ∈ {1, . . . , , r } such that bag Xi contains both v and w . (P3) For every v ∈ V (G ), let i be the minimum and j be the maximum indices of the bags containing v . Then for every k, i ≤ k ≤ j, we have v ∈ Xk . In other words, the indices of the bags containing v form an interval.
  • 44.
    Pathwidth A path decompositionof graph G is a sequence of bags Xi ⊆ V (G ), i ∈ {1, . . . , , r }, (X1 , X2 , . . . , Xr ) such that (P1) 1≤i≤r Xi = V (G ). In other words, every vertex of G is in some (maybe several) bags. (P2) For every vw ∈ E (G ), there exists i ∈ {1, . . . , , r } such that bag Xi contains both v and w . (P3) For every v ∈ V (G ), let i be the minimum and j be the maximum indices of the bags containing v . Then for every k, i ≤ k ≤ j, we have v ∈ Xk . In other words, the indices of the bags containing v form an interval.
  • 45.
    Pathwidth A path decompositionof graph G is a sequence of bags Xi ⊆ V (G ), i ∈ {1, . . . , , r }, (X1 , X2 , . . . , Xr ) such that (P1) 1≤i≤r Xi = V (G ). In other words, every vertex of G is in some (maybe several) bags. (P2) For every vw ∈ E (G ), there exists i ∈ {1, . . . , , r } such that bag Xi contains both v and w . (P3) For every v ∈ V (G ), let i be the minimum and j be the maximum indices of the bags containing v . Then for every k, i ≤ k ≤ j, we have v ∈ Xk . In other words, the indices of the bags containing v form an interval.
  • 46.
    Pathwidth A path decompositionof graph G is a sequence of bags Xi ⊆ V (G ), i ∈ {1, . . . , , r }, (X1 , X2 , . . . , Xr ) such that (P1) Xi = V (G ). In other words, every vertex of G is in some (maybe several) bags. (P2) For every vw ∈ E (G ), there exists i ∈ {1, . . . , , r } such that bag Xi contains both v and w . (P3) For every v ∈ V (G ), let i be the minimum and j be the maximum indices of the bags containing v . Then for every k, i ≤ k ≤ j, we have v ∈ Xk . In other words, the indices of the bags containing v form an interval. The width of a path decomposition (X1 , X2 , . . . , Xr ) is max1≤i≤r |Xi | − 1. The pathwidth of a graph G , denoted by pw(G ), is the minimum width of a path decomposition of G . 1≤i≤r
  • 47.
  • 48.
    Separation Property Lemma Let (X1, X2 , . . . , Xr ) be a path decomposition. Then for every j ∈ {1, . . . , r − 1}, ∂(X1 ∪ X2 · · · ∪ Xj ) ⊆ Xj ∩ Xj+1 . In other words, Xj ∩ Xj+1 separates X1 ∪ X2 · · · ∪ Xj from the other vertices of G . Proof. On board.
  • 49.
    Separation Property Lemma Let (X1, X2 , . . . , Xr ) be a path decomposition. Then for every j ∈ {1, . . . , r − 1}, ∂(X1 ∪ X2 · · · ∪ Xj ) ⊆ Xj ∩ Xj+1 . In other words, Xj ∩ Xj+1 separates X1 ∪ X2 · · · ∪ Xj from the other vertices of G . Proof. On board. By above Lemma, an intersection of two consecutive bags separates the vertices to the “left” from the vertices to the “right”. This makes the pathwidth to look very similar to the vertex separation number. Let us formalize these similarities.
  • 50.
    Nice Decompositions It ismore convenient to work with nice decompositions. A path decomposition (X1 , X2 , . . . , Xr ) of a graph G is nice if |X1 | = |Xr | = 1, and for every i ∈ {1, 2, . . . , r − 1} there is a vertex v of G such that either Xi+1 = Xi ∪ {v }, or Xi+1 = Xi {v }.
  • 51.
    Nice Decompositions It ismore convenient to work with nice decompositions. A path decomposition (X1 , X2 , . . . , Xr ) of a graph G is nice if |X1 | = |Xr | = 1, and for every i ∈ {1, 2, . . . , r − 1} there is a vertex v of G such that either Xi+1 = Xi ∪ {v }, or Xi+1 = Xi {v }. Thus bags of a nice path decomposition are of the two types. Bags of the first type are of the form Xi+1 = Xi ∪ {v } and are introduce nodes. Bags of the form Xi+1 = Xi {v } are forget nodes.
  • 52.
  • 53.
    An Example a b b e d e c d c f g a abc a b c d e ab f g h i i bcd bc hi d e i h cde bcde h deg de ehi e degf eh deg de deh Figure :A graph, its path and nice path decompositions. Exercise: Construct an algorithm that for a given path decomposition of width p constructs a nice path decomposition of width p in time O(p 2 n).
  • 54.
    VSN vs PW Itappears that vertex separation number of a graph is exactly the pathwidth of a graph.
  • 55.
    VSN vs PW Itappears that vertex separation number of a graph is exactly the pathwidth of a graph. Lemma For any graph G , vsn(G ) = pw(G ). Proof. On the board.
  • 56.
    Another Definition ofPathwidth The pathwidth(pw(G )) of G is the minimum boundary size needed to construct G from the empty graph using introduce and forget operations... -1 Have seen: Maximum Independent Set can be solved in O(2p n) time if a construction of G with p labels is given as input.
  • 57.
    Tractable Problems onGraphs of Bounded Pathwidth Independent Set Dominating Set q Coloring Max Cut Odd Cycle Transversal Hamiltonian Cycle Partition into Triangles O(2p n) time O(3p n) time O(q p n) time O(2p n) time O(3p n) time O(p p n) time O(2p n) time
  • 58.
    Pathwidth Introduced in the80’s as a part of Robertson and Seymours Graph Minors project. (Bodlaender and Kloks 96) Graphs of pathwidth k can be recognized in f (k)n time — FPT algorithm.
  • 59.
    Another Operation: JoinOperation Given two t-boundaried graphs G1 and G2 , the join operation glues them together at the boundaries.
  • 60.
    Another Operation: JoinOperation Given two t-boundaried graphs G1 and G2 , the join operation glues them together at the boundaries. X X x1 x1 x2 x3 x2 x3
  • 61.
    Another Operation: JoinOperation Given two t-boundaried graphs G1 and G2 , the join operation glues them together at the boundaries. X X x1 x1 x2 x3 x2 x3
  • 62.
    Another Operation: JoinOperation Given two t-boundaried graphs G1 and G2 , the join operation glues them together at the boundaries. X X x1 x2 x2 x3 x3
  • 63.
    Joining G1 andG2 : Updating the Table T for Maximum Independent Set Have a table T1 for G1 and T2 for G2 , want to compute the table T for their join. T [S] = T1[S] + T2[S] − |S| Update time: O(2t )
  • 64.
    Tree Decomposition A treedecomposition of a graph G is a pair T = (T , χ), where T is a tree and mapping χ assigns to every node t of T a vertex subset Xt (called a bag) such that (T1) t∈V (T ) Xt = V (G ). (T2) For every vw ∈ E (G ), there exists a node t of T such that bag χ(t) = Xt contains both v and w . (T3) For every v ∈ V (G ), the set χ−1 (v ), i.e. the set of nodes Tv = {t ∈ V (T ) | v ∈ Xt } forms a connected subgraph (subtree) of T .
  • 65.
    Tree Decomposition A treedecomposition of a graph G is a pair T = (T , χ), where T is a tree and mapping χ assigns to every node t of T a vertex subset Xt (called a bag) such that (T1) t∈V (T ) Xt = V (G ). (T2) For every vw ∈ E (G ), there exists a node t of T such that bag χ(t) = Xt contains both v and w . (T3) For every v ∈ V (G ), the set χ−1 (v ), i.e. the set of nodes Tv = {t ∈ V (T ) | v ∈ Xt } forms a connected subgraph (subtree) of T .
  • 66.
    Tree Decomposition A treedecomposition of a graph G is a pair T = (T , χ), where T is a tree and mapping χ assigns to every node t of T a vertex subset Xt (called a bag) such that (T1) t∈V (T ) Xt = V (G ). (T2) For every vw ∈ E (G ), there exists a node t of T such that bag χ(t) = Xt contains both v and w . (T3) For every v ∈ V (G ), the set χ−1 (v ), i.e. the set of nodes Tv = {t ∈ V (T ) | v ∈ Xt } forms a connected subgraph (subtree) of T .
  • 67.
    Tree Decomposition A treedecomposition of a graph G is a pair T = (T , χ), where T is a tree and mapping χ assigns to every node t of T a vertex subset Xt (called a bag) such that (T1) t∈V (T ) Xt = V (G ). (T2) For every vw ∈ E (G ), there exists a node t of T such that bag χ(t) = Xt contains both v and w . (T3) For every v ∈ V (G ), the set χ−1 (v ), i.e. the set of nodes Tv = {t ∈ V (T ) | v ∈ Xt } forms a connected subgraph (subtree) of T .
  • 68.
    Tree Decomposition A treedecomposition of a graph G is a pair T = (T , χ), where T is a tree and mapping χ assigns to every node t of T a vertex subset Xt (called a bag) such that (T1) t∈V (T ) Xt = V (G ). (T2) For every vw ∈ E (G ), there exists a node t of T such that bag χ(t) = Xt contains both v and w . (T3) For every v ∈ V (G ), the set χ−1 (v ), i.e. the set of nodes Tv = {t ∈ V (T ) | v ∈ Xt } forms a connected subgraph (subtree) of T . The width of tree decomposition T = (T , χ) equals maxt∈V (T ) |Xt | − 1, i.e the maximum size of it s bag minus one. The treewidth of a graph G , tw(G ), is the minimum width of a tree decomposition of G .
  • 69.
    Separation Property For everypair of adjacent nodes of the path of a path decomposition, the intersection of the corresponding bags is a separator. Treewidth also has similar properties,
  • 70.
    Separation Property For everypair of adjacent nodes of the path of a path decomposition, the intersection of the corresponding bags is a separator. Treewidth also has similar properties,
  • 71.
    Separation Property For everypair of adjacent nodes of the path of a path decomposition, the intersection of the corresponding bags is a separator. Treewidth also has similar properties, Lemma Let (T , χ) be a tree decomposition and st be an edge of T . The forest T − st obtained from T by deleting st contains two connected components Ts and Tt . Let Vs and Vt be the vertices of G contained in bags of Ts and Tt , correspondingly. Then ∂(Vs ) ⊆ Xs ∩ Xt . Thus Xs ∩ Xt separates Vs and Vt . In other words, every path in G with one endpoint in Vs and one in Vt contains a vertex from Xs ∩ Xt . Proof. On board.
  • 72.
    A rooted treedecomposition T = (T , χ) of a graph G is nice if each of its nodes is one of the following four types. Leaf node: a node i with |Xi | = 1 and no children. Introduce node: a node i with exactly one child j such that Xi = Xj ∪ {v } for some vertex v ∈ Xj ; we say that v is introduced in i. Forget node: a node i with exactly one child j such that Xi = Xj {v } for some vertex v ∈ Xi ; we say that v is forgotten in i. Join node: a node i with two children j1 , j2 such that Xi = Xj1 = Xj2 .
  • 73.
    A rooted treedecomposition T = (T , χ) of a graph G is nice if each of its nodes is one of the following four types. Leaf node: a node i with |Xi | = 1 and no children. Introduce node: a node i with exactly one child j such that Xi = Xj ∪ {v } for some vertex v ∈ Xj ; we say that v is introduced in i. Forget node: a node i with exactly one child j such that Xi = Xj {v } for some vertex v ∈ Xi ; we say that v is forgotten in i. Join node: a node i with two children j1 , j2 such that Xi = Xj1 = Xj2 . Every tree decomposition of width t can be turned into a nice tree decomposition of width t in time O(t 2 · n).
  • 74.
    Treewidth The treewidth(tw(G ))of G is the minimum boundary size needed to construct G from the empty graph using introduce, forget and join operations... -1 Have seen: Independent Set can be solved in O(2t n) time if a construction of G with t labels is given as input.
  • 75.
    In what followswe will see several examples of dynamic programming on graphs of bounded treewidth. Any Questions until now?