• Nem Talált Eredményt

Algorithmic graph structure theory

N/A
N/A
Protected

Academic year: 2022

Ossza meg "Algorithmic graph structure theory"

Copied!
255
0
0

Teljes szövegt

(1)

Algorithmic graph structure theory

Dániel Marx1

1Computer and Automation Research Institute, Hungarian Academy of Sciences (MTA SZTAKI)

Budapest, Hungary

STACS 2013 Tutorial February 27, 2013

(2)

Classes of graphs

Classes of graphs can be described by

1 what they do not have, (excluded structures)

2 how they look like

(constructions and decompositions).

In general, the second description is more useful for algorithmic purposes.

(3)

Classes of graphs

Example: Trees

1 Do not contain cycles (and connected)

2 Have a tree structure.

Example: Bipartite graphs

1 Do not contain odd cycles,

2 Edges going only between two classes.

Example: Chordal graphs

1 Do not contain induced cycles,

(4)

Graph Structure Theory

“Graph structure theory” usually refers to the theory developed by Robertson and Seymour on graphs excluding minors.

Definition

GraphH is a minor ofG (H ≤G) ifH can be obtained fromG by deleting edges, deleting vertices, and contracting edges.

deletinguv

u v

contracting uv

(5)

Excluding minors

Theorem [Wagner 1937]

A graph is a planar if and only if it excludesK5 andK3,3 as a minor.

K5 K3,3

How do graphs excluding H (orH1,. . .,Hk) look like? What other classes can be defined this way?

The work of Robertson and Seymour gives some kind of combinatorial answer to that and provides tools for the related algorithmic questions.

(6)

Excluding minors

Theorem [Wagner 1937]

A graph is a planar if and only if it excludesK5 andK3,3 as a minor.

K5 K3,3

How do graphs excluding H (orH1,. . .,Hk) look like?

(7)

Minor closed properties

Definition

A setG of graphs isminor closed ifG ∈ G andH ≤G implies H ∈ G. .

Examples of minor closed properties:

planar graphs

graphs that can be drawn on the torus acyclic graphs (forests)

graphs having no cycle longer than k empty graphs

Examples ofnot minor closed properties:

(8)

Wagner’s conjecture

LetG be a minor closed class of graphs. Then G can be characterized by the minimalobstructions:

LetH ∈ F if H 6∈ G, but every proper minor ofH is inG.

G ∈ G ⇐⇒ ∀H ∈ F,H 6≤G

Theorem [Robertson and Seymour]

Every classG closed under taking minors has a finite setF of minimal obstructions.

(9)

Wagner’s conjecture

LetG be a minor closed class of graphs. Then G can be characterized by the minimalobstructions:

LetH ∈ F if H 6∈ G, but every proper minor ofH is inG.

G ∈ G ⇐⇒ ∀H ∈ F,H 6≤G

Theorem [Robertson and Seymour]

Every classG closed under taking minors has a finite setF of minimal obstructions.

(10)

Graph Minors Theorem

Well-quasi-ordering:

Theorem [Robertson and Seymour]

Every classG closed under taking minors has a finite setF of minimal obstructions.

Minor testing:

Theorem [Robertson and Seymour]

For every fixed graphH, there is anO(n3) time algorithm for testing whetherH is a minor of the given graphG.

(11)

Graph Minors results

The proof spans around 400 pages in the paper series “Graph Minors I–XXIII”.

The size of the obstruction sets and the constants in the algorithms can be astronomical even for simple properties.

Why should you know about this theory?

The theory introduces simpler concepts and techniques that are useful on their own in many contexts.

Some of the more complicated results can be formulated as self-contained powerful statements that can be used as a black box.

(12)

Graph Minors results

The proof spans around 400 pages in the paper series “Graph Minors I–XXIII”.

The size of the obstruction sets and the constants in the algorithms can be astronomical even for simple properties.

Why should you know about this theory?

The theory introduces simpler concepts and techniques that are useful on their own in many contexts.

Some of the more complicated results can be formulated as self-contained powerful statements that can be used as a black

(13)

Graph Minors Theorem

Treewidth Grid theorems Planar graphs

Structure theorem

(14)

Fixed-parameter tractability

Main definition

A parameterized problem isfixed-parameter tractable (FPT)if there is anf(k)nc time algorithm for some constant c.

Main goal of parameterized complexity: to find FPT problems.

Examples of NP-hard problems that are FPT: Finding a vertex cover of size k.

Finding a path of length k. Finding k disjoint triangles.

Drawing the graph in the plane with k edge crossings. Finding disjoint paths that connectk pairs of points. . . .

(15)

Fixed-parameter tractability

Main definition

A parameterized problem isfixed-parameter tractable (FPT)if there is anf(k)nc time algorithm for some constant c.

