SLIDE 1 Approximation Algorithms for the Maximum Leaf Spanning Tree Problem
Nadine Schwartges · Joachim Spoerhase · Alexander Wolff
Lehrstuhl f¨ ur Informatik I Universit¨ at W¨ urzburg, Germany
WAOA ’11
SLIDE 2
Problem Definition
Given a digraph G with root r, find an r-rooted spanning tree with the maximum number of leaves. r
SLIDE 3
Problem Definition
Given a digraph G with root r, find an r-rooted spanning tree with the maximum number of leaves. r r G
SLIDE 4
Previous Results
Undirected graphs
classical NP-hard problem listed by Garey & Johnson [’74]
SLIDE 5
Previous Results
Undirected graphs
classical NP-hard problem listed by Garey & Johnson [’74] 3-approximation by local search [Lu and Ravi ’90] O(n5) running time
SLIDE 6
Previous Results
Undirected graphs
classical NP-hard problem listed by Garey & Johnson [’74] 3-approximation by local search [Lu and Ravi ’90] O(n5) running time 3-approximation in (almost) linear time by expansion-based approach [Lu and Ravi ’98]
SLIDE 7
Previous Results
Undirected graphs
classical NP-hard problem listed by Garey & Johnson [’74] 3-approximation by local search [Lu and Ravi ’90] O(n5) running time 3-approximation in (almost) linear time by expansion-based approach [Lu and Ravi ’98] linear-time 2-approximation by expansion [Solis-Oba ’98]
SLIDE 8
Previous Results
Undirected graphs
classical NP-hard problem listed by Garey & Johnson [’74] 3-approximation by local search [Lu and Ravi ’90] O(n5) running time 3-approximation in (almost) linear time by expansion-based approach [Lu and Ravi ’98] linear-time 2-approximation by expansion [Solis-Oba ’98]
Digraphs
√ OPT-approximation [Drescher and Vetta, ’10] 92-approximation [Daligault and Thomass´ e, 10]
SLIDE 9
Previous Results
Undirected graphs
classical NP-hard problem listed by Garey & Johnson [’74] 3-approximation by local search [Lu and Ravi ’90] O(n5) running time 3-approximation in (almost) linear time by expansion-based approach [Lu and Ravi ’98] linear-time 2-approximation by expansion [Solis-Oba ’98]
Digraphs
√ OPT-approximation [Drescher and Vetta, ’10] What about special classes of digraphs? 92-approximation [Daligault and Thomass´ e, 10]
SLIDE 10
Previous Results
Undirected graphs
classical NP-hard problem listed by Garey & Johnson [’74] 3-approximation by local search [Lu and Ravi ’90] O(n5) running time 3-approximation in (almost) linear time by expansion-based approach [Lu and Ravi ’98] linear-time 2-approximation by expansion [Solis-Oba ’98]
Digraphs
√ OPT-approximation [Drescher and Vetta, ’10] What about special classes of digraphs?
DAGs
92-approximation [Daligault and Thomass´ e, 10]
SLIDE 11
Our Results for DAGs
MaxSNP-hard, i.e., no PTAS linear-time 4-approximation algorithm linear-time 2-approximation algorithm (expansion-based)
SLIDE 12
Our Results for DAGs
MaxSNP-hard, i.e., no PTAS linear-time 4-approximation algorithm linear-time 2-approximation algorithm (expansion-based)
SLIDE 13
Algorithm
Input: acyclic digraph G with root r Output: spanning tree T mark r F ← expand(G) T ← connect(G, F) return T r G
SLIDE 14
Algorithm
Input: acyclic digraph G with root r Output: spanning tree T mark r F ← expand(G) T ← connect(G, F) return T r G
SLIDE 15
Algorithm
Input: acyclic digraph G with root r Output: spanning tree T mark r F ← expand(G) T ← connect(G, F) return T r G
SLIDE 16
Procedure expand
F ← ∅ foreach node v in G do if v / ∈ F then F ← F + v Uv ← unmarked children of v if |Uv| ≥ 2 then F ← F + Uv foreach u ∈ Uv do F ← F + (v, u) mark u F G v r
SLIDE 17
Procedure expand
F ← ∅ foreach node v in G do if v / ∈ F then F ← F + v Uv ← unmarked children of v if |Uv| ≥ 2 then F ← F + Uv foreach u ∈ Uv do F ← F + (v, u) mark u F G v r
SLIDE 18
Procedure expand
F ← ∅ foreach node v in G do if v / ∈ F then F ← F + v Uv ← unmarked children of v if |Uv| ≥ 2 then F ← F + Uv foreach u ∈ Uv do F ← F + (v, u) mark u F G v Uv r
SLIDE 19
Procedure expand
F ← ∅ foreach node v in G do if v / ∈ F then F ← F + v Uv ← unmarked children of v if |Uv| ≥ 2 then F ← F + Uv foreach u ∈ Uv do F ← F + (v, u) mark u F G v Uv r
SLIDE 20
Procedure expand
F ← ∅ foreach node v in G do if v / ∈ F then F ← F + v Uv ← unmarked children of v if |Uv| ≥ 2 then F ← F + Uv foreach u ∈ Uv do F ← F + (v, u) mark u F G v Uv r
SLIDE 21
Procedure expand
F ← ∅ foreach node v in G do if v / ∈ F then F ← F + v Uv ← unmarked children of v if |Uv| ≥ 2 then F ← F + Uv foreach u ∈ Uv do F ← F + (v, u) mark u F G v Uv every u ∈ Uv has exactly one incoming edge in F r
SLIDE 22
Procedure expand
F ← ∅ foreach node v in G do if v / ∈ F then F ← F + v Uv ← unmarked children of v if |Uv| ≥ 2 then F ← F + Uv foreach u ∈ Uv do F ← F + (v, u) mark u F G v Uv every u ∈ Uv has exactly one incoming edge in F r
SLIDE 23
Procedure expand
F ← ∅ foreach node v in G do if v / ∈ F then F ← F + v Uv ← unmarked children of v if |Uv| ≥ 2 then F ← F + Uv foreach u ∈ Uv do F ← F + (v, u) mark u F G v r
SLIDE 24
Procedure expand
F ← ∅ foreach node v in G do if v / ∈ F then F ← F + v Uv ← unmarked children of v if |Uv| ≥ 2 then F ← F + Uv foreach u ∈ Uv do F ← F + (v, u) mark u F G v Uv r
SLIDE 25
Procedure expand
F ← ∅ foreach node v in G do if v / ∈ F then F ← F + v Uv ← unmarked children of v if |Uv| ≥ 2 then F ← F + Uv foreach u ∈ Uv do F ← F + (v, u) mark u F G v r
SLIDE 26
Procedure expand
F ← ∅ foreach node v in G do if v / ∈ F then F ← F + v Uv ← unmarked children of v if |Uv| ≥ 2 then F ← F + Uv foreach u ∈ Uv do F ← F + (v, u) mark u F G v Uv r
SLIDE 27
Procedure expand
F ← ∅ foreach node v in G do if v / ∈ F then F ← F + v Uv ← unmarked children of v if |Uv| ≥ 2 then F ← F + Uv foreach u ∈ Uv do F ← F + (v, u) mark u F G v r
SLIDE 28
Procedure expand
F ← ∅ foreach node v in G do if v / ∈ F then F ← F + v Uv ← unmarked children of v if |Uv| ≥ 2 then F ← F + Uv foreach u ∈ Uv do F ← F + (v, u) mark u F G v Uv r
SLIDE 29
Procedure expand
F ← ∅ foreach node v in G do if v / ∈ F then F ← F + v Uv ← unmarked children of v if |Uv| ≥ 2 then F ← F + Uv foreach u ∈ Uv do F ← F + (v, u) mark u F G v r
SLIDE 30
Procedure expand
F ← ∅ foreach node v in G do if v / ∈ F then F ← F + v Uv ← unmarked children of v if |Uv| ≥ 2 then F ← F + Uv foreach u ∈ Uv do F ← F + (v, u) mark u F G v Uv r
SLIDE 31
Procedure expand
F ← ∅ foreach node v in G do if v / ∈ F then F ← F + v Uv ← unmarked children of v if |Uv| ≥ 2 then F ← F + Uv foreach u ∈ Uv do F ← F + (v, u) mark u F G v r
SLIDE 32
Procedure expand
F ← ∅ foreach node v in G do if v / ∈ F then F ← F + v Uv ← unmarked children of v if |Uv| ≥ 2 then F ← F + Uv foreach u ∈ Uv do F ← F + (v, u) mark u F G v Uv r
SLIDE 33
Procedure expand
F ← ∅ foreach node v in G do if v / ∈ F then F ← F + v Uv ← unmarked children of v if |Uv| ≥ 2 then F ← F + Uv foreach u ∈ Uv do F ← F + (v, u) mark u F G = v r
SLIDE 34
Procedure expand
F ← ∅ foreach node v in G do if v / ∈ F then F ← F + v Uv ← unmarked children of v if |Uv| ≥ 2 then F ← F + Uv foreach u ∈ Uv do F ← F + (v, u) mark u F G = v Uv r
SLIDE 35
Procedure expand
F ← ∅ foreach node v in G do if v / ∈ F then F ← F + v Uv ← unmarked children of v if |Uv| ≥ 2 then F ← F + Uv foreach u ∈ Uv do F ← F + (v, u) mark u F G r
SLIDE 36
Algorithm
Input: acyclic digraph G with root r Output: spanning tree T mark r F ← expand(G) T ← connect(G, F) return T F G r
SLIDE 37
Procedure connect
foreach unmarked node v do choose arbitrary incoming edge e of v in G F ← F + e mark v F G r v
SLIDE 38
Procedure connect
foreach unmarked node v do choose arbitrary incoming edge e of v in G F ← F + e mark v F G r v e
SLIDE 39
Procedure connect
foreach unmarked node v do choose arbitrary incoming edge e of v in G F ← F + e mark v F G r v e
SLIDE 40
Procedure connect
foreach unmarked node v do choose arbitrary incoming edge e of v in G F ← F + e mark v F G r v e
SLIDE 41
Procedure connect
foreach unmarked node v do choose arbitrary incoming edge e of v in G F ← F + e mark v F G r e v
SLIDE 42
Procedure connect
foreach unmarked node v do choose arbitrary incoming edge e of v in G F ← F + e mark v F G r
SLIDE 43 Correctness
⇒ spanning tree
- Lemma. Given an acyclic digraph G, the algorithm computes
a spanning tree of G. Observations. ◮ If a node is marked, – it has exactly one incoming edge in F (except r) and – no further incoming edges are added. ◮ At the end of the algorithm every node is marked.
SLIDE 44 Correctness
⇒ spanning tree
- Lemma. Given an acyclic digraph G, the algorithm computes
a spanning tree of G. Observations. ◮ If a node is marked, – it has exactly one incoming edge in F (except r) and – no further incoming edges are added. ◮ At the end of the algorithm every node is marked.
SLIDE 45 Correctness
⇒ spanning tree
- Lemma. Given an acyclic digraph G, the algorithm computes
a spanning tree of G. Observations. ◮ If a node is marked, – it has exactly one incoming edge in F (except r) and – no further incoming edges are added. ◮ At the end of the algorithm every node is marked.
SLIDE 46 Correctness
⇒ spanning tree
- Lemma. Given an acyclic digraph G, the algorithm computes
a spanning tree of G. Observations. ◮ If a node is marked, – it has exactly one incoming edge in F (except r) and – no further incoming edges are added. ◮ At the end of the algorithm every node is marked.
SLIDE 47 Correctness
⇒ spanning tree
- Lemma. Given an acyclic digraph G, the algorithm computes
a spanning tree of G. Observations. ◮ If a node is marked, – it has exactly one incoming edge in F (except r) and – no further incoming edges are added. ◮ At the end of the algorithm every node is marked.
SLIDE 48 Analysis
◮ ¯ F = F − {isolated nodes} = {T0, . . . , Tk}, ◮ ri ← root of Ti and ◮ ¯ L ← set of leaves in ¯ F.
- Observation. Procedure expand yields forest F.
F
SLIDE 49 Analysis
◮ ¯ F = F − {isolated nodes} = {T0, . . . , Tk}, ◮ ri ← root of Ti and ◮ ¯ L ← set of leaves in ¯ F.
- Observation. Procedure expand yields forest F.
T0 T1 ¯ F
SLIDE 50 Analysis
◮ ¯ F = F − {isolated nodes} = {T0, . . . , Tk}, ◮ ri ← root of Ti and ◮ ¯ L ← set of leaves in ¯ F.
- Observation. Procedure expand yields forest F.
T0 T1 ¯ F r0 r1
SLIDE 51 Analysis
◮ ¯ F = F − {isolated nodes} = {T0, . . . , Tk}, ◮ ri ← root of Ti and ◮ ¯ L ← set of leaves in ¯ F.
- Observation. Procedure expand yields forest F.
T0 T1 ¯ F r0 r1 L
SLIDE 52
Analysis
⇒ at least |V (Ti)|/2 leaves for each Ti ∈ ¯ F Expand F in appropriate order: top-down. Every expansion ◮ creates at least two leaves and ◮ destroys exactly one leaf. Lemma 1. For i = 0, . . . , k, any subtree Ti ∈ ¯ F has at least (|V (Ti)| + 1)/2 leaves.
SLIDE 53
Analysis
⇒ at least |V (Ti)|/2 leaves for each Ti ∈ ¯ F Expand F in appropriate order: top-down. Every expansion ◮ creates at least two leaves and ◮ destroys exactly one leaf. Lemma 1. For i = 0, . . . , k, any subtree Ti ∈ ¯ F has at least (|V (Ti)| + 1)/2 leaves.
SLIDE 54
Analysis
⇒ at least |V (Ti)|/2 leaves for each Ti ∈ ¯ F Expand F in appropriate order: top-down. Every expansion ◮ creates at least two leaves and ◮ destroys exactly one leaf. Lemma 1. For i = 0, . . . , k, any subtree Ti ∈ ¯ F has at least (|V (Ti)| + 1)/2 leaves. F
SLIDE 55
Analysis
⇒ at least |V (Ti)|/2 leaves for each Ti ∈ ¯ F Expand F in appropriate order: top-down. Every expansion ◮ creates at least two leaves and ◮ destroys exactly one leaf. Lemma 1. For i = 0, . . . , k, any subtree Ti ∈ ¯ F has at least (|V (Ti)| + 1)/2 leaves. F
SLIDE 56
Analysis
⇒ at least |V (Ti)|/2 leaves for each Ti ∈ ¯ F Expand F in appropriate order: top-down. Every expansion ◮ creates at least two leaves and ◮ destroys exactly one leaf. Lemma 1. For i = 0, . . . , k, any subtree Ti ∈ ¯ F has at least (|V (Ti)| + 1)/2 leaves. F . . .
SLIDE 57
Analysis
⇒ at least |V (Ti)|/2 leaves for each Ti ∈ ¯ F Expand F in appropriate order: top-down. Every expansion ◮ creates at least two leaves and ◮ destroys exactly one leaf. Lemma 1. For i = 0, . . . , k, any subtree Ti ∈ ¯ F has at least (|V (Ti)| + 1)/2 leaves. F . . .
SLIDE 58
Analysis
⇒ at least |V (Ti)|/2 leaves for each Ti ∈ ¯ F Expand F in appropriate order: top-down. Every expansion ◮ creates at least two leaves and ◮ destroys exactly one leaf. Lemma 1. For i = 0, . . . , k, any subtree Ti ∈ ¯ F has at least (|V (Ti)| + 1)/2 leaves. F . . .
SLIDE 59
Analysis
Lemma 2. Procedure connect creates a tree with at least |¯ L| − k leaves. T0 T1 T2 F
SLIDE 60
Analysis
Lemma 2. Procedure connect creates a tree with at least |¯ L| − k leaves. T0 T1 T2 F
SLIDE 61
Analysis
Lemma 2. Procedure connect creates a tree with at least |¯ L| − k leaves. T0 T1 T2 F
SLIDE 62
Analysis
Lemma 3. OPT ≤ |V (¯ F)| − k. ⇒ exclusion of k nodes of V (¯ F) show the uniqueness For ◮ each root ri and ◮ each leaf ℓ of T ∗ outside of V (¯ F) identify a unique internal node in T ∗. Let T ∗ be an optimum spanning tree.
SLIDE 63
Analysis
Lemma 3. OPT ≤ |V (¯ F)| − k. ⇒ exclusion of k nodes of V (¯ F) show the uniqueness For ◮ each root ri and ◮ each leaf ℓ of T ∗ outside of V (¯ F) identify a unique internal node in T ∗. Let T ∗ be an optimum spanning tree.
SLIDE 64
Analysis
Lemma 3. OPT ≤ |V (¯ F)| − k. ⇒ exclusion of k nodes of V (¯ F) show the uniqueness For ◮ each root ri and ◮ each leaf ℓ of T ∗ outside of V (¯ F) identify a unique internal node in T ∗. Let T ∗ be an optimum spanning tree.
SLIDE 65
Analysis
Lemma 3. OPT ≤ |V (¯ F)| − k. ⇒ exclusion of k nodes of V (¯ F) show the uniqueness For ◮ each root ri and ◮ each leaf ℓ of T ∗ outside of V (¯ F) identify a unique internal node in T ∗. Let T ∗ be an optimum spanning tree.
SLIDE 66
Analysis
Lemma 3. OPT ≤ |V (¯ F)| − k. ⇒ exclusion of k nodes of V (¯ F) show the uniqueness For ◮ each root ri and ◮ each leaf ℓ of T ∗ outside of V (¯ F) identify a unique internal node in T ∗. Let T ∗ be an optimum spanning tree.
SLIDE 67
Analysis
case 1: u, v, w ∈ path u procedure expand Take the first node in V (¯ F) on the way from ri or ℓ to r. u is first node ∈ V (¯ F) for w Assume to the contrary that u is the unique node of v and w. case 2: u, v, w / ∈ path u v w w v Claim: This node is unique.
SLIDE 68
Analysis
case 1: u, v, w ∈ path u procedure expand Take the first node in V (¯ F) on the way from ri or ℓ to r. u is first node ∈ V (¯ F) for w Assume to the contrary that u is the unique node of v and w. case 2: u, v, w / ∈ path u v w w v Claim: This node is unique.
SLIDE 69
Analysis
case 1: u, v, w ∈ path u procedure expand Take the first node in V (¯ F) on the way from ri or ℓ to r. u is first node ∈ V (¯ F) for w Assume to the contrary that u is the unique node of v and w. case 2: u, v, w / ∈ path u v w w v Claim: This node is unique.
SLIDE 70
Analysis
case 1: u, v, w ∈ path u procedure expand Take the first node in V (¯ F) on the way from ri or ℓ to r. u is first node ∈ V (¯ F) for w Assume to the contrary that u is the unique node of v and w. case 2: u, v, w / ∈ path u v w w v Claim: This node is unique.
SLIDE 71
Analysis
case 1: u, v, w ∈ path u procedure expand Take the first node in V (¯ F) on the way from ri or ℓ to r. u is first node ∈ V (¯ F) for w Assume to the contrary that u is the unique node of v and w. case 2: u, v, w / ∈ path u v w w v Claim: This node is unique.
SLIDE 72
Analysis
case 1: u, v, w ∈ path u procedure expand Take the first node in V (¯ F) on the way from ri or ℓ to r. u is first node ∈ V (¯ F) for w Assume to the contrary that u is the unique node of v and w. case 2: u, v, w / ∈ path u v w w v Claim: This node is unique.
SLIDE 73 Analysis
Putting things together. . . Lemma 1. For i = 0, . . . , k, any subtree Ti ∈ ¯ F has at least (|V (Ti)| + 1)/2 leaves. Lemma 2. Procedure connect creates a tree with at least |¯ L| − k leaves. Lemma 3. OPT ≤ |V (¯ F)| − k. ⇒ ≥ |¯ L| − k ≥
k
|V (Ti)| + 1 2 − k = |V (¯ F)| − k 2 ⇒ ratio 2
SLIDE 74 Analysis
Putting things together. . . Lemma 1. For i = 0, . . . , k, any subtree Ti ∈ ¯ F has at least (|V (Ti)| + 1)/2 leaves. Lemma 2. Procedure connect creates a tree with at least |¯ L| − k leaves. Lemma 3. OPT ≤ |V (¯ F)| − k. ⇒ ≥ |¯ L| − k ≥
k
|V (Ti)| + 1 2 − k = |V (¯ F)| − k 2 ⇒ ratio 2
SLIDE 75 Analysis
Putting things together. . . Lemma 1. For i = 0, . . . , k, any subtree Ti ∈ ¯ F has at least (|V (Ti)| + 1)/2 leaves. Lemma 2. Procedure connect creates a tree with at least |¯ L| − k leaves. Lemma 3. OPT ≤ |V (¯ F)| − k. ⇒ ≥ |¯ L| − k ≥
k
|V (Ti)| + 1 2 − k = |V (¯ F)| − k 2 ⇒ ratio 2
SLIDE 76
Summary and Open Questions
MaxSNP-hardness for DAGs Summary.
SLIDE 77
Summary and Open Questions
MaxSNP-hardness for DAGs linear-time 4- and 2-approximation algorithms for DAGs improving upon 92-approximation for general digraphs Summary.
SLIDE 78
Summary and Open Questions
MaxSNP-hardness for DAGs linear-time 4- and 2-approximation algorithms for DAGs improving upon 92-approximation for general digraphs Summary. Open questions expansion-approach extendable to general digraphs?
SLIDE 79
Summary and Open Questions
MaxSNP-hardness for DAGs linear-time 4- and 2-approximation algorithms for DAGs improving upon 92-approximation for general digraphs Summary. Open questions expansion-approach extendable to general digraphs? better results (DAGs or general) by multi-stage expansion?
SLIDE 80
Summary and Open Questions
MaxSNP-hardness for DAGs linear-time 4- and 2-approximation algorithms for DAGs improving upon 92-approximation for general digraphs Summary. Open questions expansion-approach extendable to general digraphs? better results (DAGs or general) by multi-stage expansion?
Thank you!