Experimental Comparison of PC-Trees and PQ-Trees

Q2 Mathematics Journal of Experimental Algorithmics Pub Date : 2021-06-28 DOI:10.1145/3611653
S. D. Fink, Matthias Pfretzschner, Ignaz Rutter
{"title":"Experimental Comparison of PC-Trees and PQ-Trees","authors":"S. D. Fink, Matthias Pfretzschner, Ignaz Rutter","doi":"10.1145/3611653","DOIUrl":null,"url":null,"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 [14] 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 [6, 15], 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.","PeriodicalId":53707,"journal":{"name":"Journal of Experimental Algorithmics","volume":"1 1","pages":""},"PeriodicalIF":0.0000,"publicationDate":"2021-06-28","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"2","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Journal of Experimental Algorithmics","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1145/3611653","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"Q2","JCRName":"Mathematics","Score":null,"Total":0}
引用次数: 2

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 [14] 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 [6, 15], 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.
查看原文
分享 分享
微信好友 朋友圈 QQ好友 复制链接
本刊更多论文
PC树与PQ树的实验比较
PQ树和PC树是分别表示线性阶和循环阶的集合的数据结构,受元素的特定子集必须连续的约束。虽然PC树彼此等价,但在概念上比PQ树简单得多;更新PC树以使一组元素变得连续只需要一次操作,而PQ树使用的更新过程是根据必须递归匹配和应用的九个转换模板来描述的。尽管有这些理论上的优势,但到目前为止还没有实用的PC树实现。这可能是由于Hsu和McConnell[14]在某些地方的原始描述仅概述了实现的细节。在本文中,我们描述了PC树的两种替代实现。对于第一个,我们遵循Hsu和McConnell的方法,填写了必要的细节,并对原始算法提出了改进建议。对于第二个,我们使用不同的技术来使用Union Find数据结构有效地表示树。在一次广泛的实验评估中,我们将我们的实现与网络上作为学术和其他软件库的一部分提供的PQ树的各种其他实现进行了比较。我们的结果表明,两种PC树实现都以2到4的倍数击败了最接近的完全正确的竞争对手,即OGDF库[6,15]中的PQ树实现,这表明PC树不仅在概念上更简单,而且在实践中也很快。此外,我们发现基于Union find的实现,虽然渐近运行时稍差,但速度是基于Hsu和McConnell描述的实现的两倍。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约1分钟内获得全文 去求助
来源期刊
Journal of Experimental Algorithmics
Journal of Experimental Algorithmics Mathematics-Theoretical Computer Science
CiteScore
3.10
自引率
0.00%
发文量
29
期刊介绍: The ACM JEA is a high-quality, refereed, archival journal devoted to the study of discrete algorithms and data structures through a combination of experimentation and classical analysis and design techniques. It focuses on the following areas in algorithms and data structures: ■combinatorial optimization ■computational biology ■computational geometry ■graph manipulation ■graphics ■heuristics ■network design ■parallel processing ■routing and scheduling ■searching and sorting ■VLSI design
期刊最新文献
Random projections for Linear Programming: an improved retrieval phase SAT-Boosted Tabu Search for Coloring Massive Graphs An Experimental Evaluation of Semidefinite Programming and Spectral Algorithms for Max Cut A constructive heuristic for the uniform capacitated vertex k-center problem Algorithms for Efficiently Computing Structural Anonymity in Complex Networks
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
现在去查看 取消
×
提示
确定
0
微信
客服QQ
Book学术公众号 扫码关注我们
反馈
×
意见反馈
请填写您的意见或建议
请填写您的手机或邮箱
已复制链接
已复制链接
快去分享给好友吧!
我知道了
×
扫码分享
扫码分享
Book学术官方微信
Book学术文献互助
Book学术文献互助群
群 号:481959085
Book学术
文献互助 智能选刊 最新文献 互助须知 联系我们:info@booksci.cn
Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。
Copyright © 2023 Book学术 All rights reserved.
ghs 京公网安备 11010802042870号 京ICP备2023020795号-1