Papers
Topics
Authors
Recent
Search
2000 character limit reached

Breadth-First Search Trees with Many or Few Leaves

Published 1 Apr 2026 in cs.DS, cs.CC, and cs.DM | (2604.00691v1)

Abstract: The Maximum (Minimum) Leaf Spanning Tree problem asks for a spanning tree with the largest (smallest) number of leaves. As spanning trees are often computed using graph search algorithms, it is natural to restrict this problem to the set of search trees of some particular graph search, e.g., find the Breadth-First Search (BFS) tree with the largest number of leaves. We study this problem for Generic Search (GS), BFS and Lexicographic Breadth-First Search (LBFS) using search trees that connect each vertex to its first neighbor in the search order (first-in trees) just like the classic BFS tree. In particular, we analyze the complexity of these problems, both in the classical and in the parameterized sense. Among other results, we show that the minimum and maximum leaf problems are in FPT for the first-in trees of GS, BFS and LBFS when parameterized by the number of leaves in the tree. However, when these problems are parameterized by the number of internal vertices of the tree, they are W[1]-hard for the first-in trees of GS, BFS and LBFS.

Summary

  • 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.

Problem Formulation and Search Paradigms

The paper formally distinguishes two classes of decision and optimization problems for a given connected graph GG, search paradigm A\mathcal{A} (GS, BFS, LBFS), and parameter kk:

  • Min/Max-Leaf A\mathcal{A}-Tree: Given GG and kk, does there exist an A\mathcal{A}-ordering whose corresponding A\mathcal{A}-tree has at most (or at least) kk leaves?
  • Min/Max-Internal A\mathcal{A}-Tree: Given A\mathcal{A}0 and A\mathcal{A}1, does there exist an A\mathcal{A}2-ordering whose A\mathcal{A}3-tree has at most (or at least) A\mathcal{A}4 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 A\mathcal{A}5-Tree problems are fixed-parameter tractable (FPT) when parameterized by the number of leaves, A\mathcal{A}6.

  • 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 A\mathcal{A}7), ensuring A\mathcal{A}8 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) A\mathcal{A}9-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 kk0-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 kk1 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 kk2 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 kk3 vertices, the Min-Leaf constraint is impossible.
  • For possible orderings of up to kk4 vertices per layer, DP tracks the current leaf count, propagating feasible configurations while pruning infeasible permutations.
  • The total state space grows only superfactorially with kk5 (kk6 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 kk7 leaves imposes a bound on the pathwidth of kk8: specifically, pathwidth is at most kk9. 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 A\mathcal{A}0 time.

Further, key combinatorial equivalences are established:

  • The existence of a GS-tree with at most A\mathcal{A}1 leaves is equivalent to the existence of a zero-forcing set of size A\mathcal{A}2 (with specific rule variants) and the existence of a generic A\mathcal{A}3-sequence of length at least A\mathcal{A}4.

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 A\mathcal{A}5 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 A\mathcal{A}6.

Hardness and Separation Results

The work substantiates the following claims (restated formally):

  • Min-Leaf and Max-Leaf A\mathcal{A}7-Tree: For GS, BFS, and LBFS, NP-complete in the classical sense, FPT for A\mathcal{A}8 number of leaves, W[1/2]-hard for A\mathcal{A}9 number of internal vertices.
  • Min/Max-Internal GG0-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.

Paper to Video (Beta)

No one has generated a video about this paper yet.

Whiteboard

No one has generated a whiteboard explanation for this paper yet.

Collections

Sign up for free to add this paper to one or more collections.