edited by
37,616 views
69 69 votes

The order of a leaf node in a $B^+$ - tree is the maximum number of (value, data record pointer) pairs it can hold. Given that the block size is $1K\;\text{bytes}$, data record pointer is $7\;\text{bytes}$ long, the value field is $9\;\text{bytes}$ long and a block pointer is $6 \;\text{bytes}$ long, what is the order of the leaf node?

  1. $63$
  2. $64$
  3. $67$
  4. $68$

9 Answers

Best answer
92 92 votes

The answer is option A.

$B_{p} + P(R_{p} + \text{Key} ) \leq \text{BlockSize}$

$\implies 1\times 6 + n(7 + 9) \leq 1024$

$\implies n \leq$ $63.625$.

So, $63$ is the answer.

edited by
14 14 votes

For leaf nodes order is-

n*(K+RP)+BP <= Block size

and for non-leaf nodes order is-

n*BP+(n-1)K <= Block size

Here question is about Leaf nodes so it would be

n*(K+RP)+BP <= Block size

Therefore, n*(9+7)+6 <= 1024

                  16n<=1018

                    n <= 63.6

So, n is 63. Hence option A is correct.

 

4 4 votes

For tree of order p, leaf nodes can have max p-1 keys. Hence

$(p-1)(DP + V) + BP <= Block_Size$

(p-1)16 + 6 <= 1024

p = 64

Reference: https://en.wikipedia.org/wiki/B%2B_tree#Overview

0 0 votes
The concept wrt leaf node of any b+ tree is :

a) 1 Block Pointer

b) Some search keys and respective record pointers

We assume that number of search keys be y.

Then number of record pointers will be y as well.

Now this becomes a simple maths equation as follows:

Size of 1Block Pointer+ Size of y search keys + Size of y Record Pointers <= 1024 B

6 + y(9) + y(7) <= 1024

y<=63.625

y= 63

ANSWER A 63
Answer:
Position:
Show:

Related questions

88 88 votes
16 answers 16 answers
56.2k
56.2k views
Arjun asked Jul 6, 2016
56,216 views
Consider the following segment of C-code:int j, n; j = 1; while (j <= n) j = j * 2;The number of comparisons made in the execution of the loop for any $n 0$ is:$\lceil \...
53 53 votes
9 answers 9 answers
45.4k
45.4k views
Kathleen asked Sep 21, 2014
45,387 views
The message $11001001$ is to be transmitted using the CRC polynomial $x^3 +1$ to protect it from errors. The message that should be transmitted is:$11001001000$$110010010...
50 50 votes
4 answers 4 answers
24.3k
24.3k views
Kathleen asked Sep 21, 2014
24,263 views
The following postfix expression with single digit operands is evaluated using a stack:$$8 \ 2 \ 3 \ \;\hat{}\; ∕ \ 2 \ 3 * + 5 \ 1 * -$$Note that $\;\hat{}\;$ is the ...
39 39 votes
5 answers 5 answers
27.5k
27.5k views
Kathleen asked Sep 21, 2014
27,537 views
Consider a disk pack with $16$ surfaces, $128$ tracks per surface and $256$ sectors per track. $512$ bytes of data are stored in a bit serial manner in a sector. The capa...