Abstract
Generalizing the concept of tree metric, Hirai (Ann Combinatorics 10:111–128, 2006) introduced the concept of subtree distance. A nonnegative-valued mapping \(d:X\times X \rightarrow \mathbb {R}_+\) is called a subtree distance if there exist a weighted tree T and a family \(\{T_x\mid x \in X\}\) of subtrees of T indexed by the elements in X such that \(d(x,y)=d_T(T_x,T_y)\), where \(d_T(T_x,T_y)\ge 0\) is the distance between \(T_x\) and \(T_y\) in T. Hirai (2006) provided a characterization of subtree distances that corresponds to Buneman’s (J Comb Theory, Series B 17:48–50, 1974) four-point condition for tree metrics. Using this characterization, we can decide whether or not a given mapping is a subtree distance in O\((n^4)\) time. In this paper, we show an O\((n^3)\) time algorithm that finds a representation of a given subtree distance. This results in an O\((n^3)\) time algorithm for deciding whether a given mapping is a subtree distance.
Similar content being viewed by others
References
Buneman P (1974) A note on metric properties of trees. J Comb Theory, Series B 17:48–50
Culberson JC, Rudnicki P (1989) A fast algorithm for constructing trees from distance matrices. Infor Process Lett 30:215–220
Farach M, Kannan S, Warnow T (1995) A robust model for finding optimal evolutionary trees. Algorithmica 13:155–179
Hirai H (2006) Characterization of the distance between subtrees of a tree by the associated tight span. Ann Combinatorics 10:111–128
Saitou N, Nei M (1987) The neighbor-joining method: a new method for reconstructing phylogenetic trees. Mol Biol Evolut 4:405–425
Semple C, Steel M (2003) Phylogenetics. Oxford University Press, Oxford
Acknowledgements
The authors are grateful to Professor Hiroshi Hirai for useful suggestions for the design of the algorithm presented in this paper. Thanks are also due to the anonymous referees for their helpful suggestions, which improved readability of the paper and simplified the proofs of Lemmas 1, 2 and Proposition 3. This work was supported by JSPS KAKENHI Grant Number 15K00033.
Author information
Authors and Affiliations
Corresponding author
Rights and permissions
About this article
Cite this article
Ando, K., Sato, K. An algorithm for finding a representation of a subtree distance. J Comb Optim 36, 742–762 (2018). https://doi.org/10.1007/s10878-017-0145-x
Published:
Issue Date:
DOI: https://doi.org/10.1007/s10878-017-0145-x