I know there's another question asking the same in this website, but answers to that question was not clear; it did not help me.
In this wikipedia page, the 2nd property says "All NIL nodes are considered black".
I want to know why that constraint exists.
I could think (but not sure) that the contradiction (if NIL nodes were allowed to be any color) would arise in one of these two ways:
- There exists a certain tree that do not conform atleast one rule out of the other 3 rules (rule 1, 3 and 4 from this page).
- There exists a certain tree whose ratio between the the height of the farthest leaf node to the nearest leaf node would be more than 2.
Can you give an example that would result in such contradiction?