in DS edited by
4,414 views
4 votes
4 votes

The maximum number of keys stored in a B-tree of order $m$ and depth $d$ is

  1. $m^{d +1}-1$
  2. $\frac{m^{d+1}-1}{m-1}$
  3. $(m-1)(m^{d+1}-1)$
  4. $\frac{m^d-1}{m-1}$
in DS edited by
4.4k views

2 Answers

5 votes
5 votes
Best answer

Options are wrong I think so...

m$^{(d+1)}$-1 is the ans ...

Height No.of keys
0 m-1
1 m$^1$ * (m-1)
2 m$^2$ * (m-1)
d m$^d$ * (m-1)

Sum = m-1 + m$^1$* (m-1) + m$^2$ * (m-1) ....+ m$^d$ * (m-1)

= (m-1) ( 1+ m$^2$ + m$^2$ + ... + m$^d$)

= (m-1) [ $\frac{(m^{(d+1)} -1)}{(m-1)}$ ]

= m$^{(d+1)}$ - 1

edited by

3 Comments

it is better to type answer or else you change the image orientation
2
2
I'll  type too...
0
0
@Papesh Sir,Please can there be a diagrammatic representation of the above answer?
0
0
1 vote
1 vote
B tree is order m and deapth d . so it will have blocks = (1+m+m^2 + m^3+ ................. + m^d)

which is a Geometrical progression ; So blocks will be = m^(d+1)-1/(m-1)

and in order m B tree each block will have (m-1) keys maximally .

so total no of keys possible = (m-1)*(m^(d+1)-1)
                                          --------------------------------  = (m^(d+1)-1)
                                            (m-1)

so option A is the right one but (d+1) is the power of m .
Answer:

Related questions