• Nem Talált Eredményt

Minicourse on parameterized algorithms and complexity Part 6: Important Separators

N/A
N/A
Protected

Academic year: 2022

Ossza meg "Minicourse on parameterized algorithms and complexity Part 6: Important Separators"

Copied!
105
0
0

Teljes szövegt

(1)

Minicourse on parameterized algorithms and complexity Part 6: Important Separators

Dániel Marx

Jagiellonian University in Kraków April 21-23, 2015

(2)

Overview

Main message

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

Bounding the number of “important” cuts.

Edge/vertex versions, directed/undirected versions.

Algorithmic applications: FPT algorithm for Multiway cut,

Directed Feedback Vertex Set, and

2

(3)

Minimum cuts

Definition: δ(R)is the set of edges with exactly one endpoint inR.

Definition: A setS of edges is aminimal (X,Y)-cutif there is no X−Y path inG\S and no proper subset ofS breaks everyX−Y path.

Observation: Every minimal(X,Y)-cutS can be expressed asS = δ(R)for some X ⊆R andR∩Y =∅.

R δ(R) X Y

(4)

Minimum cuts

Theorem

A minimum(X,Y)-cut can be found in polynomial time.

Theorem

The size of a minimum(X,Y)-cut equals the maximum size of a pairwise edge-disjoint collection ofX −Y paths.

R δ(R) X Y

3

(5)

Finding minimum cuts

There is a long list of algorithms for finding disjoint paths and minimum cuts.

Edmonds-Karp: O(|V(G)| · |E(G)|2) Dinitz: O(|V(G)|2· |E(G)|)

Push-relabel: O(|V(G)|3)

Orlin-King-Rao-Tarjan: O(|V(G)| · |E(G)|) . . .

But we need only the following result:

Theorem

An(X,Y)-cut of size at mostk (if exists) can be found in time O(k·(|V(G)|+|E(G)|)).

(6)

Finding minimum cuts

Theorem

An(X,Y)-cut of size at mostk (if exists) can be found in time O(k·(|V(G)|+|E(G)|)).

We try to grow a collectionP of edge-disjointX −Y paths.

Residual graph:

not used byP: bidirected,

used by P: directed in the opposite direction.

X Y X Y

original graph residual graph

If we cannot find an augmenting path, we can find a (minimum) cut of size|P|.

5

(7)

Finding minimum cuts

Theorem

An(X,Y)-cut of size at mostk (if exists) can be found in time O(k·(|V(G)|+|E(G)|)).

We try to grow a collectionP of edge-disjointX −Y paths.

Residual graph:

not used byP: bidirected,

used by P: directed in the opposite direction.

X Y X Y

original graph residual graph

If we cannot find an augmenting path, we can find a (minimum) cut of size|P|.

(8)

Finding minimum cuts

Theorem

An(X,Y)-cut of size at mostk (if exists) can be found in time O(k·(|V(G)|+|E(G)|)).

We try to grow a collectionP of edge-disjointX −Y paths.

Residual graph:

not used byP: bidirected,

used by P: directed in the opposite direction.

X Y X Y

original graph residual graph

If we cannot find an augmenting path, we can find a (minimum) cut of size|P|.

5

(9)

Finding minimum cuts

Theorem

An(X,Y)-cut of size at mostk (if exists) can be found in time O(k·(|V(G)|+|E(G)|)).

We try to grow a collectionP of edge-disjointX −Y paths.

Residual graph:

not used byP: bidirected,

used by P: directed in the opposite direction.

X Y X Y

original graph residual graph

If we cannot find an augmenting path, we can find a (minimum) cut of size|P|.

(10)

Submodularity

Fact: The functionδ issubmodular: for arbitrary sets A,B,

|δ(A)| + |δ(B)| ≥ |δ(A∩B)| + |δ(A∪B)|

Proof: Determine separately the contribution of the different types of edges.

6

(11)

Submodularity

Fact: The functionδ issubmodular: for arbitrary sets A,B,

|δ(A)| + |δ(B)| ≥ |δ(A∩B)| + |δ(A∪B)|

Proof: Determine separately the contribution of the different types of edges.

A B

(12)

Submodularity

Fact: The functionδ issubmodular: for arbitrary sets A,B,

|δ(A)| + |δ(B)| ≥ |δ(A∩B)| + |δ(A∪B)|

0 1 1 0

Proof: Determine separately the contribution of the different types of edges.

B A

6

(13)

Submodularity

Fact: The functionδ issubmodular: for arbitrary sets A,B,

|δ(A)| + |δ(B)| ≥ |δ(A∩B)| + |δ(A∪B)|

1 0 1 0

Proof: Determine separately the contribution of the different types of edges.

A B

(14)

Submodularity

Fact: The functionδ issubmodular: for arbitrary sets A,B,

|δ(A)| + |δ(B)| ≥ |δ(A∩B)| + |δ(A∪B)|

0 1 0 1

Proof: Determine separately the contribution of the different types of edges.

A B

6

(15)

Submodularity

Fact: The functionδ issubmodular: for arbitrary sets A,B,

|δ(A)| + |δ(B)| ≥ |δ(A∩B)| + |δ(A∪B)|

1 0 0 1

Proof: Determine separately the contribution of the different types of edges.

B A

(16)

Submodularity

Fact: The functionδ issubmodular: for arbitrary sets A,B,

|δ(A)| + |δ(B)| ≥ |δ(A∩B)| + |δ(A∪B)|

1 1 1 1

Proof: Determine separately the contribution of the different types of edges.

B A

6

(17)

Submodularity

Fact: The functionδ issubmodular: for arbitrary sets A,B,

|δ(A)| + |δ(B)| ≥ |δ(A∩B)| + |δ(A∪B)|

1 1 0 0

Proof: Determine separately the contribution of the different types of edges.

B A

(18)

Submodularity

Lemma

Letλbe the minimum (X,Y)-cut size. There is a unique maximal Rmax⊇X such that δ(Rmax)is an (X,Y)-cut of size λ.

Proof: Let R1,R2 ⊇X be two sets such that δ(R1), δ(R2) are (X,Y)-cuts of size λ.

|δ(R1)|+ |δ(R2)| ≥ |δ(R1∩R2)|+|δ(R1∪R2)|

