1 / 91

Discovering Treewidth

Hans L. Bodlaender, Utrecht University. Discovering Treewidth. This talk. Introduction Definition of treewidth: a graph parameter Applications Determining the treewidth of a graph: Exact algorithms Upper bounds Lower bounds Pre-processing. Theory and experimental results.

zaide
Download Presentation

Discovering Treewidth

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Hans L. Bodlaender, Utrecht University Discovering Treewidth

  2. This talk Introduction Definition of treewidth: a graph parameter Applications Determining the treewidth of a graph: Exact algorithms Upper bounds Lower bounds Pre-processing Theory and experimental results

  3. I. Introduction History: resistance, laws of Ohm, series parallel graphs Definition of treewidth Applications Hard problems becoming easier on special graphs Probabilistic networks PTAS’s on planar and other graphs Some useful graph theory

  4. Computing the Resistance With the Laws of Ohm R1 R2 R1 R2 1789-1854

  5. Repeated use of the rules 6 6 5 2 2 1 7 1/6 + 1/2 = 1/(1.5) 1.5 + 1.5 + 5 = 8 1 + 7 = 8 1/8 + 1/8 = 1/4 Has resistance 4

  6. A tree structure 5 P 7 6 2 S S P P 5 7 1 1 6 2 6 2 6 2

  7. Network is ‘series parallel graph’ 196*, 197*: many graph problems that are hard for general graphs are easy for Trees Series parallel graphs Many well-known problems, e.g., maximum independent set, Hamiltonian circuit, … Using tree structures for solving hard problems on graphs 1 e.g.: NP-complete Linear / polynomial time computable

  8. Birth of treewidth Algorithms for trees and series parallel graphs can be generalized: 198*: problems solvable on decomposable graphs (Bern, Lawler, Wong; Arnborg, Proskurowski; Wimer; Borie; Scheffler, Seese; Courcelle; Lautemann; … ) Arnborg and Proskurowski: Partial k-trees Robertson and Seymour: treewidth (in their work on graph minors)

  9. Tree decomposition • A tree decomposition: • Tree with a vertex set called bagassociated to every node. • For all edges {v,w}: there is a set containing both v and w. • For every v: the nodes that contain v form a connected subtree. g a h b c f e d a a g c f a g h b c f d c e

  10. Tree decomposition • A tree decomposition: • Tree with a vertex set called bag associated to every node. • For all edges {v,w}: there is a set containing both v and w. • For every v: the nodes that contain v form a connected subtree. g a h b c f e d a a g c f a g h b c f d c e

  11. Tree decomposition • A tree decomposition: • Tree with a vertex set called bag associated to every node. • For all edges {v,w}: there is a set containing both v and w. • For every v: the nodes that contain v form a connected subtree. g a h b c f e d a a g c f a g h b c f d c e

  12. Treewidth (definition) g a h • Width of tree decomposition: • Treewidth of graph G: tw(G)= minimum width over all tree decompositions of G. b c f Width 2 e d a a g c f a g h b c f d c e a b c d e f g h

  13. Useful lemmas If the treewidth is at most k, then G has a vertex of degree at most k. There is a vertex with all neighbours in the same bag. If W is a clique in G, then a tree decomposition of G has a bag i with W  Xi. Follows from the Helly property for trees

  14. Fill-in Given a permutation  of the vertices, the fill-in graph is made as follows: For i = 1 to n do Add an edge between each pair of higher numbered neighbours of the ith vertex 2 2 2 1 3 1 1 3 3 4 5 4 4 5 5

  15. Alternative definition The treewidth of a graph is the minimum over all permutations of its vertices of the maximum number of higher numbered neighbours of a vertex in the fill-in graph. 2 2 1 3 1 3 4 5 4 5 Treewidth 2

  16. Constructing tree decomposition for fill-in graph Let v be the first vertex in  Recursively, make tree decomposition for G – v. The neighbours v form a clique in G – v. There is a bag that contains N(v) N(v) … i* and then…

  17. Constructing tree decomposition for fill-in graph Let v be the first vertex in  Recursively, make tree decomposition for G – v. The neighbours v form a clique in G – v. There is a bag i* that contains N(v) Add a new bag containing v and its neighbours, making that adjacent to i* N(v) … N(v) v i*

  18. Applications of treewidth Graph minor theory (Robertson and Seymour) Many hard problems become linear time solvable when restricted to bounded treewidth Optimisation Probabilistic networks … VLSI-layouts Compilers Choleski factorisation

  19. Many graphs have small treewidth Trees (1), series parallel graphs (2), Halin graphs (3), outerplanar graphs (2), … Graphs from some applications Many graphs have large treewidth: when containing a large grid, a large clique …

  20. Tree decompositions contain separators If neither v or w belongs to X(i) then {v,w} cannot be an edge of G. So X(i) separates vertices appearing below i in the tree from the rest of G. This allows for dynamic programming algorithms w X(i) v

  21. Dynamic programming algorithms Many NP-hard (and some PSPACE-hard, or #P-hard) graph problems become polynomial or linear time solvable when restricted to graphs of bounded treewidth Well known problems like independent set, Hamiltonian circuit, graph colouring Frequency assignment (Koster et al.)

  22. Dynamic programming with tree decompositions For each bag, a table is computed: Contains information on subgraph formed by vertices in bag and bags below it Bag itself separates this subgraph from rest of the graph Often limited information needed Computing a table needs only tables of children and local information 6 4 5 3 1 2

  23. Probabilistic networks Underlying decision support systems Representation of statistical variables and (in)dependencies by a graph Central problem (inference) is #P-complete Lauritzen-Spiegelhalter, 1988: linear time solvable when treewidth (of moralized graph) is bounded Treewidth appears often small for actual probabilistic networks Used in several modern (commercial and freeware) systems

  24. Monadic second order logic Courcelle: Every graph problem that can be formulated in Monadic Second Order Logic can be solved in linear time on graphs with bounded treewidth Language with constructions: Quantification over vertices, edges, sets of vertices, sets of edges (for all vertex sets W there exists an edge e, such that ...) Membership tests, adjacency tests ( {v,w} in E ), Logical operations (and, or, not, ...) Extended for optimisation problems (Arnborg et al, Borie et al.)

  25. Problems on planar graphs (1) Method originated by Baker (198*, 1994) PTAS for many problems on planar graphs, and extensions Extended by several authors to more general/other classes of graphs (e.g., SODA 2005: Demaine & Hajigitani – more problems and minor closed classes of graphs, van Leeuwen 2004: unit disk graphs of small density) Here: example: PTAS for independent set on planar graphs.

  26. Ingredient 1: k-outerplanar graphs Label vertices of a plane graph by level. All vertices on exterior face level 1. All vertices on exterior face when vertices of levels 1 … i are removed are on level i+1. Graph is k-outerplanar when at most k levels. Theorem: k-outerplanar graphs have treewidth at most 3k – 1. 3-outerplanar

  27. Independent set on k-outerplanar graphs For fixed k, finding a maximum independent set in a k-outerplanar graph can be solved in linear time (approximately 8k * n time). Dynamic programming using tree-decomposition

  28. Baker’s scheme For each i in {1,2, …, k} do Remove all vertices in levels i, i+k, 2i+k, 3i+k, … Each connected component of the remaining graph (and hence the remaining graph) is (k-1)-outerplanar. Solve independent set exactly on the remaining graph. Output the best of the k obtained independent sets.

  29. Quality Look at a maximum independent set S. Each of the k runs deletes a different subset of S. So, there is a run that deletes at most |S|/k vertices from S: one of the runs gives an answer that is at least (k-1)/k times the size of the optimum. Gives:for each , there is an -approximation algorithm whose time is polynomial in n (but exponential in 1/ .) Method has been extended in several ways.

  30. 2. Computing treewidth: exact algorithms For applications: needed to compute the treewidth of a given graph Interaction between theoretical and experimental work Overview of some results First: exact algorithms

  31. The problem Given: Graph G Question: what is the treewidth of G? Or: Give a tree decomposition with minimum (close to minimum) treewidth Decision problem version: Given: Graph G, integer k Question: is the treewidth of G at most k. Both of theoretical and practical interest

  32. Exact methods Arnborg, Corneil, Proskurowski, 1987: problem is NP-complete Special cases have been studied: NP-complete for graphs of degree at most 9 (B, Thilikos), bipartite graphs, cobipartite graphs, … Polynomial time algorithms for chordal graphs, circular arc graphs, permutation graphs, distance hereditary graphs Open: planar graphs. (Polynomial time algorithm for the related problem of branchwidth for planar graphs.)

  33. Graphs with polynomially many separators Bouchitté, Todinca (2002, 2003): Polynomial time algorithm to compute the treewidth of graphs with polynomially many minimal separators. Using potential maximal cliques There is always a tree decomposition whose bags are potential maximal cliques All pmc’s can be listed in time polynomial in nb of minimal separators (Bouchitté Todinca) Fitting together pmc’s to make tree decomposition

  34. Fixed parameter case Important special case: k fixed Arnborg, Corneil, and Proskurowski (1987): O(nk+2) time Linear time algorithm, 1996: B, using a result with Kloks. Big constant factor: (n) time… Hein Röhrig: feasibility study (1998). Special cases: k=1(forests); k=2, k=3 (Arnborg, Proskurowski, 1986; Matousek, Thomas); k=4 (Sanders). Work with reduction. To be explained later

  35. Branch and Bound algorithm Gogate, Dechter, 2004: Branch and Bound algorithm for treewidth Builds a permutation of the vertices: For each vertex v: Choose v as first vertex and add fill-in edges for v Run a lower bound heuristic on the new graph and possibly stop this branch Otherwise recurse (next time finding 2nd vertex, etc.) Rules to limit nb of branches

  36. 3. Upper bound heuristics and approximation algorithms Different methods and heuristics Finding repeatedly separators Refining a tree decomposition Building a permutation Some have guarantees on performance, others not.

  37. Approximation algorithms Polynomial in n, but exponential in k: Robertson, Seymour; Lagergren; Reed; Becker, Geiger, Amir: e.g. Algorithm that uses O(f(k) n log n) time and either tells treewidth(G)>k, or finds tree decomposition of width at most 6k. Polynomial time algorithm with O(log n) approximation ratio (B,Gilbert,Hafsteinsson,Kloks, 1995). Polynomial time algorithm with O(log k) approximation ratio: Bouchitté, Kratsch, Müller, Todinca; Amir; k optimal treewidth (2001)Amir: 720 log k in O(n3 log4nk5 log k) time.

  38. Method Procedure BuildTD (Graph G, set W) Find a set S, such that each connected component of G-S has only few vertices of W For each component Ziof G – S do BuildTD( G[Z  S, S  (W  Z)) Fit together the tree decompositions: S W SWZ1) …

  39. Variants Algorithms of Robertson and Seymour, B et al, Bouchitté et al, Lagergren, Amir differ in how they find separators, what size of separators, and small other details Koster and Bouchitté et al. also have heuristics that start with one trivial tree decomposition (one bag with all vertices), and then refine.

  40. Heuristics with permutations Successful method for upper bound heuristics (Folklore): Build in some way a permutation  of G. Make the fill-in (perhaps during building ) Translate to tree decomposition Koster, B, van Hoesel 2001: experiments with several such heuristics

  41. Minimum degree heuristic Choose a vertex v in G of minimum degree Make a clique of the neighbours of v Build permutation of G-v (or tree decomposition) Add v in front (or construct tree decomposition of G) N(v) … N(v) … N(v) v i* i*

  42. Minimum fill-in heuristic Choose a vertex v in G of such that the number of pairs of unadjacent neighbours (= nb of fill-in edges for this vertex v) is as small as possible Make a clique of the neighbours of v Build permutation of G-v (or tree decomposition) Add v in front (or construct tree decomposition of G) N(v) … N(v) … N(v) v i* i*

  43. Experimental results Minimum degree and minimum fill-in perform very well in practice Fast Often best results Not always minimal triangulation Improve result by using algorithm by Blair, Heggernes, Telle for making minimal triangulations given a triangulation

  44. Other upper bound heuristics Kjaerulff: Simulated annealing for related problem Work on genetic algorithms Clautiaux et al. (2004): Tabu search Representing solutions by permutations, and using steps that insert vertices on different spots, etc.

  45. 4. Lower bounds Useful for Branch and bound Informing on quality of upper bounds Telling uselessness of treewidth approach for some graphs Joint work with Koster and Wolle

  46. Our first lower bounds Minimum degree If G has a tree decomposition of width k, then it has a vertex of degree at most k. Helpful for improvement: If H is a subgraph of G, then the treewidth of G is at least the treewidth of H. Degeneracy: k = 0; While G is not the empty graph do Take a vertex v of minimum degree d k = max(d,k) Remove v from G The degeneracy is a lower bound for treewidth

  47. Contraction Contraction of an edge does not increase the treewidth Take tree decomposition If we contract {v,w}, replace v and w in each bag by the vertex representing the contraction This is a tree decomposition of the new graph v w x x x … … … x v v … … … w w ... ...

  48. Lower bound improving upon degeneracy k = 0; While G is not the empty graph do Take a vertex v of minimum degree d k = max(d,k) Contract v with a neighbour Different tiebreaking rules Neighbour of minimum degree Neighbour of maximum degree (bad) Neighbour with minimum nb of common neighbours (best) Contraction degeneracy x v w

More Related