3 votes 3 votes Let T be a B-tree of order m and height h. if n is the number of key elements in T then the maximum value of n is ? I'm getting $m^{h+1}-1$, Am I correct? Databases b-tree databases + – Aghori asked Dec 4, 2016 Aghori 8.4k views answer comment Share Follow See all 2 Comments See all 2 2 Comments reply santhoshdevulapally commented Dec 4, 2016 reply Follow Share yes.same as like binary tree with order 2($2^{(h+1)-1}$) here it is 3 1 votes 1 votes amit srivastava commented Dec 6, 2016 reply Follow Share [m^(h+1)-1]/m-1 0 votes 0 votes Please log in or register to add a comment.
1 votes 1 votes Root(height 1) -- 1 nodes m pointer m-1 keys (height 2) -- m nodes m*m pointer m*(m-1) . . . (height h) -- m(h-1) nodes mh pointer mh*(m-1) total keys = (m-1) + m*(m-1) + m*m(m-1) +....+ mh*(m-1) = (m-1){ 1 + m + m2 + m3 +.... mh} = mh-1 Arnab Bhadra answered May 30, 2017 Arnab Bhadra comment Share Follow See 1 comment See all 1 1 comment reply akshat sharma commented Jan 2, 2018 reply Follow Share Maximum Nodes in B/B+ tree=1+m+m^2... = (mh+1 -1)/m-1 Maximum keys in B tree =mh+1 -1 Maximum keys in B+ tree =mh *(m-1) 2 votes 2 votes Please log in or register to add a comment.
0 votes 0 votes yes u r right RAJESHWAR YADAV answered Dec 4, 2016 RAJESHWAR YADAV comment Share Follow See all 0 reply Please log in or register to add a comment.
0 votes 0 votes [m^(h+1)-1]/m-1 amit srivastava answered Dec 6, 2016 amit srivastava comment Share Follow See all 3 Comments See all 3 3 Comments reply santhoshdevulapally commented Dec 7, 2016 reply Follow Share u r wrong,take some example like m=3 and h=2 then max no of keys in a B-tree is 26 but not 13. 0 votes 0 votes amit srivastava commented Dec 16, 2016 reply Follow Share yeah, I didnt notice that its asking for keys and not blockptr .. 0 votes 0 votes Learner_jai commented Dec 30, 2016 reply Follow Share (2m^(h+1) )-1 if u found anything invalid ,please update me too Explanation: order=m maximum no of child in each node=2m maximum no of keys in each node=2m-1 height=0 key=2m-1 child=2m height1= total no of key=2m(2m-1) height =3 keys=2m(2m(2m(2m-1))) height h=(2m)^h*(2m-1) it is forming GP 2m-1(1+2m+2m^2+......2m^(h)) =2m^(h+1)-1 0 votes 0 votes Please log in or register to add a comment.