An Extended Symbolic-Arithmetic Model for Teaching Double-Black Removal with Rotation in Red-Black Trees
Kennedy E. EhimwenmaHongyu ZhouJunfeng WangZe Zheng
Kennedy E. Ehimwenma
Hongyu Zhou
Junfeng Wang
Ze Zheng
+4
This paper extends a symbolic-arithmetic (SA) method for removing double-black (DB) nodes in red-black (RB) trees. The core operations are Red+Black=Black, Black−Black=Red, Black+Black=DB, and DB−Black=Black, which are augmented with three new SA equations (general, partial rule1, partial rule2). These equations handle DB removal when rotation and recoloring are needed, considering all rotation cases (LR, RL, LL, RR) and the colors of nephews of the sibling. The approach aims to make teaching DB removal more systematic by balancing black heights through algebraic manipulation rather than case-by-case reasoning.

arXiv ·
· April 4, 2025