Part I. Introduction to treewidth SCHOOL ON PARAMETERIZED - - PowerPoint PPT Presentation

part i introduction to treewidth school on parameterized
SMART_READER_LITE
LIVE PREVIEW

Part I. Introduction to treewidth SCHOOL ON PARAMETERIZED - - PowerPoint PPT Presentation

FEDOR V. FOMIN Part I. Introduction to treewidth SCHOOL ON PARAMETERIZED ALGORITHMS AND COMPLEXITY 17-22 August 2014 B dlewo, Poland Why treewidth? Very general idea in science: large structures can be understood by breaking them into


slide-1
SLIDE 1

FEDOR V. FOMIN

Part I. Introduction to treewidth SCHOOL ON PARAMETERIZED ALGORITHMS AND COMPLEXITY 17-22 August 2014 Będlewo, Poland

slide-2
SLIDE 2

Why treewidth? Very general idea in science: large structures can be understood by breaking them into small pieces

slide-3
SLIDE 3

Why treewidth? Very general idea in science: large structures can be understood by breaking them into small pieces In Computer Science: divide and conquer; dynamic programming

slide-4
SLIDE 4

Why treewidth? Very general idea in science: large structures can be understood by breaking them into small pieces In Computer Science: divide and conquer; dynamic programming In Graph Algorithms: Exploiting small separators

slide-5
SLIDE 5

+ = Why treewidth? Very convenient to decompose a graph via small separations Obstacles for decompositions Powerful tool

slide-6
SLIDE 6

Plan Trees and separators Path and tree decompositions Dynamic programming Courcelle's THeorem Computing treewidth Applications on planar graphs Irrelevant vertex technique Beyond treewidth

slide-7
SLIDE 7

Trees and separators

Path and tree decompositions Dynamic programming Courcelle's THeorem Computing treewidth Applications on planar graphs Irrelevant vertex technique Beyond treewidth

slide-8
SLIDE 8

The Party Problem

Party Problem Problem: Invite some colleagues for a party. Maximize: The total fun factor of the invited people. Constraint: Everyone should be having fun.

slide-9
SLIDE 9

The Party Problem

Party Problem Problem: Invite some colleagues for a party. Maximize: The total fun factor of the invited people. Constraint: Everyone should be having fun. No fun with your direct boss!

slide-10
SLIDE 10

The Party Problem

Party Problem Problem: Invite some colleagues for a party. Maximize: The total fun factor of the invited people. Constraint: Everyone should be having fun. No fun with your direct boss!

6 6 4 4 5 2

◮ Input: A tree with weights

  • n the vertices.

◮ Task: Find an independent

set of maximum weight.

slide-11
SLIDE 11

The Party Problem

Party Problem Problem: Invite some colleagues for a party. Maximize: The total fun factor of the invited people. Constraint: Everyone should be having fun. No fun with your direct boss!

2 5 4 4 6 6

◮ Input: A tree with weights

  • n the vertices.

◮ Task: Find an independent

set of maximum weight.

slide-12
SLIDE 12

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.

slide-13
SLIDE 13

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 B[v] = k

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).

slide-14
SLIDE 14

What is a tree-like graph?

tree treelike

slide-15
SLIDE 15

What is a tree-like graph?

treelike tree

slide-16
SLIDE 16

What is a tree-like graph?

1 Number of cycles is bounded.

good bad bad bad

2 Removing a bounded number of vertices makes it acyclic.

good good bad bad

3 Bounded-size parts connected in a tree-like way.

bad bad good good

17

slide-17
SLIDE 17

Less ambitious question: What is a path-like graph?

pathlike path

slide-18
SLIDE 18

Introduction

Crucial property of pathlike treelike graphs: separators.

slide-19
SLIDE 19

Introduction

Crucial property of pathlike treelike graphs: separators.

slide-20
SLIDE 20

Introduction

Crucial property of pathlike treelike graphs: separators.

slide-21
SLIDE 21

Introduction

Crucial property of pathlike treelike graphs: separators.

slide-22
SLIDE 22

Introduction

Crucial property of pathlike treelike graphs: separators.

slide-23
SLIDE 23

Introduction

Crucial property of pathlike treelike graphs: separators.

slide-24
SLIDE 24

Introduction

Crucial property of pathlike treelike graphs: separators.

slide-25
SLIDE 25

