License: Creative Commons Attribution 4.0 International license (CC BY 4.0)
When quoting this document, please refer to the following
DOI: 10.4230/LIPIcs.ESA.2021.43
URN: urn:nbn:de:0030-drops-146245
URL: http://dagstuhl.sunsite.rwth-aachen.de/volltexte/2021/14624/
Go to the corresponding LIPIcs Volume Portal


Fink, Simon D. ; Pfretzschner, Matthias ; Rutter, Ignaz

Experimental Comparison of PC-Trees and PQ-Trees

pdf-format:
LIPIcs-ESA-2021-43.pdf (10 MB)


Abstract

PQ-trees and PC-trees are data structures that represent sets of linear and circular orders, respectively, subject to constraints that specific subsets of elements have to be consecutive. While equivalent to each other, PC-trees are conceptually much simpler than PQ-trees; updating a PC-tree so that a set of elements becomes consecutive requires only a single operation, whereas PQ-trees use an update procedure that is described in terms of nine transformation templates that have to be recursively matched and applied.
Despite these theoretical advantages, to date no practical PC-tree implementation is available. This might be due to the original description by Hsu and McConnell [Hsu et al., 2003] in some places only sketching the details of the implementation. In this paper, we describe two alternative implementations of PC-trees. For the first one, we follow the approach by Hsu and McConnell, filling in the necessary details and also proposing improvements on the original algorithm. For the second one, we use a different technique for efficiently representing the tree using a Union-Find data structure. In an extensive experimental evaluation we compare our implementations to a variety of other implementations of PQ-trees that are available on the web as part of academic and other software libraries. Our results show that both PC-tree implementations beat their closest fully correct competitor, the PQ-tree implementation from the OGDF library [Markus Chimani et al., 2014; Leipert, 1997], by a factor of 2 to 4, showing that PC-trees are not only conceptually simpler but also fast in practice. Moreover, we find the Union-Find-based implementation, while having a slightly worse asymptotic runtime, to be twice as fast as the one based on the description by Hsu and McConnell.

BibTeX - Entry

@InProceedings{fink_et_al:LIPIcs.ESA.2021.43,
  author =	{Fink, Simon D. and Pfretzschner, Matthias and Rutter, Ignaz},
  title =	{{Experimental Comparison of PC-Trees and PQ-Trees}},
  booktitle =	{29th Annual European Symposium on Algorithms (ESA 2021)},
  pages =	{43:1--43:13},
  series =	{Leibniz International Proceedings in Informatics (LIPIcs)},
  ISBN =	{978-3-95977-204-4},
  ISSN =	{1868-8969},
  year =	{2021},
  volume =	{204},
  editor =	{Mutzel, Petra and Pagh, Rasmus and Herman, Grzegorz},
  publisher =	{Schloss Dagstuhl -- Leibniz-Zentrum f{\"u}r Informatik},
  address =	{Dagstuhl, Germany},
  URL =		{https://drops.dagstuhl.de/opus/volltexte/2021/14624},
  URN =		{urn:nbn:de:0030-drops-146245},
  doi =		{10.4230/LIPIcs.ESA.2021.43},
  annote =	{Keywords: PQ-Tree, PC-Tree, circular consecutive ones, implementation, experimental evaluation}
}

Keywords: PQ-Tree, PC-Tree, circular consecutive ones, implementation, experimental evaluation
Collection: 29th Annual European Symposium on Algorithms (ESA 2021)
Issue Date: 2021
Date of publication: 31.08.2021
Supplementary Material: Software (Source Code): https://github.com/N-Coder/pc-tree/ archived at: https://archive.softwareheritage.org/swh:1:dir:00616576c1a16938cc5c376685086c7c2c368f7d


DROPS-Home | Fulltext Search | Imprint | Privacy Published by LZI