Main goal of parameterized complexity: to find FPT problems.

Examples of NP-hard problems that are FPT:

Finding a vertex cover of sizek. Finding a path of length k.

Finding k disjoint triangles.

Drawing the graph in the plane with k edge crossings.

(16)

Fixed-parameter tractability

Downey and Fellows started the systematic investigation of fixed-parameter tractability and its hardness theory in the 80s.

nf(k) vs.f(k)·nc.

Many of the algorithmic results from graph structure theory can be formulated and appreciated using the language of fixed-parameter tractability.

The original motivation of Downey and Fellows comes from graph structure theory!

(17)

Outline

Treewidth

Definition, algorithms, properties.

Applications Graphs on surfaces

The Graph Structure Theorem Minor Testing

Well-quasi-ordering

(18)

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.

5 6

2

Input: A tree with weights on the vertices. Task: Find an

independent set of maximum weight.

(19)

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.

Do not invite a colleague and his direct boss at the same time!

5 6

2

Input: A tree with weights on the vertices. Task: Find an

independent set of maximum weight.

(20)

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.

Do not invite a colleague and his direct boss at the same time!

5 6

2

Input: A tree with weights on the vertices.

Task: Find an independent set of

(21)

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.

Do not invite a colleague and his direct boss at the same time!

2

5 6

Input: A tree with weights on the vertices.

Task: Find an independent set of

(22)

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.

Subproblems:

Tv: the subtree rooted atv.

A[v]: max. weight of an independent set inTv B[v]: max. weight of an independent set inTv

that does not contain v Goal: determineA[r] for the rootr.

(23)

Solving the Party Problem

Subproblems:

Tv: the subtree rooted atv.

A[v]: max. weight of an independent set inTv B[v]: max. weight of an independent set inTv

that does not contain v Recurrence:

Assumev1, . . . ,vk are the children ofv. Use the recurrence relations

B[v] =Pk

i=1A[vi]

A[v] =max{B[v], w(v) +Pk

i=1B[vi]}

(24)
(25)

Treewidth — a measure of “tree-likeness”

Tree decomposition: Vertices are arranged in a tree structure satisfying the following properties:

1 If u andv are neighbors, then there is a bag containing both of them.

2 For every v, the bags containingv form a connected subtree.

Width of the decomposition: largest bag size−1. treewidth: width of the best decomposition.

d c b

a

d,f,g b,c,f

c,d,f

(26)

Treewidth — a measure of “tree-likeness”

Tree decomposition: Vertices are arranged in a tree structure satisfying the following properties:

1 If u andv are neighbors, then there is a bag containing both of them.

2 For every v, the bags containingv form a connected subtree.

Width of the decomposition: largest bag size−1. treewidth: width of the best decomposition.

d c b

a

b,c,f c,d,f

d,f,g

(27)

Treewidth — a measure of “tree-likeness”

Tree decomposition: Vertices are arranged in a tree structure satisfying the following properties:

1 If u andv are neighbors, then there is a bag containing both of them.

2 For every v, the bags containingv form a connected subtree.

Width of the decomposition: largest bag size−1. treewidth: width of the best decomposition.

d c b

a

b,c,f c,d,f

d,f,g

(28)

Treewidth — a measure of “tree-likeness”

Tree decomposition: Vertices are arranged in a tree structure satisfying the following properties:

1 If u andv are neighbors, then there is a bag containing both of them.

2 For every v, the bags containingv form a connected subtree.

Width of the decomposition: largest bag size−1.

treewidth: width of the best decomposition.

d c b

a

b,c,f c,d,f

d,f,g

(29)

Treewidth — a measure of “tree-likeness”

Tree decomposition: Vertices are arranged in a tree structure satisfying the following properties:

1 If u andv are neighbors, then there is a bag containing both of them.

2 For every v, the bags containingv form a connected subtree.

Width of the decomposition: largest bag size−1.

treewidth: width of the best decomposition.

d c b

a

d,f,g b,c,f

c,d,f

(30)

Treewidth — a measure of “tree-likeness”

Tree decomposition: Vertices are arranged in a tree structure satisfying the following properties:

1 If u andv are neighbors, then there is a bag containing both of them.

2 For every v, the bags containingv form a connected subtree.

Width of the decomposition: largest bag size−1.

treewidth: width of the best decomposition.

a

b c d

d,f,g b,c,f

c,d,f

(31)

Treewidth

Fact: treewidth= 1 ⇐⇒graph is a forest

a a

b

d

c

f g

e

a a

b

d

c

f g

e a,b a,c

b,d b,e c,g

e,h

c,f

(32)

Treewidth — outline

1 Basic algorithms

2 Combinatorial properties

3 Applications

(33)

Finding tree decompositions

Hardness:

