{"title":"A linear time algorithm for rolling binary trees","authors":"George Tanev, Adrijan Božinovski","doi":"10.1109/EUROCON.2017.8011115","DOIUrl":null,"url":null,"abstract":"This paper presents a new, linear algorithm for performing the roll operation on binary trees. Based on the inorder tree traversal, this algorithm has a very simple structure and achieves linear time and space complexity. A detailed analysis of this algorithm is presented, showing how its design contributes to a more streamlined operation and an improved time complexity over the original — and only other known to the authors — binary tree roll algorithm. A practical implementation of both algorithms is benchmarked by counting the minimum and maximum numbers of basic operations, as well as measuring the minimum and maximum amounts of memory space required by the algorithms to run to completion, across all binary tree topologies with progressively increasing numbers of nodes. Results obtained from this empirical analysis quantify the best-and worst-case complexities of both algorithms and show how the improved algorithm outperforms the original one asymptotically, particularly in regards to their time complexity.","PeriodicalId":114100,"journal":{"name":"IEEE EUROCON 2017 -17th International Conference on Smart Technologies","volume":"36 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2017-07-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"1","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"IEEE EUROCON 2017 -17th International Conference on Smart Technologies","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1109/EUROCON.2017.8011115","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 1
Abstract
This paper presents a new, linear algorithm for performing the roll operation on binary trees. Based on the inorder tree traversal, this algorithm has a very simple structure and achieves linear time and space complexity. A detailed analysis of this algorithm is presented, showing how its design contributes to a more streamlined operation and an improved time complexity over the original — and only other known to the authors — binary tree roll algorithm. A practical implementation of both algorithms is benchmarked by counting the minimum and maximum numbers of basic operations, as well as measuring the minimum and maximum amounts of memory space required by the algorithms to run to completion, across all binary tree topologies with progressively increasing numbers of nodes. Results obtained from this empirical analysis quantify the best-and worst-case complexities of both algorithms and show how the improved algorithm outperforms the original one asymptotically, particularly in regards to their time complexity.