Like this presentation? Why not share!

# 20110319 parameterized algorithms_fomin_lecture03-04

## by Computer Science Club on Mar 24, 2011

• 691 views

### Views

Total Views
691
Views on SlideShare
563
Embed Views
128

Likes
0
4
0

### 6 Embeds128

 http://www.lektorium.tv 106 http://lektorium.tv 7 http://logic.pdmi.ras.ru 6 http://compsciclub.ru 5 http://www.compsciclub.ru 3 http://censys.ru 1

## 20110319 parameterized algorithms_fomin_lecture03-04Presentation Transcript

• IN OM .F O RV DFEParameterized Algorithms II PART I St. Petersburg, 2011
• Powerful toolbox for designing FPT algorithms: Graph Minors Bounded Search Tree Kernelization Color coding Graph Minors Theorem Treewidth Iterative compression Fixed Parameter Algorithms – p.8/98
• Graph Minors FPT algorithmic techniques Signiﬁcant advances in the past 20 years or so (especially in recent years). Powerful toolbox for designing FPT algorithms: Bounded Search Tree Kernelization Color coding Graph Minors Theorem Treewidth Iterative compression Fixed Parameter Algorithms – p.8/98 Neil Robertson Paul Seymour
• Graph Minors Some consequences of the Graph Minors Theorem give a quick way of showing that certain problems are FPT. However, the function f (k) in the resulting FPT algorithms can be HUGE, completely impractical. History: motivation for FPT. Parts and ingredients of the theory are useful for algorithm design. New algorithmic results are still being developed.
• Graph Minors Graph Minors Deﬁnition: Graph H is a minor G (H ≤ G ) if H can be obtained fromDeﬁnition: Graph Hedges, deleting G ) if H can be obtained from G byedges. G by deleting is a minor G (H vertices, and contracting deleting edges, deleting vertices, and contracting edges. u v deleting uv contracting uv u v w Example: A triangle is a minor of a graph G if and only if G has a cycle (i.e., it is not a forest). Example: A triangle is a minor of a graph G if and only if G has a cycle (i.e., it is not a forest). Fixed Parameter Algorithms – p.58/98
• Graph minors Graph minors Equivalent deﬁnition: Graph H is a minor of G if there is a mapping φ that maps each vertex of H to a connected subset of G such that Equivalent deﬁnition: Graph H is a minor of G if there is a mapping φ that maps each vertex of H to a connected subset of G such that φ(u) and φ(v ) are disjoint if u = v , and if uv ∈ and φ(v ) then there = van edge between φ(u) and φ(v ). φ(u) E (G ), are disjoint if u is , and if uv ∈ E (G ), then there is an edge between φ(u) and φ(v ). 1 2 3 4 5 1 2 3 4 5 6 7 6 6 6 4 5 7 7 7 7 5 Fixed Parameter Algorithms – p.59/98
• Minor closed properties Deﬁnition: A set G of graphs is minor closed if whenever G ∈ G and H ≤ G , then H ∈ G as well. Examples of minor closed properties: planar graphs acyclic graphs (forests) graphs having no cycle longer than k empty graphs Examples of not minor closed properties: complete graphs regular graphs bipartite graphs
• Forbidden minors Let G be a minor closed set and let F be the set of “minimal bad graphs”: H ∈ F if H ∈ G, but every proper minor of H is in G. Characterization by forbidden minors: G ∈ G ⇐⇒ ∀H ∈ F, H ≤ G The set F is the obstruction set of property G.
• Forbidden minors Let G be a minor closed set and let F be the set of “minimal bad graphs”: H ∈ F if H ∈ G, but every proper minor of H is in G. Characterization by forbidden minors: G ∈ G ⇐⇒ ∀H ∈ F, H ≤ G The set F is the obstruction set of property G. Theorem: [Wagner] A graph is planar if and only if it does not have a K5 or K3,3 minor. In other words: the obstruction set of planarity is F = {K5 , K3,3 }. Does every minor closed property have such a ﬁnite characterization?
• Graph Minors Theorem Theorem: [Robertson and Seymour] Every minor closed property G has a ﬁnite obstruction set. Note: The proof is contained in the paper series “Graph Minors I–XX”. Note: The size of the obstruction set can be astronomical even for simple properties.
• Graph Minors Theorem Theorem: [Robertson and Seymour] Every minor closed property G has a ﬁnite obstruction set. Note: The proof is contained in the paper series “Graph Minors I–XX”. Note: The size of the obstruction set can be astronomical even for simple properties. Theorem: [Robertson and Seymour] For every ﬁxed graph H, there is an O(n3 ) time algorithm for testing whether H is a minor of the given graph G . Corollary: For every minor closed property G, there is an O(n3 ) time algorithm for testing whether a given graph G is in G.
• Applications Planar Face Cover: Given a graph G and Applications ﬁnd an integer k, an embedding of planar graph G such that there are k faces that cover all the vertices. : Given a graph G and an integer k , ﬁnd an embedding of P LANAR FACE C OVER planar graph G such that there are k faces that cover all the vertices. One line argument: One line For every ﬁxed k , the class Gk of graphs of yes-instances is minor closed. argument: ⇓ ﬁxed ﬁxed k , there is a G of graphs P LANAR FACE COVER . For every For every k, the classO(n3k) time algorithm forof yes-instances is minor closed. Note: non-uniform FPT. ⇓ Fixed Parameter Algorithms – p.63/98 For every ﬁxed k, there is a O(n3 ) time algorithm for Planar Face Cover. Note: non-uniform FPT.
• Applications Applications k-Leaf Spanning Tree: Given a graph G and an integer k, ﬁnd a spanning tree with at least k leaves. k -L EAF S PANNING T REE : Given a graph G and an integer k , ﬁnd a spanning tree with at least k leaves. Technical modiﬁcation: Is there such a spanning tree for at least one component of G? Technical modiﬁcation: Is there such a spanning tree for at least one component of G ? One line argument: One For every ﬁxed k , the class Gk of no-instances is minor closed. line argument: ⇓ For every ﬁxed k, kthe class Gk ofREE can be solved in time O(n3 ).closed. For every ﬁxed k , -L EAF S PANNING T no-instances is minor ⇓ Fixed Parameter Algorithms – p.64/98 For every ﬁxed k, k-Leaf Spanning Tree can be solved in time O(n3 ).
• G + k verticesG + k vertices Let G be a graph property, and let G + kv contain graph G if there ⊆ be a graph property, and let + kv that G ∈ G. is a set SLet GV (G ) of k vertices Gsuchcontain graph GSif there is a set S ⊆ V (G ) of k vertices such that G S ∈ G. S Lemma: If G is minor closed, then G + kv is minor closed for every ﬁxed k . Lemma: ⇒ ItG (nonuniform) FPT to decide if G can + transformed into a closedoffor If is is minor closed, then G be kv is minor member G by deleting k vertices. every ﬁxed k. ⇒ It is (nonuniform) FPT to decide if G can be transformed into a member of G by deleting k vertices. Fixed Parameter Algorithms – p.65/98
• G + k verticesG + k vertices Let G be a graph property, and let G + kv contain graph G if there ⊆ be a graph property, and let + kv that G ∈ G. is a set SLet GV (G ) of k vertices Gsuchcontain graph GSif there is a set S ⊆ V (G ) of k vertices such that G S ∈ G. S Lemma: If G is minor closed, then G + kv is minor closed for every ﬁxed k . Lemma: ⇒ ItG (nonuniform) FPT to decide if G can + transformed into a closedoffor If is is minor closed, then G be kv is minor member G by deleting k vertices. every ﬁxed k. ⇒ It is (nonuniform) FPT to decide if G can be transformed into a member of G by deleting k vertices. If G = forests ⇒ G + kv = graphs that can be made acyclic by the deletion of k vertices ⇒ Feedback Vertex Set is FPT. Fixed Parameter Algorithms – p.65/98 If G = planar graphs ⇒ G + kv = graphs that can be made planar by the deletion of k vertices (k-apex graphs) ⇒ k-Apex Graph is FPT. If G = empty graphs ⇒ G + kv = graphs with vertex cover number at most k ⇒ Vertex Cover is FPT.
• Treewidth FPT algorithmic techniques Signiﬁcant advances in the past 20 years or so (especially in recent years). Powerful toolbox for designing FPT algorithms: Bounded Search Tree Kernelization Color coding Graph Minors Theorem Treewidth Iterative compression Fixed Parameter Algorithms – p.8/98
• DTH E WI ETR Introduction and deﬁnition Part I: Algorithms for bounded treewidth graphs. Part II: Graph-theoretic properties of treewidth. Part III: Applications for general graphs.
• 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.
• 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!
• The Party Problem PARTY P ROBLEM Party Problem some colleagues for a party. Problem: Invite Problem: The total fun factor of the invitedapeople. Maximize: Invite some colleagues for party. Maximize: The total fun factor of the invited people. Constraint: Everyone should be having fun. Constraint: Everyone should be having fun. Do not invite a colleague and his direct boss at the same time! No fun with your direct boss! 2 Input: A tree with weights on the Input: A tree with weights 5 6 on the vertices. vertices. Task: Find an independent set of maxi- Task: Find an independent set of maximum weight. mum weight. 4 4 6 Fixed Parameter Algorithms – p.5/48
• The Party Problem PARTY P ROBLEM Party Problem some colleagues for a party. Problem: Invite Problem: The total fun factor of the inviteda party. Maximize: Invite some colleagues for people. Maximize: The total fun factor of the invited people. Constraint: Everyone should be having fun. Constraint: Everyone should be having fun. Do not invite a colleague and his direct boss at the same time! No fun with your direct boss! 2 Input: A tree with weights on the Input: A tree with weights 5 6 vertices. on the vertices. Task: Findan independent set of maxi- Task: Find an independent mum weight. set of maximum weight. 4 4 6 Fixed Parameter Algorithms – p.5/48
• 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 .
• 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 A[vi ] i=1 k A[v ] = max{B[v ] , w (v ) + i=1 B[vi ]} The values A[v ] and B[v ] can be calculated in a bottom-up order (the leaves are trivial).
• TreewidthTreewidth: A measure of how “tree-like” the “tree-like”Treewidth: A measure of how “tree-like” the graph is. Treewidth: A measure of how graph is. a a(Introduced by Robertson and Seymour.)(Introducedgraph is. the by Robertson and Seymour.) (Introduced by Robertson and Seymour.) b b c c d dTree decomposition: Vertices are arranged in a treeTree decomposition: Vertices are arranged in a treestructure satisfying the following properties:structure satisfying the following properties: Tree decomposition: Vertices are ar-1. If u and v areaneighbors, then there is a bag con-1. If u and v in neighbors, then there is a bag con- ranged are tree structure satisfying the fol- lowing properties: taining both of them. taining both of them. e e ff g g h h2. For every u and v , are bags containing v there a2. For every vertex v , the neighbors, then form a 1. If vertex v the bags containing v form is connectedbag containing both of them. a subtree. connected subtree. c, d, ff c, d, 2. For every vertex v , the bags containing v form a connected b, c, ff b, c, d, ff,,g d, g subtree. a, b, c a, b, c b, e, ff b, e, g ,,h g h Fixed Parameter Algorithms – p.8/48 Fixed Parameter Algorithms – p.8/48
• TreewidthTreewidth: A measure of how “tree-like” the “tree-like”Treewidth: A measure of how “tree-like” the graph is. Treewidth: A measure of how graph is.(Introducedgraph is. a a(Introduced by Robertson and Seymour.) the by Robertson and Seymour.) b cc d (Introduced by Robertson and Seymour.)Tree decomposition: Vertices are arranged in a treeTree decomposition: Vertices are arranged in a tree b dstructure satisfying the following properties:structure satisfying the following properties: Tree decomposition: Vertices are ar-1. If u and v areaneighbors, then there is a bag con-1. If u and v in neighbors, then there is a bag con- ranged are tree structure satisfying the fol- lowing properties: taining both of them. taining both of them. e e ff gg hh2. For every vertex v ,, are bags containing v there a2. For every u and v the neighbors, then form a 1. If vertex v the bags containing v form is connectedbag containing both of them. a subtree. connected subtree. c, d, ff c, d, 2. For every vertex v , the bags containing v form a connected b, c, ff d, ff,,g b, c, d, g subtree. a, b, c a, b, c b, e, ff b, e, g ,,h g h Fixed Parameter Algorithms – p.8/48 Fixed Parameter Algorithms – p.8/48
• TreewidthTreewidth: AA measureof how “tree-like” the graph is. Treewidth: measure of how “tree-like” the “tree-like” Treewidth: A measure of how graph is.(Introducedgraph is. (Introduced byRobertson and Seymour.) the by Robertson and Seymour.) aa (Introduced by Robertson arranged in tree b b and Seymour.) cc d dTree decomposition: Vertices are arranged in aatree Tree decomposition: Verticesstructure satisfying the following properties: Tree decomposition: Vertices are ar- structure satisfying the following properties:1.1. Ifrangedvin aneighbors, then there is a bag con- are tree structure there is a bag con- If u u andv are neighbors, and satisfying the fol- lowing properties: taining both of them. taining both of them. ee f f g g h h2.2. Forevery uvertex v ,, are neighbors, then thereaa For 1. If vertex v the bags containing v form is every and v the bags containing v form connectedbag containing a subtree. connected subtree. both of them. c,c, d, f d, f 2. For every vertex v , the bags containing v form a connected b, c, f b, c, f d, f , g d, f , g subtree. a, b, c b, e, f g, h a, b, c b, e, f g, h Fixed Parameter Algorithms – p.8/48 Fixed Parameter Algorithms – p.8/48
• TreewidthTreewidth: AA measureof how “tree-like” the graph is. Treewidth: measure of how “tree-like” the “tree-like” Treewidth: A measure of how graph is.(Introducedgraph is. (Introduced byRobertson and Seymour.) the by Robertson and Seymour.) aa (Introduced by Robertson arranged in tree b b and Seymour.) cc d dTree decomposition: Vertices are arranged in aatree Tree decomposition: Verticesstructure satisfying the following properties: Tree decomposition: Vertices are ar- structure satisfying the following properties:1.1. Ifrangedvin aneighbors, then there is a bag con- are tree structure there is a bag con- If u u andv are neighbors, and satisfying the fol- lowing properties: taining both of them. taining both of them. ee f f g g h h2.2. Forevery uvertex v ,, are neighbors, then thereaa For 1. If vertex v the bags containing v form is every and v the bags containing v form connectedbag containing a subtree. connected subtree. both of them. c,c, d, f d, f 2. For every vertex v , the bags containing v form a connected b, c, f b, c, f d, f , g d, f , g subtree. a, b, c b, e, f g, h Width of the decomposition: largest bag a, b, c b, e, f g, h size −1. treewidth: width of the best decomposi- Fixed Parameter Algorithms – p.8/48 Fixed Parameter Algorithms – p.8/48 tion. Fact: treewidth = 1 iﬀ graph is a forest
• TreewidthTreewidth: AA measuremeasure of how “tree-like” Treewidth: A of how “tree-like” the graph is. Treewidth: measure of how “tree-like” the graph is. the graph is. (Introduced by Robertson and Seymour.)(Introduced by Robertson and Seymour.) a a (Introduced by Robertson and Seymour.) b b c c d d Tree decomposition: Vertices are arranged in a treeTree decomposition: Vertices are arranged in a tree structure satisfying the following properties: are ar- Tree decomposition: Verticesstructure satisfying the following properties: ranged inaretree structure satisfying bag con- a neighbors, then there is a the fol-1.1.If If u and vare neighbors, then there is a bag con- u and v lowing properties: taining both of them. taining both of them. e g e ff g h h For every vertexv , are neighbors, then there is 1. If u and2.2.For every vertex vv ,the bags containing vv form a the bags containing form a a bag containing both of them. connected subtree. connected subtree. c, d, ff c, d, Width 2. the decomposition: largestbagssize −1 of For every vertex v , the bagWidth of the decomposition: largest bag size −1.. containing v form a connected b, c, ff b, c, d, ff ,, g d, gtreewidth: subtree. the best decomposition. treewidth: width of best decomposition. width of the Fact: treewidth the⇐⇒ graph is forest a, b, c b, e, ff b, e, g, hFact: Width of = 1 ⇐⇒ graph is aaforest largest treewidth = 1 decomposition: bag a, b, c g, h size −1. treewidth: width of the best decomposi- Fixed Parameter Algorithms – p.8/48 Fixed Parameter Algorithms – p.8/48 tion. Fact: treewidth = 1 iﬀ graph is a forest
• TreewidthTreewidth: A measure of how “tree-like” the graph is. Treewidth: A measure of how “tree-like” the graph is. Treewidth: A measure of how “tree-like” a(Introduced by Robertson and Seymour.) a (Introduced byis. the graph Robertson and Seymour.) b c dTree(Introduced by Robertson and Seymour.) b c d Tree decomposition: Vertices are arrangedin aa tree decomposition: Vertices are arranged in treestructure satisfying the following properties: structure satisfying the following properties: Tree decomposition: Vertices are ar- 1. If uIfand v are neighbors, then there isisaabag con- ranged in va are neighbors, then there 1. u and bag con- tree structure satisfying the fol- taining both of them. taining both of them. e e f g g lowing properties: f hh 2. ForFor every vertex, vthe bags containing vv form a 2. every vertex v , the bags containing form a 1. If u and v are neighbors, then there is connected subtree. connected subtree. c, d, ff c, d, a bag containing both of them. Width of decomposition: largest bag size −1Width of thethe decomposition: largest bag size−1. . 2. For every vertex v , the bags b, c, f b, c, f d, ff,,g d, g treewidth: width of the best decomposition.treewidth: width of the v form a connected containing best decomposition. subtree.Fact: treewidth = 1 1 ⇐⇒ graph is a forest Fact: treewidth = ⇐⇒ graph is a forest a, b, c a, b, c b, e, ff b, e, gg , h ,h Width of the decomposition: largest bag size −1. Fixed Parameter Algorithms – p.8/48 Fixed Parameter Algorithms – p.8/48 treewidth: width of the best decomposi- tion. Fact: treewidth = 1 iﬀ graph is a forest
• Finding tree decompositions Fact: It is NP-hard to determine the treewidth of a graph (given a graph G and an integer w , decide if the treewidth of G is at most w ), but there is a polynomial-time algorithm for every ﬁxed w .
• Finding tree decompositions Fact: [Bodlaender’s Theorem] For every ﬁxed w , there is a linear-time algorithm that ﬁnds a tree decomposition of width w (if exists). ⇒ Deciding if treewidth is at most w is ﬁxed-parameter tractable. ⇒ If we want an FPT algorithm parameterized by treewidth w of the input graph, then we can assume that a tree decomposition of width w is available.
• Finding tree decompositions Fact: [Bodlaender’s Theorem] For every ﬁxed w , there is a linear-time algorithm that ﬁnds a tree decomposition of width w (if exists). ⇒ Deciding if treewidth is at most w is ﬁxed-parameter tractable. ⇒ If we want an FPT algorithm parameterized by treewidth w of the input graph, then we can assume that a tree decomposition of width w is available. 3 Running time is 2O(w ) · n. Sometimes it is better to use the following results instead: Fact: There is a O(33w · w · n2 ) time algorithm that ﬁnds a tree decomposition of width 4w + 1, if the treewidth of the graph is at most w . Fact: There is a polynomial-time algorithm that ﬁnds a tree √ decomposition of width O(w log w ), if the treewidth of the graph is at most w .
• Part I: Algoritmhs forbounded-treewidth graphs
• and tree decompositionsWeighted Max Independent Setand tree decompositions Fact: Given a tree decomposition of width w of width wM AX I NDEPENDENT S ET can Fact: Given a tree decomposition , W EIGHTED , Weighted Max be solved in time O(2Set .can be solved in time O(2w · n). Independent w · n) c, d, f BBxvertices appearing in nodein . node x. x : : vertices appearing x VV vertices appearing in the subtree rooted at x . x : : vertices appearing in the subtree x b, c, f d, f , g rooted at x. Generalizing our solution for trees: Generalizing our solution for trees: a, b, c b, e, f g, h Instead of computing 2 values A[v ], B[v ] for each Instead of computing 2 values A[v ], vertex of the graph, we compute 2|Bx | ≤ 2w +1 ∅ =? bc =? B[v ] for each bagvertex of the graph, we values for each B . b =? cf =? x compute 2|Bx | ≤ 2w +1 values for each c =? bf =? M[x, S]: the maximum weight of an independent bag Bx . f =? bcf =? set I ⊆ Vx with I ∩ Bx = S . M[x, S]: the maximum weight of an How to determine M[x, S] if all the values are known for independent set I ⊆ Vx with I ∩ Bx = the children of x ? S. Fixed Parameter Algorithms – p.11/48 How to determine M[x, S] if all the values are known for the children of x?
• Nice tree decompositions Deﬁnition: A rooted tree decomposition decompositions x is Nice tree is nice if every node one of the following 4 types: Deﬁnition: A children, |Bx | = is Leaf: no rooted tree decomposition 1 nice if every node x is one of the following 4 types: Introduce: 1 child y , Bx = By ∪ {v } for some vertex v Leaf: no children, |Bx | = 1 Forget: 1 child y , Bx = By {v } for some vertex v Introduce: 1 child y , Bx = By ∪ {v } for some vertex v Join: 2 1 child y , B = 1 , {v }with Bx = By1 = By2 Forget: children y B y2 for some vertex v x y Join: 2 children y1 , y2 with Bx = By1 = By2 Leaf Introduce Forget Join v u, v , w u, w u, v , w u, w u, v , w u, v , w u, v , w Fact: A tree decomposition of width w and n nodes can be turned into a nice tree decomposition of width w and O(wn) nodes in time O(w 2 n). Fact: A tree decomposition of width w and n nodes can be turned Fixed Parameter Algorithms – p.12/48 into a nice tree decomposition of width w and O(wn) nodes in time O(w 2 n).
• Weighted Max Independent Setand nice tree decompositions Leaf: no children, |Bx | = 1 Trivial! Nice tree decompositions Introduce: 1 child y , Bx = By ∪ {v } for some vertex v Deﬁnition: A rooted tree decomposition is nice if every node x is one of the following  4 types: m[y , S]  if v ∈ S, m[x, S]no children, |B S = 1{v }] + w (v ) if v ∈ S but v has no neighbor in S, Leaf: = m[y , |  x −∞ if S contains v and its neighbor.  Introduce: 1 child y , B = B ∪ {v } for some vertex v x y Forget: 1 child y , Bx = By {v } for some vertex v Join: 2 children y1 , y2 with Bx = By1 = By2 Leaf Introduce Forget Join v u, v , w u, w u, v , w u, w u, v , w u, v , w u, v , w Fact: A tree decomposition of width w and n nodes can be turned into a nice tree decomposition of width w and O(wn) nodes in time O(w 2 n). Fixed Parameter Algorithms – p.12/48
• Weighted Max Independent Setand nice tree decompositions Forget: 1 child y , Bx = By {v } for some vertex v Nice tree decompositions m[x, S] = max{m[y , S], m[y , S ∪ {v }]} Join: 2 Achildren decomposition is nice if = By1 = is one of the following Deﬁnition: rooted tree y , y with B every node x B 1 2 x y2 4 types: m[x, S] = m[y1 , S] + m[y2 , S] − w (S) Leaf: no children, |Bx | = 1 Introduce: 1 child y , Bx = By ∪ {v } for some vertex v Forget: 1 child y , Bx = By {v } for some vertex v Join: 2 children y1 , y2 with Bx = By1 = By2 Leaf Introduce Forget Join v u, v , w u, w u, v , w u, w u, v , w u, v , w u, v , w Fact: A tree decomposition of width w and n nodes can be turned into a nice tree decomposition of width w and O(wn) nodes in time O(w 2 n). Fixed Parameter Algorithms – p.12/48
• Weighted Max Independent Setand nice tree decompositions Forget: 1 child y , Bx = By {v } for some vertex v m[x, S] = max{m[y , S], m[y , S ∪ {v }]} Join: 2 children y1 , y2 with Bx = By1 = By2 m[x, S] = m[y1 , S] + m[y2 , S] − w (S) There are at most 2w +1 · n subproblems m[x, S] and each subproblem can be solved in constant time (assuming the children are already solved) ⇒ Running time is O(2w · n). ⇒ Weighted Max Independent Set is FPT parameterized by treewidth ⇒ Weighted Min Vertex Cover is FPT parameterized by treewidth.
• 3-C OLORING and tree decompositions3-Coloring and tree decompositions Fact: Given a tree decomposition of width w , 3-Coloring can Fact: Given a tree O(3w · n). of width w , 3-C OLORING can be solved in O(3w · n). be solved in decomposition Bx :Bx : vertices appearing in node x. vertices appearing in node x . Vx :Vx : vertices appearing in the subtree vertices appearing in the subtree rooted at x . c, d, f rooted at x. ForFor every node x and coloring c {1, 2, 3}, every node x and coloring c : Bx → : B → b, c, f d, f , g x we {1, 2, 3}, we compute Ethec],Boolean compute the Boolean value [x, which is true if and only if c can be extended to a proper a, b, c b, e, f g, h value E [x, c], which is true if and only 3-coloring of Vx . if c can be extended to a proper 3- coloring of Vx . bcf=T bcf=F bcf=T bcf=F ... ... How to to determine [x,[x, c] all all the values are known for How determine E E c] if if the values are known for the children x the children of of?x? Fixed Parameter Algorithms – p.14/48
• 3-Coloring and nice tree decompositions Leaf: no children, |Bx | = 1 Trivial! Introduce: 1 child y , Bx = By ∪ {v } for some vertex v If c(v ) = c(u) for every neighbor u of v , then Nice tree decompositions E [x, c] = E [y , c ], where c is c restricted to By . Forget: 1 rooted tree decomposition is nice{vevery nodesome vertex v Deﬁnition: A child y , Bx = By if } for x is one of the following E [x, c] is true if E [y , c ] is true for one of the 3 extensions of 4 types: c to Leaf:.no children, |B | = 1 By x Introduce: 1 child y , Bx = By ∪ {v } for some vertex v Join: 2 children y , y with B = B = By2 1 2 x y1 E [x, c] = E [y1 , c] ∧ E [y2 , c] Forget: 1 child y , Bx = By {v } for some vertex v Join: 2 children y1 , y2 with Bx = By1 = By2 Leaf Introduce Forget Join v u, v , w u, w u, v , w u, w u, v , w u, v , w u, v , w Fact: A tree decomposition of width w and n nodes can be turned into a nice tree decomposition of width w and O(wn) nodes in time O(w 2 n). Fixed Parameter Algorithms – p.12/48
• 3-Coloring and nice tree decompositions Leaf: no children, |Bx | = 1 Trivial! Introduce: 1 child y , Bx = By ∪ {v } for some vertex v If c(v ) = c(u) for every neighbor u of v , then E [x, c] = E [y , c ], where c is c restricted to By . Forget: 1 child y , Bx = By {v } for some vertex v E [x, c] is true if E [y , c ] is true for one of the 3 extensions of c to By . Join: 2 children y1 , y2 with Bx = By1 = By2 E [x, c] = E [y1 , c] ∧ E [y2 , c] There are at most 3w +1 · n subproblems E [x, c] and each subproblem can be solved in constant time (assuming the children are already solved). ⇒ Running time is O(3w · n). ⇒ 3-Coloring is FPT parameterized by treewidth.
• Vertex coloring More generally: Fact: Given a tree decomposition of width w , c-Coloring can be solved in O ∗ (c w ). Exercise: Every graph of treewidth at most w can be colored with w + 1 colors. Fact: Given a tree decomposition of width w , Vertex Coloring can be solved in time O ∗ (w w ). ⇒ Vertex Coloring is FPT parameterized by treewidth.
• Hamiltonian cycle andtree decompositions Hamiltonian cycle and tree decompositions Fact: Given a tree decomposition of width w , Hamiltonian cycle canO(w ) a tree decomposition w width )w·, H AMILTONIAN CYCLE can be solved in be solved in time of O(w n. Fact: Given time w · n. Bx : vertices appearinginin node x. Bx : vertices appearing node x . 0 Bx 1 Bx 2 Bx x Vx : vertices appearing the subtreesubtreex . Vx : vertices appearing in in the rooted at rootedIf at is a Hamiltonian cycle, then the subgraph H x. H[V ] is a set of paths with endpoints in B . If H is ax Hamiltonian cycle, then xthe subgraph H[Vx ]important properties of H[Vx ] “seen What are the is a set of paths with from the outside world”? endpoints in Bx . 0 1 2 Vx The subsets Bx , Bx , Bx of Bx having degree 0, 1, and 2. 1 The matching M of Bx . Number of subproblems (Bx , Bx , Bx , M) for each node x : at most 3w · w w . 0 1 2 Fixed Parameter Algorithms – p.17/48
• tree decompositionsHamiltonian cycle andtree decompositions Fact: Given a tree decomposition of width w , H AMILTONIAN CYCLE can be solved in time w O(w ) · n. Bx : vertices appearinginin node x. Bx : vertices appearing node x . 0 Bx 1 Bx 2 Bx x Vx : vertices appearing the subtreesubtreex . Vx : vertices appearing in in the rooted at rootedIf at is a Hamiltonian cycle, then the subgraph H x. H[V ] is a set of paths with endpoints in B . If H is ax Hamiltonian cycle, then xthe subgraph H[Vx ]important properties of H[Vx ] “seen What are the is a set of paths with from the outside world”? endpoints in Bx . 0 1 2 Vx The subsets Bx , Bx , Bx of Bx having degree What are 1, and important properties of 0, the 2. H[Vx ] “seenmatching the outside world”? The from M of Bx . 1 0 1 2 w Number of subproblems 1 Bx 0 2 of B · ww. The subsets Bx , B(B,x ,Bx, Bx , M)xfor each node x : at most 3 x having degree 0, 1, and 2. Fixed Parameter Algorithms – p.17/48 1 The matching M of Bx . 0 1 2 Number of subproblems (Bx , Bx , Bx , M) for each node x: at most 3 w · ww.
• Hamiltonian cycle andnice tree decompositions 0 1 2 For each subproblem (Bx , Bx , Bx , M), we have to determine if there is a set of paths with this pattern. How to do this for the diﬀerent types of nodes? (Assuming that all the subproblems are solved for the children.) Leaf: no children, |Bx | = 1 Trivial!
• Hamiltonian cycle and Hamiltonian cycle an nice tree decompositions nice tree decomposition 0 1 2 Solving subproblem (Bx , Bx , Bx , M) of node x. 0 1 2olving subproblem (Bx , Bx , Bx , M) of node x . Forget: 1 child y , Bx = By {v } for some vertex vorget: 1 child y , Bx = By {v } 1 some vertex v 0 for 2 In a solution H of (Bx , Bx , Bx , M), vertex v has degree 2. Thus 0 01 12 2 a solution H of (Bx , Bx BBx BM), vertex v has degree to subproblem subproblem (Bx , , x , , x , M) of x is equivalent 2. Thus subproblem 0 , B 1 , B 2 ∪ {v }, M) of y .Bx , Bx , (B2x, M) of x is equivalent to subproblem (Bx , Bx , Bx ∪ {v }, M) of y . 0 1 Bx x x 0 1 2 0 1 2 Bx Bx Bx
• Hamiltonian cycle andnice tree decompositions Hamiltonian cycle and nice tree decompositions 0 1 2 Solving subproblem (Bx , Bx , Bx , M) of node x. Forget: 1 child0 y , 1 , x 2 , B {v } x .Solving subproblem (Bx , BxBBx=M)yof node for some vertex v 0 1 2Forget: 1 child y , BxH ofy (B{v } for Bx , M), vertex In a solution = B x , Bx , some vertex v v has degree 2. Thus subproblem 0 1 2 (Bx ,1Bx ,2 Bx , M) of x is equivalent to subproblem 0In a solution H of 2 x , Bx , Bx , M), vertex v has degree 2. Thus subproblem 0 1 (B 0 (Bx ,2Bx , Bx ∪ {v }, M) of y . 1 0 1 2(Bx , Bx , Bx , M) of x is equivalent to subproblem (Bx , Bx , Bx ∪ {v }, M) of y . 0 1 2 Bx Bx Bx v
• Hamiltonian cycle andnice tree decompositions Hamiltonian cycle and 0 1 2 M) of node x. Solving subproblem (Bx , Bx , Bx , nice tree decompositions Forget: 1 child y , Bx = By {v } for some vertex v Solving subproblem (Bx ,0 , , B1 , B 2 , node . In a solution H of (BxBx1Bxx2, M)xof M),x vertex v has degree 2. Thus 0 0 , B 1 , B 2 , M) of x is equivalent to subproblem subproblem childxy , Bxx = Byx {v } for some vertex v Forget: 1 (B 0 , B 1 , B 2 ∪ {v }, 0 1 of y . (Bx Inx solution H of (BxM), Bx2 , M), vertex v has degree 2. Thus subproblem a x , Bx 0 1 2 0 1 2 (Bx , Bx , Bx , M) of x is equivalent to subproblem (Bx , Bx , Bx ∪ {v }, M) of y . 0 1 2 Bx Bx Bx v Fixed Parameter Algorithms – p.19/48
• Solving subproblem (B 0 , B 1 , B 2 , M) of node x .Hamiltonian cycle and x x xnice tree decompositions y ∪ {v } for some vertex v Introduce: 1 child y , Bx = B 0 0 1 2 Case 1: v ∈ Bx . Subproblem is equivalent with (Bx {v }, Bx , Bx , M) for no 0 1 2 Solving subproblem (Bx , Bx , Bx , M) of node x. Introduce: 1 child y , Bx = By ∪ {v } for some vertex v 0 Case 1: v ∈ Bx . 0 1 2 Subproblem is equivalent with (Bx {v }, Bx , Bx , M) for node y . 0 1 2 0 1 2 Bx Bx Bx By By By v x ⇐ y Fixed Parameter
• nice tree decompositHamiltonian cycle andnice tree decompositions Solving subproblem (Bx0, Bx , B22 , M) of node x. 0 1 1 x Solving subproblem (Bx , Bx , Bx , M) of node x . Introduce: 1 child y , Bx = By ∪ {v } for some vertex v Introduce: 1 child y , Bx = By ∪ {v } for some vertex v Case 2: v Case12: Every x . Every neighbor Vxv is in xBx .inThusThus v hasbe be adjacent ∈ Bx . v ∈ B neighbor of v in of in V is Bx . v has to to 1 adjacent withof Bx .other vertex of Bx . other vertex one 0 1 2 Is there a subproblem (By , By , By , M2 ) of node y such that making a 0 1 Is there a subproblem (By , By , By , M ) of node y such that making a vert vertex of By adjacent to v makes it a solution for subproblem2 0 1 adjacent2to v makes it a solution for subproblem (Bx , Bx , Bx , M) of node x ? 0 1 (Bx , Bx , Bx , M) of node x? 0 1 2 0 1 2 Bx Bx Bx By By By x y v
• Hamiltonian cycle and Bx1 , Bx2 , M) of node x . Solving subproblem (Bx ,0nice tree decompositionsBy ∪ {v } for some vertex v Introduce: 1 child y , Bx = 1 Case 3: v ∈ Bx . Similar to Case 2, but 2 vertices of By are adjacent with v . 0 1 2 Solving subproblem (Bx , Bx , Bx , M) of node x. Introduce: 1 child y , Bx = By ∪ {v } for some vertex v 1 Case 3: v ∈ Bx . Similar to Case 2, but 2 vertices of By are adjacent with v . 0 1 2 0 1 Bx Bx Bx By By v x ⇐ y Fixed Parameter
• Hamiltonian cycle andnice tree decompositions 0 1 2 Solving subproblem (Bx , Bx , Bx , M) of node x. Join: 2 children y1 , y2 with Bx = By1 = By2 A solution H is the union of a subgraph H1 ⊆ G [Vy1 ] and a subgraph H2 ⊆ G [Vy2 ]. 0 1 2 If H1 is a solution for (By1 , By1 , By1 , M1 ) of node y1 and H2 is a 0 , B 1 , B 2 , M ) of node y , then we can check if solution for (By2 y2 y2 2 2 0 1 2 H1 ∪ H2 is a solution for (Bx , Bx , Bx , M) of node x. For any two subproblems of y1 and y2 , we check if they have 0 1 2 solutions and if their union is a solution for (Bx , Bx , Bx , M) of node x.
• Monadic Second Order Logic Extended Monadic Second Order Logic (EMSO) A logical language on graphs consisting of the following: Logical connectives ∧, ∨, →, ¬, =, = quantiﬁers ∀, ∃ over vertex/edge variables predicate adj(u, v ): vertices u and v are adjacent predicate inc(e, v ): edge e is incident to vertex v quantiﬁers ∀, ∃ over vertex/edge set variables ∈, ⊆ for vertex/edge sets Example: The formula ∃C ⊆ V ∀v ∈ C ∃u1 , u2 ∈ C (u1 = u2 ∧ adj(u1 , v ) ∧ adj(u2 , v )) is true . . .
• Monadic Second Order Logic Extended Monadic Second Order Logic (EMSO) A logical language on graphs consisting of the following: Logical connectives ∧, ∨, →, ¬, =, = quantiﬁers ∀, ∃ over vertex/edge variables predicate adj(u, v ): vertices u and v are adjacent predicate inc(e, v ): edge e is incident to vertex v quantiﬁers ∀, ∃ over vertex/edge set variables ∈, ⊆ for vertex/edge sets Example: The formula ∃C ⊆ V ∀v ∈ C ∃u1 , u2 ∈ C (u1 = u2 ∧ adj(u1 , v ) ∧ adj(u2 , v )) is true if graph G (V , E ) has a cycle.
• Courcelle’s Theorem Courcelle’s Theorem: If a graph property can be expressed in EMSO, then for every ﬁxed w ≥ 1, there is a linear-time algorithm for testing this property on graphs having treewidth at most w . Note: The constant depending on w can be very large (double, triple exponential etc.), therefore a direct dynamic programming algorithm can be more eﬃcient.
• Courcelle’s Theorem Courcelle’s Theorem: If a graph property can be expressed in EMSO, then for every ﬁxed w ≥ 1, there is a linear-time algorithm for testing this property on graphs having treewidth at most w . Note: The constant depending on w can be very large (double, triple exponential etc.), therefore a direct dynamic programming algorithm can be more eﬃcient. If we can express a property in EMSO, then we immediately get that testing this property is FPT parameterized by the treewidth w of the input graph. Can we express 3-Coloring and Hamiltonian Cycle in EMSO?
• Using Courcelle’s Theorem 3-Coloring ∃C1 , C2 , C3 ⊆ V ∀v ∈ V (v ∈ C1 ∨ v ∈ C2 ∨ v ∈ C3 ) ∧ ∀u, v ∈ V adj(u, v ) → (¬(u ∈ C1 ∧ v ∈ C1 ) ∧ ¬(u ∈ C2 ∧ v ∈ C2 ) ∧ ¬(u ∈ C3 ∧ v ∈ C3 ))
• Using Courcelle’s Theorem 3-Coloring Hamiltonian Cycle ∃H ⊆ E spanning(H) ∧ (∀v ∈ V degree2(H, v )) degree0(H, v ) := ¬∃e ∈ H inc(e, v ) degree1(H, v ) := ¬degree0(H, v ) ∧ ¬∃e1 , e2 ∈ H (e1 = e2 ∧ inc(e1 , v ) ∧ inc(e2 , v )) degree2(H, v ) := ¬degree0(H, v ) ∧ ¬degree1(H, v ) ∧ ¬∃e1 , e2 , e3 ∈ H (e1 = e2 ∧ e2 = e3 ∧ e1 = e3 ∧ inc(e1 , v ) ∧ inc(e2 , v ) ∧ inc(e3 , v ))) spanning(H) := ∀u, v ∈ V ∃P ⊆ H ∀x ∈ V ((x = u ∨ x = v ) ∧ degree1(P, x)) ∨ (x = u ∧ x = v ∧ (degree0(P, x) ∨ degree2(P, x)))
• Using Courcelle’s Theorem Two ways of using Courcelle’s Theorem: 1. The problem can be described by a single formula (e.g, 3-Coloring, Hamiltonian Cycle). ⇒ Problem can be solved in time f (w ) · n for graphs of treewidth at most w . ⇒ Problem is FPT parameterized by the treewidth w of the input graph.
• Using Courcelle’s Theorem Two ways of using Courcelle’s Theorem: 1. The problem can be described by a single formula (e.g, 3-Coloring, Hamiltonian Cycle). ⇒ Problem can be solved in time f (w ) · n for graphs of treewidth at most w . ⇒ Problem is FPT parameterized by the treewidth w of the input graph. 2. The problem can be described by a formula for each value of the parameter k. Example: For each k, having a cycle of length exactly k can be expressed as ∃v1 , . . . , vk ∈ V (adj(v1 , v2 )∧adj(v2 , v3 )∧· · ·∧adj(vk−1 , vk )∧adj(vk , v1 )). ⇒ Problem can be solved in time f (k, w ) · n for graphs of treewidth w . ⇒ Problem is FPT parameterized with combined parameter k and
• Subgraph Isomorphism Subgraph Isomorphism: given graphs H and G , ﬁnd a copy of H in G as subgraph. Parameter k := |V (H)| (size of the small graph). For each H, we can construct a formula φH that expresses “G has a subgraph isomorphic to H” (similarly to the k-cycle on the previous slide).
• Subgraph Isomorphism Subgraph Isomorphism: given graphs H and G , ﬁnd a copy of H in G as subgraph. Parameter k := |V (H)| (size of the small graph). For each H, we can construct a formula φH that expresses “G has a subgraph isomorphic to H” (similarly to the k-cycle on the previous slide). ⇒ By Courcelle’s Theorem, Subgraph Isomorphism can be solved in time f (H, w ) · n if G has treewidth at most w .
• Subgraph Isomorphism Subgraph Isomorphism: given graphs H and G , ﬁnd a copy of H in G as subgraph. Parameter k := |V (H)| (size of the small graph). For each H, we can construct a formula φH that expresses “G has a subgraph isomorphic to H” (similarly to the k-cycle on the previous slide). ⇒ By Courcelle’s Theorem, Subgraph Isomorphism can be solved in time f (H, w ) · n if G has treewidth at most w . ⇒ Since there is only a ﬁnite number of simple graphs on k vertices, Subgraph Isomorphism can be solved in time f (k, w ) · n if H has k vertices and G has treewidth at most w . ⇒ Subgraph Isomorphism is FPT parameterized by combined parameter k := |V (H)| and the treewidth w of G .
• Part II:Graph-theoretical properties of treewidth
• The Robber and Cops game Game: k cops try to capture a robber in the graph. In each step, the cops can move from vertex to vertex arbitrarily with helicopters. The robber moves inﬁnitely fast on the edges, and sees where the cops will land.
• The Robber and Cops game (cont.) Example: 2 cops have a winning strategy in a tree.
• The Robber and Cops game (cont.) Example: 2 cops have a winning strategy in a tree.
• The Robber and Cops game (cont.) Example: 2 cops have a winning strategy in a tree.
• The Robber and Cops game (cont.) Example: 2 cops have a winning strategy in a tree.
• The Robber and Cops game (cont.) Example: 2 cops have a winning strategy in a tree.
• The Robber and Cops game (cont.) Example: 2 cops have a winning strategy in a tree.
• The Robber and Cops game (cont.) Example: 2 cops have a winning strategy in a tree.
• The Robber and Cops game (cont.) Example: 2 cops have a winning strategy in a tree.
• The Robber and Cops game Fact: k + 1 cops can win the game iﬀ the treewidth of the graph is at most k.
• The Robber and Cops game Fact: k + 1 cops can win the game iﬀ the treewidth of the graph is at most k. The winner of the game can be determined in time nO(k) using standard techniques (there are at most nk positions for the cops) ⇓ For every ﬁxed k, it can be checked in polynomial-time if treewidth is at most k.
• The Robber and Cops game Fact: k + 1 cops can win the game iﬀ the treewidth of the graph is at most k. The winner of the game can be determined in time nO(k) using standard techniques (there are at most nk positions for the cops) ⇓ For every ﬁxed k, it can be checked in polynomial-time if treewidth is at most k. Exercise 1: Show that the treewidth of the k × k grid is at least k − 1. Exercise 2: Show that the treewidth of the k × k grid is at least k.
• Properties of treewidth Fact: For every k ≥ 2, the treewidth of the k × k grid is exactly k.
• Properties of treewidth Fact: For every k ≥ 2, the treewidth of the k × k grid is exactly k. Fact: Treewidth does not increase if we delete edges, delete vertices, or contract edges. ⇒ If F is a minor of G , then the treewidth of F is at most the treewidth of G .
• Excluded Grid Theorem Fact: [Excluded Grid Theorem] If the treewidth of G is at least 2 k 4k (k+2) , then G has a k × k grid minor. A large grid minor is a “witness” that treewidth is large. Fact: Every planar graph with treewidth at least 4k has k × k grid minor.
• Outerplanar graphs Deﬁnition: A planar graph is outerplanar if it has a planar embedding where every vertex is on the inﬁnite face. Fact: Every outerplanar graph has treewidth at most 2.
• k-outerplanar graphs k -outerplanar graphs Given a planar embedding, we can deﬁne layers by iteratively removing the vertices on the inﬁnite face. Given a planar embedding, we can deﬁne layers by iteratively removing the vertices Deﬁnition: A planar graph is k-outerplanar if it has a planar on the inﬁnite face. embedding having at most -outerplanar if it has a planar embedding having at Deﬁnition: A planar graph is k k layers. most k layers. 1 1 1 2 2 1 2 3 2 3 2 3 3 3 3 3 2 2 2 2 2 1 1 Fact: Every k -outerplanar graph has treewidth at most 3k + 1. Fixed Parameter Algorithms – p.33/48 Fact: Every k-outerplanar graph has treewidth at most 3k + 1.
• Part III:Applications
• Baker’s shifting strategySubgraph Isomorphism for planar graphs: given planar graphs H and G , ﬁnd acopy of H in G as subgraph. Parameter k := |V (H)|.Layers of the planargraph: (as in the deﬁni-tion of k-outerplanar):
• Baker’s shifting strategySubgraph Isomorphism for planar graphs: given planar graphs H and G , ﬁnd acopy of H in G as subgraph. Parameter k := |V (H)|.Layers of the planargraph: (as in the deﬁni-tion of k-outerplanar): For a ﬁxed 0 ≤ s < k + 1, delete every layer Li with i = s (mod k + 1)
• Baker’s shifting strategySubgraph Isomorphism for planar graphs: given planar graphs H and G , ﬁnd acopy of H in G as subgraph. Parameter k := |V (H)|.Layers of the planargraph: (as in the deﬁni-tion of k-outerplanar): For a ﬁxed 0 ≤ s < k + 1, delete every layer Li with i = s (mod k + 1) The resulting graph is k-outerplanar, hence it has treewidth at most 3k + 1. Using the f (k, w ) · n time algorithm for Subgraph Isomorphism, the problem can be solved in time f (k, 3k + 1) · n.
• Baker’s shifting strategySubgraph Isomorphism for planar graphs: given planar graphs H and G , ﬁnd acopy of H in G as subgraph. Parameter k := |V (H)|.Layers of the planargraph: (as in the deﬁni-tion of k-outerplanar): For a ﬁxed 0 ≤ s < k + 1, delete every layer Li with i = s (mod k + 1) The resulting graph is k-outerplanar, hence it has treewidth at most 3k + 1. Using the f (k, w ) · n time algorithm for Subgraph Isomorphism, the problem can be solved in time f (k, 3k + 1) · n. We do this for every 0 ≤ s < k + 1: for at least one value of s, we do not delete any of the k vertices of the solution ⇒ we ﬁnd a copy of H in G if there is one. Subgraph Isomorphism for planar graphs is FPT parameterized by k := |V (H)|.
• Baker’s shifting strategySubgraph Isomorphism for planar graphs: given planar graphs H and G , ﬁnd acopy of H in G as subgraph. Parameter k := |V (H)|.Layers of the planargraph: (as in the deﬁni-tion of k-outerplanar): For a ﬁxed 0 ≤ s < k + 1, delete every layer Li with i = s (mod k + 1) The resulting graph is k-outerplanar, hence it has treewidth at most 3k + 1. Using the f (k, w ) · n time algorithm for Subgraph Isomorphism, the problem can be solved in time f (k, 3k + 1) · n. We do this for every 0 ≤ s < k + 1: for at least one value of s, we do not delete any of the k vertices of the solution ⇒ we ﬁnd a copy of H in G if there is one. Subgraph Isomorphism for planar graphs is FPT parameterized by k := |V (H)|.
• Baker’s shifting strategySubgraph Isomorphism for planar graphs: given planar graphs H and G , ﬁnd acopy of H in G as subgraph. Parameter k := |V (H)|.Layers of the planargraph: (as in the deﬁni-tion of k-outerplanar): For a ﬁxed 0 ≤ s < k + 1, delete every layer Li with i = s (mod k + 1) The resulting graph is k-outerplanar, hence it has treewidth at most 3k + 1. Using the f (k, w ) · n time algorithm for Subgraph Isomorphism, the problem can be solved in time f (k, 3k + 1) · n. We do this for every 0 ≤ s < k + 1: for at least one value of s, we do not delete any of the k vertices of the solution ⇒ we ﬁnd a copy of H in G if there is one. Subgraph Isomorphism for planar graphs is FPT parameterized by k := |V (H)|.
• Baker’s shifting strategySubgraph Isomorphism for planar graphs: given planar graphs H and G , ﬁnd acopy of H in G as subgraph. Parameter k := |V (H)|.Layers of the planargraph: (as in the deﬁni-tion of k-outerplanar): For a ﬁxed 0 ≤ s < k + 1, delete every layer Li with i = s (mod k + 1) The resulting graph is k-outerplanar, hence it has treewidth at most 3k + 1. Using the f (k, w ) · n time algorithm for Subgraph Isomorphism, the problem can be solved in time f (k, 3k + 1) · n. We do this for every 0 ≤ s < k + 1: for at least one value of s, we do not delete any of the k vertices of the solution ⇒ we ﬁnd a copy of H in G if there is one. Subgraph Isomorphism for planar graphs is FPT parameterized by k := |V (H)|.
• Detour to approximation. . .
• Detour toapproximation algorithms Deﬁnition: A c-approximation algorithm for a maximization problem is a polynomial-time algorithm that ﬁnds a solution of cost at least OPT/c. Deﬁnition: A c-approximation algorithm for a minimization problem is a polynomial-time algorithm that ﬁnds a solution of cost at most OPT · c. There are well-known approximation algorithms for NP-hard 3 problems: 2 -approximation for Metric TSP, 2-approximation for 8 Vertex Cover, 7 -approximation for Max 3SAT, etc. For some problems, we have lower bounds: there is no (2 − )-approximation for Vertex Cover or ( 8 − )-approximation for Max 3SAT (under suitable 7 complexity assumptions). For some other problems, arbitrarily good approximation is possible in polynomial time: for any c > 1 (say, c = 1.000001), there is a polynomial-time c-approximation
• Approximation schemes Deﬁnition: A polynomial-time approximation scheme (PTAS) for a problem P is an algorithm that takes an instance of P and a rational number > 0, always ﬁnds a (1 + )-approximate solution, the running time is polynomial in n for every ﬁxed > 0. 2 Typical running times: 21/ · n, n1/ , (n/ )2 , n1/ . Some classical problems that have a PTAS: Independent Set for planar graphs TSP in the Euclidean plane Steiner Tree in planar graphs Knapsack
• Baker’s shifting strategy for EPTAS Fact: There is a 2O(1/ ) · n time PTAS for Independent Set for planar graphs. Let D := 1/ . For a ﬁxed 0 ≤ s < D, delete every layer Li with i = s (mod D) The resulting graph is D-outerplanar, hence it has treewidth at most 3D + 1 = O(1/ ). Using the O(2w · n) time algorithm for Independent Set, the problem can be solved in time 2O(1/ ) · n. 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 ⇒ we get a (1 + )-approximate solution.
• Back to FPT. . .
• Bidimensionality A powerful framework to obtain eﬃcient algorithms on planar graphs. Let x(G ) be some graph invariant (i.e., an integer associated with each graph). Some typical examples: Maximum independent set size. Minimum vertex cover size. Length of the longest path. Minimum dominating set size Minimum feedback vertex set size. Given G and k, we want to decide if x(G ) ≤ k (or x(G ) ≥ k). √ For many natural invariants, we can do this in time 2O( k) · nO(1) .
• Bidimensionality for Vertex Cover Hr ,r for r = 10
• Bidimensionality for Vertex Cover r2 vc(Hr ,r ) ≥ 2
• Bidimensionality forVertex Cover √ Observation: If √ treewidth of a planar graph G is at least 4 2k the √ ⇒ It contains a 2k × 2k grid minor (Excluded Grid Theorem for planar graphs) ⇒ The vertex cover size of the grid is at least k in the grid ⇒ Vertex cover size is at least k in G . We use this observation to solve Vertex Cover on planar graphs as follows: √ Set w := 4 2k. Use the 4-approximation tree decomposition algorithm √ (2O(w ) · nO(1) = 2O( k) · nO(1) time). If treewidth is at least w : we answer ’vertex cover is ≥ k’. If we get a tree decomposition of width 4w , then we can solve √ the problem in time 2w · nO(1) = 2O( k) · nO(1) .
• Bidimensionality (cont.) Deﬁnition: A graph invariant x(G ) is minor-bidimensional if x(G ) ≤ x(G ) for every minor G of G , and If Gk is the k × k grid, then x(Gk ) ≥ ck 2 (for some constant c > 0). Examples: minimum vertex cover, length of the longest path, feedback vertex set are minor-bidimensional.
• Bidimensionality (cont.) Deﬁnition: A graph invariant x(G ) is minor-bidimensional if x(G ) ≤ x(G ) for every minor G of G , and If Gk is the k × k grid, then x(Gk ) ≥ ck 2 (for some constant c > 0). Examples: minimum vertex cover, length of the longest path, feedback vertex set are minor-bidimensional.
• Bidimensionality (cont.) Deﬁnition: A graph invariant x(G ) is minor-bidimensional if x(G ) ≤ x(G ) for every minor G of G , and If Gk is the k × k grid, then x(Gk ) ≥ ck 2 (for some constant c > 0). Examples: minimum vertex cover, length of the longest path, feedback vertex set are minor-bidimensional.
• Bidimensionality (cont.) We can answer “x(G ) ≥ k?” for a minor-bidimensional parameter the following way: √ Set w := c k for an appropriate constant c. Use the 4-approximation tree decomposition algorithm. If treewidth is at least w : x(G ) is at least k. If we get a tree decomposition of width 4w , then we can solve the problem using dynamic programming on the tree decomposition. Running time: If we can solve the problem using a width w tree decomposition in time 2O(w ) · nO(1) , then the running time is √ 2O( k) · nO(1) . If we can solve the problem using a width w tree decomposition in time w O(w ) · nO(1) , then the running time is √ 2O( k log k) · nO(1) .
• Summary Notion of treewidth allows us to generalize dynamic programming on trees to more general graphs. Standard techniques for designing algorithms on bounded treewidth graphs: dynamic programming and Courcelle’s Theorem. Surprising uses of treewidth in other contexts (planar graphs).