English

Computing Quartet Distance is Equivalent to Counting 4-Cycles

Data Structures and Algorithms 2020-12-03 v2

Abstract

The quartet distance is a measure of similarity used to compare two unrooted phylogenetic trees on the same set of nn leaves, defined as the number of subsets of four leaves related by a different topology in both trees. After a series of previous results, Brodal et al. [SODA 2013] presented an algorithm that computes this number in O(ndlogn)\mathcal{O}(nd\log n) time, where dd is the maximum degree of a node. Our main contribution is a two-way reduction establishing that the complexity of computing the quartet distance between two trees on nn leaves is the same, up to polylogarithmic factors, as the complexity of counting 4-cycles in an undirected simple graph with mm edges. The latter problem has been extensively studied, and the fastest known algorithm by Vassilevska Williams [SODA 2015] works in O(m1.48)\mathcal{O}(m^{1.48}) time. In fact, even for the seemingly simpler problem of detecting a 4-cycle, the best known algorithm works in O(m4/3)\mathcal{O}(m^{4/3}) time, and a conjecture of Yuster and Zwick implies that this might be optimal. In particular, an almost-linear time for computing the quartet distance would imply a surprisingly efficient algorithm for counting 4-cycles. In the other direction, by plugging in the state-of-the-art algorithms for counting 4-cycles, our reduction allows us to significantly decrease the complexity of computing the quartet distance. For trees with unbounded degrees we obtain an O(n1.48)\mathcal{O}(n^{1.48}) time algorithm, which is a substantial improvement on the previous bound of O(n2logn)\mathcal{O}(n^{2}\log n). For trees with degrees bounded by dd, by analysing the reduction more carefully, we are able to obtain an O~(nd0.77)\mathcal{\tilde O}(nd^{0.77}) time algorithm, which is again a nontrivial improvement on the previous bound of O(ndlogn)\mathcal{O}(nd\log n).

Keywords

Cite

@article{arxiv.1811.06244,
  title  = {Computing Quartet Distance is Equivalent to Counting 4-Cycles},
  author = {Bartłomiej Dudek and Paweł Gawrychowski},
  journal= {arXiv preprint arXiv:1811.06244},
  year   = {2020}
}
R2 v1 2026-06-23T05:16:41.324Z