Treewidth: a complexity measure for graphs - PowerPoint PPT Presentation

1 / 82
About This Presentation
Title:

Treewidth: a complexity measure for graphs

Description:

Dijkstra's algorithm. O(m n log n) General case. Floyd's algorithm - all pairs shortest path ... Find a cycle passing at least once through each edge. Minimize ... – PowerPoint PPT presentation

Number of Views:174
Avg rating:3.0/5.0
Slides: 83
Provided by: shm4
Category:

less

Transcript and Presenter's Notes

Title: Treewidth: a complexity measure for graphs


1
Treewidth a complexity measure for graphs
  • Ioan Todinca
  • LIFO - Université dOrléans
  • France

2
Outline
  • Optimization problems on graphs
  • Motivation
  • General approaches for hard problems
  • Treewidth and tree decomposition
  • Definitions
  • Applications
  • Computing treewidth

3
Graphs
  • G(V,E)
  • n vertices, m edges
  • Complexity of the algorithms O(f(n))
  • Decision problems
  • yes/no
  • Optimization problems
  • Minimize/maximize some quantity

4
Shortest path
  • Non-negative weights
  • Dijkstras algorithm
  • O(mn log n)
  • General case
  • Floyds algorithm - all pairs shortest path
  • O(n3)

5
Minimum weight spanning tree
  • A tree touching all the vertices, of minimum
    weight
  • Kruskals algorithm
  • O(m log n)
  • Prims algorithm
  • O(n²)

6
Chinese postman
  • Find a cycle passing at least once through each
    edge
  • Minimize the length of the cycle
  • O(n3)
  • Eulerian cycle passing exactly once through each
    edge
  • O(m)

7
Polynomial and NP-hard problems
  • Efficient algorithms polynomial worst-case
    runing time O(Poly (n))
  • Maximum flow, connectivity,
  • NP-Hard problems no polynomial algorithms,
    unless PNP
  • Exponential running time
  • Coloring, max independent set, TSP,

8
The coloring problem
  • Assign a color to each vertex, such that adjacent
    vertices receive different colors.
  • Use a minimum number of colors.
  • Even the 3-coloring problem is NP-hard.

9
Maximum independent set
  • Independent set set of pairwise non-adjacent
    vertices
  • Find an independent set of maximum size.

10
Traveling salesman
  • Find a cycle passing at least once through each
    vertex, of minimum length
  • Hamiltonicity find a cycle passing exactly once
    through each vertex

11
Optimization problems the output
  • Optimization problem
  • Find an object satisfying a property P
  • Minimize/maximize the cost of the object
  • Solutions and optimal solutions
  • Solution any object satisfying property P
  • Optimal solution solution of minimum/maximum
    cost
  • OPT the cost of the optimal solution

12
How to cope with NP-hard optimization problems?
  • What we can not do
  • Obtain efficient algorithms, giving the optimal
    solution for any input
  • What we can do
  • Exponential time algorithms
  • Algorithms giving non-optimal solutions
  • Optimal algorithms for particular cases

13
Exponential algorithms
  • Too slow for big data
  • May be interesting for small instances
  • O(2n) and O(1.01n) are quite different
    complexities!
  • Maximum independent set O(1.1844n)
  • Pruning the search tree
  • Branch and bound

14
Heuristics
  • No guarantee on the solution
  • Validated on benchmarks
  • More or less efficient
  • Sometimes very simple and efficient
  • Approaches
  • Ad-hoc heuristics
  • Genetic algorithms, simulated annealing,
  • Randomized algorithms

15
Approximation algorithms
  • Guarantee on the solution!
  • c-approximation algorithm (cgt1)
  • minimization problem gives a solution of cost at
    most c OPT
  • Maximization problem at least OPT/c
  • Polynomial algorithms!

16
Approximation algorithm for TSP
  • 2-approximation
  • Compute a minimum weight spanning tree T
  • w(T) lt OPT
  • Walk around the tree
  • Also a 1.5-approximation for TSP
  • Better approximation?

17
Non-metric TSP bad news
  • Complete graph G
  • A cycle passing through each vertex exactly once
  • Of minimum length.
  • For any constant c, there is no c-approximation
    for this problem, unless PNP

2
5
6
2
1
8
8
2
1
1
18
If non-metric TSP has a c-approximation
algorithm, then Hamiltonicity is polynomial
1
cn1
  • If G hamiltonian length(output) cn
  • If length(output) cn G is hamiltonian

19
Bad news for Coloring, MIS,
  • For any cgt1, no c-approximation algorithm (unless
    PNP or similar)
  • No 1000-approximation!
  • For any egt0, no n1-e approximation
  • No coloring algorithms with at most OPTn0.99
    colors!
  • What can we do?
  • n/log n approximations