Useful point of view: generating sequence

For an integer k, we generate graph G (if we can) using the following operations:

slide-26
SLIDE 26

Useful point of view: generating sequence

For an integer k, we generate graph G (if we can) using the following operations:

  • 1. init: V := ∅, E := ∅, X := ∅
slide-27
SLIDE 27

Useful point of view: generating sequence

For an integer k, we generate graph G (if we can) using the following operations:

  • 1. init: V := ∅, E := ∅, X := ∅
  • 2. introduce − vertex(v) for v /

∈ V : V := V ∪ {v} X := X ∪ {v}

slide-28
SLIDE 28

Useful point of view: generating sequence

For an integer k, we generate graph G (if we can) using the following operations:

  • 1. init: V := ∅, E := ∅, X := ∅
  • 2. introduce − vertex(v) for v /

∈ V : V := V ∪ {v} X := X ∪ {v}

  • 3. forget(v) for v ∈ X:

X := X \ {v}

slide-29
SLIDE 29

Useful point of view: generating sequence

For an integer k, we generate graph G (if we can) using the following operations:

  • 1. init: V := ∅, E := ∅, X := ∅
  • 2. introduce − vertex(v) for v /

∈ V : V := V ∪ {v} X := X ∪ {v}

  • 3. forget(v) for v ∈ X:

X := X \ {v}

  • 4. introduce − edge(uv) for u, v ∈ X:

E := E ∪ {uv}

slide-30
SLIDE 30

Useful point of view: generating sequence

For an integer k, we generate graph G (if we can) using the following operations:

  • 1. init: V := ∅, E := ∅, X := ∅
  • 2. introduce − vertex(v) for v /

∈ V : V := V ∪ {v} X := X ∪ {v}

  • 3. forget(v) for v ∈ X:

X := X \ {v}

  • 4. introduce − edge(uv) for u, v ∈ X:

E := E ∪ {uv} A sequence of operations must always satisfy |X| ≤ k.

slide-31
SLIDE 31

Generating sequence

Example: init

slide-32
SLIDE 32

Generating sequence

Example: introduce-vertex(v1)

slide-33
SLIDE 33

Generating sequence

Example: introduce-vertex(v1) v1

slide-34
SLIDE 34

Generating sequence

Example: introduce-vertex(v2) v1

slide-35
SLIDE 35

Generating sequence

Example: introduce-vertex(v2) v1 v2

slide-36
SLIDE 36

Generating sequence

Example: introduce-edge(v1v2) v1 v2

slide-37
SLIDE 37

Generating sequence

Example: introduce-edge(v1v2) v1 v2

slide-38
SLIDE 38

Generating sequence

Example: introduce-vertex(v3) v1 v2

slide-39
SLIDE 39

Generating sequence

Example: introduce-vertex(v3) v1 v2 v3

slide-40
SLIDE 40

Generating sequence

Example: introduce-edge(v1v3) v1 v2 v3

slide-41
SLIDE 41

Generating sequence

Example: introduce-edge(v1v3) v1 v2 v3

slide-42
SLIDE 42

Generating sequence

Example: introduce-edge(v2v3) v1 v2 v3

slide-43
SLIDE 43

Generating sequence

Example: introduce-edge(v2v3) v1 v2 v3

slide-44
SLIDE 44

Generating sequence

Example: forget(v2) v1 v2 v3

slide-45
SLIDE 45

Generating sequence

Example: forget(v2) v1 v2 v3

slide-46
SLIDE 46

Generating sequence

Example: introduce-vertex(v4) v1 v2 v3

slide-47
SLIDE 47

Generating sequence

Example: introduce-vertex(v4) v1 v2 v3 v4

slide-48
SLIDE 48

Generating sequence

Example: introduce-edge(v1v4) v1 v2 v3 v4

slide-49
SLIDE 49

Generating sequence

Example: introduce-edge(v1v4) v1 v2 v3 v4

slide-50
SLIDE 50

Generating sequence

Example: introduce-edge(v3v4) v1 v2 v3 v4

slide-51
SLIDE 51

Generating sequence

Example: introduce-edge(v3v4) v1 v2 v3 v4

slide-52
SLIDE 52

Generating sequence

Example: forget(v3) v1 v2 v3 v4

slide-53
SLIDE 53

Generating sequence

