Title: A revisited representation of the red-black tree
Authors: Lynda Bounif; Djamel Eddine Zegour
Addresses: LCSI Laboratory, Ecole Nationale Supérieure d'Informatique (ESI ex INI), Algiers, Algeria ' LCSI Laboratory, Ecole Nationale Supérieure d'Informatique (ESI ex INI), Algiers, Algeria
Abstract: Nowadays, the red-black tree is probably the most used balanced data structure. It searches, inserts and deletes keys in O log (n) time and it is highly recommended for applications with frequent updates. However this balanced binary tree is complicated in the implementation because of the different cases in both the insertion and deletion and the use of the red and black colours. That's why we propose in this paper a simpler representation of this structure. The new representation uses one extra bit in order to gain simplicity and efficiency. The red-black tree is seen as a partitioned binary tree and uses instead of colours three kinds of subtrees: 01, 10 and 11 subtrees. We show on one hand that we can simply express the insert algorithm and on the other hand that the performance of the algorithm is slightly better. Efficiency is due to the fact that the search branch used in the new representation is reduced by half. Therefore this representation can replace easily the standard algorithms of red-black tree in practice.
Keywords: binary search trees; balanced trees; red-black tree; data structure; search trees; partitioning; algorithms; efficiency; performance.
DOI: 10.1504/IJCAET.2022.119541
International Journal of Computer Aided Engineering and Technology, 2022 Vol.16 No.1, pp.95 - 118
Received: 08 Nov 2018
Accepted: 22 Mar 2019
Published online: 09 Dec 2021 *