Treewidth and Applications

60
Treewidth 2: Applications Saket Saurabh The Institute of Mathematical Sciences, India ASPAK 2014, March 3-8

Transcript of Treewidth and Applications

Page 1: Treewidth and Applications

Treewidth 2: Applications

Saket Saurabh

The Institute of Mathematical Sciences, India

ASPAK 2014, March 3-8

Page 2: Treewidth and Applications

I Introduction and definition DONE

I Part I: Algorithms for bounded treewidth graphs. DONE

I Part II: Graph-theoretic properties of treewidth.

I Part III: Applications for general graphs.

I Part IV: Algorithm for finding treewidth

I Part V: Irrelevant Vertices – Planar Vertex Deletion.

Page 3: Treewidth and Applications

Applications

Algorithms for graphs of bounded treewidth find many

applications, for example in

I Graph Minors

I Exact Algorithms

I Approximation Schemes

I Parameterized Algorithms

I Kernelization

I Databases

I CSP’s

Page 4: Treewidth and Applications

Application I: Parameterized Algorithms

Extended Monadic Second Order Logic (EMSO) A logical language

on graphs consisting of the following:

I Logical connectives ∧, ∨, →, ¬, =, 6=I quantifiers ∀, ∃ over vertex/edge variables

I predicate adj(u, v): vertices u and v are adjacent

I predicate inc(e, v): edge e is incident to vertex v

I ∈, ⊆ for vertex/edge sets

Example: The formula∃C ⊆ V ∀v ∈ C ∃u1, u2 ∈ C (u1 6= u2 ∧ adj(u1, v) ∧ adj(u2, v)) istrue . . .if graph G (V ,E ) has a cycle.

Page 5: Treewidth and Applications

Application I: Parameterized Algorithms

Extended Monadic Second Order Logic (EMSO) A logical language

on graphs consisting of the following:

I Logical connectives ∧, ∨, →, ¬, =, 6=I quantifiers ∀, ∃ over vertex/edge variables

I predicate adj(u, v): vertices u and v are adjacent

I predicate inc(e, v): edge e is incident to vertex v

I ∈, ⊆ for vertex/edge sets

Example: The formula∃C ⊆ V ∀v ∈ C ∃u1, u2 ∈ C (u1 6= u2 ∧ adj(u1, v) ∧ adj(u2, v)) istrue . . .if graph G (V ,E ) has a cycle.

Page 6: Treewidth and Applications

Application I: Parameterized Algorithms

Extended Monadic Second Order Logic (EMSO) A logical language

on graphs consisting of the following:

I Logical connectives ∧, ∨, →, ¬, =, 6=I quantifiers ∀, ∃ over vertex/edge variables

I predicate adj(u, v): vertices u and v are adjacent

I predicate inc(e, v): edge e is incident to vertex v

I ∈, ⊆ for vertex/edge sets

Example: The formula∃C ⊆ V ∀v ∈ C ∃u1, u2 ∈ C (u1 6= u2 ∧ adj(u1, v) ∧ adj(u2, v)) istrue . . .if graph G (V ,E ) has a cycle.

Page 7: Treewidth and Applications

Courcelle’s Theorem

Courcelle’s Theorem: If a graph property can be expressed inEMSO with formula ϕ of size |ϕ|, then for every fixed w ≥ 1, thereis an algorithm running in time f (|ϕ|,w) · n for testing thisproperty on graphs having treewidth at most w .Independent Set, Dominating Set, q Coloring, Max Cut, Odd CycleTransversal, Hamiltonian Cycle, Partition into Triangles, FeedbackVertex Set, Vertex Disjoint Cycle Packing and million otherproblems are FPT parameterized by the treewidth.

Page 8: Treewidth and Applications

Courcelle’s Theorem

Courcelle’s Theorem: If a graph property can be expressed inEMSO with formula ϕ of size |ϕ|, then for every fixed w ≥ 1, thereis an algorithm running in time f (|ϕ|,w) · n for testing thisproperty on graphs having treewidth at most w .Independent Set, Dominating Set, q Coloring, Max Cut, Odd CycleTransversal, Hamiltonian Cycle, Partition into Triangles, FeedbackVertex Set, Vertex Disjoint Cycle Packing and million otherproblems are FPT parameterized by the treewidth.

Page 9: Treewidth and Applications

Properties of treewidth

Fact: treewidth ≤ 2 if and only if graphis subgraph of a series-parallel graph