Example: forget(v3) v1 v2 v3 v4

slide-54
SLIDE 54

Generating sequence

Example: introduce-vertex(v5) v1 v2 v3 v4

slide-55
SLIDE 55

Generating sequence

Example: introduce-vertex(v5) v1 v2 v3 v4 v5

slide-56
SLIDE 56

Generating sequence

Example: introduce-edge(v4v5) v1 v2 v3 v4 v5

slide-57
SLIDE 57

Generating sequence

Example: introduce-edge(v4v5) v1 v2 v3 v4 v5

slide-58
SLIDE 58

Generating sequence

Example: forget(v4) v1 v2 v3 v4 v5

slide-59
SLIDE 59

Generating sequence

Example: forget(v4) v1 v2 v3 v4 v5

slide-60
SLIDE 60

Generating sequence

Example: forget(v1) v1 v2 v3 v4 v5

slide-61
SLIDE 61

Generating sequence

Example: forget(v1) v1 v2 v3 v4 v5

slide-62
SLIDE 62

Generating sequence

Example: forget(v5) v1 v2 v3 v4 v5

slide-63
SLIDE 63

Generating sequence

Example: forget(v5) v1 v2 v3 v4 v5

slide-64
SLIDE 64

Pathwidth definition (first attempt)

◮ Since a path can be generated with k equal to

slide-65
SLIDE 65

Pathwidth definition (first attempt)

◮ Since a path can be generated with k equal to 2 ◮ Call the pathwidth of a graph G the minimum k + 1 such that

G can be generated

slide-66
SLIDE 66

Running example

Independent Set Input: A graph G and an integer k. Question: Is there a subset S of V (G) of size k such that there are no edges between vertices in S? Or find the size of a maximum independent set of G.

slide-67
SLIDE 67

Idea

◮ Follow a generating sequence the graph was constructed ◮ Exploit the fact that the set of special vertices X is small to

compute MIS.

slide-68
SLIDE 68

t-boundaried graphs

A k-boundaried graph is a graph with n vertices and at most k special vertices X ⊆ {x1, . . . , xk}. X is called the boundary of G. Special vertices are ∂(Vj).

X

x1 x2 x3

slide-69
SLIDE 69

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

slide-70
SLIDE 70

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]

slide-71
SLIDE 71

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[∅] 4 T[x1] T[x2] T[x3] T[x1, x2] T[x1, x3] T[x2, x3] T[x1, x2, x3]

slide-72
SLIDE 72

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[∅] 4 T[x1] T[x2] T[x3] T[x1, x2] T[x1, x3] T[x2, x3] T[x1, x2, x3] −∞

slide-73
SLIDE 73

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[∅] 4 T[x1] T[x2] T[x3] T[x1, x2] T[x1, x3] T[x2, x3] 3 T[x1, x2, x3] −∞

slide-74
SLIDE 74

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[∅] 4 T[x1] 4 T[x2] 3 T[x3] 3 T[x1, x2] −∞ T[x1, x3] 3 T[x2, x3] 3 T[x1, x2, x3] −∞

slide-75
SLIDE 75

Introduce

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

X

x1 x2 x3 x4

slide-76
SLIDE 76

Introduce

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

X

x1 x2 x3 x4

slide-77
SLIDE 77

Introduce: Updating table T

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

slide-78
SLIDE 78

Introduce: Updating table T

Suppose xi (here x4) was introduced into X, with closed neighbourhood N[xi]. We update the table T. T[S] =        T[S] if xi / ∈ S, −∞ if xi ∈ S and S ∩ N(xi) = ∅, 1 + T[S \ xi] if xi ∈ S and S ∩ N(xi) = ∅. Update time: 2k · nO(1) [There are tricks to turn it into 2k · kO(1)]

slide-79
SLIDE 79

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 x4

slide-80
SLIDE 80

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 x4

slide-81
SLIDE 81

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

slide-82
SLIDE 82

Forget: Updating table T

Forgetting xi (here x4). T[S] = max

  • T[S], T[S ∪ xi]
  • Update time: 2kkO(1)
slide-83
SLIDE 83

Two questions:

Two important questions are not answered so far

◮ How to find a good generating sequence?

slide-84
SLIDE 84

Two questions:

Two important questions are not answered so far

◮ How to find a good generating sequence? ◮ While the pathwidth of a tree can be arbitrarily large, the

