- The paper presents NP-completeness and FPT results for minimizing and maximizing leaves in search trees based on BFS, LBFS, and GS.
- It leverages dynamic programming and zero-forcing set techniques to establish tight bounds on bandwidth and pathwidth for these search paradigms.
- The findings reveal a complexity dichotomy that informs efficient algorithm design for network reliability and combinatorial optimization.
Breadth-First Search Trees with Many or Few Leaves: Complexity and Parameterization
Introduction
This paper rigorously investigates the complexity landscape of finding Breadth-First Search (BFS) trees with either the maximum or minimum number of leaves—problems known as the Maximum Leaf (Max-Leaf) and Minimum Leaf (Min-Leaf) Spanning Tree problems—when the spanning tree is further constrained to be a "first-in" tree resulting from a graph traversal such as BFS, Lexicographic Breadth-First Search (LBFS), or Generic Search (GS). Unlike the general spanning tree setting, these trees are tied to the structure of the traversal ordering, with each vertex connecting to its first neighbor in the search order.
The study highlights a dichotomy in the parameterized complexity of these problems, showing that the choice of parameterization (either by the number of leaves or the number of internal vertices) fundamentally alters tractability. The analysis encompasses classical and parameterized complexity results, as well as algorithmic contributions—particularly dynamic programming techniques contextualized to graph search layerings.
The paper formally distinguishes two classes of decision and optimization problems for a given connected graph G, search paradigm A (GS, BFS, LBFS), and parameter k:
- Min/Max-Leaf A-Tree: Given G and k, does there exist an A-ordering whose corresponding A-tree has at most (or at least) k leaves?
- Min/Max-Internal A-Tree: Given A0 and A1, does there exist an A2-ordering whose A3-tree has at most (or at least) A4 internal vertices?
The distinction from the general Minimum/Maximum Leaf Spanning Tree setting is essential: first-in trees are a (sometimes much smaller) subset of all spanning trees and can exhibit significantly different structural constraints, especially in layered (BFS-type) searches.
Parameterized Complexity Results
Parameterization by Number of Leaves
A core contribution is the identification that, for GS, BFS, and LBFS, both Min-Leaf and Max-Leaf A5-Tree problems are fixed-parameter tractable (FPT) when parameterized by the number of leaves, A6.
- For layered searches (notably BFS and LBFS), the paper develops FPT algorithms via dynamic programming over the possible orderings of search layers, utilizing bounds on per-layer vertex counts to control DP state space (factorially bounded in A7), ensuring A8 running time.
- In GS, Min-Leaf and Max-Leaf questions reduce (via structural combinatorics and established NP-hardness/FPT equivalences) to the well-studied connected dominating set and zero-forcing set frameworks; correspondingly, the best current FPT algorithms for Max-Leaf Spanning Tree directly yield FPT algorithms for Max-Leaf GS-tree ((2604.00691), Theorem 3.7).
Parameterization by Number of Internal Vertices
A computational intractability separation arises when parameterizing by the number of internal vertices:
- The Min-Internal (equivalently, Max-Leaf) and Max-Internal (equivalently, Min-Leaf) A9-Tree problems are shown to be W[2]-hard or W[1]-hard even on restricted graph classes (split and weakly chordal graphs), a hardness that extends to GS, BFS, LBFS, and other clique starter search paradigms.
- Specifically, Min-Internal k0-Tree remains W[2]-hard via reductions from Set Cover, and Max-Internal is W[1]-hard leveraging reductions from the One-Sided Grundy Total Domination problem ((2604.00691), Theorems 4.2 and 4.4).
- For LBFS, it is further established that Min-Internal is NP-complete for any fixed k1 on weakly chordal graphs.
- For GS, Max-Internal is W[1]-complete under standard parameterized reductions, whereas for BFS, XP algorithms are provided, but not FPT ((2604.00691), Theorems 4.6 and 4.8).
This is in stark contrast to the DFS setting, where the complexity flip is observed (cf. [Bergougnoux et al. 2025]): in DFS, Min-Leaf and Max-Leaf trees are hard for the leaf parameter but tractable for the number of internal vertices.
Algorithms and Structural Decomposition
Dynamic Programming for Layered Graph Searches
The authors devise an FPT algorithm for Min/Max-Leaf BFS-Tree parameterized by k2 by exploiting the layered structure induced by the BFS traversal. The method proceeds as follows:
- For each root candidate, the graph is partitioned into BFS layers; if any layer contains more than k3 vertices, the Min-Leaf constraint is impossible.
- For possible orderings of up to k4 vertices per layer, DP tracks the current leaf count, propagating feasible configurations while pruning infeasible permutations.
- The total state space grows only superfactorially with k5 (k6 per layer), yielding FPT performance.
For GS, Pathwidth and Tree Decompositions
The central tool for GS is the observation that the existence of a GS-tree with k7 leaves imposes a bound on the pathwidth of k8: specifically, pathwidth is at most k9. The authors generalize this with a reduction to the zero-forcing set problem (grounded in the theory of dominating sequences and their connection with tree decompositions), then adapt dynamic programming over tree decompositions to find minimal leaf GS-trees in A0 time.
Further, key combinatorial equivalences are established:
- The existence of a GS-tree with at most A1 leaves is equivalent to the existence of a zero-forcing set of size A2 (with specific rule variants) and the existence of a generic A3-sequence of length at least A4.
XP Algorithms for Internal Vertex Parameters
For the internal vertex parameter, the authors present XP (slice-wise polynomial-time) algorithms for BFS and GS: for each possible subset of at most A5 internal vertices and their orderings, an augmented BFS (or GS) tying breaker is simulated, and the induced search tree is checked for feasibility ((2604.00691), Lemma 4.7). The combinatorial blow-up in the number of subsets and permutations precludes FPT algorithms, but algorithms are polynomial for fixed A6.
Hardness and Separation Results
The work substantiates the following claims (restated formally):
- Min-Leaf and Max-Leaf A7-Tree: For GS, BFS, and LBFS, NP-complete in the classical sense, FPT for A8 number of leaves, W[1/2]-hard for A9 number of internal vertices.
- Min/Max-Internal G0-Tree: W[2]/W[1]-hard for various searches parameterized by internal vertices, even on restricted graph classes, providing lower bounds barring FPT algorithms unless standard complexity-theoretic collapses occur.
- For layered searches, combinatorial examples illustrate that the set of possible numbers of leaves in BFS-trees can be `arbitrarily far' from the general spanning tree problem, even with respect to standard width invariants.
Theoretical and Practical Implications
The analysis connotes several theoretical implications:
- The complexity landscape of leaf-constrained spanning trees drastically shifts under the constraint to search-generated (first-in) trees, directly impacting parameterized algorithm design and the applicability of structural decompositions.
- The tight connections to zero forcing, dominating sequences, and pathwidth strengthen the conceptual bridge between search tree structure and graph interplay, yielding new avenues for algorithmic generalization—especially for layered search paradigms.
- Contradicting the folklore that "BFS always produces trees with many leaves and DFS always with few," there exist graphs where the corresponding BFS or DFS trees' leaf counts are far from optimal for the spanning tree variant, emphasizing the vital role of the underlying search order.
On the practical side, these results inform parameterized algorithm development in network design and related fields, where constraints may derive either from graph structure (e.g., pathwidth) or the operational protocol (BFS, DFS, etc.).
Future Developments
Potential lines of further research include:
- Extending hardness and algorithmic results to other clique starter searches (such as Maximum Cardinality Search or Maximal Neighborhood Search), for which some tractability/hardness results remain open.
- Analyzing the analogous problems for "last-in" trees (e.g., DFS), for which complementary complexity profiles have been observed and will be addressed in follow-up work.
- Exploring whether the established combinatorial gaps between search-tree and spanning-tree variants can be further widened by new graph constructions.
- Establishing improved lower or upper bounds for FPT/XP algorithms, or kernelization results for parameterizations where FPT is feasible.
Conclusion
This paper systematically resolves the parameterized and classical complexity of maximizing or minimizing the number of leaves (alternatively, internal vertices) in search-tree constrained spanning trees, primarily for BFS, GS, and LBFS. Strong separations between parameterizations are proved: FPT is achievable for number-of-leaves parameterization in layered searches, while hard cases predominate for the number of internal vertices parameterization. Algorithmic techniques draw on dynamic programming over BFS layers and generalizations of domination and forcing concepts, and the structural results articulate the complexity-theoretic underpinnings of search-tree structure. The work refines the understanding of the algorithmic power and limits of search-induced spanning trees, and highlights profound differences vis-Ã -vis classical spanning tree problems constrained only by connectivity.