edited by
37,220 views
71 71 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$

6 Answers

Best answer
101 101 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
26 26 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

13 13 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
1 1 vote

start inserting from 1 to 10 in a b-tree you will end up splitting it 5 times

1st split  :while inserting 4

2nd split :while inserting 6

3rd split:while inserting 8

4th and 5th split :while inserting 10

0 0 votes
ans 3
Answer:
Position:
Show:

Related questions

74 74 votes
4 answers 4 answers
35.4k
35.4k views
Kathleen asked Sep 12, 2014
35,356 views
Which of the following are NOT true in a pipelined processor?Bypassing can handle all RAW hazardsRegister renaming can eliminate all register carried WAR hazardsControl h...
43 43 votes
3 answers 3 answers
21.0k
21.0k views
Arjun asked Nov 27, 2016
21,014 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 ...
100 100 votes
8 answers 8 answers
47.2k
47.2k views
Kathleen asked Sep 12, 2014
47,161 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 fo...
101 101 votes
4 answers 4 answers
30.3k
30.3k views
Kathleen asked Sep 12, 2014
30,261 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 $\left\{P, Q\right\}$ is the key for both schemas....