A Faster Algorithm for Constructing the Frequency Difference Consensus Tree

Authors Jesper Jansson, Wing-Kin Sung, Seyed Ali Tabatabaee, Yutong Yang

Thumbnail PDF


  • Filesize: 0.94 MB
  • 17 pages

Document Identifiers

Author Details

Jesper Jansson
  • Kyoto University, Japan
Wing-Kin Sung
  • The Chinese University of Hong Kong, China
  • Hong Kong Genome Institute, Hong Kong Science Park, China
Seyed Ali Tabatabaee
  • Dept. of Computer Science, University of British Columbia, Vancouver, Canada
Yutong Yang
  • Hong Kong Genome Institute, Hong Kong Science Park, China


The authors would like to thank Varun Gupta for some ideas employed in the procedure Fast_Label_Trees.

Cite AsGet BibTex

Jesper Jansson, Wing-Kin Sung, Seyed Ali Tabatabaee, and Yutong Yang. A Faster Algorithm for Constructing the Frequency Difference Consensus Tree. In 41st International Symposium on Theoretical Aspects of Computer Science (STACS 2024). Leibniz International Proceedings in Informatics (LIPIcs), Volume 289, pp. 43:1-43:17, Schloss Dagstuhl – Leibniz-Zentrum für Informatik (2024)


A consensus tree is a phylogenetic tree that summarizes the evolutionary relationships inferred from a collection of phylogenetic trees with the same set of leaf labels. Among the many types of consensus trees that have been proposed in the last 50 years, the frequency difference consensus tree is one of the more finely resolved types that retains a large amount of information. This paper presents a new deterministic algorithm for constructing the frequency difference consensus tree. Given k phylogenetic trees with identical sets of n leaf labels, it runs in O(knlog{n}) time, improving the best previously known solution.

Subject Classification

