4

According to Wikipedia B-tree page, Knuth's definition fifth property is "All leaves appear in the same level and carry no information.".

What does it mean that they carry no information?

Does that mean that there are no more pointers to children nodes? (kinda redundant to say that as they are the leaves no?)

In the more literal meaning I understand from it that there is actually no information there (AKA the nodes values vs. the key which is used to search) but that doesn't make sense as each key in a B-tree appear only at one node and thus must have a value associated to it or at least a pointer to the data.

Please notice that I'm not referring to a B+ tree where indeed there is an extra layer just for the data/values/information and the keys are indeed duplicated between nodes levels.

1 Answers1

1

So according to CLRS (quotations):

  • Any "satellite information" associated with a key is stored in the same node as the key
  • Leaf nodes have no children, so their ci fields [pointers to child nodes, added for clarification] are undefined
  • A common variant on a B-tree, known as a B+-tree, stores all the satellite information in the leaves and stores only keys and child pointers in the internal nodes

There was no mention about leaf nodes carrying no keys/information/etc...

So basically leaf nodes do carry keys in order to actually get the data you search for (just like all the other nodes), they just don't carry pointers to child nodes.

And why Donald Knuth wrote (according to Wikipedia and other sources) that leaf nodes "carry no information" is beyond me, maybe he was referring to a different variant of B-tree... I honestly don't know.