Fact: For every k ≥ 2, the treewidth ofthe k × k grid is exactly k.

Fact: Treewidth does not increase if we delete edges, deletevertices, or contract edges.

=⇒ If F is a minor of G , then the treewidth of F is at most thetreewidth of G .

The treewidth of the k-clique is k − 1.

Page 10: Treewidth and Applications

Properties of treewidth

Fact: treewidth ≤ 2 if and only if graphis subgraph of a series-parallel graph

Fact: For every k ≥ 2, the treewidth ofthe k × k grid is exactly k.

Fact: Treewidth does not increase if we delete edges, deletevertices, or contract edges.

=⇒ If F is a minor of G , then the treewidth of F is at most thetreewidth of G .

The treewidth of the k-clique is k − 1.

Page 11: Treewidth and Applications

Properties of treewidth

Fact: treewidth ≤ 2 if and only if graphis subgraph of a series-parallel graph

Fact: For every k ≥ 2, the treewidth ofthe k × k grid is exactly k.

Fact: Treewidth does not increase if we delete edges, deletevertices, or contract edges.

=⇒ If F is a minor of G , then the treewidth of F is at most thetreewidth of G .

The treewidth of the k-clique is k − 1.

Page 12: Treewidth and Applications

Properties of treewidth

Fact: treewidth ≤ 2 if and only if graphis subgraph of a series-parallel graph

Fact: For every k ≥ 2, the treewidth ofthe k × k grid is exactly k.

Fact: Treewidth does not increase if we delete edges, deletevertices, or contract edges.

=⇒ If F is a minor of G , then the treewidth of F is at most thetreewidth of G .

The treewidth of the k-clique is k − 1.

Page 13: Treewidth and Applications

Obstruction to Treewidth

Figure : Example of a 6× 6-grid �6 and a triangulated grid Γ4.

Another, extremely useful obstructions to small treewidth, aregrid-minors. Let t be a positive integer. The t × t-grid �t is agraph with vertex set {(x , y) | x , y ∈ {1, 2, . . . , t}}. Thus �t hasexactly t2 vertices. Two different vertices (x , y) and (x ′, y ′) areadjacent if and only if |x − x ′|+ |y − y ′| ≤ 1. The border of �t isthe set of vertices with coordinates (1, y), (t, y), (t, 1), and (x , t),where x , y ∈ {1, 2, . . . , t}

Page 14: Treewidth and Applications

As we already have seen, if a graph contains large grid as a minor,its treewidth is also large.

Page 15: Treewidth and Applications

As we already have seen, if a graph contains large grid as a minor,its treewidth is also large.

What is much more surprising, is that the converse is also true,every graph of large treewidth contains a large grid as a minor.

Page 16: Treewidth and Applications

Excluded Grid Theorem

Fact: [Excluded Grid Theorem] If the treewidth of G is at leastk4k

2(k+2), then G has a k × k grid minor.[Robertson and Seymour ]

Page 17: Treewidth and Applications

Excluded Grid Theorem

Fact: [Excluded Grid Theorem] If the treewidth of G is at leastk4k

2(k+2), then G has a k × k grid minor.[Robertson and Seymour ]

It was open for many years whether a polynomial relationship couldbe established between the treewidth of a graph G and the size ofits largest grid minor.

Page 18: Treewidth and Applications

Excluded Grid Theorem

Fact: [Excluded Grid Theorem] If the treewidth of G is at leastk4k

2(k+2), then G has a k × k grid minor.[Robertson and Seymour ]

It was open for many years whether a polynomial relationship couldbe established between the treewidth of a graph G and the size ofits largest grid minor.

Theorem (Excluded Grid Theorem, Chekuri and Chuzhoy)

Let t ≥ 0 be an integer. There exists a universal constant c, suchthat every graph of treewidth at least c · t99 contains �t as aminor.

Page 19: Treewidth and Applications

Excluded Grid Theorem

Fact: [Excluded Grid Theorem] If the treewidth of G is at leastk4k

2(k+2), then G has a k × k grid minor.[Robertson and Seymour ]

Page 20: Treewidth and Applications

Excluded Grid Theorem

Fact: [Excluded Grid Theorem] If the treewidth of G is at leastk4k

2(k+2), then G has a k × k grid minor.[Robertson and Seymour ]

It was open for many years whether a polynomial relationship couldbe established between the treewidth of a graph G and the size ofits largest grid minor.

