A note on the largest number of red nodes in red-black trees

https://doi.org/10.1016/j.jda.2017.03.001Get rights and content
Under an Elsevier user license
open archive

Abstract

In this paper, we are interested in the number of red nodes in red-black trees. We first present an O(n2logn) time dynamic programming solution for computing r(n), the largest number of red internal nodes in a red-black tree on n keys. Then the algorithm is improved to some O(logn) time recursive and nonrecursive algorithms. Based on these improved algorithms we finally find a closed-form solution of r(n).

Keywords

Red-black trees
Red internal nodes
Dynamic programming
Explicit solutions

Cited by (0)