An AA tree is a binary search tree such that if it is nonempty, the level of a node is 1 if the node is a leaf, the node is red if it is the same level as its parent, and the node is black if it is one level less than the level of the parent.
aa树是一棵非空二叉树,且
<1>树的叶子结点为1
<2>如果结点的度和他双亲的度相同,则该结点是"红色"的 (后面在解释)
<3>如果结点的度比他双亲的度小一,则该结点是"黑色"的
红,黑的说法是 "红黑树" 里面的概念
1. Every node has two children, each colored either red or black.
2. Every tree leaf node is colored black.
3. Every red node has both of its children colored black.
4. Every path from the root to a tree leaf contains the same number (the "black-height") of black nodes
我就我的理解简单说一下:
叶子结点是黑的
如果两个孩子结点是黑色的,该结点才有可能是红的
从根结点到叶子结点的路径都含有相同数量的黑结点(也就是说,为了实现这个,才需要插入一些红色的结点)
(这里有更详细的说法,还有图解:http://mathworld.wolfram.com/Red-BlackTree.html)