Page 21: Treewidth and Applications

Excluded Grid Theorem

Fact: [Excluded Grid Theorem] If the treewidth of G is at leastk4k

2(k+2), then G has a k × k grid minor.[Robertson and Seymour ]

It was open for many years whether a polynomial relationship couldbe established between the treewidth of a graph G and the size ofits largest grid minor.

Theorem (Excluded Grid Theorem, Chekuri and Chuzhoy)

Let t ≥ 0 be an integer. There exists a universal constant c, suchthat every graph of treewidth at least c · t99 contains �t as aminor.

Page 22: Treewidth and Applications

Excluded Grid Theorem A : Planar Graph

Much better relations. We have two theorems:

Theorem (Planar Excluded Grid Theorem)

Let t ≥ 0 be an integer. Every planar graph G of treewidth atleast 9

2 t, contains �t as a minor. Furthermore, there exists apolynomial-time algorithm that for a given planar graph G eitheroutputs a tree decomposition of G of width 9

2 t or constructs aminor model of �t in G.

Page 23: Treewidth and Applications

Excluded Grid Theorem : Planar Graph

One more Excluded Grid Theorem, this time not for minors butjust for edge contractions.

Figure : Example of a 6× 6-grid �6 and a triangulated grid Γ4.

Page 24: Treewidth and Applications

Excluded Grid Theorem : Planar Graph

One more Excluded Grid Theorem, this time not for minors butjust for edge contractions.

Figure : Example of a 6× 6-grid �6 and a triangulated grid Γ4.

For an integer t > 0 the graph Γt is obtained from the grid �t byadding for every 1 ≤ x , y ≤ t − 1, the edge (x , y), (x + 1, y + 1),and making the vertex (t, t) adjacent to all vertices with x ∈ {1, t}and y ∈ {1, t}.

Page 25: Treewidth and Applications

Excluded Grid Theorem : Planar Graph

Figure : Example of a 6× 6-grid �6 and a triangulated grid Γ4.

TheoremFor any connected planar graph G and integer t ≥ 0, iftw(G ) ≥ 9(t + 1), then G contains Γt as a contraction.Furthermore there exists a polynomial-time algorithm that given Geither outputs a tree decomposition of G of width 9(t + 1) or a setof edges whose contraction result in Γt .

Page 26: Treewidth and Applications

Excluded Grid Theorem : Planar Graph

One more Excluded Grid Theorem, this time not for minors butjust for edge contractions.

TheoremFor any connected planar graph G and integer t ≥ 0, iftw(G ) ≥ 9(t + 1), then G contains Γt as a contraction.Furthermore there exists a polynomial-time algorithm that given Geither outputs a tree decomposition of G of width 9(t + 1) or a setof edges whose contraction result in Γt .

Page 27: Treewidth and Applications

Excluded Grid Theorem : Planar Graph

One more Excluded Grid Theorem, this time not for minors butjust for edge contractions.

TheoremFor any connected planar graph G and integer t ≥ 0, iftw(G ) ≥ 9(t + 1), then G contains Γt as a contraction.Furthermore there exists a polynomial-time algorithm that given Geither outputs a tree decomposition of G of width 9(t + 1) or a setof edges whose contraction result in Γt .

Can we have such theorems for generalgraphs?

Page 28: Treewidth and Applications

Outerplanar graphs

Definition: A planar graph is outerplanar if it has a planarembedding where every vertex is on the infinite face.

Fact: Every outerplanar graph has treewidth at most 2.

=⇒ Every outerplanar graph is series-parallel.

Page 29: Treewidth and Applications

Outerplanar graphs

Definition: A planar graph is outerplanar if it has a planarembedding where every vertex is on the infinite face.

Fact: Every outerplanar graph has treewidth at most 2.

=⇒ Every outerplanar graph is series-parallel.

Page 30: Treewidth and Applications

k-outerplanar graphs

Given a planar embedding, we can define layers by iterativelyremoving the vertices on the infinite face.

Definition: A planar graph is k-outerplanar if it has a planarembedding having at most k layers.

1

1 1

1

2

2

1

2

3

3

2

3

3

3

3

2

2

2

32

2

2

1

Fact: Every k-outerplanar graph has treewidth at most 3k + 1.

Page 31: Treewidth and Applications

k-outerplanar graphs

Given a planar embedding, we can define layers by iterativelyremoving the vertices on the infinite face.