dynamic programs we used on trees and on graphs with small pathwidth are quite similar. Is it possible to combine both approaches?

slide-85
SLIDE 85

Two questions:

Two important questions are not answered so far

◮ How to find a good generating sequence? ◮ While the pathwidth of a tree can be arbitrarily large, the

dynamic programs we used on trees and on graphs with small pathwidth 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.

slide-86
SLIDE 86

Courcelle's THeorem Trees and separators Dynamic programming Computing treewidth Applications on planar graphs Irrelevant vertex technique Beyond treewidth

Path and tree decompositions

slide-87
SLIDE 87

Pathwidth (canonical definition)

A path decomposition of graph G is a sequence of bags Xi ⊆ V (G), i ∈ {1, . . . , , r}, (X1, X2, . . . , Xr) such that

slide-88
SLIDE 88

Pathwidth (canonical definition)

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).

(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 is the minimum width of a path decomposition of G.

slide-89
SLIDE 89

Example

a b c d e f g h a b c d h b c d e e f e i g d h e i a ab abc bc bcd bcde cde de deg degf deg de deh eh ehi hi i

Figure : A graph and its path-decompositions.

slide-90
SLIDE 90

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}.

slide-91
SLIDE 91

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

  • f 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.
slide-92
SLIDE 92

An Example

a b c d e f g h a b c d h b c d e e f e i g d h e i a ab abc bc bcd bcde cde de deg degf deg de deh eh ehi hi i

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

slide-93
SLIDE 93

An Example

a b c d e f g h a b c d h b c d e e f e i g d h e i a ab abc bc bcd bcde cde de deg degf deg de deh eh ehi hi i

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

Exercise: Construct an algorithm that for a given path decomposition of width k constructs a nice path decomposition of width k in time O(k2n).

slide-94
SLIDE 94

Equivalence of definitions

slide-95
SLIDE 95

What about separators?

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.

slide-96
SLIDE 96

DP on graphs of small 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

2kkO(1)n time if a path decomposition of width k is given as input.

slide-97
SLIDE 97

Tractable problems on graphs of pathwidth p

Independent Set O(2ppn) Dominating Set O(3ppn) q-Coloring O(qppn) Max Cut O(2ppn) Odd Cycle Transversal O(3ppn) Hamiltonian Cycle O(pppn) Partition into Triangles O(2ppn)

slide-98
SLIDE 98

Tightness

We will see later that up to SETH these bounds are tight Independent Set O(2kkn) Dominating Set O(3kkn) q-Coloring O(qkkn) Max Cut O(2kkn) Odd Cycle Transversal O(3kkn) Partition into Triangles O(2kkn)

slide-99
SLIDE 99

Pathwidth

◮ Introduced in the 80’s as a part of Robertson and Seymour’s

Graph Minors project.

◮ (Bodlaender and Kloks 96) Graphs of pathwidth k can be

recognized in f(k)n time — FPT algorithm.

slide-100
SLIDE 100

Another Operation: Join Operation

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

slide-101
SLIDE 101

Another Operation: Join Operation

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

X

x1 x2 x3

X

x3 x2 x1

slide-102
SLIDE 102

Another Operation: Join Operation

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

X

x1 x2 x3

X

x3 x2 x1

slide-103
SLIDE 103

Another Operation: Join Operation

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

X

x1 x2 x3

X

x3 x2 x1

slide-104
SLIDE 104

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(2k

slide-105
SLIDE 105

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 2kkO(1)n

time if a construction of G with k labels is given as input.

slide-106
SLIDE 106

Tree Decomposition: canonical definition

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

slide-107
SLIDE 107

Tree Decomposition: canonical definition

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 is the minimum width of a tree decomposition of G.

slide-108
SLIDE 108

Treewidth Applications

◮ Graph Minors ◮ Parameterized Algorithms ◮ Exact Algorithms ◮ Approximation Schemes ◮ Kernelization ◮ Databases ◮ CSP’s ◮ Bayesian Networks ◮ AI ◮ ...

slide-109
SLIDE 109

Exercise: What are the widths of these graphs?

1 Number of cycles is bounded.

good bad bad bad

2 Removing a bounded number of vertices makes it acyclic.

good good bad bad

3 Bounded-size parts connected in a tree-like way.

bad bad good good

17

slide-110
SLIDE 110

Treewidth

◮ Discovered and rediscovered many times: Halin 1976, Bertel´

e and Brioschi, 1972

◮ In the 80’s as a part of Robertson and Seymour’s Graph

Minors project.

◮ Arnborg and Proskurowski: algorithms

slide-111
SLIDE 111

Separation Property

For every pair of adjacent nodes of the path of a path decomposition, the intersection of the corresponding bags is a separator.

slide-112
SLIDE 112

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—every bag is a separator.

slide-113
SLIDE 113

Trees and separators Courcelle's THeorem Computing treewidth Applications on planar graphs Irrelevant vertex technique Beyond treewidth Path and tree decompositions

Dynamic programming

slide-114
SLIDE 114

Reminder: Solving the Party Problem on trees

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 B[v] = k

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).