λ λ ≥λ

⇒ |δ(R1∪R2)| ≤λ

R2

R1

Y

X Note: Analogous result holds for a unique minimal Rmin.

7

(19)

Submodularity

Lemma

Letλbe the minimum (X,Y)-cut size. There is a unique maximal Rmax⊇X such that δ(Rmax)is an (X,Y)-cut of size λ.

Proof: Let R1,R2 ⊇X be two sets such that δ(R1), δ(R2) are (X,Y)-cuts of size λ.

|δ(R1)|+|δ(R2)| ≥ |δ(R1∩R2)|+|δ(R1∪R2)|

λ λ ≥λ

⇒ |δ(R1∪R2)| ≤λ

R2

R1

Y

X Note: Analogous result holds for a unique minimal Rmin.

(20)

Finding R

min

and R

max

Lemma

Given a graphG and sets X,Y ⊆V(G), the setsRmin andRmax

can be found in polynomial time.

Proof: Iteratively add vertices to X if they do not increase the minimumX −Y cut size. When the process stops, X =Rmax. Similar forRmin.

But we can do better!

8

(21)

Finding R

min

and R

max

Lemma

Given a graphG and sets X,Y ⊆V(G), the setsRmin andRmax

can be found inO(λ·(|V(G)|+|E(G)|))time, where λis the minimumX −Y cut size.

Proof: Look at the residual graph.

X Y X Y

original graph residual graph

Rmin Rmax Rmin Rmax

Rmin: vertices reachable fromX.

R : vertices from whichY isnot reachable.

(22)

Important cuts

Definition: δ(R)is the set of edges with exactly one endpoint inR.

Definition: A setS of edges is aminimal (X,Y)-cutif there is no X−Y path inG\S and no proper subset ofS breaks everyX−Y path.

Observation: Every minimal(X,Y)-cutS can be expressed asS = δ(R)for some X ⊆R andR∩Y =∅.

R δ(R) X Y

10

(23)

Important cuts

Definition

A minimal(X,Y)-cut δ(R) isimportantif there is no (X,Y)-cut δ(R0) withR ⊂R0 and|δ(R0)|≤ |δ(R)|.

Note: Can be checked in polynomial time if a cut is important (δ(R) is important if R=Rmax).

R δ(R) X Y

(24)

Important cuts

Definition

A minimal(X,Y)-cut δ(R) isimportantif there is no (X,Y)-cut δ(R0) withR ⊂R0 and|δ(R0)|≤ |δ(R)|.

Note: Can be checked in polynomial time if a cut is important (δ(R) is important if R=Rmax).

R0 δ(R)

R

δ(R0)

X Y

10

(25)

Important cuts

Definition

A minimal(X,Y)-cut δ(R) isimportantif there is no (X,Y)-cut δ(R0) withR ⊂R0 and|δ(R0)|≤ |δ(R)|.

Note: Can be checked in polynomial time if a cut is important (δ(R) is important if R=Rmax).

R δ(R)

X Y

(26)

Important cuts

The number of important cuts can be exponentially large.

Example:

X Y

1 2 k/2

This graph has2k/2 important(X,Y)-cuts of size at mostk.

Theorem

There are at most4k important(X,Y)-cuts of size at mostk.

11

(27)

Important cuts

The number of important cuts can be exponentially large.

Example:

X Y

1 2 k/2

This graph has2k/2 important(X,Y)-cuts of size at mostk. Theorem

There are at most4k important(X,Y)-cuts of size at mostk.

(28)

Important cuts

Theorem

There are at most4k important(X,Y)-cuts of size at mostk. Proof: Let λbe the minimum(X,Y)-cut size and let δ(Rmax) be the unique important cut of sizeλsuch that Rmax is maximal.

(1) We show thatRmax⊆R for every important cut δ(R).

By the submodularity ofδ:

|δ(Rmax)|+|δ(R)| ≥ |δ(Rmax∩R)|+|δ(Rmax∪R)|

λ ≥λ

|δ(Rmax∪R)| ≤ |δ(R)|

If R 6=Rmax∪R, then δ(R) is not important. Thus the important(X,Y)- and (Rmax,Y)-cuts are the same.

⇒We can assume X =Rmax.

12

(29)

Important cuts

Theorem

There are at most4k important(X,Y)-cuts of size at mostk. Proof: Let λbe the minimum(X,Y)-cut size and let δ(Rmax) be the unique important cut of sizeλsuch that Rmax is maximal.

(1) We show thatRmax⊆R for every important cut δ(R).

By the submodularity ofδ:

|δ(Rmax)|+|δ(R)| ≥ |δ(Rmax∩R)|+|δ(Rmax∪R)|

λ ≥λ

|δ(Rmax∪R)| ≤ |δ(R)|

If R 6=Rmax∪R, then δ(R) is not important.

Thus the important(X,Y)- and (Rmax,Y)-cuts are the same.

⇒We can assume X =Rmax.

(30)

Important cuts

Theorem

There are at most4k important(X,Y)-cuts of size at mostk. Proof: Let λbe the minimum(X,Y)-cut size and let δ(Rmax) be the unique important cut of sizeλsuch that Rmax is maximal.

(1) We show thatRmax⊆R for every important cut δ(R).

By the submodularity ofδ:

|δ(Rmax)|+|δ(R)| ≥ |δ(Rmax∩R)|+|δ(Rmax∪R)|

λ ≥λ

|δ(Rmax∪R)| ≤ |δ(R)|

If R 6=Rmax∪R, then δ(R) is not important.

Thus the important(X,Y)- and(Rmax,Y)-cuts are the same.

⇒We can assume X =Rmax.

12

(31)

Important cuts

(2) Search tree algorithm for enumerating all these cuts:

An (arbitrary) edgeuv leavingX =Rmax is either in the cut or not.

v Y X =Rmaxu

Branch 1: Ifuv ∈S, thenS\uv is an important (X,Y)-cut of size at mostk−1 inG \uv.

⇒ k decreases by one, λdecreases by at most 1. Branch 2: If uv 6∈S, thenS is an important

(X ∪v,Y)-cut of size at mostk inG.

⇒ k remains the same,λincreases by 1. The measure2k−λdecreases in each step.

