Skip to main content

Splaying Preorders and Postorders

Author(s): Levy, Caleb C; Tarjan, Robert E

Download
To refer to this page use: http://arks.princeton.edu/ark:/88435/pr18n80
Full metadata record
DC FieldValueLanguage
dc.contributor.authorLevy, Caleb C-
dc.contributor.authorTarjan, Robert E-
dc.date.accessioned2021-10-08T19:47:37Z-
dc.date.available2021-10-08T19:47:37Z-
dc.date.issued2019en_US
dc.identifier.citationLevy, Caleb C., and Robert E. Tarjan. "Splaying Preorders and Postorders." In Workshop on Algorithms and Data Structures (2019): pp. 510-522. doi:10.1007/978-3-030-24766-9_37en_US
dc.identifier.issn0302-9743-
dc.identifier.urihttps://arxiv.org/pdf/1907.06309.pdf-
dc.identifier.urihttp://arks.princeton.edu/ark:/88435/pr18n80-
dc.description.abstractLet T be a binary search tree of n nodes with root r, left subtree ๐ฟ=left(๐‘Ÿ) , and right subtree ๐‘…=right(๐‘Ÿ) . The preorder and postorder of T are defined as follows: the preorder and postorder of the empty tree is the empty sequence, and preorder(๐‘‡)postorder(๐‘‡)=(๐‘Ÿ)โŠ•preorder(๐ฟ)โŠ•preorder(๐‘…)=postorder(๐ฟ)โŠ•postorder(๐‘…)โŠ•(๐‘Ÿ), where โŠ• denotes sequence concatenation. (We will refer to any such sequence as a preorder or a postorder). We prove the following results about the behavior of splaying [21] preorders and postorders: 1. Inserting the nodes of preorder(T) into an empty tree via splaying costs O(n). (Theorem 2.) 2. Inserting the nodes of postorder(T) into an empty tree via splaying costs O(n). (Theorem 3.) 3. If ๐‘‡โ€ฒ has the same keys as T and T is weight-balanced [18] then splaying either preorder(T) or postorder(T) starting from ๐‘‡โ€ฒ costs O(n). (Theorem 4.) For 1 and 2, we use the fact that preorders and postorders are pattern-avoiding: i.e. they contain no subsequences that are order-isomorphic to (2, 3, 1) and (3, 1, 2), respectively. Pattern-avoidance implies certain constraints on the manner in which items are inserted. We exploit this structure with a simple potential function that counts inserted nodes lying on access paths to uninserted nodes. Our methods can likely be extended to permutations that avoid more general patterns. The proof of 3 uses the fact that preorders and postorders of balanced search trees do not contain many large โ€œjumpsโ€ in symmetric order, and exploits this fact using the dynamic finger theorem [5, 6]. Items 2 and 3 are both novel. Item 1 was originally proved by Chaudhuri and Hรถft [4]; our proof simplifies theirs. These results provide further evidence in favor of the elusive dynamic optimality conjecture [21].en_US
dc.format.extent510 - 522en_US
dc.language.isoen_USen_US
dc.relation.ispartofWorkshop on Algorithms and Data Structuresen_US
dc.rightsAuthor's manuscripten_US
dc.titleSplaying Preorders and Postordersen_US
dc.typeConference Articleen_US
dc.identifier.doi10.1007/978-3-030-24766-9_37-
dc.identifier.eissn1611-3349-
pu.type.symplectichttp://www.symplectic.co.uk/publications/atom-terms/1.0/conference-proceedingen_US

Files in This Item:
File Description SizeFormat 
SplayingPreordersPostorders.pdf667.19 kBAdobe PDFView/Download


Items in OAR@Princeton are protected by copyright, with all rights reserved, unless otherwise indicated.