edited by
22,640 views
51 votes
51 votes

A B-tree of order $4$ is built from scratch by $10$ successive insertions. What is the maximum number of node splitting operations that may take place?

  1. $3$
  2. $4$
  3. $5$
  4. $6$
edited by

6 Answers

Best answer
70 votes
70 votes

Total 5 splitting will occur during $10$ successive insertions

Let's take $10$ successive key values as $\{1,2,3,\ldots 10\}$ which can cause maximum possible splits.

 

 

edited by
23 votes
23 votes

Let 1 to 10 be inserted

Insertion of 123 does not cause any split

When we insert 4 split occurs

We use right bias

              2

   1              3456

Again on insertion of 6 split occurs

             2 4

  1         3        56

7 does not cause split

           2 4  

1         3          5678

8 cause  split

       2  4   6

1       3    5    7 8

Inserting 9 wont cause any split


       2  4   6

1       3    5    7 8 9

Inserting 10 causes split at leaf and non leaf node

           4

    2          6   8

1    3    5   7    9 10



So total 5 splits

10 votes
10 votes
In this ques we can splits a node with two methods which is based on chosing mid element  ,

1-Right bias (#keys in right > #keys in left or  choosing mid elem is N/2 th element ) ,then no SPLITS =5

 2-Left bias (#keys in left > #keys in left or  choosing mid elem is (N/2 +1) th element) ,then no SPLITS =3  ,where N is even.

   so, MAX # splits = 5 .

Ans is C:5
Answer:

Related questions

11.3k
views
2 answers
30 votes
Arjun asked Nov 27, 2016
11,315 views
Consider the following $\text{ER}$ diagramThe minimum number of tables needed to represent $M$, $N$, $P$, $R1$, $R2$ is Which of the following is a correct attribute set for one of ... M2, M3, P1}${M1, P1, N1, N2}${M1, P1, N1}${M1, P1}$
29.5k
views
5 answers
62 votes
Kathleen asked Sep 12, 2014
29,481 views
Consider the following relational schemes for a library database:Book (Title, Author, Catalog_no, Publisher, Year, Price) Collection(Title, Author, Catalog_no)with the ... $\text{2NF}$ only
18.6k
views
4 answers
66 votes
Kathleen asked Sep 12, 2014
18,608 views
Let R and S be two relations with the following schema$R(\underline{P,Q}, R1, R2, R3)$S(\underline{P,Q}, S1, S2)$where $ ... Only I and IIOnly I and IIIOnly I, II and IIIOnly I, III and IV
14.6k
views
5 answers
44 votes
Kathleen asked Sep 11, 2014
14,568 views
Which of the following tuple relational calculus expression(s) is/are equivalent to $\forall t \in r \left(P\left(t\right)\right)$ ... I onlyII onlyIII onlyIII and IV only