⇒ Height of the search tree ≤2k

⇒ ≤22k =4k important cuts of size at mostk.

(32)

Important cuts

(2) Search tree algorithm for enumerating all these cuts:

An (arbitrary) edgeuv leavingX =Rmax is either in the cut or not.

v Y X =Rmaxu

Branch 1: Ifuv ∈S, thenS\uv is an important (X,Y)-cut of size at mostk−1 inG \uv.

⇒ k decreases by one, λdecreases by at most 1.

Branch 2: If uv 6∈S, thenS is an important (X ∪v,Y)-cut of size at mostk inG.

⇒ k remains the same,λincreases by 1. The measure2k−λdecreases in each step.

⇒ Height of the search tree ≤2k

⇒ ≤22k =4k important cuts of size at mostk.

13

(33)

Important cuts

(2) Search tree algorithm for enumerating all these cuts:

An (arbitrary) edgeuv leavingX =Rmax is either in the cut or not.

v Y X =Rmaxu

Branch 1: Ifuv ∈S, thenS\uv is an important (X,Y)-cut of size at mostk−1 inG \uv.

⇒ k decreases by one, λdecreases by at most 1.

Branch 2: If uv 6∈S, thenS is an important (X ∪v,Y)-cut of size at mostk inG.

⇒ k remains the same,λincreases by 1.

The measure2k−λdecreases in each step.

⇒ Height of the search tree ≤2k

⇒ ≤22k =4k important cuts of size at mostk.

(34)

Important cuts

(2) Search tree algorithm for enumerating all these cuts:

An (arbitrary) edgeuv leavingX =Rmax is either in the cut or not.

v Y X =Rmaxu

Branch 1: Ifuv ∈S, thenS\uv is an important (X,Y)-cut of size at mostk−1 inG \uv.

⇒ k decreases by one, λdecreases by at most 1.

Branch 2: If uv 6∈S, thenS is an important (X ∪v,Y)-cut of size at mostk inG.

⇒ k remains the same,λincreases by 1.

The measure2k−λdecreases in each step.

⇒ Height of the search tree ≤2k

⇒ ≤22k =4k important cuts of size at mostk.

13

(35)

Important cuts — some details

We are using the following two statements:

Branch 1: If uv ∈S, then Sis an important(X,Y)-cut inG

S \ uv is an important (X,Y)-cut in G \uv

Converse is not true:

Set {ab,ay} is important (X,Y)-cut in G\xb, but {xb,ab,ay}is not an impor- tant(X,Y)-cut in G.

Branch 2: If S is an(X ∪v,Y)-cut, then Sis an important(X,Y)-cut

inG

S is an important(X∪v,Y)- cut in G

Converse is true!

(36)

Important cuts — some details

We are using the following two statements:

Branch 1: If uv ∈S, then Sis an important(X,Y)-cut inG

S \ uv is an important (X,Y)-cut in G \uv

Converse is not true:

Set {ab,ay} is important (X,Y)-cut in G\xb, but {xb,ab,ay}is not an impor-

tant(X,Y)-cut in G. X Y

a

c

x b y

Branch 2: If S is an(X ∪v,Y)-cut, then Sis an important(X,Y)-cut

inG

S is an important(X∪v,Y)- cut in G

Converse is true!

14

(37)

Important cuts — some details

We are using the following two statements:

Branch 1: If uv ∈S, then Sis an important(X,Y)-cut inG

S \ uv is an important (X,Y)-cut in G \uv

Converse is not true:

Set {ab,ay} is important (X,Y)-cut in G\xb, but {xb,ab,ay}is not an impor-

tant(X,Y)-cut in G. X Y

a

c

x b y

Branch 2: If S is an(X ∪v,Y)-cut, then Sis an important(X,Y)-cut

inG

S is an important(X∪v,Y)- cut in G

(38)

Important cuts — algorithm

Theorem

There are at most4k important(X,Y)-cuts of size at mostk and they can be enumerated in timeO(4k ·k·(|V(G)|+|E(G)|)).

Algorithm for enumerating important cuts:

1 Handle trivial cases (k =0,λ=0,k < λ)

2 FindRmax.

3 Choose an edge uv ofδ(Rmax).

Recurse on(Guv,Rmax,Y,k1).

Recurse on(G,Rmaxv,Y,k).

4 Check if the returned cuts are important and throw away those that are not.

15

(39)

Important cuts

Theorem

There are at most4k important(X,Y)-cuts of size at mostk. Example: The bound 4k is essentially tight.

Y X

Any subtree withk leaves gives an important(X,Y)-cut of size k. The number of subtrees withk leaves is the Catalan number

Ck−1= 1 k

2k−2 k−1

≥4k/poly(k).

(40)

Important cuts

Theorem

There are at most4k important(X,Y)-cuts of size at mostk. Example: The bound 4k is essentially tight.

X

Y

Any subtree withk leaves gives an important(X,Y)-cut of size k.

The number of subtrees withk leaves is the Catalan number Ck−1= 1

k

2k−2 k−1

≥4k/poly(k).

16

(41)

Important cuts

Theorem

There are at most4k important(X,Y)-cuts of size at mostk. Example: The bound 4k is essentially tight.

Y X

Any subtree withk leaves gives an important(X,Y)-cut of size k.

The number of subtrees withk leaves is the Catalan number Ck−1= 1

k

2k−2 k−1

≥4k/poly(k).

(42)

Important cuts

Theorem

There are at most4k important(X,Y)-cuts of size at mostk. Example: The bound 4k is essentially tight.

Y X

Any subtree withk leaves gives an important(X,Y)-cut of size k.

The number of subtrees withk leaves is the Catalan number Ck−1= 1

k

2k−2 k−1

≥4k/poly(k).

16

(43)

Multiway Cut

Definition: Amultiway cut of a set of terminalsT is a setS of edges such that each component ofG\S contains at most one vertex ofT.

Multiway Cut

Input: GraphG, setT of vertices, inte- gerk

Find: Amultiway cutS of at most k

edges. t4

t5

t4 t3

t2

t1

Polynomial for|T|=2, but NP-hard for any fixed|T| ≥3 [Dalhaus et al. 1994].

(44)

Multiway Cut