Definition: A planar graph is k-outerplanar if it has a planarembedding having at most k layers.

1

1 1

1

2

2

1

2

3

3

2

3

3

3

3

2

2

2

32

2

2

1

Fact: Every k-outerplanar graph has treewidth at most 3k + 1.

Page 32: Treewidth and Applications

k-outerplanar graphs

Given a planar embedding, we can define layers by iterativelyremoving the vertices on the infinite face.

Definition: A planar graph is k-outerplanar if it has a planarembedding having at most k layers.

2

2

2 3

2

2

2

3

3

3

3

2

3

3

2

2

2

Fact: Every k-outerplanar graph has treewidth at most 3k + 1.

Page 33: Treewidth and Applications

k-outerplanar graphs

Given a planar embedding, we can define layers by iterativelyremoving the vertices on the infinite face.

Definition: A planar graph is k-outerplanar if it has a planarembedding having at most k layers.

2

2

2

3

3

2

3

3

3

3

2

2

2

32

2

2

Fact: Every k-outerplanar graph has treewidth at most 3k + 1.

Page 34: Treewidth and Applications

k-outerplanar graphs

Given a planar embedding, we can define layers by iterativelyremoving the vertices on the infinite face.

Definition: A planar graph is k-outerplanar if it has a planarembedding having at most k layers.

3

33

3

3

3

3

Fact: Every k-outerplanar graph has treewidth at most 3k + 1.

Page 35: Treewidth and Applications

Shifting Techniques

Page 36: Treewidth and Applications

Building Blocks of the Technique

For vertex v of a graph G and integer r ≥ 1, we denote by G rv the

subgraph of G induced by vertices within distance r from v in G .

Page 37: Treewidth and Applications

Building Blocks of the Technique

For vertex v of a graph G and integer r ≥ 1, we denote by G rv the

subgraph of G induced by vertices within distance r from v in G .

LemmaLet G be a planar graph, v ∈ V (G ) and r ≥ 1. Thentw(G r

v ) ≤ 18(r + 1).

Proof.On board.

Page 38: Treewidth and Applications

Building Blocks of the TechniqueFor vertex v of a graph G and integer r ≥ 1, we denote by G r

v thesubgraph of G induced by vertices within distance r from v in G .

LemmaLet G be a planar graph, v ∈ V (G ) and r ≥ 1. Thentw(G r

v ) ≤ 18(r + 1).

Proof.On board.

18(r + 1) in the above proof can be made 3r + 1.

LemmaLet v be a vertex of a planar graph G and let Li , be the vertices ofG at distance i , 0 ≤ i ≤ n, from v. Then for any i , j ≥ 0, thetreewidth of the subgraph Gi ,i+j induced by vertices inLi ∪ Li+1 ∪ · · · ∪ Li+j does not exceed 3j + 1.

Proof.On board.

Page 39: Treewidth and Applications

Intuition

The idea behind the shifting technique is as follows.

I Pick a vertex v of planar graph G and run breadth-first search(BFS) from v .

I For any i , j ≥ 0, the treewidth of the subgraph Gi ,i+j inducedby vertices in levels i , i + 1, . . . , i + j of BFS does not exceed3j + 1.

I Now for an appropriate choice of parameters, we can finda“shift” of “windows”, i.e. a disjoint set of a small number ofconsecutive levels of BFS, “covering” the solution. Becauseevery window is of small treewidth, we can employ thedynamic programing or the power of Courcelle’s theorem tosolve the problem.

We will see two examples.

Page 40: Treewidth and Applications

Intuition

The idea behind the shifting technique is as follows.

I Pick a vertex v of planar graph G and run breadth-first search(BFS) from v .

I For any i , j ≥ 0, the treewidth of the subgraph Gi ,i+j inducedby vertices in levels i , i + 1, . . . , i + j of BFS does not exceed3j + 1.

I Now for an appropriate choice of parameters, we can finda“shift” of “windows”, i.e. a disjoint set of a small number ofconsecutive levels of BFS, “covering” the solution. Becauseevery window is of small treewidth, we can employ thedynamic programing or the power of Courcelle’s theorem tosolve the problem.

We will see two examples.

Page 41: Treewidth and Applications

Intuition

The idea behind the shifting technique is as follows.

I Pick a vertex v of planar graph G and run breadth-first search(BFS) from v .