Theorem [Arnborg, Corneil, Proskurowski 1987]

It is NP-hard to determine the treewidth of a graph (given a graph G and an integerw, decide if the treewidth ofG is at mostw).

Fixed-parameter tractability:

Theorem [Bodlaender 1996]

There is a2O(w3)·n time algorithm that finds a tree decomposition of widthw (if exists).

Consequence:

(34)

Finding tree decompositions — approximately

Sometimes we can get better dependence on treewidth using approximation.

FPT approximation:

Theorem [Robertson and Seymour]

There is aO(33w ·w·n2) time algorithm that finds a tree

decomposition of width4w+1, if the treewidth of the graph is at mostw.

Polynomial-time approximation:

Theorem [Feige, Hajiaghayi, Lee 2008]

(35)

Weighted Max Independent Set and treewidth

Theorem

Given a tree decomposition of widthw,Weighted Max Independent Setcan be solved in time O(2w·wO(1)·n).

Bx: vertices appearing in nodex.

Vx: vertices appearing in the subtree rooted atx. Generalizing our solution for trees:

Instead of computing 2 values A[v], B[v] for each vertex of the graph, we compute 2|Bx|≤2w+1 values for each bagBx.

M[x,S]:

c,d,f b,c,f d,f,g a,b,c b,e,f g,h

How to determineM[x,S] if all the values are known for the children ofx?

(36)

Weighted Max Independent Set and treewidth

Theorem

Given a tree decomposition of widthw,Weighted Max Independent Setcan be solved in time O(2w·wO(1)·n).

Bx: vertices appearing in nodex.

Vx: vertices appearing in the subtree rooted atx. Generalizing our solution for trees:

Instead of computing 2 values A[v], B[v] for each vertex of the graph, we compute 2|Bx|≤2w+1 values for each bagBx.

M[x,S]:

c,d,f b,c,f d,f,g a,b,c b,e,f g,h

(37)

Nice tree decompositions

Definition

A rooted tree decomposition isniceif every node x is one of the following 4 types:

Leaf: no children,|Bx|=1

Introduce: 1 childy withBx =By∪ {v} for some vertexv Forget: 1 childy withBx =By \ {v} for some vertexv Join: 2 children y1,y2 withBx =By1 =By2

Forget Join

Introduce Leaf

(38)

Nice tree decompositions

Definition

A rooted tree decomposition isniceif every node x is one of the following 4 types:

Leaf: no children,|Bx|=1

Introduce: 1 childy withBx =By∪ {v} for some vertexv Forget: 1 childy withBx =By \ {v} for some vertexv Join: 2 children y1,y2 withBx =By1 =By2

Theorem

(39)

Weighted Max Independent Set and nice tree decompositions

Leaf: no children,|Bx|=1 Trivial!

Introduce: 1 childy withBx =By∪ {v} for some vertexv

m[x,S] =

m[y,S] ifv 6∈S,

m[y,S\ {v}] +w(v) ifv S butv has no neighbor inS,

−∞ ifS containsv and its neighbor.

Forget Join

Introduce Leaf

(40)

Weighted Max Independent Set and nice tree decompositions

Forget: 1 childy withBx =By \ {v} for some vertexv m[x,S] =max{m[y,S],m[y,S ∪ {v}]}

Join: 2 children y1,y2 withBx =By1 =By2 m[x,S] =m[y1,S] +m[y2,S]−w(S)

Forget Join

Introduce Leaf

(41)

Weighted Max Independent Set and nice tree decompositions

Forget: 1 childy withBx =By \ {v} for some vertexv m[x,S] =max{m[y,S],m[y,S ∪ {v}]}

Join: 2 children y1,y2 withBx =By1 =By2 m[x,S] =m[y1,S] +m[y2,S]−w(S)

There are at most2w+1·n subproblemsm[x,S]and each

(42)

3-Coloring and tree decompositions

Theorem

Given a tree decomposition of widthw,3-Coloringcan be solved inO(3w·wO(1)·n).

Bx: vertices appearing in nodex.

Vx: vertices appearing in the subtree rooted atx. For every node x and coloring c : Bx → {1,2,3}, we compute the Boolean value E[x,c], which is true if and only if c can be extended to a proper 3-coloring ofVx.

c,d,f b,c,f d,f,g a,b,c b,e,f g,h

How to determineE[x,c] if all the values are known for the children ofx?

(43)

3-Coloring and tree decompositions

Theorem

Given a tree decomposition of widthw,3-Coloringcan be solved inO(3w·wO(1)·n).

Bx: vertices appearing in nodex.

Vx: vertices appearing in the subtree rooted atx. For every node x and coloring c : Bx → {1,2,3}, we compute the Boolean value E[x,c], which is true if and only if c can be extended to a proper 3-coloring ofVx.