20
Solving the problems for particular graph classes
  • The input may satisfy particular properties
  • Planar graphs the four colors theorem
  • Interval graphs Coloring, MIS, Hamiltonicity
    become polynomial
  • But
  • Solve one problem at a time
  • The classes are often very restricted

21
Graph decomposition techniques
  • General principle
  • Split the graph into several pieces that glue
    according some simple rules
  • Recursively split the pieces
  • Solve the problems bottom-up, by dynamic
    programming

22
Graph decompositions
  • Only work if the input graph admits a good
    decomposition
  • Allow to solve classes of problems by the same
    algorithm
  • Decompositions
  • Modular decompositions (cographs, )
  • Tree decompositions (trees, cycles, outerplanar
    graphs)
  • Clique decompositions (combines both, but no
    results about computing the decompositions)

23
Techniques for hard optimization problems
  • Approximations
  • Guaranteed, efficient
  • Restricted input
  • Graph classes
  • Decompositions
  • Heuristics
  • Exponential algorithms

24
Outline
  • Optimization problems on graphs
  • Motivation
  • General approaches for hard problems
  • Treewidth and tree decomposition
  • Definitions
  • Applications
  • Computing treewidth

25
Tree decompositions and treewidth
  • Every graph can be seen as a generalized tree
  • treewidth the smaller it is, the more the graph
    behaves like a tree
  • Many problems can be solved in O(2tw(G)n) time

26
Tree decompositions for G(V,E)
  • Tree T, each node i has a bag Xi
  • Each vertex x of G is in some bag
  • For each edge xy, there is a bag containing both
    x and y
  • For each vertex x, the set of nodes i s.t. Xi
    contains x forms a subtree Tx of T

27
Treewidth Robertson, Seymour 84
  • Width of a decomposition (T,X)
  • width max Xi -1
  • Treewidth of G
  • tw(G) min width(T,X)
  • over all possible decompositions

28
Treewidth examples
  • Trees treewidth one
  • Cycles treewidth two
  • Complete graph Kn treewidth n-1
  • tw(G)n-1

29
Treewidth of the grid
  • Grid ab
  • tw(grid ab) min(a,b)
  • Hard to prove that min(a,b) is a lower bound!

30
Graph minors
  • H is a minor of G if it can be obtained by
    repeatedly applying
  • Edge deletion
  • Vertex deletion
  • Edge contraction

a
b
c
a
b
c
x
y
xy
d
d
31
The grid minor theorem
  • Conjecture. A graph G that does not contain the
    rr grid as a minor has treewidth at most r2 log
    r
  • Theorem. If no rr grid minor then tw29r5
  • For any G, either G has small tw or it contains a
    big grid.

32
Treewidth applications the graph minors theorem
  • The class of planar graphs minor closed
  • Kuratowskis theorem a graph G is planar iff K5
    and K3,3 are not minors of G

33
Graph minors theorem
  • G a minor closed class of graphs. There is a
    finite set of graphs obstr(G) s.t.G in G iff G
    has no minors in obstr(G) .
  • Consequence O(n²) recognition algorithm for the
    class...
  • if you know the obstruction set!

34
Treewidth algorithmic applications
  • Input G and (T,X) of width k
  • Most of the classical problems can be solved in
    O(exp(k) Poly(n)) time
  • Example maximum independent set
  • Coloring, TSP,

35
Decomposition
yc
xa
  • Xi
  • x, y not in Xi
  • x, y in different subtrees of T i
  • Xi separates x and y in G
  • Any x,y path passes through Xi

Xi
36
Maximum independent set
root
  • Gi
  • restrict to the vertices in the subtree rooted
    in I
  • Bottom-up Gi increasing
  • Groot G

gh
beg
i
bcg
bgd
j
abd
cgf
37
MIS(Z,i)
root
  • Independent in Gi
  • Intersects Xi exactly in Z
  • Of maximum size

gh
beg
i
bcg
bgd
abd
cgf
38
MIS(Z,i) Z U MIS(Z,j) U MIS(Z,p)
  • Consider all sets Z, Z and compute MIS(Z,I)
  • MIS(G) in O(n23k) time
  • Can be done in O(n2k)

root
gh
beg
i
bcg
bgd
j
p
abd
cgf
39
Most problems can be solved in O(exp(k)Poly(n))
time
  • Dynamic programming
  • Logic Courcelle et al.
  • every problem expressible in ExtMSOL2 can be
    solved in O(exp(k)n) time
  • MIS
  • 3Col

40
Surprising treewidth application
  • The disjoint paths problem
  • s1, s2,,sp
  • t1, t2,,tp
  • Find disjoint paths from si to ti
  • Small treewidth gt previous techniques
  • Big treewidth gt use the grid minor!