I For any i , j ≥ 0, the treewidth of the subgraph Gi ,i+j inducedby vertices in levels i , i + 1, . . . , i + j of BFS does not exceed3j + 1.

I Now for an appropriate choice of parameters, we can finda“shift” of “windows”, i.e. a disjoint set of a small number ofconsecutive levels of BFS, “covering” the solution. Becauseevery window is of small treewidth, we can employ thedynamic programing or the power of Courcelle’s theorem tosolve the problem.

We will see two examples.

Page 42: Treewidth and Applications

Intuition

The idea behind the shifting technique is as follows.

I Pick a vertex v of planar graph G and run breadth-first search(BFS) from v .

I For any i , j ≥ 0, the treewidth of the subgraph Gi ,i+j inducedby vertices in levels i , i + 1, . . . , i + j of BFS does not exceed3j + 1.

I Now for an appropriate choice of parameters, we can finda“shift” of “windows”, i.e. a disjoint set of a small number ofconsecutive levels of BFS, “covering” the solution. Becauseevery window is of small treewidth, we can employ thedynamic programing or the power of Courcelle’s theorem tosolve the problem.

We will see two examples.

Page 43: Treewidth and Applications

Subgraph Isomorphism

Subgraph Isomorphism: given graphs H and G , find a copy ofH in G as subgraph. Parameter k := |V (H)|.

EMSO formula of size kO(1) for Subgraph Isomorphism exists.

This now using Courcelle’s Theorem implies that we havef (k ,w) · n time algorithm for Subgraph Isomorphism ongraphs of treewidth w .

Page 44: Treewidth and Applications

Subgraph Isomorphism

Subgraph Isomorphism: given graphs H and G , find a copy ofH in G as subgraph. Parameter k := |V (H)|.

EMSO formula of size kO(1) for Subgraph Isomorphism exists.

This now using Courcelle’s Theorem implies that we havef (k ,w) · n time algorithm for Subgraph Isomorphism ongraphs of treewidth w .

Page 45: Treewidth and Applications

Subgraph Isomorphism

Subgraph Isomorphism: given graphs H and G , find a copy ofH in G as subgraph. Parameter k := |V (H)|.

EMSO formula of size kO(1) for Subgraph Isomorphism exists.

This now using Courcelle’s Theorem implies that we havef (k ,w) · n time algorithm for Subgraph Isomorphism ongraphs of treewidth w .

Page 46: Treewidth and Applications

Baker’s shifting strategySubgraph Isomorphism for planar graphs: given planar graphs H andG , find a copy of H in G as subgraph. Parameter k := |V (H)|.

Layers of the planargraph:(as in the definition ofk-outerplanar):I For a fixed 0 ≤ s < k + 1, delete every layer Li with i = s

(mod k + 1)

I The resulting graph is k-outerplanar, hence it has treewidth at most3k + 1.

I Using the f (k ,w) · n time algorithm for Subgraph Isomorphism,the problem can be solved in time f (k , 3k + 1) · n.

I We do this for every 0 ≤ s < k + 1: for at least one value of s, wedo not delete any of the k vertices of the solution =⇒ we find acopy of H in G if there is one.

I Subgraph Isomorphism for planar graphs is FPT parameterizedby k := |V (H)|.

Page 47: Treewidth and Applications

Baker’s shifting strategySubgraph Isomorphism for planar graphs: given planar graphs H andG , find a copy of H in G as subgraph. Parameter k := |V (H)|.

Layers of the planargraph:(as in the definition ofk-outerplanar):I For a fixed 0 ≤ s < k + 1, delete every layer Li with i = s

(mod k + 1)

I The resulting graph is k-outerplanar, hence it has treewidth at most3k + 1.

I Using the f (k ,w) · n time algorithm for Subgraph Isomorphism,the problem can be solved in time f (k , 3k + 1) · n.

I We do this for every 0 ≤ s < k + 1: for at least one value of s, wedo not delete any of the k vertices of the solution =⇒ we find acopy of H in G if there is one.

I Subgraph Isomorphism for planar graphs is FPT parameterizedby k := |V (H)|.

Page 48: Treewidth and Applications

Baker’s shifting strategySubgraph Isomorphism for planar graphs: given planar graphs H andG , find a copy of H in G as subgraph. Parameter k := |V (H)|.

Layers of the planargraph:(as in the definition ofk-outerplanar):I For a fixed 0 ≤ s < k + 1, delete every layer Li with i = s

(mod k + 1)

