I am searching for a proof that all AVL trees can be colored like a red-black tree? Can anyone give the proof?
+1
A:
Ok, ik give you a hint
Have a look at: AVL Tree and Red black Tree, if you understand that, the proof should be trivial.
Gamecat
2009-01-10 20:53:25
A:
I suspect the answer is no.
AVL trees balance better than RB trees, which means they balance differently, which would rather imply that you could not colour every AVL tree as a valid RB tree.
Blank Xavier
2009-03-24 21:19:29
This is incorrect. The only substantial difference is that the AVL tree's balancing is more strict, and no tree can be "too balanced" to be a red-black tree.
Graphics Noob
2010-09-21 05:52:54
Would it not be possible to have an AVL tree, which if you coloured it, would be in a state which is invalid for a RB tree? that is my concern.
Blank Xavier
2010-09-29 09:50:01