c,d,f b,c,f d,f,g a,b,c b,e,f g,h

(44)

3-Coloring and nice tree decompositions

Leaf: no children,|Bx|=1 Trivial!

Introduce: 1 childy withBx =By∪ {v} for some vertexv If c(v)6=c(u) for every neighbor u of v, then

E[x,c] =E[y,c0], where c0 is c restricted to By. Forget: 1 childy withBx =By \ {v} for some vertexv E[x,c]is true if E[y,c0]is true for one of the 3 extensions ofc to By.

Join: 2 children y1,y2 withBx =By1 =By2 E[x,c] =E[y1,c]∧E[y2,c]

Forget Join

Introduce Leaf

u,v,w u,w

v u,v,w

(45)

3-Coloring and nice tree decompositions

Leaf: no children,|Bx|=1 Trivial!

Introduce: 1 childy withBx =By∪ {v} for some vertexv If c(v)6=c(u) for every neighbor u of v, then

E[x,c] =E[y,c0], where c0 is c restricted to By. Forget: 1 childy withBx =By \ {v} for some vertexv E[x,c]is true if E[y,c0]is true for one of the 3 extensions ofc to By.

Join: 2 children y1,y2 withBx =By1 =By2 E[x,c] =E[y1,c]∧E[y2,c]