Definition: Amultiway cut of a set of terminalsT is a setS of edges such that each component ofG\S contains at most one vertex ofT.

Multiway Cut

Input: GraphG, setT of vertices, inte- gerk

Find: Amultiway cutS of at most k

edges. t4

t5

t4 t3

t2

t1

Trivial to solve in polynomial time for fixedk (in timenO(k)).

Theorem

Multiway cutcan be solved in time4k ·k3·(|V(G)|+|E(G)|).

17

(45)

Multiway Cut

Intuition: Consider a t∈T. A subset of the solutionS is a (t,T \t)-cut.

t

There are many such cuts.

But a cut farther fromt and closer toT \t seems to be more useful.

(46)

Multiway Cut

Intuition: Consider a t∈T. A subset of the solutionS is a (t,T \t)-cut.

t

There are many such cuts.

But a cut farther fromt and closer toT \t seems to be more useful.

18

(47)

Multiway Cut

Intuition: Consider a t∈T. A subset of the solutionS is a (t,T \t)-cut.

t

There are many such cuts.

But a cut farther fromt and closer toT \t seems to be more useful.

(48)

Multiway Cut

Intuition: Consider a t∈T. A subset of the solutionS is a (t,T \t)-cut.

t

There are many such cuts.

But a cut farther fromt and closer toT \t seems to be more useful.

18

(49)

Multiway Cut and important cuts

Pushing Lemma

Lett∈T. The Multiway Cutproblem has a solutionS that contains an important(t,T \t)-cut.

Proof: Let R be the vertices reachable fromt inG \S for a solutionS.

δ(R) is not important, then there is an important cutδ(R0)with R⊂R0 and|δ(R0)|≤ |δ(R)|. ReplaceS with

S0 := (S\δ(R))∪δ(R0)⇒ |S0| ≤ |S|

S0 is a multiway cut: (1) There is not-u path inG \S0 and (2) a u-v path inG \S0 implies a t-u path, a contradiction.

(50)

Multiway Cut and important cuts

Pushing Lemma

Lett∈T. The Multiway Cutproblem has a solutionS that contains an important(t,T \t)-cut.

Proof: Let R be the vertices reachable fromt inG \S for a solutionS.

R t

δ(R) is not important, then there is an important cutδ(R0)with R⊂R0 and|δ(R0)|≤ |δ(R)|. ReplaceS with

S0 := (S\δ(R))∪δ(R0)⇒ |S0| ≤ |S|

S0 is a multiway cut: (1) There is not-u path inG \S0 and (2) a u-v path inG \S0 implies a t-u path, a contradiction.

19

(51)

Multiway Cut and important cuts

Pushing Lemma

Lett∈T. The Multiway Cutproblem has a solutionS that contains an important(t,T \t)-cut.

Proof: Let R be the vertices reachable fromt inG \S for a solutionS.

R0 R t

δ(R)is not important, then there is an important cut δ(R0)with R⊂R0 and|δ(R0)|≤ |δ(R)|. ReplaceS with

S0 := (S\δ(R))∪δ(R0)⇒ |S0| ≤ |S|

S0 is a multiway cut: (1) There is not-u path inG \S0 and (2) a u-v path inG \S0 implies a t-u path, a contradiction.

(52)

Multiway Cut and important cuts

Pushing Lemma

Lett∈T. The Multiway Cutproblem has a solutionS that contains an important(t,T \t)-cut.

Proof: Let R be the vertices reachable fromt inG \S for a solutionS.

R0 R

t u

v

δ(R)is not important, then there is an important cut δ(R0)with R⊂R0 and|δ(R0)|≤ |δ(R)|. ReplaceS with

S0 := (S\δ(R))∪δ(R0)⇒ |S0| ≤ |S|

S0 is a multiway cut: (1) There is not-u path inG \S0 and (2) a u-v path inG \S0 implies a t-u path, a contradiction. 19

(53)

Multiway Cut and important cuts

Pushing Lemma

Lett∈T. The Multiway Cutproblem has a solutionS that contains an important(t,T \t)-cut.

Proof: Let R be the vertices reachable fromt inG \S for a solutionS.

t u

R v R0

δ(R)is not important, then there is an important cut δ(R0)with R⊂R0 and|δ(R0)|≤ |δ(R)|. ReplaceS with

S0 := (S\δ(R))∪δ(R0)⇒ |S0| ≤ |S|

S0 is a multiway cut: (1) There is not-u path inG \S0 and (2) a

(54)

Algorithm for Multiway Cut

1 If every vertex of T is in a different component, then we are done.

2 Let t∈T be a vertex that is not separated from everyT \t.

3 Branch on a choice of an important(t,T \t) cut S of size at most k.

4 Set G :=G \S andk :=k− |S|.

5 Go to step 1.

We branch into at most4k directions at most k times: 4k2·nO(1) running time.

Next: Better analysis gives 4k bound on the size of the search tree.

20

(55)

A refined bound

We have seen: at most4k important cut of size at most k.

Better bound:

Lemma

IfS is the set of all important(X,Y)-cuts, then P

S∈S4−|S|≤1 holds.

Proof: We show the stronger statement P

S∈S4−|S|≤2−λ, where λis the minimum(X,Y)-cut size.

Branch 1: removinguv.

λincreases by at most one and we add the edgeuv to each separator, increasing the cut by one. Thus the total contribution is

X

S∈S1

4−(|S|+1)= X

S∈S1

4−|S|/4≤2−(λ−1)/4=2−λ/2.

Branch 2: replacing X with X ∪v.

λincreases by at least one. Thus the total contribution is X

S∈S2

4−|S|≤2−(λ+1)=2−λ/2.

(56)

A refined bound

Lemma

IfS is the set of all important(X,Y)-cuts, then P

S∈S4−|S|≤1 holds.

Proof: We show the stronger statement P

S∈S4−|S|≤2−λ, where λis the minimum (X,Y)-cut size.

Branch 1: removinguv.

λincreases by at most one and we add the edgeuv to each separator, increasing the cut by one. Thus the total contribution is

X

S∈S1

4−(|S|+1)= X

S∈S1

4−|S|/4≤2−(λ−1)/4=2−λ/2.

