arXiv:2610.39863cs.DSOct 2026

Manuscript Offprint

arXiv:2610.39863

From Trees to Binary Trees: Approximation Algorithms and a PTAS

Fabian Weisbrodt, Florian Werner

Abstract

Kellerhals, Krebs, Nichterlein, and Schmid introduced the optimization problem TREE IN BINARY TREE (TBT), where, given a tree TT, the task is to find a binary tree S∗S^* with V(T)=V(S∗)V(T) = V(S^*) that minimizes ∑uv∈E(T)distS∗(u,v)\sum_{uv \in E(T)} \text{dist}_{S^*}(u, v). They also introduced the variant TREE IN BINARY TREE WITH STEINER NODES (TBT-SN), where the condition V(T)=V(S∗)V(T) = V(S^*) is relaxed to V(T)⊆V(S∗)V(T) \subseteq V(S^*). We give a simple linear-time 83\frac{8}{3}-approximation algorithm for TBT and a polynomial-time approximation scheme (PTAS) for TBT-SN. Our main building idea in both algorithms is to iteratively consider subtrees of the tree TT which contain all vertices below some vertex vv and construct a solution where vv has degree 1. For the PTAS, we cut TT into smaller trees, solve these instances, modify the obtained solutions, and combine them to achieve a solution for the original instance.

Keywords: network design, tree embedding, binary tree, approximation algorithms, polynomial-time approximation scheme

1 Introduction

Many algorithmic problems on graphs are significantly easier to solve when we restrict the input to trees. This simple observation motivates approximating a general graph metric, i.e. the distance function of a graph, by a tree metric. One highlight is Bartal's [1] idea to consider the expected distortion when approximating a metric by a tree metric. Fakcharoenphol, Rao, and Talwar [6] showed that a metric can be approximated by tree metrics with expected distortion (O(log⁡n))(O(\log n)). A natural next step is to restrict the properties of the trees behind the tree metric, especially introducing bounds on the degree. We focus on this step from general trees to trees of bounded degree, more specifically, binary trees. Recently, Kellerhals, Krebs, Nichterlein, and Schmid [11] introduced the optimization problem TREE IN BINARY TREE (TBT) in the context of network embedding problems, on which we focus in this paper.

TREE IN BINARY TREE (TBT)

Input: A tree T

Task: Find a binary tree S∗S^* with V(T)=V(S∗)V(T) = V(S^*) that minimizes ∑uv∈E(T)distS∗(u,v)\sum_{uv \in E(T)} \text{dist}_{S^*}(u, v).

Kellerhals, Krebs, Nichterlein, and Schmid also introduced the variant TREE IN BINARY TREE WITH STEINER NODES (TBT-SN), where the condition V(T)=V(S∗)V(T) = V(S^*) is replaced with V(T)⊆V(S∗)V(T) \subseteq V(S^*). Intuitively, TBT-SN also allows Steiner nodes. They gave a linear-time 4-approximation algorithm for TBT, which first calculates a 3-approximate solution for TBT-SN and then eliminates the Steiner nodes.

In [11], TREE IN BINARY TREE is motivated as an embedding problem. We highlight two related problems. In the first, trees are embedded into binary trees under a different objective function; in the second, trees are embedded into paths, but the objective function is the same as in TBT. Specifically:

First, in [14], Monien showed that, given an input tree TT of height 3 (diameter 6), finding a binary tree SS with V(T)⊆V(S)V(T) \subseteq V(S) such that max⁡uv∈E(T)distS(u,v)\max_{uv \in E(T)} \text{dist}_S(u, v) is minimal is NP-hard. In embedding problems, this objective function is called bandwidth. The computational complexity of TBT and TBT-SN is unknown; however, it seems highly unlikely that replacing the objective function bandwidth with the objective function in TBT makes the problem easier.

Second, given a tree TT as input, the task is to find a path PP with V(T)⊆V(P)V(T) \subseteq V(P) such that ∑uv∈E(T)distP(u,v)\sum_{uv \in E(T)} \text{dist}_P(u, v) is minimal. In [7], Goldberg and Klipker showed that an optimal solution can be found in polynomial time. The running time was later improved by Shiloach in [15] and by Chung in [2]. In contrast to trees, given a bipartite graph GG, computing a path PP with V(P)⊆V(G)V(P) \subseteq V(G) minimizing ∑uv∈E(G)distP(u,v)\sum_{uv \in E(G)} \text{dist}_P(u, v) is NP-complete [4].

TBT is a specialization of the well-studied NETWORK DESIGN PROBLEM [13]. Given a weighted graph, the classical network design problem asks for a connected subgraph which optimizes a cost function related to communication cost under budget constraints, which can, for example, limit the number of edges or the total edge weight. A common objective function is the sum of all pairwise distances in the connected subgraph. Relaxing the condition that a feasible solution must be a subgraph and further allowing a larger vertex set leads to problems involving Steiner nodes, including the classical Steiner tree problem, which is NP-complete [5, 10]. Liers, Martin, and Pape [12] showed that computing a minimal binary Steiner tree is NP-complete. Note that in TBT, the optimal binary tree is of course not a subgraph of the input tree T if T has a vertex of degree at least 4. However, one can consider a weighted complete graph K with the same vertex set as T, where the weight on each edge xy is the distance between the vertices x and y in T. A classical variant of the NETWORK DESIGN PROBLEM is the MINIMUM ROUTING COST TREE PROBLEM (MRCT). Given a graph, the task is to find a subtree that minimizes the sum of all pairwise distances. Up to a scaling factor, the problem is also known as the minimum average distance (MAD) tree. MRCT was introduced by Hu in [8] under the name OPTIMUM DISTANCE

SPANNING TREE problem. According to Hu, the problem was proposed to him by Francesco Maffioli. Hu also introduced a more general version for weighted graphs. Johnson, Lenstra, and Rinnooy Kan [9] showed that MRCT is NP-hard. The authors in [16] gave a polynomial-time approximation scheme (PTAS), where the input graph is allowed to have nonnegative weights. Dahlhaus, Dankelmann, and Ravi [3] gave a linear-time algorithm on interval graphs.

The paper is structured as follows: Section 2 states our main results; Section 3 introduces the necessary notation. Sections 4 and 5 describe our algorithms for TBT and TBT-SN, respectively, with the corresponding analysis in Sections 6 and 7.