I The resulting graph is k-outerplanar, hence it has treewidth at most3k + 1.

I Using the f (k ,w) · n time algorithm for Subgraph Isomorphism,the problem can be solved in time f (k , 3k + 1) · n.

I We do this for every 0 ≤ s < k + 1: for at least one value of s, wedo not delete any of the k vertices of the solution =⇒ we find acopy of H in G if there is one.

I Subgraph Isomorphism for planar graphs is FPT parameterizedby k := |V (H)|.

Page 49: Treewidth and Applications

Baker’s shifting strategySubgraph Isomorphism for planar graphs: given planar graphs H andG , find a copy of H in G as subgraph. Parameter k := |V (H)|.

Layers of the planargraph:(as in the definition ofk-outerplanar):I For a fixed 0 ≤ s < k + 1, delete every layer Li with i = s

(mod k + 1)

I The resulting graph is k-outerplanar, hence it has treewidth at most3k + 1.

I Using the f (k ,w) · n time algorithm for Subgraph Isomorphism,the problem can be solved in time f (k , 3k + 1) · n.

I We do this for every 0 ≤ s < k + 1: for at least one value of s, wedo not delete any of the k vertices of the solution =⇒ we find acopy of H in G if there is one.

I Subgraph Isomorphism for planar graphs is FPT parameterizedby k := |V (H)|.

Page 50: Treewidth and Applications

Baker’s shifting strategySubgraph Isomorphism for planar graphs: given planar graphs H andG , find a copy of H in G as subgraph. Parameter k := |V (H)|.

Layers of the planargraph:(as in the definition ofk-outerplanar):I For a fixed 0 ≤ s < k + 1, delete every layer Li with i = s

(mod k + 1)

I The resulting graph is k-outerplanar, hence it has treewidth at most3k + 1.

I Using the f (k ,w) · n time algorithm for Subgraph Isomorphism,the problem can be solved in time f (k , 3k + 1) · n.

I We do this for every 0 ≤ s < k + 1: for at least one value of s, wedo not delete any of the k vertices of the solution =⇒ we find acopy of H in G if there is one.

I Subgraph Isomorphism for planar graphs is FPT parameterizedby k := |V (H)|.

Page 51: Treewidth and Applications

Baker’s shifting strategySubgraph Isomorphism for planar graphs: given planar graphs H andG , find a copy of H in G as subgraph. Parameter k := |V (H)|.

Layers of the planargraph:(as in the definition ofk-outerplanar):I For a fixed 0 ≤ s < k + 1, delete every layer Li with i = s

(mod k + 1)

I The resulting graph is k-outerplanar, hence it has treewidth at most3k + 1.

I Using the f (k ,w) · n time algorithm for Subgraph Isomorphism,the problem can be solved in time f (k , 3k + 1) · n.

I We do this for every 0 ≤ s < k + 1: for at least one value of s, wedo not delete any of the k vertices of the solution =⇒ we find acopy of H in G if there is one.

I Subgraph Isomorphism for planar graphs is FPT parameterizedby k := |V (H)|.

Page 52: Treewidth and Applications

Baker’s shifting strategySubgraph Isomorphism for planar graphs: given planar graphs H andG , find a copy of H in G as subgraph. Parameter k := |V (H)|.

Layers of the planargraph:(as in the definition ofk-outerplanar):I For a fixed 0 ≤ s < k + 1, delete every layer Li with i = s

(mod k + 1)

I The resulting graph is k-outerplanar, hence it has treewidth at most3k + 1.

I Using the f (k ,w) · n time algorithm for Subgraph Isomorphism,the problem can be solved in time f (k , 3k + 1) · n.

I We do this for every 0 ≤ s < k + 1: for at least one value of s, wedo not delete any of the k vertices of the solution =⇒ we find acopy of H in G if there is one.

I Subgraph Isomorphism for planar graphs is FPT parameterizedby k := |V (H)|.

Page 53: Treewidth and Applications

Baker’s shifting strategySubgraph Isomorphism for planar graphs: given planar graphs H andG , find a copy of H in G as subgraph. Parameter k := |V (H)|.

Layers of the planargraph:(as in the definition ofk-outerplanar):I For a fixed 0 ≤ s < k + 1, delete every layer Li with i = s

(mod k + 1)

I The resulting graph is k-outerplanar, hence it has treewidth at most3k + 1.