Branch 2: replacing X with X ∪v.

λincreases by at least one. Thus the total contribution is X

S∈S2

4−|S|≤2−(λ+1)=2−λ/2.

21

(57)

Refined analysis for Multiway Cut

Lemma

The search tree for theMultiway Cutalgorithm has4k leaves.

Proof: Let Lk be the maximum number of leaves with parameter k. We proveLk ≤4k by induction. After enumerating the setSk of important separators of size≤k, we branch into|Sk|directions.

X

S∈Sk

4k−|S|=4k· X

S∈Sk

4−|S|≤4k

Still need: bound the work at each node.

(58)

Refined enumeration algorithms

We have seen:

Lemma

We can enumerate every important(X,Y)-cut of size at mostk in timeO(4k·k·(|V(G)|+|E(G)|)).

Problem: running time at a node of the recursion tree is not linear in the number children.

23

(59)

Refined enumeration algorithms

We have seen:

Lemma

We can enumerate every important(X,Y)-cut of size at mostk in timeO(4k·k·(|V(G)|+|E(G)|)).

Problem: running time at a node of the recursion tree is not linear in the number children.

Easily follows:

Lemma

We can enumerate a supersetSk0 of every important (X,Y)-cut of size at mostk in time O(|Sk0| ·k2·(|V(G)|+|E(G)|))such that P

S∈Sk0 4−|S|≤1 holds.

(60)

Refined enumeration algorithms

We have seen:

Lemma

We can enumerate every important(X,Y)-cut of size at mostk in timeO(4k·k·(|V(G)|+|E(G)|)).

Problem: running time at a node of the recursion tree is not linear in the number children.

Needs more work:

Lemma

We can enumerate the setSk of every important (X,Y)-cut of size at mostk in time O(|Sk| ·k2·(|V(G)|+|E(G)|)).

23

(61)

Algorithm for Multiway Cut

Theorem

Multiway Cutcan be solved in time O(4k ·k3·(|V(G)|+|E(G)|)).

1 If every vertex of T is in a different component, then we are done.

2 Let t∈T be a vertex that is not separated from everyT \t.

3 Branch on a choice of an important(t,T \t) cut S of size at most k.

4 Set G :=G \S andk :=k− |S|.

5 Go to step 1.

(62)

Simple application

Lemma:

At mostk·4k edges incident to t can be part of an inclusionwise minimals −t cut of size at most k.

Proof: We show that every such edge is contained in an important (s,t)-cut of size at mostk.

Suppose thatvt ∈δ(R) and|δ(R)|=k.

There is an important(s,t)-cutδ(R0)withR ⊆R0 and|δ(R0)|≤k. Clearly,vt ∈δ(R0): v ∈R, hence v ∈R0.

25

(63)

Simple application

Lemma:

At mostk·4k edges incident to t can be part of an inclusionwise minimals −t cut of size at most k.

Proof: We show that every such edge is contained in an important (s,t)-cut of size at mostk.

v

R t

s

Suppose thatvt ∈δ(R) and|δ(R)|=k.

There is an important(s,t)-cutδ(R0)withR ⊆R0 and|δ(R0)|≤k. Clearly,vt ∈δ(R0): v ∈R, hence v ∈R0.

(64)

Simple application

Lemma:

At mostk·4k edges incident to t can be part of an inclusionwise minimals −t cut of size at most k.

Proof: We show that every such edge is contained in an important (s,t)-cut of size at mostk.

v R

R0

s t

Suppose thatvt ∈δ(R) and|δ(R)|=k.

There is an important(s,t)-cutδ(R0)withR ⊆R0 and|δ(R0)|≤k.

Clearly,vt ∈δ(R0): v ∈R, hence v ∈R0.

25

(65)

Anti isolation

Lets,t1, . . . ,tn be vertices andS1, . . . ,Sn be sets of at mostk edges such thatSi separates ti froms, butSi does notseparatetj froms for any j 6=i.

It is possible thatn is “large” even ifk is “small.”

s

t6 t5 t4 t3 t2 t1

Is the opposite possible, i.e.,Si separates everytj except ti? Lemma

IfSi separatestj froms if and onlyj 6=i and every Si has size at mostk, then n≤(k+1)·4k+1.

Proof: Add a new vertex t. Every edge tti is part of an

(inclusionwise minimal)(s,t)-cut of size at mostk+1. Use the previous lemma.

(66)

Anti isolation

Lets,t1, . . . ,tn be vertices andS1, . . . ,Sn be sets of at mostk edges such thatSi separates ti froms, butSi does notseparatetj froms for any j 6=i.

It is possible thatn is “large” even ifk is “small.”

s

t6 t5 t4 t3 t2 t1

S1

Is the opposite possible, i.e.,Si separates everytj except ti? Lemma

IfSi separatestj froms if and onlyj 6=i and every Si has size at mostk, then n≤(k+1)·4k+1.

Proof: Add a new vertex t. Every edge tti is part of an

(inclusionwise minimal)(s,t)-cut of size at mostk+1. Use the previous lemma.

26

(67)

Anti isolation

Lets,t1, . . . ,tn be vertices andS1, . . . ,Sn be sets of at mostk edges such thatSi separates ti froms, butSi does notseparatetj froms for any j 6=i.

It is possible thatn is “large” even ifk is “small.”

s

t6 t5 t4 t3 t2 t1

S2

Is the opposite possible, i.e.,Si separates everytj except ti? Lemma

IfSi separatestj froms if and onlyj 6=i and every Si has size at mostk, then n≤(k+1)·4k+1.

Proof: Add a new vertex t. Every edge tti is part of an

(inclusionwise minimal)(s,t)-cut of size at mostk+1. Use the previous lemma.

(68)

Anti isolation

Lets,t1, . . . ,tn be vertices andS1, . . . ,Sn be sets of at mostk edges such thatSi separates ti froms, butSi does notseparatetj froms for any j 6=i.

It is possible thatn is “large” even ifk is “small.”

s

t6 t5 t4 t3 t2 t1

S3

Is the opposite possible, i.e.,Si separates everytj except ti? Lemma

IfSi separatestj froms if and onlyj 6=i and every Si has size at mostk, then n≤(k+1)·4k+1.

