Phylogenetic k-Root and Steiner k-Root

Given a graph G = (V, E) and a positive integer k, the PHYLOGENETIC k-ROOT PROBLEM asks for a (unrooted) tree T without degree-2 nodes such that its leaves are labeled by V and (u, v) ∈ E if and only if dT (u, v) ≤ k. If the vertices in V are also allowed to be internal nodes in T, then we have the Steiner k-ROOT PROBLEM. Moreover, if a particular subset S of V are required to be internal nodes in T, then we have the RESTRICTED STEINER k-ROOT PROBLEM. Phylogenetic k-roots and Steiner k-roots extend the standard notion of GRAPH ROOTS and are motivated by applications in computational biology. In this paper, we first present O(n + e)-time algorithms to determine if a (not necessarily connected) graph G = (V, E) has an S-restricted 1-root Steiner tree for a given subset S ⊂ V , and to determine if a connected graph G = (V, E) has an S-restricted 2-root Steiner tree for a given subset S ⊂ V, where n = |V| and e = |E|. We then use these two algorithms as subroutines to design O(n + e)-time algorithms to determine if a given (not necessarily connected) graph G = (V, E) has a 3-root phylogeny and to determine if a given connected graph G = (V, E) has a 4-root phylogeny.