41
Treewidth applications
  • Mathematics
  • Graph minors theorem, Wagners conjecture
  • Algorithms
  • Most hard problems can be solved efficiently on
    graphs of bounded treewidth
  • Treewidth techniques may help even on arbitrary
    graphs!

42
Outline
  • Optimization problems on graphs
  • Motivation
  • General approaches for hard problems
  • Treewidth and tree decomposition
  • Definitions
  • Applications
  • Computing treewidth

43
Computing treewidth the main results
  • The Treewidth problem is NP-hard
  • For fixed k, deciding if tw(G)k is polynomial,
    even linear Bodlaender 94
  • O(24k²n) time
  • First output tw(G)gtk or a decomposition of width
    2k
  • Use the decomposition to decide if tw(G)k
  • O(log OPT) approximation algorithm

44
Treewidth an alternative definition
  • G(V,E) (T,X)
  • H(T,X)
  • Vertex set V
  • x,y adjacent iff there exists a bag containing
    them
  • H(T,X) contains G
  • Bags gt cliques of H

45
Chordal graphs
  • G is chordal if each cycle of at least four
    vertices has a chord
  • Edge between two non-consecutive vertices of the
    cycle
  • H(T,X) is chordal

46
H(T,X) as an intersection graph
  • Tx induced by the bags containing x
  • xy adjacent in H iff Tx and Ty intersect
  • H(T,X) is the intersection graph of the subtrees
    of a tree

47
Chordal graphs as intersection graphs
  • If H is the intersection graph of the subtrees of
    a tree then H is chordal
  • and conversely!

a
b
c
d
48
From tree decompositions to chordal graphs
  • width (T,X) ?(H)-1

49
Treewidth and minimal triangulations
  • Triangulations of G chordal supergraphs
  • tw(G) min ?(H) -1
  • over all triangulations H of G
  • Equivalently
  • over all minimal triangulations H of G

50
(Minimal) triangulation problems
  • Treewidth
  • Find a minimal triangulation of the input graph
  • Minimize the cliquesize of the triangulation
  • Minimum fill-in
  • Find a minimal triangulation of the input graph
  • Minimize the number of added edges
  • How to control the minimal triangulations?

51
Minimal separators
  • x,y-separator S
  • x and y are in different connected components of
    G-S
  • minimal x,y-separator S
  • inclusion-minimal x,y-separator
  • minimal separator S of G
  • exist x,y s.t. S is a x,y-minimal separator

52
Chordal graphs and minimal separators Dirac 61
  • A graph is chordal iff all its minimal separators
    are cliques
  • If G non chordal there is a separator which is
    not a clique

a
b
c
d
53
Parallel and crossing separators
  • S crosses T if S separates two vertices of T.
    Otherwise S is parallel to T
  • S T ? T S

54
Minimal triangulations and minimal separators
  • Parra, Scheffler 96, Bodlaender, Kloks,
    Kratsch, Müller, Spinrad 90-96
  • Theorem. H is a minimal triangulation of G iff H
    is obtained from G by considering a maximal set
    of pairwise parallel separators and completing
    each of them into a clique
  • The minimal separators of H are exactly the
    minimal separators chosen in G.
  • They form the same components in H and in G.

55
The Parra-Scheffler theorem
56
Treewidth and minimal separators
  • Are the minimal separators sufficient for
    computing the treewidth?
  • Yes, for many graph classes Bodlaender, Kloks,
    Kratsch, Müller, permutation graphs, circle
    graphs, circular arc graphs,
  • Actually, yes ? Bouchitté, T. 00
  • Do they help for approximating treewidth?
  • Sometimes (AT-free graphs, ) Bouchitté,
    Kratsch, Müller, T. 01

57
Decomposition using minimal separators the
principle
  • Blocks G
  • While there is a non-complete block B
  • Choose a minimal separator S of B
  • For each component C of B-S create the block BSS
    U C
  • Remove B

C1
C2
S
C2
C1
S
S
58
Decomposition using minimal separators example
59
Decomposition using minimal separators example
b
a
b
c
a
b
c
d
d
f
d
f
e
e
e
e
d
f
d
f
h
g
g
g
g
h
h
60
Decomposition using minimal separators example
b
c
b
f
d
f
e
e
d
f
g
g
g
h
61
Tree decompositions, triangulations, minimal
separators
b
c
b
f
d
f
e
e
d
f
g
g
g
h
62
Blocks
63
Potential maximal cliques
  • G(V,E)
  • Definition. A set of vertices K is a potential
    maximal clique of G if there is a minimal
    triangulation H of G such that K is a maximal
    clique of H.
  • K is a potential maximal clique iff it is a
    terminal block in the decomposition algorithm.

64
Potential maximal cliques characterization
  • C1,,Cp the components of G-K
  • S1,,Sp their neighborhoods
  • Theorem. K is a potential maximal clique iff
  • Each Si strictly included in K
  • GK becomes a clique when every Si is completed

