The quartet distance is a way of measuring the distance between two phylogenetic trees. It is defined as the number of subsets of four leaves that are not related by the same topology in both trees.
Computing the quartet distance The most straightforward computation of the quartet distance would require O ( N 4 ) {\displaystyle O(N^{4})} time, where N {\displaystyle N} is the number of leaves in the trees. For binary trees, better algorithms have been found to compute the distance in
O ( N 2 ) {\displaystyle O(N^{2})} time
O ( N log 2 N ) {\displaystyle O(N\log ^{2}N)} time and
O ( N log N ) {\displaystyle O(N\log N)} time Gerth Stølting Brodal et al. found an algorithm that takes O ( D N log N ) {\displaystyle O(DN\log N)} time to compute the quartet distance between two multifurcating trees when D {\displaystyle D} is the maximum degree of the trees, which is accessible Archived 2019-01-19 at the Wayback Machine in C, perl, and the R package Quartet.
References