ACM Subject Classification
  • Theory of computation → Graph algorithms analysis
  • Applied computing → Bioinformatics
  • phylogenetic tree
  • frequency difference consensus tree
  • tree algorithm
  • centroid path decomposition
  • max-Manhattan Skyline Problem


  • Access Statistics
  • Total Accesses (updated on a weekly basis)
    PDF Downloads


  1. The Boost C++ Libraries. https://www.boost.org/. Accessed on September 14, 2023.
  2. Edward N Adams III. Consensus techniques and the comparison of taxonomic trees. Systematic Biology, 21(4):390-397, 1972. Google Scholar
  3. Craig F Barrett, Jerrold I Davis, Jim Leebens-Mack, John G Conran, and Dennis W Stevenson. Plastid genomes and deep relationships among the commelinid monocot angiosperms. Cladistics, 29(1):65-87, 2013. Google Scholar
  4. Michael A Bender and Martin Farach-Colton. The LCA problem revisited. In Latin American Symposium on Theoretical Informatics, pages 88-94. Springer, 2000. Google Scholar
  5. Michael A Bender and Martın Farach-Colton. The level ancestor problem simplified. Theoretical Computer Science, 321(1):5-12, 2004. Google Scholar
  6. Omer Berkman and Uzi Vishkin. Finding level-ancestors in trees. Journal of Computer and System Sciences, 48(2):214-230, 1994. Google Scholar
  7. David Bryant. A classification of consensus methods for phylogenetics. DIMACS Series in Discrete Mathematics and Theoretical Computer Science, 61:163-184, 2003. Google Scholar
  8. Richard Cole, Martin Farach-Colton, Ramesh Hariharan, Teresa Przytycka, and Mikkel Thorup. An O(n log n) algorithm for the maximum agreement subtree problem for binary trees. SIAM Journal on Computing, 30(5):1385-1404, 2000. Google Scholar
  9. Maxime Crochemore, Costas S Iliopoulos, Marcin Kubica, Jakub Radoszewski, Wojciech Rytter, and Tomasz Waleń. Extracting powers and periods in a word from its runs structure. Theoretical Computer Science, 521:29-41, 2014. Google Scholar
  10. William HE Day. Optimal algorithms for comparing trees with labeled leaves. Journal of Classification, 2:7-28, 1985. Google Scholar
  11. Jianrong Dong, David Fernández-Baca, FR McMorris, and Robert C Powers. Majority-rule (+) consensus trees. Mathematical Biosciences, 228(1):10-15, 2010. Google Scholar
  12. Martin Farach and Mikkel Thorup. Fast comparison of evolutionary trees. Information and Computation, 123(1):29-37, 1995. Google Scholar
  13. J Felsenstein. Phylip version 3.6. Software package, Department of Genome Sciences, University of Washington, Seattle, USA, 2005. Google Scholar
  14. Nicolás García, Alan W Meerow, Douglas E Soltis, and Pamela S Soltis. Testing deep reticulate evolution in Amaryllidaceae tribe Hippeastreae (Asparagales) with ITS and chloroplast sequence data. Systematic Botany, 39(1):75-89, 2014. Google Scholar
  15. Paweł Gawrychowski, Gad M Landau, Wing-Kin Sung, and Oren Weimann. A faster construction of greedy consensus trees. 45th International Colloquium on Automata, Languages, and Programming (ICALP 2018), 2018. Google Scholar
  16. Pablo A Goloboff, James S Farris, Mari Källersjö, Bengt Oxelman, Martín J Ramírez, and Claudia A Szumik. Improvements to resampling measures of group support. Cladistics, 19(4):324-332, 2003. Google Scholar
  17. Pablo A Goloboff, James S Farris, and Kevin C Nixon. TNT, a free program for phylogenetic analysis. Cladistics, 24(5):774-786, 2008. Google Scholar
  18. Jon Gorrie. Does culture evolve? Testing evolutionary theories of culture through a case study of El Khiam points from three sites in the Pre Pottery Neolithic A of the Southern Levant. PhD thesis, Oxford Brookes University, 2021. Google Scholar
  19. Gang Han, Luis M Chiappe, Shu-An Ji, Michael Habib, Alan H Turner, Anusuya Chinsamy, Xueling Liu, and Lizhuo Han. A new raptorial dinosaur with exceptionally long feathering provides insights into dromaeosaurid flight performance. Nature Communications, 5:4382, 2014. Google Scholar
  20. Jesper Jansson, Ramesh Rajaby, Chuanqi Shen, and Wing-Kin Sung. Algorithms for the majority rule (+) consensus tree and the frequency difference consensus tree. IEEE/ACM Transactions on Computational Biology and Bioinformatics (TCBB), 15(1):15-26, 2018. Google Scholar
  21. Jesper Jansson, Chuanqi Shen, and Wing-Kin Sung. Improved algorithms for constructing consensus trees. Journal of the ACM, 63(3):28, 2016. Google Scholar
  22. Sung Kwon Kim, Jung-Sik Cho, and Soo-Cheol Kim. Path maximum query and path maximum sum query in a tree. IEICE TRANSACTIONS on Information and Systems, 92(2):166-171, 2009. Google Scholar
  23. Max Cardoso Langer, Blair Wayne McPhee, Júlio César de Almeida Marsola, Lúcio Roberto-da Silva, and Sérgio Furtado Cabreira. Anatomy of the dinosaur Pampadromaeus barberenai from the Late Triassic Santa Maria Formation of southern Brazil. PLOS ONE, 14(2):e0212543, 2019. Google Scholar
  24. Charlotte Lindqvist, Jan De Laet, Robert R Haynes, Lone Aagesen, Brian R Keener, and Victor A Albert. Molecular phylogenetics of an aquatic plant lineage, Potamogetonaceae. Cladistics, 22(6):568-588, 2006. Google Scholar
  25. Timothy Margush and Fred R McMorris. Consensus n-trees. Bulletin of Mathematical Biology, 43(2):239-244, 1981. Google Scholar
  26. Carlos Molineri. A cladistic revision of Tortopus Needham & Murphy with description of the new genus Tortopsis (Ephemeroptera: Polymitarcyidae). Zootaxa, 2481:1-36, 2010. Google Scholar
  27. Carlos Molineri and Frederico F Salles. Phylogeny and biogeography of the ephemeral Campsurus. Systematic Entomology, 38(2):265-277, 2013. Google Scholar
  28. Carlos Molineri, Frederico F Salles, and Janice G Peters. Phylogeny and biogeography of Asthenopodinae with a revision of Asthenopus, reinstatement of Asthenopodes, and the description of the new genera Hubbardipes and Priasthenopus (Ephemeroptera, Polymitarcyidae). ZooKeys, 478:45-128, 2015. Google Scholar
  29. Martín O Pereyra, Boris L Blotto, Diego Baldo, Juan C Chaparro, Santiago R Ron, Agustín J Elias-Costa, Patricia P Iglesias, Pablo J Venegas, Maria Tereza C Thome, Jhon Jairo Ospina-Sarria, et al. Evolution in the genus Rhinella: a total evidence phylogenetic analysis of Neotropical true toads (Anura: Bufonidae). Bulletin of the American Museum of Natural History, 447(1):1-156, 2021. Google Scholar
  30. Robert R Sokal and F James Rohlf. Taxonomic congruence in the Leptopodomorpha re-examined. Systematic Zoology, 30(3):309-325, 1981. Google Scholar
  31. Mike Steel and Joel D Velasco. Axiomatic opportunities and obstacles for inferring a species tree from gene trees. Systematic Biology, 63(5):772-778, 2014. Google Scholar
  32. Hongxun Wu. Near-optimal algorithm for constructing greedy consensus tree. In 47th International Colloquium on Automata, Languages, and Programming (ICALP 2020). Schloss Dagstuhl-Leibniz-Zentrum für Informatik, 2020. Google Scholar