There are at most 3w+1·n subproblems E[x,c]and each subprob- lem can be solved in wO(1) time (assuming the children are already

(46)

Hamiltonian cycle and treewidth

Theorem

Given a tree decomposition of widthw,Hamiltonian cyclecan be solved in timewO(w)·n.

Bx: vertices appearing in nodex.

Vx: vertices appearing in the subtree rooted atx. If H is a Hamiltonian cycle, then the subgraph H[Vx] is a set of paths with endpoints inBx.

Bx0 Bx1 Bx2 x

Vx

What are the important properties ofH[V ]“seen from outside”?

(47)

Hamiltonian cycle and nice tree decompositions

For each subproblem(Bx0,Bx1,Bx2,M), we have to determine if there is a set of paths with this pattern.

How to do this for the different types of nodes?

(Assuming that all the subproblems are solved for the children.) Leaf: no children,|Bx|=1

Trivial!

(48)

Hamiltonian cycle and nice tree decompositions

Solving subproblem(Bx0,Bx1,Bx2,M) of node x.

Forget: 1 childy with Bx =By\ {v}for some vertex v

In a solutionH of (Bx0,Bx1,Bx2,M), vertexv has degree 2. Thus subproblem(Bx0,Bx1,Bx2,M) ofx is equivalent to subproblem (Bx0,Bx1,Bx2∪ {v},M)of y.

Bx0 Bx1 Bx2

(49)

Hamiltonian cycle and nice tree decompositions

Solving subproblem(Bx0,Bx1,Bx2,M) of node x.

Forget: 1 childy with Bx =By\ {v}for some vertex v

In a solutionH of (Bx0,Bx1,Bx2,M), vertexv has degree 2. Thus subproblem(Bx0,Bx1,Bx2,M) ofx is equivalent to subproblem (Bx0,Bx1,Bx2∪ {v},M)of y.

Bx2 Bx1 Bx0

v

(50)

Hamiltonian cycle and nice tree decompositions

Solving subproblem(Bx0,Bx1,Bx2,M) of node x.

Forget: 1 childy with Bx =By\ {v}for some vertex v

In a solutionH of (Bx0,Bx1,Bx2,M), vertexv has degree 2. Thus subproblem(Bx0,Bx1,Bx2,M) ofx is equivalent to subproblem (Bx0,Bx1,Bx2∪ {v},M)of y.

Bx2 Bx1 Bx0

v

(51)

Hamiltonian cycle and nice tree decompositions

Solving subproblem(Bx0,Bx1,Bx2,M) of node x.

Introduce: 1 childy with Bx =By∪ {v} for some vertex v Case 1: v ∈Bx0. Subproblem is equivalent with(Bx0\{v},Bx1,Bx2,M) for nodey.

v x

Bx0 Bx1 Bx2

(52)

Hamiltonian cycle and nice tree decompositions

Solving subproblem(Bx0,Bx1,Bx2,M) of node x.

Introduce: 1 childy with Bx =By∪ {v} for some vertex v Case 1: v ∈Bx0. Subproblem is equivalent with(Bx0\{v},Bx1,Bx2,M) for nodey.

v x

Bx0 Bx1 Bx2

y By2 By1 By0

(53)

Hamiltonian cycle and nice tree decompositions

Solving subproblem(Bx0,Bx1,Bx2,M) of node x.

Introduce: 1 childy with Bx =By∪ {v} for some vertex v Case 1: v ∈Bx0. Subproblem is equivalent with(Bx0\{v},Bx1,Bx2,M) for nodey.

v x

Bx0 Bx1 Bx2

y By2 By1 By0

(54)

Hamiltonian cycle and nice tree decompositions

Solving subproblem(Bx0,Bx1,Bx2,M) of node x.

Introduce: 1 childy with Bx =By∪ {v} for some vertex v Case 1: v ∈Bx0. Subproblem is equivalent with(Bx0\{v},Bx1,Bx2,M) for nodey.

v x

Bx2 Bx1 Bx0

y

By2 By1 By0

(55)

Hamiltonian cycle and nice tree decompositions

Solving subproblem(Bx0,Bx1,Bx2,M) of node x.

Introduce: 1 childy with Bx =By∪ {v} for some vertex v

Case 2: v ∈Bx1. Every neighbor of v in Vx is inBx. Thusv has to be adjacent with one other vertex ofBx.

Is there a subproblem(By0,By1,By2,M0) of node y such that making a vertex of By adjacent to v makes it a solution for subproblem (Bx0,Bx1,Bx2,M) of nodex?

x Bx2 Bx1 Bx0

v

(56)

Hamiltonian cycle and nice tree decompositions

Solving subproblem(Bx0,Bx1,Bx2,M) of node x.

Introduce: 1 childy with Bx =By∪ {v} for some vertex v

Case 2: v ∈Bx1. Every neighbor of v in Vx is inBx. Thusv has to be adjacent with one other vertex ofBx.

Is there a subproblem(By0,By1,By2,M0) of node y such that making a vertex of By adjacent to v makes it a solution for subproblem (Bx0,Bx1,Bx2,M) of nodex?

x Bx0 Bx1 Bx2

v

(57)

Hamiltonian cycle and nice tree decompositions

Solving subproblem(Bx0,Bx1,Bx2,M) of node x.

Introduce: 1 childy with Bx =By∪ {v} for some vertex v

Case 2: v ∈Bx1. Every neighbor of v in Vx is inBx. Thusv has to be adjacent with one other vertex ofBx.

Is there a subproblem(By0,By1,By2,M0) of node y such that making a vertex of By adjacent to v makes it a solution for subproblem (Bx0,Bx1,Bx2,M) of nodex?

x Bx0 Bx1 Bx2

v

y By0 By1 By2

(58)

Hamiltonian cycle and nice tree decompositions

Solving subproblem(Bx0,Bx1,Bx2,M) of node x.

Introduce: 1 childy with Bx =By∪ {v} for some vertex v

Case 2: v ∈Bx1. Every neighbor of v in Vx is inBx. Thusv has to be adjacent with one other vertex ofBx.

Is there a subproblem(By0,By1,By2,M0) of node y such that making a vertex of By adjacent to v makes it a solution for subproblem (Bx0,Bx1,Bx2,M) of nodex?

x Bx0 Bx1 Bx2

v

y By0 By1 By2

(59)

Hamiltonian cycle and nice tree decompositions

Solving subproblem(Bx0,Bx1,Bx2,M) of node x.

Introduce: 1 childy with Bx =By∪ {v} for some vertex v

Case 2: v ∈Bx1. Every neighbor of v in Vx is inBx. Thusv has to be adjacent with one other vertex ofBx.

Is there a subproblem(By0,By1,By2,M0) of node y such that making a vertex of By adjacent to v makes it a solution for subproblem (Bx0,Bx1,Bx2,M) of nodex?

x Bx2 Bx1 Bx0

v

y

By0 By1 By2

(60)

Hamiltonian cycle and nice tree decompositions

Solving subproblem(Bx0,Bx1,Bx2,M) of node x.

Introduce: 1 childy with Bx =By∪ {v} for some vertex v

Case 3: v ∈Bx1. Similar to Case 2, but 2 vertices ofBy are adjacent withv.

v x Bx2 Bx1 Bx0

(61)

Hamiltonian cycle and nice tree decompositions

Solving subproblem(Bx0,Bx1,Bx2,M) of node x.

Introduce: 1 childy with Bx =By∪ {v} for some vertex v

Case 3: v ∈Bx1. Similar to Case 2, but 2 vertices ofBy are adjacent withv.

v x

Bx0 Bx1 Bx2

(62)

Hamiltonian cycle and nice tree decompositions

Solving subproblem(Bx0,Bx1,Bx2,M) of node x.

Introduce: 1 childy with Bx =By∪ {v} for some vertex v

Case 3: v ∈Bx1. Similar to Case 2, but 2 vertices ofBy are adjacent withv.

v x

Bx0 Bx1 Bx2

y By0 By1

(63)

Hamiltonian cycle and nice tree decompositions

Solving subproblem(Bx0,Bx1,Bx2,M) of node x.

Introduce: 1 childy with Bx =By∪ {v} for some vertex v

Case 3: v ∈Bx1. Similar to Case 2, but 2 vertices ofBy are adjacent withv.

v x

Bx0 Bx1 Bx2

y By0 By1

(64)

Hamiltonian cycle and nice tree decompositions

Solving subproblem(Bx0,Bx1,Bx2,M) of node x.

Introduce: 1 childy with Bx =By∪ {v} for some vertex v

Case 3: v ∈Bx1. Similar to Case 2, but 2 vertices ofBy are adjacent withv.

v x

Bx0 Bx1 Bx2

y

By0 By1

(65)

Hamiltonian cycle and nice tree decompositions

Solving subproblem(Bx0,Bx1,Bx2,M) of node x. Join: 2 childreny1,y2 withBx =By1 =By2

A solutionH is the union of a subgraphH1⊆G[Vy1] and a subgraphH2 ⊆G[Vy2].

IfH1 is a solution for (By01,By11,By21,M1) of node y1 andH2 is a solution for(By02,By12,By22,M2) of nodey2, then we can check if H1∪H2 is a solution for (Bx0,Bx1,Bx2,M) of nodex.

For any two subproblems ofy1 andy2, we check if they have solutions and if their union is a solution for(B0,B1,B2,M) of node

(66)

Monadic Second Order Logic

Extended Monadic Second Order Logic (EMSO) A logical language on graphs consisting of the following:

Logical connectives ∧,∨,→,¬,=,6=

quantifiers ∀,∃over vertex/edge variables predicate adj(u,v): vertices u andv are adjacent predicate inc(e,v): edgee is incident to vertex v quantifiers ∀,∃over vertex/edge set variables

∈,⊆for vertex/edge sets Example:

The formula

(67)

Monadic Second Order Logic

Extended Monadic Second Order Logic (EMSO) A logical language on graphs consisting of the following:

Logical connectives ∧,∨,→,¬,=,6=

quantifiers ∀,∃over vertex/edge variables predicate adj(u,v): vertices u andv are adjacent predicate inc(e,v): edgee is incident to vertex v quantifiers ∀,∃over vertex/edge set variables

∈,⊆for vertex/edge sets Example:

The formula

(68)

Courcelle’s Theorem

Courcelle’s Theorem

If a graph property can be expressed in EMSO, then for every fixed w ≥1, there is a linear-time algorithm for testing this property on graphs having treewidth at mostw.

Note: The constant depending on w can be very large (double, triple exponential etc.), therefore a direct dynamic programming algorithm can be more efficient.

If we can express a property in EMSO, then we immediately get that testing this property is FPT parameterized by the treewidthw of the input graph.

Can we express3-ColoringandHamiltonian Cycle in EMSO?

(69)

Courcelle’s Theorem

Courcelle’s Theorem

If a graph property can be expressed in EMSO, then for every fixed w ≥1, there is a linear-time algorithm for testing this property on graphs having treewidth at mostw.

Note: The constant depending on w can be very large (double, triple exponential etc.), therefore a direct dynamic programming algorithm can be more efficient.

If we can express a property in EMSO, then we immediately get that testing this property is FPT parameterized by the treewidthw of the input graph.

(70)

Using Courcelle’s Theorem

3-Coloring

∃C1,C2,C3V ∀v V(vC1v C2vC3)

∧ ∀u,v Vadj(u,v)(¬(uC1vC1)∧ ¬(uC2v C2)∧ ¬(u C3v C3))

Hamiltonian Cycle

∃HE spanning(H)(∀v Vdegree2(H,v)) degree0(H,v) :=¬∃eHinc(e,v)

degree1(H,v) :=¬degree0(H,v)∧ ¬∃e1,e2H(e16= e2inc(e1,v)inc(e2,v))

degree2(H,v) :=¬degree0(H,v)∧ ¬degree1(H,v)∧ ¬∃e1,e2,e3 H(e16=e2e26=e3e16=e3inc(e1,v)inc(e2,v)inc(e3,v))) spanning(H) :=∀u,v V∃PH∀x V ((x =ux =

v)degree1(P,x))(x6=ux 6=v(degree0(P,x)degree2(P,x)))