C2
S2
S1
C1
S3
C3
65
Potential maximal cliques examples
  • Recognition algorithm O(nm)

66
Treewidth and potential maximal cliques
  • Theorem Bouchitté, T 99. The potential maximal
    cliques are sufficient to compute the treewidth.
  • Input G, PMCG
  • Output tw(G) optimal decomposition
  • Complexity O(nmp)

67
Enumerating the potential maximal cliques
  • Most potential maximal cliques are formed by
    two crossing separators.
  • pmc minsep² n
  • PMCG can be obtained in O(Poly(n,minsep)) time.

68
Treewidth and minimal separators the conclusion
  • Theorem the minimal separators are sufficient
    for computing treewidth.
  • Input G
  • Output tw(G) optimal decomposition
  • Complexity O(nmr²)
  • Enumerate the minimal separators
  • Use the min seps to enumerate pmcs
  • Use pmcs to compute tw

69
Treewidth and potential maximal cliques side
effects
  • The same technique allows to compute the minimum
    fill-in
  • Exact algorithm for treewidth and minimum
    fill-in O(nm 1.961n) Kratsch, Fomin, T.,
    submitted
  • min seps 1.73n
  • potential maximal cliques 1.961n

70
Treewidth heuristics and approximations
  • Decomposition algorithm each minimal separator
    we chose is completed
  • What if we always chose the minimum size
    separator?
  • MinCardSep
  • Existing heuristic MinDegree
  • Not even minimal triangulations, but good for
    minimum fill-in!

71
Blocks and MinCardSep
  • Border/Interior
  • Suppose
  • tw(G) k
  • Intgt Brd
  • Si 4k, for all i
  • Then
  • Exists x in Int with 4k neighbors
  • So a separator 4k

72
Blocks and MinCardSep
  • tw(G) k, Int gt Brd, Si 4k, for all i
  • For all x in Int, x has gt4k neighbors
  • edges GB gt4k Int/2 kB
  • Contradicts tw(GB) k

73
Blocks and asteroidal number
  • AT-free graphs
  • at most two (inclusion maximal) separators on the
    border
  • Asteroidal number
  • the maximum number of inclusion maximal
    separators on the border

74
MinCardSep in graphs of asteroidal number a
  • If
  • B gt 8ak
  • the separators on the border are 4k
  • Then
  • there is a min sep in B with 4k vertices
  • split again!
  • MCardSep is a 8a approximation algorithm

75
Treewidth approximations and heuristics
  • Constant factor approximations
  • AT-free graphs (2-approx)
  • Bounded asteroidal number (8a-approx)
  • O(log OPT) approximations
  • 1000 log k only of theoretical interest
  • MinDegree
  • E. Amir proposes a 2-approx in exp(k) time
  • and says that MinDegree always beats it!

76
Treewidth computations and approximations
  • Polynomial for fixed k (FPT-problem)
  • Polynomial for graphs with few minimal
    separators
  • Exact algorithm O(cn Poly(n)) time with clt2
  • O(log OPT)-approximation
  • Nice heuristic
  • Open constant factor approximations

77
Treewidth conclusion
  • tw(G) the distance from G to the class of
    trees
  • Small treewidth gt efficient algorithms
  • Dynamic programming, logic expressions, reduction
    rules
  • Not so hard to compute
  • NP-hard, but polynomial for fixed k
  • Anything left for future research?

78
Treewidth extensions
  • G planar for any x,r
  • tw(Nr(x)) 3r
  • Bounded local treewidth
  • Function f
  • for any G, any x,r
  • tw(Nr(x)) f(r)
  • Efficient or fixed parameter algorithms for
    graphs of bounded local treewidth

79
Cliquewidth
  • Treewidth the complete graphs are
    undecomposable.
  • Cographs very simple graphs!
  • Single vertex parallel composition series
    composition

G1
G2
G1
G2
Parallel G1G2
Series G1G2
80
Cliquewidth
  • Graph grammars defining a class of k-simple
    graphs
  • cwd(G) k
  • Quite many NP-hard problems become polynomial
    MIS, Hamiltonicity, Coloring,
  • Dynamic programming, logic (ExtMSOL1)
  • Almost no results on cliquewidth
    computation/approximations
  • cwd 3 polynomial

81
Treewidth approximations?
  • Constant factor seems hard
  • Treewidth obstructions?
  • Find a min-max theorem
  • For any G, either something(G) gt r or tw(G)
    r2
  • Certifying algorithms?
  • When I claim tw(G) k you can check the
    decomposition.
  • Why should you trust me when I say tw(G) gt k?

82
Treewidth and tree decompositions a very active
research area!
Write a Comment
User Comments (0)
About PowerShow.com