Proof: Add a new vertex t. Every edge tti is part of an

(inclusionwise minimal)(s,t)-cut of size at mostk+1. Use the previous lemma.

26

(69)

Anti isolation

Lets,t1, . . . ,tn be vertices andS1, . . . ,Sn be sets of at mostk edges such thatSi separates ti froms, butSi does notseparatetj froms for any j 6=i.

It is possible thatn is “large” even ifk is “small.”

s

t6 t5 t4 t3 t2 t1

S1

Is the opposite possible, i.e.,Si separates everytj except ti?

Lemma

IfSi separatestj froms if and onlyj 6=i and every Si has size at mostk, then n≤(k+1)·4k+1.

Proof: Add a new vertex t. Every edge tti is part of an

(inclusionwise minimal)(s,t)-cut of size at mostk+1. Use the previous lemma.

(70)

Anti isolation

Lets,t1, . . . ,tn be vertices andS1, . . . ,Sn be sets of at mostk edges such thatSi separates ti froms, butSi does notseparatetj froms for any j 6=i.

It is possible thatn is “large” even ifk is “small.”

s

t6 t5 t4 t3 t2 t1

S2

Is the opposite possible, i.e.,Si separates everytj except ti?

Lemma

IfSi separatestj froms if and onlyj 6=i and every Si has size at mostk, then n≤(k+1)·4k+1.

Proof: Add a new vertex t. Every edge tti is part of an

(inclusionwise minimal)(s,t)-cut of size at mostk+1. Use the previous lemma.

26

(71)

Anti isolation

Lets,t1, . . . ,tn be vertices andS1, . . . ,Sn be sets of at mostk edges such thatSi separates ti froms, butSi does notseparatetj froms for any j 6=i.

It is possible thatn is “large” even ifk is “small.”

s

t6 t5 t4 t3 t2 t1

S3

Is the opposite possible, i.e.,Si separates everytj except ti?

Lemma

IfSi separatestj froms if and onlyj 6=i and every Si has size at mostk, then n≤(k+1)·4k+1.

Proof: Add a new vertex t. Every edge tti is part of an

(inclusionwise minimal)(s,t)-cut of size at mostk+1. Use the previous lemma.

(72)

Anti isolation

Lets,t1, . . . ,tn be vertices andS1, . . . ,Sn be sets of at mostk edges such thatSi separates ti froms, butSi does notseparatetj froms for any j 6=i.

It is possible thatn is “large” even ifk is “small.”

s

t6 t5 t4 t3 t2 t1

S3

Is the opposite possible, i.e.,Si separates everytj except ti? Lemma

IfSi separatestj froms if and onlyj 6=i and every Si has size at mostk, then n≤(k+1)·4k+1.

Proof: Add a new vertex t. Every edge tti is part of an

(inclusionwise minimal)(s,t)-cut of size at mostk+1. Use the previous lemma.

26

(73)

Anti isolation

t1 t2 t3 t4 t5 t6

s t

S3

Is the opposite possible, i.e.,Si separates everytj except ti? Lemma

IfSi separatestj froms if and onlyj 6=i and every Si has size at mostk, then n≤(k+1)·4k+1.

Proof: Add a new vertex t. Every edge tti is part of an

(inclusionwise minimal)(s,t)-cut of size at mostk+1. Use the previous lemma.

(74)

Anti isolation

s

t6

t5

t4

t3

t2

t1

t

S2

Is the opposite possible, i.e.,Si separates everytj except ti? Lemma

IfSi separatestj froms if and onlyj 6=i and every Si has size at mostk, then n≤(k+1)·4k+1.

Proof: Add a new vertex t. Every edge tti is part of an

(inclusionwise minimal)(s,t)-cut of size at mostk+1. Use the previous lemma.

26

(75)

Anti isolation

s

t6

t5

t4

t3

t2

t1

t

S1

Is the opposite possible, i.e.,Si separates everytj except ti? Lemma

IfSi separatestj froms if and onlyj 6=i and every Si has size at mostk, then n≤(k+1)·4k+1.

Proof: Add a new vertex t. Every edge tti is part of an

(inclusionwise minimal)(s,t)-cut of size at mostk+1. Use the previous lemma.

(76)

Multicut

Multicut

Input: GraphG, pairs(s1,t1),. . .,(s`,t`), integerk

Find: A set S of edges such that G\S has no si-ti path for any i.

Theorem

Multicutcan be solved in timef(k, `)·nO(1) (FPT parameterized by combined parametersk and`).

Proof: The solution partitions{s1,t1, . . . ,s`,t`} into components. Guess this partition, contract the vertices in a class, and solve Multiway Cut.

Theorem

Multicutis FPT parameterized by the sizek of the solution.

27

(77)

Multicut

Multicut

Input: GraphG, pairs(s1,t1),. . .,(s`,t`), integerk

Find: A set S of edges such that G\S has no si-ti path for any i.

Theorem

Multicutcan be solved in timef(k, `)·nO(1) (FPT parameterized by combined parametersk and`).

Proof: The solution partitions{s1,t1, . . . ,s`,t`} into components.

Guess this partition, contract the vertices in a class, and solve Multiway Cut.

Theorem

Multicutis FPT parameterized by the sizek of the solution.

(78)

Directed graphs

Definition: ~δ(R) is the set of edgesleavingR.

Observation: Every inclusionwise-minimal directed (X,Y)-cutS can be expressed asS =~δ(R)for some X ⊆R andR∩Y =∅.

Definition: A minimal(X,Y)-cut~δ(R) is importantif there is no (X,Y)-cut~δ(R0) withR ⊂R0 and|~δ(R0)|≤ |~δ(R)|.

R

~δ(R)

Y X

28

(79)

Directed graphs

Definition: ~δ(R) is the set of edgesleavingR.

Observation: Every inclusionwise-minimal directed (X,Y)-cutS can be expressed asS =~δ(R)for some X ⊆R andR∩Y =∅.

Definition: A minimal(X,Y)-cut~δ(R) is importantif there is no (X,Y)-cut~δ(R0) withR ⊂R0 and|~δ(R0)|≤ |~δ(R)|.

R0

~δ(R0)

R

~δ(R)

Y X

(80)

Directed graphs