I Using the f (k ,w) · n time algorithm for Subgraph Isomorphism,the problem can be solved in time f (k , 3k + 1) · n.

I We do this for every 0 ≤ s < k + 1: for at least one value of s, wedo not delete any of the k vertices of the solution =⇒ we find acopy of H in G if there is one.

I Subgraph Isomorphism for planar graphs is FPT parameterizedby k := |V (H)|.

Page 54: Treewidth and Applications

Baker’s shifting strategySubgraph Isomorphism for planar graphs: given planar graphs H andG , find a copy of H in G as subgraph. Parameter k := |V (H)|.

Layers of the planargraph:(as in the definition ofk-outerplanar):I For a fixed 0 ≤ s < k + 1, delete every layer Li with i = s

(mod k + 1)

I The resulting graph is k-outerplanar, hence it has treewidth at most3k + 1.

I Using the f (k ,w) · n time algorithm for Subgraph Isomorphism,the problem can be solved in time f (k , 3k + 1) · n.

I We do this for every 0 ≤ s < k + 1: for at least one value of s, wedo not delete any of the k vertices of the solution =⇒ we find acopy of H in G if there is one.

I Subgraph Isomorphism for planar graphs is FPT parameterizedby k := |V (H)|.

Page 55: Treewidth and Applications

Baker’s shifting strategySubgraph Isomorphism for planar graphs: given planar graphs H andG , find a copy of H in G as subgraph. Parameter k := |V (H)|.

Layers of the planargraph:(as in the definition ofk-outerplanar):I For a fixed 0 ≤ s < k + 1, delete every layer Li with i = s

(mod k + 1)

I The resulting graph is k-outerplanar, hence it has treewidth at most3k + 1.

I Using the f (k ,w) · n time algorithm for Subgraph Isomorphism,the problem can be solved in time f (k , 3k + 1) · n.

I We do this for every 0 ≤ s < k + 1: for at least one value of s, wedo not delete any of the k vertices of the solution =⇒ we find acopy of H in G if there is one.

I Subgraph Isomorphism for planar graphs is FPT parameterizedby k := |V (H)|.

Page 56: Treewidth and Applications

Bisection

For a given n-vertex graph G , weight function w : V (G )→ N andinteger k , the task is to decide if there is a partition of V (G ) intosets V1 and V2 of weights dw(V (G ))/2e and bw(V (G )/2c andsuch that the number of edges between V1 and V2 is at most k. Inother words, we are looking for a balanced partition (V1,V2) witha (V1,V2)-cut at most k.

Page 57: Treewidth and Applications

Bisection

For a given n-vertex graph G , weight function w : V (G )→ N andinteger k , the task is to decide if there is a partition of V (G ) intosets V1 and V2 of weights dw(V (G ))/2e and bw(V (G )/2c andsuch that the number of edges between V1 and V2 is at most k. Inother words, we are looking for a balanced partition (V1,V2) witha (V1,V2)-cut at most k.

LemmaBisection is solvable in time 2t · nO(1) on an n-vertex giventogether with its tree decomposition of width t.

TheoremBisection on planar graphs is solvable in time 2O(k) · nO(1).

Proof.On board.

Page 58: Treewidth and Applications

Approximation schemes

Definition: A polynomial-time approximation scheme (PTAS) for aproblem P is an algorithm that takes an instance of P and arational number ε > 0,

I always finds a (1 + ε)-approximate solution,

I the running time is polynomial in n for every fixed ε > 0.

Typical running times: 21/ε · n, n1/ε, (n/ε)2, n1/ε2.

Some classical problems that have a PTAS:

I Independent Set for planar graphs

I TSP in the Euclidean plane

I Steiner Tree in planar graphs

I Knapsack

Page 59: Treewidth and Applications

Baker’s shifting strategy for EPTAS

Fact: There is a 2O(1/ε) · n time PTAS for Independent Set forplanar graphs.

I Let D := 1/ε. For a fixed 0 ≤ s < D, delete every layer Liwith i = s (mod D)

I The resulting graph is D-outerplanar, hence it has treewidthat most 3D + 1 = O(1/ε).

I Using the O(2w · n) time algorithm for Independent Set,the problem can be solved in time 2O(1/ε) · n.

I We do this for every 0 ≤ s < D: for at least one value of s,we delete at most 1/D = ε fraction of the solution =⇒ weget a (1− ε)-approximate solution.

Page 60: Treewidth and Applications

Bidimensionality