slide-115
SLIDE 115

Weighted Max Independent Set and tree decompositions

Fact: Given a tree decomposition of width k, Weighted Max Independent Set can be solved in time O(2kkO(1) · n). Xt: vertices appearing in node t. Vt: vertices appearing in the subtree rooted at t. Generalizing our solution for trees: Instead of computing two values A[v], B[v] for each vertex of the graph, we compute 2|Xt| ≤ 2k+1 values for each bag Xt.

. t b, e, f g, h c, d, f b, c, f d, f , g a, b, c ∅ =? bc =? b =? cf =? c =? bf =? f =? bcf =?

slide-116
SLIDE 116

Weighted Max Independent Set and tree decompositions

Xt: vertices appearing in node t. Vt: vertices appearing in the subtree rooted at t. c[t, S]: the maximum weight of an in- dependent set I ⊆ Vt with I ∩Xt = S.

. t b, e, f g, h c, d, f b, c, f d, f , g a, b, c ∅ =? bc =? b =? cf =? c =? bf =? f =? bcf =?

How to determine c[t, S] if all the values are known for the children

  • f t?
slide-117
SLIDE 117

Nice tree decompositions

Definition: A rooted tree decomposition is nice if every node t is

  • ne of the following 4 types:

◮ Leaf: no children, |Xt| = 1 ◮ Introduce: one child q, Xt = Xq ∪ {v} for some vertex v ◮ Forget: one child q, Xt = Xq \ {v} for some vertex v ◮ Join: two children t1, t2 with Xt = Xt1 = Xt2

Leaf Forget Join Introduce u, v, w u, v, w u, w u, w u, v, w u, v, w u, v, w v

slide-118
SLIDE 118

Nice tree decompositions

Definition: A rooted tree decomposition is nice if every node t is

  • ne of the following 4 types:

◮ Leaf: no children, |Xt| = 1 ◮ Introduce: one child q, Xt = Xq ∪ {v} for some vertex v ◮ Forget: one child q, Xt = Xq \ {v} for some vertex v ◮ Join: two children t1, t2 with Xt = Xt1 = Xt2

Leaf Forget Join Introduce u, v, w u, v, w u, w u, w u, v, w u, v, w u, v, w v

Fact: A tree decomposition of width k and n nodes can be turned into a nice tree decomposition of width k and O(kn) nodes in time O(k2n).

slide-119
SLIDE 119

Weighted Max Independent Set and nice tree decompositions

◮ Leaf: no children, |Xt| = 1

Trivial!

◮ Introduce: one child q, Xt = Xq ∪ {v} for some vertex v

c[t, S] =        c[q, S] if v ∈ S, c[q, S \ {v}] + w(v) if v ∈ S but v has no neighbor in S, −∞ if S contains v and its neighbor.

Leaf Forget Join Introduce u, v, w u, v, w u, w u, w u, v, w u, v, w u, v, w v

slide-120
SLIDE 120

Weighted Max Independent Set and nice tree decompositions

◮ Forget: one child y, Xt = Xq \ {v} for some vertex v

c[t, S] = max{c[q, S], c[q, S ∪ {v}]}

◮ Join: two children t1, t2 with Xt = Xt1 = Xt2

c[t, S] = c[t1, S] + c[t2, S] − w(S)

Leaf Forget Join Introduce u, v, w u, v, w u, w u, w u, v, w u, v, w u, v, w v

slide-121
SLIDE 121

Weighted Max Independent Set and nice tree decompositions

