Bart Jansen Utrecht University Fixed Parameter Complexity of
Bart Jansen, Utrecht University Fixed Parameter Complexity of the Maximum Leaf Weight Spanning Tree Problem
Max Leaf Spanning Tree Max Leaf Instance: Connected graph G, positive integer k Question: Is there a spanning tree for G with at least k leaves? Applications in network design YES-instance for k ≤ 8 2
Complexity of Max Leaf Classical complexity Max-SNP complete, so no polynomial-time approximation scheme (PTAS) NP-complete, even for 3 -regular graphs • By P. Lemke, 1988 Planar graphs of maximum degree 4 • By Garey and Johnson, 1979 3
Bipartite Max Leaf Spanning Tree Bipartite Max Leaf Instance: Connected bipartite graph G with black and white vertices according to the partition, positive integer k Question: Is there a spanning tree for G with at least k black leaves? 4
Complexity of Bipartite Max Leaf Classical complexity No constant-factor approximation NP-complete, even for: d-regular graphs for d ≥ 4 • By Fusco and Monti, 2007 Planar graphs of maximum degree 4 • By Li and Toulouse, 2006 5
Weighted Max Leaf Spanning Tree Weighted Max Leaf Instance: Connected graph G with non-negative vertex weights; positive number k Question: Is there a spanning tree for G such that its leaves have combined weight at least k? Leaf weight 16 11 6
Complexity of Weighted Max Leaf Classical complexity NP-complete by restriction of Max Leaf If weights {0, 1} are allowed, no constant-factor approximation since it generalizes Bipartite Max Leaf We consider the fixed parameter complexity 7
Fixed Parameter Complexity Suppose we encounter a NP-complete problem No O(nc) algorithm for fixed c No efficient algorithm exists? What happens if we use some information about the instance? For example: solution size is k, much less than n. Can we solve it in O(2 kn) time? True for many problems, such as Vertex Cover Instance of a parameterized problem is <I, k> Regular instance and the parameter as a natural number If there is an f(k)nc time algorithm for a problem Then it is Fixed Parameter Tractable (FPT) (n is the size of instance I) 8
Kernelization algorithms A kernelization algorithm: Reduces parameterized instance <I, k> to equivalent <I’, k’> Size of I’ does not depend on I but only on k Time is poly (|I| + k) New parameter k’ is at most k If |I’| is O(g(k)), then g is the size of the kernel Kernelization algorithm implies fixed parameter tractability Compute a kernel, analyze it by brute force 9
Parameterization for Max Leaf Parameterize by the target value k Number of leaves, or leaf weight Max Leaf • Kernel with 3. 75 k vertices • O(4 kk 2+p(|V|+|E|)) algorithm Bipartite Max Leaf • No existing results • W[1] hard on general graphs Weighted Max Leaf • No existing results • Complexity depends on weight range • Kernel for restricted graph classes 10
Complexity of Weighted Max Leaf Weight range General graphs {1, 2, …} Kernel with 7. 5 k vertices 11
Complexity of Weighted Max Leaf Weight range General graphs {1, 2, …} {0, 1, … } Planar graphs Genus ≤ g Degree of positiveweight ≤ d Kernel with 7. 5 k vertices Hard for W[1] 78 k O(k√g+ g) O(kd 2) 12
Complexity of Weighted Max Leaf Weight range General graphs {1, 2, …} {0, 1, … } Q>0 Planar graphs Genus ≤ g Degree of positiveweight ≤ d Kernel with 7. 5 k vertices Hard for W[1] 78 k O(k√g+ g) O(kd 2) NP-complete for k=1 (not Fixed Parameter Tractable) 13
Complexity of Weighted Max Leaf Weight range General graphs {1, 2, …} Q≥ 1 Planar graphs Genus ≤ g Degree of positiveweight ≤ d Kernel with 7. 5 k vertices {0, 1, … } Hard for W[1] 78 k O(k√g+ g) O(kd 2) Q≥ 1 U {0} Hard for W[1] O(k) O(k√g+ g) O(kd 2) 14
Preliminaries Terminology and a lemma 15
Terminology A set S of vertices is a cutset if their removal splits the graph into multiple connected components A path component of length k is a path <x, v 1, v 2, . . , vk, y>, s. t. x, y have degree ≠ 2 all vi have degree 2 16
Leaves and cutsets If S is a cutset, then at least one vertex of S is internal in a spanning tree We need to give at least one vertex in S a degree ≥ 2 to connect both sides 17
Fixed parameter intractability Bipartite Max Leaf is hard for W[1] 18
Parameterized complexity classes We prove that Bipartite Max Leaf is hard for W[1] (Probably) no f(k)nc algorithm No proof of membership in W[1] It might be harder than any problem in W[1] No hardness proof for W[2] either Fixed parameter tractable • • Vertex Cover Feedback Vertex Set Maximum Leaf Spanning Tree. . W[1]-complete • Independent Set • Set Packing • . . W[2]-complete • Dominating Set • . . 19
Reductions prove W[1] hardness W[i] hardness is proven by parameterized reduction <I, k> <I’, k’> from some W[i]hard problem Similar to (Karp) reductions for NP-completeness Reduction in time f(k)*poly(|I|) New parameter k’ ≤ g(k) for some function g We reduce k-Independent Set (W[1]-complete) to Bipartite Max Leaf 20
Setup for reduction k-Independent Set Instance: Graph G, positive integer k Question: Does G have an independent set of size at least k? ▪ (i. e. is there a vertex set S of size at least k, such that no vertices in S are connected by an edge in G? ) Parameter: the value k 21
Reduction from k-Independent Set Given an instance of k-Independent Set, we reduce as follows: Color all vertices black Split all edges by a white vertex Add white vertex w with edges to all black vertices Set k’ = k Polynomial time k’ ≤ g(k) = k 22
Independent set of size k Spanning tree with ≥ k black leaves Complement of S is a vertex cover Build spanning tree: Take w as root, connect to all black vertices We reach the white vertices from the vertex cover V – S ▪ Since every white vertex used to be an edge Edges incident on w are not drawn 23
Spanning tree with k black leaves Independent set of size k Take the black leaves as the independent set If there was an edge x, y then they are not both leaves Since {x, y} is a cutset By contraposition, black leaves form an independent set Edges incident on w are not drawn 24
Fixed parameter tractability A linear kernel for Maximum Leaf Weight Spanning Tree on planar graphs 25
A linear kernel for Weighted Max Leaf on planar graphs Kernel of size 78 k on planar graphs Strategy: Give reduction rules ▪ that can be applied in polynomial time ▪ that reduce the instance to an equivalent instance Prove that after exhaustive application of the rules, either: ▪ the size of the graph is bounded by 78 k ▪ or we are sure that the answer is yes ▪ then we output a trivial, constant-sized YES-instance 26
Kernelization lemma We want to be sure that the answer is YES if the graph is still big after applying reduction rules Use a lemma of the following form: If no reduction rules apply, there is a spanning tree with |G|/c leaves of weight ≥ 1 (for some c > 0) With such a proof, we obtain: If |G| ≥ ck then G has a spanning tree with |G|/c≥ck/c=k leaves of weight 1 So a spanning tree with leaf weight ≥ k If |G| ≥ ck after kernelization we return YES If not, the instance is small 27
The reduction rules must enforce: When we increase the size of the graph, eventually this leads to an increase in optimal leaf weight of a spanning tree So we need to avoid: A graph can always grow larger without increasing the optimal leaf weight of a spanning tree All reduction rules are needed to prevent such situations 28
Bad situation 1) Vertex of positive weight, with arbitrarily many degree-1 neighbors of weight 0 29
1) Remove degree 1 vertices Structure: Vertex x of degree 1 adjacent to y of degree > 1 Operation: Delete x, decrease k by w(x), set w(y) = 0 Justification: Vertex x will be a leaf in any spanning tree The set {y} is a cutset, so y will never be a leaf in a spanning tree k’ = k – w(x) 30
Bad situation 2) A connected component of arbitrarily many vertices of weight 0 31
2) Contract edges between weight-0 vertices Structure: Two adjacent weight-0 vertices x, y Operation: Contract the edge xy, let w be the merged vertex Justification: We can always use the edge xy in an optimal tree 32
Bad situation 3) Arbitrarily many weight-0 degree-2 vertices with the same neighborhood 33
3) Duplicate degree-2 weight-0 vertices Structure: Two weight-0 degree-2 vertices u, v with equal neighborhoods {x, y} The remainder of the graph R is not empty Operation: Remove v and its incident edges Justification: {x, y} forms a cutset One of x, y will always be internal in a spanning tree 34
Bad situation 4) A necklace of arbitrary length Every pair of positive-weight vertices forms a cutset, so at most 1 leaf of positive weight 35
4) Edge bypassing a weight-0 vertex Structure: a weight-0 degree-2 vertex with neighbors x, y a direct edge xy Operation: remove the edge xy Justification: You never need xy If xy is used, we might as well remove it and connect x and y through z Since w(z) = 0, leaf weight does not decrease 36
Bad situation 5) Three path components of arbitrary length At most 4 leaves in any spanning tree 37
5) Shrink large path components Structure: Path component <x, v 1, v 2, . . , vp, y> with p ≥ 4 Operation: Replace v 2, v 3, . . , vp-1 by new vertex v* Weight of v*: Compute maximum of edge endpoint weights on edges (vi, vi+1) for i=1. . p-1 Subtract maximum of w(v 1) and (vp) Justification: The two spanning trees are equivalent Suppose a spanning tree avoids an edge inside the path component We gain at least as much weight by avoiding an edge incident on v* 38
Bad situation 6) An arbitrarily long cycle with alternating weighted / zero weight vertices At most one leaf of positive weight 39
6) Cut a simple cycle Structure: The graph is a simple cycle Operation: Remove an edge that maximizes the combined weight of its endpoints Justification: Any spanning tree for G avoids exactly one edge Avoiding an edge with maximum weight of endpoints is optimal 40
About the reduction rules Reduction rules are necessary and sufficient for the kernelization claim Rules do not depend on parameter k Reduction rules do not depend on planarity of the graph ▪ But the structural proof that every reduced instance has a |G|/c leaf weight spanning tree does depend on planarity Reduction rules can be executed in linear time Yields O(k) 278 k + O(|V| + |E|) algorithm 41
Discussion of the kernels Kernel for {0, 1, …} weights on planar graphs Current kernel size 78 k Improved analysis may decrease kernel size New reduction rules needed to go below 31 k Kernel size for {1, 2, . . . } weights Current kernel size 7. 5 k New reduction rules needed to go below 7. 5 k 42
Different parameterizations What is it that makes Weighted Max Leaf hard? 43
Parameterizations for Weighted Max Leaf with {0, 1, …} weights Target leaf weight k Treewidth w Positive-weight vertices p Zero-weight vertices x Parameter k + x • Not fixed parameter tractable on general graphs • Hard for W[1] by reduction from k-Independent Set (Kernel for restricted graph classes) • Amenable to dynamic programming • O(ww |V|) time algorithm • Try all subsets of S positive-weight vertices, check if V S is a Connected Dominating Set • O(2 p(|V|+|E|)) time • Not fixed parameter tractable • For x=0 (no zero-weight vertices) we have regular unweighted Max Leaf, which is NP-complete • Fixed parameter tractable • We reduce (k+x) Weighted Max Leaf with {0, 1, …} weights to k’ = k+x Weighted Max Leaf with {1, 2, …} weights 44
Reduction to Positive-Weighted Max Leaf with weight 0 and parameter x + k Is there a spanning tree of leaf weight ≥ 13 ? k = 13, x = 2 Weighted Max Leaf with weight ≥ 1 and parameter k’ = x + k Is there a spanning tree of leaf weight ≥ 15 14 ? 45
Summary Maximum Leaf Weight Spanning tree is a natural generalization of the Maximum Leaf Spanning Tree problem If weights are ≥ 1: Kernel with 7. 5 k vertices If weights are 0 or ≥ 1: W[1]-hard on general graphs Linear kernel when restricted to ▪ planar graphs, ▪ graphs of bounded genus, ▪ graphs in which the degree of positive-weight vertices is bounded. 46
Future work Classifying complexity of general-graph problem Hardness proof for some W[i] > 1 Membership proof for some W[i] Investigate connections to approximation algorithms PTAS on planar graphs using Planar-Separators? Constant-factor approximation for {0, 1} weights 47
- Slides: 47