返回信息流B-树中有k个子树的分支结点包含k-1个关键字
这个说法对吗?
为什么?[em40]
这是一条镜像帖。来源:北邮人论坛 / soft-design / #21494同步于 2007/10/1
该镜像源已超过 30 天没有更新,可能在源站已被删除。
SoftDesign机器人发帖
关于数据结构B-树的问题[求助]
CS
2007/10/1镜像同步11 回复
订阅后,新回复会通过你的通知中心匿名送达。
9 条回复
【 在 succubus 的大作中提到: 】
: 如果t是B树的最小度数
: 那么当t<=k<=2t时这句话是正确的
K在这个范围内应该是必然的吧,这是B-树的定义啊
其实这句话源自一道题目
下列命题中,不成立的是:
A、m阶B-树中每一个分支结点子树的数量都小于或等于m
B、m阶B-树中每一个分支结点子树的数量都大于或等于[m/2](向上取整)
C、m阶B-树中任何一个结点的子树深度都相等
D、m阶B-树中有k个子树的分支结点包含k-1个关键字
答案是选D,我就不知道为什么了
【 在 succubus 的大作中提到: 】
: 选d也是由B树的定义决定的
: 要是不满足那就不是B树了
: 具体可以看看CLRS
请你解释得更详细点吧,
你的意思是不是说因为没有说明k的范围,所以这个命题是不成立的?
还有就是我孤陋寡闻,不知道什么是CLRS……
【 在 CS 的大作中提到: 】
: 请你解释得更详细点吧,
: 你的意思是不是说因为没有说明k的范围,所以这个命题是不成立的?
: 还有就是我孤陋寡闻,不知道什么是CLRS……
CLRS 算法导论
CLRS分别是该书四个作者的姓名的首字母
在baidu/google的时代是没有孤陋寡闻一说的....
【 在 yywbupt 的大作中提到: 】
: CLRS 算法导论
: CLRS分别是该书四个作者的姓名的首字母
: 在baidu/google的时代是没有孤陋寡闻一说的....
呵呵,谢谢了,我刚刚也搜到了……
不知道你对这道题目的看法怎样呢?能解释一下么
我想有个人讲讲会比单啃书理解起来快很多
这个命题是对的
我加上范围只是为了更严谨一点儿
CLRS指算法导论
书上讲的很详细
【 在 CS 的大作中提到: 】
: 请你解释得更详细点吧,
: 你的意思是不是说因为没有说明k的范围,所以这个命题是不成立的?
: 还有就是我孤陋寡闻,不知道什么是CLRS……
A B-tree T is a rooted tree (with root root[T]) having the following properties.
1. Every node x has the following fields:
a. n[x], the number of keys currently stored in node x,
b. the n[x] keys themselves, stored in nondecreasing order: key1[x] key2[x] keyn[x][x], and
c. leaf [x], a boolean value that is TRUE if x is a leaf and FALSE if x is an internal node.
2. If x is an internal node, it also contains n[x] + 1 pointers c1 [x], c2[x], . . . , cn[x]+1[x] to its children. Leaf nodes have no children, so their ci fields are undefined.
3. The keys keyi[x] separate the ranges of keys stored in each subtree: if ki is any key stored in the subtree with root ci[x], then
k1 key1[x] k2 key2[x] keyn[x][x] kn[x]+1 .
4. Every leaf has the same depth, which is the tree's height h.
5. There are lower and upper bounds on the number of keys a node can contain. These bounds can be expressed in terms of a fixed integer t 2 called the minimum degree of the B-tree:
a. Every node other than the root must have at least t - 1 keys. Every internal node other than the root thus has at least t children. If the tree is nonempty, the root must have at least one key.
b. Every node can contain at most 2t - 1 keys. Therefore, an internal node can have at most 2t children. We say that a node is full if it contains exactly 2t - 1 keys.
【 在 succubus 的大作中提到: 】
: 这个命题是对的
: 我加上范围只是为了更严谨一点儿
: CLRS指算法导论
: ...................
被彻底的击败了,这是北航2002年数据结构的考题,也是北航数据结构书后一道习题
答案都是D(题干说的是“不成立”!)
但是都没解释,只是简单的说表述不正确……
算法导论我下着了,谢谢succubus兄了!