SLIDE 1 Important separators and parameterized algorithms
Dániel Marx1
1Institute for Computer Science and Control,
Hungarian Academy of Sciences (MTA SZTAKI) Budapest, Hungary
School on Parameterized Algorithms and Complexity Będlewo, Poland August 21, 2014
1
SLIDE 2
Definition: δ(R) is the set of edges with exactly one endpoint in R. Definition: A set S of edges is a minimal (X, Y )-cut if there is no X − Y path in G \ S and no proper subset of S breaks every X − Y path. Observation: Every minimal (X, Y )-cut S can be expressed as S = δ(R) for some X ⊆ R and R ∩ Y = ∅. R δ(R) Y X
Important cuts
2
SLIDE 3
Definition
A minimal (X, Y )-cut δ(R) is important if there is no (X, Y )-cut δ(R′) with R ⊂ R′ and |δ(R′)| ≤ |δ(R)|. Note: Can be checked in polynomial time if a cut is important (δ(R) is important if R = Rmax). R δ(R) Y X
Important cuts
2
SLIDE 4
Definition
A minimal (X, Y )-cut δ(R) is important if there is no (X, Y )-cut δ(R′) with R ⊂ R′ and |δ(R′)| ≤ |δ(R)|. Note: Can be checked in polynomial time if a cut is important (δ(R) is important if R = Rmax). R′ δ(R) R δ(R′) X Y
Important cuts
2
SLIDE 5
Definition
A minimal (X, Y )-cut δ(R) is important if there is no (X, Y )-cut δ(R′) with R ⊂ R′ and |δ(R′)| ≤ |δ(R)|. Note: Can be checked in polynomial time if a cut is important (δ(R) is important if R = Rmax). R δ(R) X Y
Important cuts
2
SLIDE 6
Theorem
There are at most 4k important (X, Y )-cuts of size at most k. R δ(R) X Y
Important cuts
2
SLIDE 7
Lemma:
At most k · 4k edges incident to t can be part of an inclusionwise minimal s − t cut of size at most k.
Simple application
3
SLIDE 8
Lemma:
At most k · 4k edges incident to t can be part of an inclusionwise minimal s − 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 most k. v R t s Suppose that vt ∈ δ(R) and |δ(R)| = k.
Simple application
3
SLIDE 9
Lemma:
At most k · 4k edges incident to t can be part of an inclusionwise minimal s − 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 most k. v R R′ s t Suppose that vt ∈ δ(R) and |δ(R)| = k. There is an important (s, t)-cut δ(R′) with R ⊆ R′ and |δ(R′)| ≤ k. Clearly, vt ∈ δ(R′): v ∈ R, hence v ∈ R′.
Simple application
3
SLIDE 10
Let s, t1, . . . , tn be vertices and S1, . . . , Sn be sets of at most k edges such that Si separates ti from s, but Si does not separate tj from s for any j = i. It is possible that n is “large” even if k is “small.”
s t6 t5 t4 t3 t2 t1
Anti isolation
4
SLIDE 11
Let s, t1, . . . , tn be vertices and S1, . . . , Sn be sets of at most k edges such that Si separates ti from s, but Si does not separate tj from s for any j = i. It is possible that n is “large” even if k is “small.”
s t6 t5 t4 t3 t2 t1 S1
Anti isolation
4
SLIDE 12
Let s, t1, . . . , tn be vertices and S1, . . . , Sn be sets of at most k edges such that Si separates ti from s, but Si does not separate tj from s for any j = i. It is possible that n is “large” even if k is “small.”
s t6 t5 t4 t3 t2 t1 S2
Anti isolation
4
SLIDE 13
Let s, t1, . . . , tn be vertices and S1, . . . , Sn be sets of at most k edges such that Si separates ti from s, but Si does not separate tj from s for any j = i. It is possible that n is “large” even if k is “small.”
s t6 t5 t4 t3 t2 t1 S3
Anti isolation
4
SLIDE 14
Let s, t1, . . . , tn be vertices and S1, . . . , Sn be sets of at most k edges such that Si separates ti from s, but Si does not separate tj from s for any j = i. It is possible that n is “large” even if k is “small.”
s t6 t5 t4 t3 t2 t1 S1
Is the opposite possible, i.e., Si separates every tj except ti?
Anti isolation
4
SLIDE 15
Let s, t1, . . . , tn be vertices and S1, . . . , Sn be sets of at most k edges such that Si separates ti from s, but Si does not separate tj from s for any j = i. It is possible that n is “large” even if k is “small.”
s t6 t5 t4 t3 t2 t1 S2
Is the opposite possible, i.e., Si separates every tj except ti?
Anti isolation
4
SLIDE 16
Let s, t1, . . . , tn be vertices and S1, . . . , Sn be sets of at most k edges such that Si separates ti from s, but Si does not separate tj from s for any j = i. It is possible that n is “large” even if k is “small.”
s t6 t5 t4 t3 t2 t1 S3
Is the opposite possible, i.e., Si separates every tj except ti?
Anti isolation
4
SLIDE 17
Let s, t1, . . . , tn be vertices and S1, . . . , Sn be sets of at most k edges such that Si separates ti from s, but Si does not separate tj from s for any j = i. It is possible that n is “large” even if k is “small.”
s t6 t5 t4 t3 t2 t1 S3
Is the opposite possible, i.e., Si separates every tj except ti?
Lemma
If Si separates tj from s if and only j = i and every Si has size at most k, then n ≤ (k + 1) · 4k+1.
Anti isolation
4
SLIDE 18
t1 t2 t3 t4 t5 t6 s t S3
Is the opposite possible, i.e., Si separates every tj except ti?
Lemma
If Si separates tj from s if and only j = i and every Si has size at most k, 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 most k + 1. Use the previous lemma.
Anti isolation
4
SLIDE 19
s t6 t5 t4 t3 t2 t1 t S2
Is the opposite possible, i.e., Si separates every tj except ti?
Lemma
If Si separates tj from s if and only j = i and every Si has size at most k, 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 most k + 1. Use the previous lemma.
Anti isolation
4
SLIDE 20
s t6 t5 t4 t3 t2 t1 t S1 Is the opposite possible, i.e., Si separates every tj except ti?
Lemma
If Si separates tj from s if and only j = i and every Si has size at most k, 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 most k + 1. Use the previous lemma.
Anti isolation
4
SLIDE 21
Lemma
If Si separates tj from s if and only j = i and every Si has size at most k, then n ≤ (k + 1) · 4k+1. Lower bound: in a binary tree of height k, any of the 2k leaves can be the only reachable leaf after removing k edges. s
Anti isolation
5
SLIDE 22
Definition: A multiway cut of a set of terminals T is a set S of edges such that each component of G \ S contains at most one vertex of T. Multiway Cut Input: Graph G, set T of vertices, inte- ger k Find: A multiway cut S of at most k edges.
t4 t5 t4 t3 t2 t1
Polynomial for |T| = 2, but NP-hard for any fixed |T| ≥ 3 .
Multiway Cut
6
SLIDE 23 Definition: A multiway cut of a set of terminals T is a set S of edges such that each component of G \ S contains at most one vertex of T. Multiway Cut Input: Graph G, set T of vertices, inte- ger k Find: A multiway cut S of at most k edges.
t4 t5 t4 t3 t2 t1
Theorem
Multiway Cut on planar graphs can be solved in time 2O(|T|) · nO(√
|T|).
Theorem
Multiway Cut on planar graphs is W[1]-hard parameterized by |T|.
Multiway Cut
6
SLIDE 24
Definition: A multiway cut of a set of terminals T is a set S of edges such that each component of G \ S contains at most one vertex of T. Multiway Cut Input: Graph G, set T of vertices, inte- ger k Find: A multiway cut S of at most k edges.
t4 t5 t4 t3 t2 t1
Trivial to solve in polynomial time for fixed k (in time nO(k)).
Theorem
Multiway cut can be solved in time 4k · nO(1), i.e., it is fixed-parameter tractable (FPT) parameterized by the size k of the solution.
Multiway Cut
6
SLIDE 25 Pushing Lemma
Let t ∈ T. The Multiway Cut problem has a solution S that contains an important (t, T \ t)-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 every T \ t. 3 Branch on a choice of an important (t, T \ t) cut S of size at
most k.
4 Set G := G \ S and k := k − |S|. 5 Go to step 1.
We can give a 4k bound on the size of the search tree.
Algorithm for Multiway Cut
7
SLIDE 26
Multicut Input: Graph G, pairs (s1, t1), . . ., (sℓ, tℓ), integer k Find: A set S of edges such that G \ S has no si-ti path for any i.
Theorem
Multicut can be solved in time f (k, ℓ) · nO(1) (FPT parameterized by combined parameters k and ℓ).
Multicut
8
SLIDE 27
Multicut Input: Graph G, pairs (s1, t1), . . ., (sℓ, tℓ), integer k Find: A set S of edges such that G \ S has no si-ti path for any i.
Theorem
Multicut can be solved in time f (k, ℓ) · nO(1) (FPT parameterized by combined parameters k and ℓ). Proof: The solution partitions {s1, t1, . . . , sℓ, tℓ} into components. Guess this partition, contract the vertices in a class, and solve Multiway Cut.
Multicut
8
SLIDE 28
Multicut Input: Graph G, pairs (s1, t1), . . ., (sℓ, tℓ), integer k Find: A set S of edges such that G \ S has no si-ti path for any i.
Theorem
Multicut can be solved in time f (k, ℓ) · nO(1) (FPT parameterized by combined parameters k and ℓ). Proof: The solution partitions {s1, t1, . . . , sℓ, tℓ} into components. Guess this partition, contract the vertices in a class, and solve Multiway Cut. Much more involved:
Theorem
Multicut is FPT parameterized by the size k of the solution.
Multicut
8
SLIDE 29 Definition: δ(R) is the set of edges leaving R. Observation: Every inclusionwise-minimal directed (X, Y )-cut S can be expressed as S = δ(R) for some X ⊆ R and R ∩ Y = ∅. Definition: A minimal (X, Y )-cut δ(R) is important if there is no (X, Y )-cut δ(R′) with R ⊂ R′ and | δ(R′)| ≤ | δ(R)|. R
Y X
Directed graphs
9
SLIDE 30 Definition: δ(R) is the set of edges leaving R. Observation: Every inclusionwise-minimal directed (X, Y )-cut S can be expressed as S = δ(R) for some X ⊆ R and R ∩ Y = ∅. Definition: A minimal (X, Y )-cut δ(R) is important if there is no (X, Y )-cut δ(R′) with R ⊂ R′ and | δ(R′)| ≤ | δ(R)|. R′
R
Y X
Directed graphs
9
SLIDE 31
Definition: δ(R) is the set of edges leaving R. Observation: Every inclusionwise-minimal directed (X, Y )-cut S can be expressed as S = δ(R) for some X ⊆ R and R ∩ Y = ∅. Definition: A minimal (X, Y )-cut δ(R) is important if there is no (X, Y )-cut δ(R′) with R ⊂ R′ and | δ(R′)| ≤ | δ(R)|. The proof for the undirected case goes through for the directed case:
Theorem
There are at most 4k important directed (X, Y )-cuts of size at most k.
Directed graphs
9
SLIDE 32
The undirected approach does not work: the pushing lemma is not true.
Pushing Lemma (for undirected graphs)
Let t ∈ T. The Multiway Cut problem has a solution S 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).
Directed Multiway Cut
10
SLIDE 33
The undirected approach does not work: the pushing lemma is not true.
Pushing Lemma (for undirected graphs)
Let t ∈ T. The Multiway Cut problem has a solution S 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).
Directed Multiway Cut
10
SLIDE 34
The undirected approach does not work: the pushing lemma is not true.
Pushing Lemma (for undirected graphs)
Let t ∈ T. The Multiway Cut problem has a solution S 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 (boundary of {s, a}, but the boundary of {s, a, b} has same size).
Directed Multiway Cut
10
SLIDE 35
The undirected approach does not work: the pushing lemma is not true.
Pushing Lemma (for undirected graphs)
Let t ∈ T. The Multiway Cut problem has a solution S that contains an important (t, T \ t)-cut. Problem in the undirected proof:
v u t R R′
Replacing R by R′ cannot create a t → u path, but can create a u → t path.
Directed Multiway Cut
10
SLIDE 36
The undirected approach does not work: the pushing lemma is not true.
Pushing Lemma (for undirected graphs)
Let t ∈ T. The Multiway Cut problem has a solution S that contains an important (t, T \ t)-cut. Using additional techniques, one can show:
Theorem
Directed Multiway Cut is FPT parameterized by the size k of the solution.
Directed Multiway Cut
10
SLIDE 37
Directed Multicut Input: Graph G, pairs (s1, t1), . . ., (sℓ, tℓ), integer k Find: A set S of edges such that G \ S has no si → ti path for any i.
Theorem
Directed Multicut is W[1]-hard parameterized by k.
Directed Multicut
11
SLIDE 38
Directed Multicut Input: Graph G, pairs (s1, t1), . . ., (sℓ, tℓ), integer k Find: A set S of edges such that G \ S has no si → ti path for any i.
Theorem
Directed Multicut is W[1]-hard parameterized by k. But the case ℓ = 2 can be reduced to Directed Multiway Cut: t1 s1 t2 s2
Directed Multicut
11
SLIDE 39
Directed Multicut Input: Graph G, pairs (s1, t1), . . ., (sℓ, tℓ), integer k Find: A set S of edges such that G \ S has no si → ti path for any i.
Theorem
Directed Multicut is W[1]-hard parameterized by k. But the case ℓ = 2 can be reduced to Directed Multiway Cut: x y s2 t2 s1 t1
Directed Multicut
11
SLIDE 40
Directed Multicut Input: Graph G, pairs (s1, t1), . . ., (sℓ, tℓ), integer k Find: A set S of edges such that G \ S has no si → ti path for any i.
Theorem
Directed Multicut is W[1]-hard parameterized by k. But the case ℓ = 2 can be reduced to Directed Multiway Cut: x y s2 t2 s1 t1
Directed Multicut
11
SLIDE 41
Directed Multicut Input: Graph G, pairs (s1, t1), . . ., (sℓ, tℓ), integer k Find: A set S of edges such that G \ S has no si → ti path for any i.
Theorem
Directed Multicut is W[1]-hard parameterized by k.
Corollary
Directed Multicut with ℓ = 2 is FPT parameterized by the size k of the solution. Open questions:
?
Is Directed Multicut with ℓ = 3 FPT? Is Directed Multicut FPT parameterized by k and ℓ?
Directed Multicut
11
SLIDE 42
Directed Multicut Input: Graph G, pairs (s1, t1), . . ., (sℓ, tℓ), integer k Find: A set S of edges such that G \ S has no si → ti path for any i.
Theorem
Directed Multicut is W[1]-hard parameterized by k on DAGs.
Theorem
Directed Multicut is NP-hard for ℓ = 2 on DAGs.
Theorem
Directed Multicut is FPT parameterized by k and ℓ on DAGs.
Directed Multicut
11
SLIDE 43
Skew Multicut Input: Graph G, pairs (s1, t1), . . ., (sℓ, tℓ), integer k Find: A set S of k directed edges such that G \ S con- tains no si → tj path for any i ≥ j. t4 t3 t2 t1 s4 s3 s2 s1
Skew Multicut
12
SLIDE 44
Skew Multicut Input: Graph G, pairs (s1, t1), . . ., (sℓ, tℓ), integer k Find: A set S of k directed edges such that G \ S con- tains no si → tj path for any i ≥ j. t4 t3 t2 t1 s4 s3 s2 s1
Pushing Lemma
Skew Multicut problem has a solution S that contains an important (sℓ, {t1, . . . , tℓ})-cut.
Skew Multicut
12
SLIDE 45
Skew Multicut Input: Graph G, pairs (s1, t1), . . ., (sℓ, tℓ), integer k Find: A set S of k directed edges such that G \ S con- tains no si → tj path for any i ≥ j. t4 t3 t2 t1 s4 s3 s2 s1
Pushing Lemma
Skew Multicut problem has a solution S that contains an important (sℓ, {t1, . . . , tℓ})-cut.
Theorem
Skew Multicut can be solved in time 4k · nO(1).
Skew Multicut
12
SLIDE 46
Pushing Lemma
Skew Multicut problem has a solution S that contains an important (sℓ, {t1, . . . , tℓ})-cut. Proof: Similar to the undirected pushing lemma. Let R be the vertices reachable from t in G \ S for a solution S.
sℓ tℓ t1 t2 . . . R
Pushing Lemma
13
SLIDE 47
Pushing Lemma
Skew Multicut problem has a solution S that contains an important (sℓ, {t1, . . . , tℓ})-cut. Proof: Similar to the undirected pushing lemma. Let R be the vertices reachable from t in G \ S for a solution S.
sℓ tℓ t1 t2 . . . R R′
Pushing Lemma
13
SLIDE 48
Pushing Lemma
Skew Multicut problem has a solution S that contains an important (sℓ, {t1, . . . , tℓ})-cut. Proof: Similar to the undirected pushing lemma. Let R be the vertices reachable from t in G \ S for a solution S.
sℓ tℓ t1 t2 . . . si R R′
δ(R) is not important, then there is an important cut δ(R′) with R ⊂ R′ and |δ(R′)| ≤ |δ(R)|. Replace S with S′ := (S \ δ(R)) ∪ δ(R′) ⇒ |S′| ≤ |S|
Pushing Lemma
13
SLIDE 49
Pushing Lemma
Skew Multicut problem has a solution S that contains an important (sℓ, {t1, . . . , tℓ})-cut. Proof: Similar to the undirected pushing lemma. Let R be the vertices reachable from t in G \ S for a solution S.
sℓ tℓ t1 t2 . . . si R R′
δ(R) is not important, then there is an important cut δ(R′) with R ⊂ R′ and |δ(R′)| ≤ |δ(R)|. Replace S with S′ := (S \ δ(R)) ∪ δ(R′) ⇒ |S′| ≤ |S| S′ is a skew multicut: (1) There is no sℓ-tj path in G \ S′ for any j and (2) a si-tj path in G \ S′ implies a sℓ-tj path, a contradiction.
Pushing Lemma
13
SLIDE 50
Directed Feedback Vertex/Edge Set Input: Directed graph G, integer k Find: A set S of k vertices/edges such that G \ S is acyclic. Note: Edge and vertex versions are equivalent, we will consider the edge version here.
Theorem
Directed Feedback Edge Set is FPT parameterized by the size k of the solution. Solution uses the technique of iterative compression.
Directed Feedback Vertex Set
14
SLIDE 51
Directed Feedback Edge Set Compression Input: Directed graph G, 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 input W gives us useful structural information about G.
Lemma
The compression problem is FPT parameterized by k.
The compression problem
15
SLIDE 52
Directed Feedback Edge Set Compression Input: Directed graph G, integer k, a set W of k + 1 vertices 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 input W gives us useful structural information about G.
Lemma
The compression problem is FPT parameterized by k. A useful trick for edge deletion problems: we define the compression problem in a way that a solution of k + 1 vertices are given and we have to find a solution of k edges.
The compression problem
15
SLIDE 53 Proof: Let W = {w1, . . . , wk+1} Let us split each wi into an edge − → tisi. t4 s1 t1 s2 t2 s3 t3 s4 By guessing the order of {w1, . . . , wk+1} in the acyclic
- rdering of G \ S, we can assume that w1 < w2 < · · · < wk+1
in G \ S [(k + 1)! possibilities].
The compression problem
16
SLIDE 54
Proof: Let W = {w1, . . . , wk+1} Let us split each wi into an edge − → tisi. t4 s1 t1 s2 t2 s3 t3 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
The compression problem
16
SLIDE 55
Proof: Let W = {w1, . . . , wk+1} Let us split each wi into an edge − → tisi. s4 t3s3 t2 s2 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
The compression problem
16
SLIDE 56 Proof: Let W = {w1, . . . , wk+1} Let us split each wi into an edge − → tisi. s4 t3s3 t2 s2 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
The compression problem
16
SLIDE 57
We have given a f (k)nO(1) algorithm for the following problem: Directed Feedback Edge Set Compression Input: Directed graph G, integer k, a set W of k + 1 vertices such that G \ W is acyclic Find: A set S of k edges such that G \ S is acyclic. Nice, but how do we get a solution W of size k + 1?
Iterative compression
17
SLIDE 58
We have given a f (k)nO(1) algorithm for the following problem: Directed Feedback Edge Set Compression Input: Directed graph G, integer k, a set W of k + 1 vertices such that G \ W is acyclic Find: A set S of k edges such that G \ S is acyclic. Nice, but how do we get a solution W of size k + 1?
We get it for free!
Powerful technique: iterative compression.
Iterative compression
17
SLIDE 59
Let v1, . . . , vn be the edges of G and let Gi be the subgraph induced by {v1, . . . , vi}. For every i = 1, . . . , n, we find a set Si of at most k edges such that Gi \ Si is acyclic.
Iterative compression
18
SLIDE 60 Let v1, . . . , vn be the edges of G and let Gi be the subgraph induced by {v1, . . . , vi}. For every i = 1, . . . , n, we find a set Si of at most k edges such that Gi \ Si is acyclic. For i = 1, we have the trivial solution Si = ∅. Suppose we have a solution Si for Gi. Let Wi contain the head
- f each edge in Si. Then Wi ∪ {vi+1} is a set of at most k + 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 size k for Gi+1, then we can stop. Otherwise the compression algorithm gives a solution Si+1 of size k for Gi+1.
We call the compression algorithm n times, everything else is polynomial. ⇒ Directed Feedback Edge Set is FPT.
Iterative compression
18
SLIDE 61
So far we have seen: Definition of important cuts. Combinatorial bound on the number of important cuts. Pushing argument: we can assume that the solution contains an important cut. Solves Multiway Cut, Skew Multicut. Iterative compression reduces Directed Feedback Vertex Set to Skew Multicut. Next: Randomized sampling of important separators.
Outline
19