◮ Forget: one child y, Xt = Xq \ {v} for some vertex v

c[t, S] = max{c[q, S], c[q, S ∪ {v}]}

◮ Join: two children t1, t2 with Xt = Xt1 = Xt2

c[t, S] = c[t1, S] + c[t2, S] − w(S) There are at most 2k+1 · n subproblems c[t, S] and each subproblem can be solved in O(n) time (assuming the children are already solved). There is a trick [exercise] to reduce it to O(k). ⇒ Running time is O(2k · kO(1)n).

slide-122
SLIDE 122

Dominating Set

Exercise

Show how to solve the dominating set problem in 5kkO(1)n time

  • n graphs of treewidth k.
slide-123
SLIDE 123

Dominating Set

Exercise

Show how to solve the dominating set problem in 5kkO(1)n time

  • n graphs of treewidth k.

Each vertex can be in one of three states:

◮ chosen to the solution, ◮ not chosen, not yet dominated, ◮ not chosen, dominated.

But join operation is expensive.

slide-124
SLIDE 124

Dominating Set

Exercise

Show how to solve the dominating set problem in 5kkO(1)n time

  • n graphs of treewidth k.

Each vertex can be in one of three states:

◮ chosen to the solution, ◮ not chosen, not yet dominated, ◮ not chosen, dominated.

But join operation is expensive. It is possible to improve to 3kkO(1)n by making use of subset convolution (later...)

slide-125
SLIDE 125

Steiner tree

We are given an undirected graph G and a set of vertices K ⊆ V (G), called terminals. The goal is to find a subtree H of G

  • f the minimum possible size (that is, with the minimum possible

number of edges) that connects all the terminals. Fact: Given a tree decomposition of width k, Steiner tree can be solved in time kO(k) · n.

slide-126
SLIDE 126

Treewidth DP for Steiner tree

Xt Gt H Figure : Steiner tree H intersecting bag Xt and graph Gt.

slide-127
SLIDE 127

Treewidth DP for Steiner tree

Idea: Construct forest F in Gt such that Every terminal from K ∩ Vt should belong to some connected component of F. Encode this information by keeping, for each subset X ⊆ Xt and each partition P of X, the minimum size of a forest F in Gt such that (a) K ∩ Vt ⊆ V (F), i.e., F spans all terminals from Vt, (b) V (F) ∩ Xt = X, and (c) the intersections of Xt with vertex sets of connected components of F form exactly the partition P of X.

slide-128
SLIDE 128

Treewidth DP for Steiner tree

◮ When we introduce a new vertex or join partial solution (at

join nodes), the connected components of partial solutions could merge and thus we need to keep track of the updated partition into connected components.

slide-129
SLIDE 129

Treewidth DP for Steiner tree

◮ When we introduce a new vertex or join partial solution (at

join nodes), the connected components of partial solutions could merge and thus we need to keep track of the updated partition into connected components.

◮ How to avoid cycles in join operations?

Xt Gt2 Gt1

slide-130
SLIDE 130

Treewidth DP for Steiner tree

◮ At the end, everything boils down to going to all possible

partitions of all bags, which is, roughly kk · n.

slide-131
SLIDE 131

Treewidth DP for Steiner tree

◮ At the end, everything boils down to going to all possible

partitions of all bags, which is, roughly kk · n.

◮ We will see how single-exponential 2O(k) on treewidth can be

  • btained later.
slide-132
SLIDE 132

Treewidth DP

Conclusion The main challenge for most of the problems is to understand what information to store at nodes of the tree decomposition. Obtaining formulas for forget, introduce and join nodes can be a tedious task, but is usually straightforward once a precise definition of a state is established.

slide-133
SLIDE 133

Fact

Independent Set, Dominating Set, q-Coloring, Max-Cut, Odd Cycle Transversal, Hamiltonian Cycle, Partition into Triangles, Feedback Vertex Set, Vertex Disjoint Cycle Packing and million other problems are FPT parameterized by the treewidth.

slide-134
SLIDE 134

Meta-theorem for treewidth DP

While arguments for each of the problems are different, there are a lot of things in common...

slide-135
SLIDE 135

Coming soon...

Trees and separators Path and tree decompositions Dynamic programming Computing treewidth Applications on planar graphs Irrelevant vertex technique Beyond treewidth

Courcelle's THeorem