| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 919 人关注过本帖
标题:[求助]:有谁知道AA树?
只看楼主 加入收藏
youngky
Rank: 1
等 级:新手上路
威 望:1
帖 子:75
专家分:0
注 册:2006-3-31
收藏
 问题点数:0 回复次数:1 
[求助]:有谁知道AA树?
什么是aa树啊?
2007-09-29 15:07
ybdesire
Rank: 2
等 级:论坛游民
威 望:1
帖 子:49
专家分:10
注 册:2007-5-19
收藏
得分:0 

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

2007-09-29 21:28
快速回复:[求助]:有谁知道AA树?
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.013736 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved