Generalizing the concept of tree metric, Hirai (2006) introduced the concept of subtree distance. A 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\,|\,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)\) is the distance between \(T_x\) and \(T_y\) in T. Hirai (2006) gave a characterization of subtree distances which corresponds to Buneman’s four-point condition (1974) for the tree metrics. Using this characterization, we can decide whether or not a given matrix is a subtree distance in O\((n^4)\) time. However, the existence of a polynomial time algorithm for finding a tree and subtrees representing a subtree distance has been an open question. In this paper, we show an O\((n^3)\) time algorithm that finds a tree and subtrees representing a given subtree distance.
[1]
Piotr Rudnicki,et al.
A Fast Algorithm for Constructing Trees from Distance Matrices
,
1989,
Inf. Process. Lett..
[2]
N. Saitou,et al.
The neighbor-joining method: a new method for reconstructing phylogenetic trees.
,
1987,
Molecular biology and evolution.
[3]
H. Hirai.
Characterization of the Distance between Subtrees of a Tree by the Associated Tight Span
,
2006
.
[4]
P. Buneman.
A Note on the Metric Properties of Trees
,
1974
.
[5]
Kazutoshi Ando.
Computation of the Shapley value of minimum cost spanning tree games: #P-hardness and polynomial cases
,
2012
.
[6]
Hiroshi Hirai,et al.
Half-integrality of node-capacitated multiflows and tree-shaped facility locations on trees
,
2010,
Math. Program..