(71)

Using Courcelle’s Theorem

3-Coloring

∃C1,C2,C3V ∀v V(vC1v C2vC3)

∧ ∀u,v Vadj(u,v)(¬(uC1vC1)∧ ¬(uC2v C2)∧ ¬(u C3v C3))

Hamiltonian Cycle

∃HE spanning(H)(∀v Vdegree2(H,v)) degree0(H,v) :=¬∃eHinc(e,v)

degree1(H,v) :=¬degree0(H,v)∧ ¬∃e1,e2H(e16=

e2inc(e1,v)inc(e2,v))

(72)

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, i.e., FPT parameterized by treewidth.

2 The problem can be described by a formula for each value of the parameterk.

Example: For each k, having a cycle of length exactly k can be expressed as

∃v1, . . . ,vk V((v16=v2)(v16=v3). . .(vk−16=vk))

(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, i.e., FPT parameterized withcombined parameterk and treewidth w.

(73)

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, i.e., FPT parameterized by treewidth.

2 The problem can be described by a formula for each value of the parameterk.

Example: For eachk, having a cycle of length exactly k can be expressed as

∃v1, . . . ,vk V((v16=v2)(v16=v3). . .(vk−16=vk))

(74)

Subgraph Isomorphism

Subgraph Isomorphism Input: graphs H andG

Find: a copy of H in G as subgraph.

(75)

Subgraph Isomorphism

Subgraph Isomorphism Input: graphs H andG

Find: a copy of H in G as subgraph.

For eachH, we can construct a formula φH that expresses “G has a subgraph isomorphic toH” (similarly to the k-cycle on the previous slide).

⇒ By Courcelle’s Theorem, Subgraph Isomorphism can be solved in timef(H,w)·n ifG has treewidth at mostw.

(76)

Subgraph Isomorphism

Subgraph Isomorphism Input: graphs H andG

Find: a copy of H in G as subgraph.

Since there is only a finite number of simple graphs on k vertices, Subgraph Isomorphism can be solved in time f(k,w)·n if H hask vertices andG has treewidth at mostw.

Theorem

is FPT parameterized by combined

(77)

MSO on words

Theorem [Büchi, Elgot, Trakhtenbrot 1960]

If a languageL⊆Σ can be defined by an MSO formulaφusing the relation<, thenL is regular.

Example: abc is defined by

∃x :Pb(x)∧(∀y : (y <x)→Pa(y))∧(∀y : (x <y)→Pc(y)).

(78)

MSO on words

Theorem [Büchi, Elgot, Trakhtenbrot 1960]

If a languageL⊆Σ can be defined by an MSO formulaφusing the relation<, thenL is regular.

Example: abc is defined by

∃x :Pb(x)∧(∀y : (y <x)→Pa(y))∧(∀y : (x <y)→Pc(y)).

We prove a more general statement for formulas φ(w,X1, . . . ,Xk) and words overΣ∪ {0,1}k.

Induction over the structure ofφ:

FSM for ¬φ(w), given FSM for φ(w).

(79)

MSO on words

Theorem [Büchi, Elgot, Trakhtenbrot 1960]

If a languageL⊆Σ can be defined by an MSO formulaφusing the relation<, thenL is regular.

Proving Courcelle’s Theorem:

Generalize from words to trees.

A width-k tree decomposition can be interpreted as a tree over an alphabet of size f(k).

Formula ⇒tree automata.

(80)

Algorithms — overview

Algorithms exploit the fact that a subtree communicates with the rest of the graph via a single bag.

Key point: defining the subproblems.

Courcelle’s Theorem makes this process automatic for many problems.

There are notable problems that are easy for trees, but hard for bounded-treewidth graphs.

(81)

Treewidth — outline

1 Basic algorithms

2 Combinatorial properties

3 Applications

(82)

Properties of treewidth

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

⇒If F is a minor ofG, then the treewidth ofF is at most the treewidth ofG.

Fact: For every cliqueK, there is a bagB with K ⊆B. Fact: The treewidth of thek-clique isk−1.

Fact: For everyk ≥2, the treewidth of thek×k grid is exactlyk.

(83)

Properties of treewidth

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

⇒If F is a minor ofG, then the treewidth ofF is at most the treewidth ofG.

Fact: For every cliqueK, there is a bagB with K ⊆B.

Fact: The treewidth of thek-clique isk−1.

Fact: For everyk ≥2, the treewidth of thek×k grid is exactlyk.

(84)

Properties of treewidth

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

⇒If F is a minor ofG, then the treewidth ofF is at most the treewidth ofG.

Fact: For every cliqueK, there is a bagB with K ⊆B.

Fact: The treewidth of thek-clique isk−1.

Fact: For everyk ≥2, the treewidth of thek×k grid is exactlyk.

(85)

The Cops and Robber 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 infinitely fast on the edges, and sees where the cops will land.

Theorem [Seymour and Thomas 1993]

k+1cops can win the game ⇐⇒ the treewidth of the graph is at mostk.

(86)

The Cops and Robber 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 infinitely fast on the edges, and sees where the cops will land.

Theorem [Seymour and Thomas 1993]

k+1cops can win the game ⇐⇒ the treewidth of the graph is at mostk.

Consequence 1: Algorithms

The winner of the game can be determined in timenO(k)using stan-

(87)

The Cops and Robber 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 infinitely fast on the edges, and sees where the cops will land.

Theorem [Seymour and Thomas 1993]

k+1cops can win the game ⇐⇒ the treewidth of the graph is at mostk.

Consequence 2: Lower bounds Exercise 1:

(88)

The Cops and Robber game

Example: 2 cops have a winning strategy in a tree.

(89)

The Cops and Robber game

Example: 2 cops have a winning strategy in a tree.

(90)

The Cops and Robber game

Example: 2 cops have a winning strategy in a tree.

(91)

The Cops and Robber game

Example: 2 cops have a winning strategy in a tree.

(92)

The Cops and Robber game

Example: 2 cops have a winning strategy in a tree.

(93)

The Cops and Robber game

Example: 2 cops have a winning strategy in a tree.

(94)

The Cops and Robber game

Example: 2 cops have a winning strategy in a tree.

(95)

The Cops and Robber game

Example: 2 cops have a winning strategy in a tree.

(96)

The Cops and Robber game

Example: 2 cops have a winning strategy in a tree.

(97)

A perfect structure theorem

Theorem

The following are equivalent:

G does not have a K4 minor.

G has treewidth ≤2.

G is subgraph of a series-parallel graph.

(98)

A perfect structure theorem

Theorem

The following are equivalent:

G does not have a K4 minor.

G has treewidth ≤2.

G is subgraph of a series-parallel graph.

A perfect structure theorem:

K46∈G =⇒ G has a width-2 tree decomposition

(99)

Excluded Grid Theorem

Excluded Grid Theorem [Diestel et al. 1999]

If the treewidth ofG is at leastk4k2(k+2), thenG has ak×k grid minor.

(100)

Excluded Grid Theorem

Excluded Grid Theorem [Diestel et al. 1999]

If the treewidth ofG is at leastk4k2(k+2), thenG has ak×k grid minor.

Observation: Every planar graph is the minor of a sufficiently large grid.

Consequence

IfH is planar, then everyH-minor free graph has treewidth at most f(H).

(101)

Excluded Grid Theorem

Excluded Grid Theorem [Diestel et al. 1999]

If the treewidth ofG is at leastk4k2(k+2), thenG has ak×k grid minor.

A large grid minor is a “witness” that treewidth is large, but the relation is approximate:

Nok×k grid minor =⇒ tree decomposition of width <f(k)

(102)

Excluding trees

As every forest (tree) is planar we have have for every forestF

no F-minor =⇒ tree decomposition of width <f(F)

tree decomposition

of width<f(F) =⇒ Does not exclude any tree as minor!

(103)

Excluding trees

Path decomposition: the tree of bags is a path.

Pathwidth: defined analogously to treewidth.

Example: A complete binary tree onk levels has pathwidthk−1.

Theorem [Diestel 1995]

IfF is a forest, then every F-minor free graph has pathwidth at most|V(F)| −2.

a

b c

d e j

f g

(104)

Excluding trees

Path decomposition: the tree of bags is a path.

Pathwidth: defined analogously to treewidth.

Example: A complete binary tree onk levels has pathwidthk−1.

Theorem [Diestel 1995]

IfF is a forest, then every F-minor free graph has pathwidth at most|V(F)| −2.

no F-minor =⇒ path decomposition of width <f(F)

(105)

Planar Excluded Grid Theorem

For planar graphs, we get linear instead of exponential dependence:

Theorem [Robertson, Seymour, Thomas 1994]

Every planar graphwith treewidth at least 4k has ak×k grid minor.

(106)

Outerplanar graphs

Definition

A planar graph isouterplanar if it has a planar embedding where every vertex is on the infinite face.

Fact

Hivatkozások

KAPCSOLÓDÓ DOKUMENTUMOK

Theorem: [Robertson and Seymour] For every fixed graph H , there is an O(n 3 ) time algorithm for testing whether H is a minor of the given graph G.. Corollary: For every minor

More precisely, we prove a structure theorem that decom- poses graphs excluding H as a topological subgraph into almost bounded-degree parts and into H ′ -minor free parts (for

For every class F of graphs, coloring F +ke graphs can be reduced to PrExt with fixed number of precolored vertices, if the modulator of the graph is given in the

For every fixed d , Graph Isomorphism can be solved in polynomial time on graphs with maximum degree d. Theorem

If a graph property can be expressed in EMSO, then for every fixed w ≥ 1, there is a linear-time algorithm for testing this property on graphs having treewidth at most w. Note:

Main message: Small separators in graphs have interesting extremal properties that can be exploited in combinatorial and algorithmic results.. Bounding the number of

Main message: Small separators in graphs have interesting extremal properties that can be exploited in combinatorial and algorithmic results.. Bounding the number of

Small separators in graphs have interesting extremal properties that can be exploited in combinatorial and algorithmic results.. Bounding the number of