Definition: ~δ(R) is the set of edgesleavingR.

Observation: Every inclusionwise-minimal directed (X,Y)-cutS can be expressed asS =~δ(R)for some X ⊆R andR∩Y =∅.

Definition: A minimal(X,Y)-cut~δ(R) is importantif there is no (X,Y)-cut~δ(R0) withR ⊂R0 and|~δ(R0)|≤ |~δ(R)|.

The proof for the undirected case goes through for the directed case:

Theorem

There are at most4k importantdirected(X,Y)-cuts of size at mostk.

28

(81)

Directed Multiway Cut

The undirected approach does not work: the pushing lemma is not true.

Pushing Lemma (for undirected graphs)

Lett∈T. The Multiway Cutproblem has a solutionS that contains an important(t,T \t)-cut.

Directed counterexample:

s t

a

b

Unique solution with k = 1 edges, but it is not an important cut

(82)

Directed Multiway Cut

The undirected approach does not work: the pushing lemma is not true.

Pushing Lemma (for undirected graphs)

Lett∈T. The Multiway Cutproblem has a solutionS that contains an important(t,T \t)-cut.

Directed counterexample:

s t

a

b

Unique solution with k = 1 edges, but it is not an important cut (boundary of{s,a}, but the boundary of{s,a,b}has same size).

29

(83)

Directed Multiway Cut

The undirected approach does not work: the pushing lemma is not true.

Pushing Lemma (for undirected graphs)

Lett∈T. The Multiway Cutproblem has a solutionS that contains an important(t,T \t)-cut.

Directed counterexample:

b a

t s

Unique solution with k = 1 edges, but it is not an important cut

(84)

Directed Multiway Cut

The undirected approach does not work: the pushing lemma is not true.

Pushing Lemma (for undirected graphs)

Lett∈T. The Multiway Cutproblem has a solutionS that contains an important(t,T \t)-cut.

Problem in the undirected proof:

v t u

R

R0

Replacing R by R0 cannot create a t → u path, but can create a u→t path.

29

(85)

Directed Multiway Cut

The undirected approach does not work: the pushing lemma is not true.

Pushing Lemma (for undirected graphs)

Lett∈T. The Multiway Cutproblem has a solutionS that contains an important(t,T \t)-cut.

Using additional techniques, one can show:

Theorem

Directed Multiway Cutis FPT parameterized by the sizek of the solution.

(86)

Directed Multicut

Directed Multicut

Input: GraphG, pairs(s1,t1),. . .,(s`,t`), integerk

Find: A setS of edges such thatG\S has nosi →ti path for any i.

Theorem

Directed Multicutis W[1]-hard parameterized by k.

30

(87)

Directed Multicut

Directed Multicut

Input: GraphG, pairs(s1,t1),. . .,(s`,t`), integerk

Find: A setS of edges such thatG\S has nosi →ti path for any i.

Theorem

Directed Multicutis W[1]-hard parameterized by k.

But the case`=2can be reduced toDirected Multiway Cut:

t1

s1

t2 s2

(88)

Directed Multicut

Directed Multicut

Input: GraphG, pairs(s1,t1),. . .,(s`,t`), integerk

Find: A setS of edges such thatG\S has nosi →ti path for any i.

Theorem

Directed Multicutis W[1]-hard parameterized by k.

But the case`=2can be reduced toDirected Multiway Cut:

x y

s2 t2

s1 t1

30

(89)

Directed Multicut

Directed Multicut

Input: GraphG, pairs(s1,t1),. . .,(s`,t`), integerk

Find: A setS of edges such thatG\S has nosi →ti path for any i.

Theorem

Directed Multicutis W[1]-hard parameterized by k.

But the case`=2can be reduced toDirected Multiway Cut:

x y

s2 t2

s1 t1

(90)

Directed Multicut

Directed Multicut

Input: GraphG, pairs(s1,t1),. . .,(s`,t`), integerk

Find: A setS of edges such thatG\S has nosi →ti path for any i.

Theorem

Directed Multicutis W[1]-hard parameterized by k.

Corollary

Directed Multicutwith `=2is FPT parameterized by the sizek of the solution.

?

Open: IsDirected Multicut with `=3 FPT?

Open: Is there an f(k, `)·nO(1) algorithm for Directed Multicut?

30

(91)

Skew Multicut

Skew Multicut

Input: GraphG, pairs(s1,t1),. . .,(s`,t`), integer k Find: A setS of k directed edges such thatG \S con-

tains nosi →tj path for any i ≥j.

t4 t3 t2

t1

s4 s3 s2

s1

(92)

Skew Multicut

Skew Multicut

Input: GraphG, pairs(s1,t1),. . .,(s`,t`), integer k Find: A setS of k directed edges such thatG \S con-

tains nosi →tj path for any i ≥j.

t4 t3 t2

t1

s4 s3 s2

s1

Pushing Lemma

Skew Multcutproblem has a solution S that contains an important(s`,{t1, . . . ,t`})-cut.

31

(93)

Skew Multicut

Skew Multicut

Input: GraphG, pairs(s1,t1),. . .,(s`,t`), integer k Find: A setS of k directed edges such thatG \S con-

tains nosi →tj path for any i ≥j.

t4 t3 t2

t1

s4 s3 s2

s1

Pushing Lemma

Skew Multcutproblem has a solution S that contains an important(s`,{t1, . . . ,t`})-cut.

Theorem

(94)

Directed Feedback Vertex Set

Directed Feedback Vertex/Edge Set Input: Directed graphG, integer k

Find: A setSofkvertices/edges such thatG\S is acyclic.

Note: Edge and vertex versions are equivalent, we will consider the edge version here.

Theorem

Directed Feedback Edge Setis FPT parameterized by the sizek of the solution.

Solution uses the technique of

it er

ativecompressionintroduced by [Reed, Smith, Vetta 2004].

32

(95)

The compression problem

Directed Feedback Edge Set Compression Input: Directed graphG, integer k,

a set W of k+1 edges such that G \W is acyclic

Find: A set S of k edges such that G\S is acyclic.

Easier than the original problem, as the extra inputW gives us useful structural information aboutG.

Lemma

The compression problem is FPT parameterized byk.

A useful trick for edge deletion problems: we define the

