Abstract
The red-black trees are binary trees in which a longest path from every node v to a leaf is at most twice as long as a shortest path from v to a leaf. We examine sequences of simple insertions (insertions without promotions or any other restructuring operations) in red-black trees. We prove that the case of red-black trees is the same as the class of trees that is defined by an insertion algorithm for red-black trees that uses promotions to restore balance. The proof demonstrates that every red-black tree can be built from the empty tree by a sequence of simple insertions We also prove that every red-black tree contains a skinny red-black subtree of the same height (a red-black tree with the smallest number of nodes for its height) by giving a sequence of simple insertions that can be used to build the given red-black tree from the skinny red-black subtree. From this result we conclude that the skinny red-black trees have the minimum path length among all red-black trees of the same height, a result that seems intuitively obvious but whose proof is not.
Talk to us
Join us for a 30 min session where you can share your feedback and ask us any queries you have
Disclaimer: All third-party content on this website/platform is and will remain the property of their respective owners and is provided on "as is" basis without any warranties, express or implied. Use of third-party content does not indicate any affiliation, sponsorship with or endorsement by them. Any references to third-party content is to identify the corresponding services and shall be considered fair use under The CopyrightLaw.