compression problem in a way that a solution ofk+1 vertices are given and we have to find a solution ofk edges.

(96)

The compression problem

Directed Feedback Edge Set Compression Input: Directed graphG, integer k,

a setW ofk+1verticessuch thatG \W is acyclic

Find: A set S of k edges such that G\S is acyclic.

Easier than the original problem, as the extra inputW gives us useful structural information aboutG.

Lemma

The compression problem is FPT parameterized byk.

A useful trick for edge deletion problems: we define the

compression problem in a way that a solution ofk+1 vertices are given and we have to find a solution ofk edges.

33

(97)

The compression problem

Proof: Let W ={w1, . . . ,wk+1} Let us split eachwi into an edge −→

tisi.

t4

s1

t1 t2s2 t3s3 s4

By guessing the order of {w1, . . . ,wk+1} in the acyclic

ordering of G\S, we can assume thatw1 <w2 <· · ·<wk+1

in G\S [(k+1)!possibilities].

⇒We can solve the compression problem by (k+1)!applications ofSkew Multicut.

(98)

The compression problem

Proof: Let W ={w1, . . . ,wk+1} Let us split eachwi into an edge −→

tisi.

t4

s1

t1 t2s2 t3s3 s4

Claim:

G \S is acyclic and has an ordering with w1 <w2 <· · ·<wk+1

S covers every si →tj path for every i ≥j

⇓ G\S is acyclic

⇒We can solve the compression problem by (k+1)!applications ofSkew Multicut.

34

(99)

The compression problem

Proof: Let W ={w1, . . . ,wk+1} Let us split eachwi into an edge −→

tisi.

s4

t3s3

t2s2

t1s1 t4

Claim:

G \S is acyclic and has an ordering with w1 <w2 <· · ·<wk+1

S covers every si →tj path for every i ≥j

⇓ G\S is acyclic

⇒We can solve the compression problem by (k+1)!applications ofSkew Multicut.

(100)

The compression problem

Proof: Let W ={w1, . . . ,wk+1} Let us split eachwi into an edge −→

tisi.

s4

t3s3

t2s2

t1s1 t4

Claim:

G \S is acyclic and has an ordering with w1 <w2 <· · ·<wk+1

S covers every si →tj path for every i ≥j

⇓ G\S is acyclic

⇒We can solve the compression problem by (k+1)!applications ofSkew Multicut.

34

(101)

Iterative compression

We have given af(k)nO(1) algorithm for the following problem:

Directed Feedback Edge Set Compression Input: Directed graphG, integer k,

a setW ofk+1 vertices such thatG \W is acyclic

Find: A set S of k edges such that G\S is acyclic.

Nice, but how do we get a solutionW of size k+1?

We get it for free!

Powerful technique:

it er

ative compression(introduced by[Reed, Smith, Vetta 2004]for Bipartite Deletion).

(102)

Iterative compression

We have given af(k)nO(1) algorithm for the following problem:

Directed Feedback Edge Set Compression Input: Directed graphG, integer k,

a setW ofk+1 vertices such thatG \W is acyclic

Find: A set S of k edges such that G\S is acyclic.

Nice, but how do we get a solutionW of size k+1?

We get it for free!

Powerful technique:

it er

ative compression(introduced by[Reed, Smith, Vetta 2004]for Bipartite Deletion).

35

(103)

Iterative compression

Letv1,. . .,vn be the edges ofG and let Gi be the subgraph induced by{v1, . . . ,vi}.

For everyi =1, . . . ,n, we find a setSi of at mostk edges such thatGi\Si is acyclic.

For i =1, we have the trivial solutionSi =∅.

Suppose we have a solutionSi for Gi. LetWi contain the head of each edge in Si. ThenWi∪ {vi+1}is a set of at mostk+1 vertices whose removal makes Gi+1 acyclic.

Use the compression algorithm for Gi+1 with the set Wi∪ {vi+1}.

If there is no solution of sizek forGi+1, then we can stop. Otherwise the compression algorithm gives a solutionSi+1of sizek forGi+1.

We call the compression algorithmn times, everything else is polynomial.

⇒Directed Feedback Edge Set is FPT.

(104)

Iterative compression

Letv1,. . .,vn be the edges ofG and let Gi be the subgraph induced by{v1, . . . ,vi}.

For everyi =1, . . . ,n, we find a setSi of at mostk edges such thatGi\Si is acyclic.

For i =1, we have the trivial solutionSi =∅.

Suppose we have a solutionSi for Gi. LetWi contain the head of each edge in Si. ThenWi∪ {vi+1} is a set of at mostk+1 vertices whose removal makes Gi+1 acyclic.

Use the compression algorithm for Gi+1 with the set Wi∪ {vi+1}.

If there is no solution of sizek forGi+1, then we can stop.

Otherwise the compression algorithm gives a solutionSi+1of sizek forGi+1.

We call the compression algorithmn times, everything else is polynomial.

⇒Directed Feedback Edge Set is FPT.

36

(105)

Summary

Definition of important cuts.

Combinatorial bound on the number of important cuts.

Pushing argument: we can assume that the solution contains an important cut. SolvesMultiway Cut,Skew

Multiway Cut.

Iterative compression reduces Directed Feedback Vertex Set toSkew Multiway Cut.

Hivatkozások

KAPCSOLÓDÓ DOKUMENTUMOK

⇒ Transforming an Independent Set instance (G , k) into a Vertex Cover instance (G , n − k) is a correct polynomial-time reduction.. However, Vertex Cover is FPT, but Independent Set

The undirected approach does not work: the pushing lemma is not true.. Pushing Lemma (for

If exists optimal LP solution that sets x v to 1, then exists optimal vertex cover that selects v..  Remove v from G and decrease k

Proof: Find a collection of good clusters covering every vertex and having minimum total

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

Theorem: [Grohe, Grüber 2007] There is a polynomial-time algorithm that finds a solution of D ISJOINT DIRECTED CYCLES with OPT/̺(OPT) cycles for some nontrivial function ̺....

Proof: Find a collection of good clusters covering every vertex and having minimum total size.. A sufficient and

By default iterative compression adds n factor to the running time.. Ex: show that for VC and FVST this factor can be reduced to O(k) (hint: