Insertion of a key into a b-tree, Data Structure & Algorithms

Assignment Help:

Example: Insertion of a key 33 into a B-Tree (w/split)

Step 1: Search first node for key closet to 33. Key 30 was determined.

632_Insertion of a key into a B-Tree.png

Step 2: Node pointed through key 30, is searched for inserting 33. Node is split and 36 is shifted upwards.

932_Insertion of a key into a B-Tree1.png

Step 3: Key 33 is inserted among 32 and 35.

1604_Insertion of a key into a B-Tree2.png

                                      Figure: A B-tree

Deletion of key from B-tree is not impossible, but care have to be taken to make sure that the properties of b-tree are maintained if the deletion decrease the number of keys into a node below the minimum degree of tree, this violation has to be connected by combining various nodes and possibly decreasing the height if the tree. If the key contain children, the children have to be rearranged.

Example (Searching of a B - Tree for key 21)

Step 1: Search for key 21 in first node. 21 are among 20 & 30.

1068_Insertion of a key into a B-Tree3.png

Step2: Searching is conducted onto the nodes linked by 30.

1784_Insertion of a key into a B-Tree4.png

                                Figure: A B-tree


Related Discussions:- Insertion of a key into a b-tree

Stack, Explain in detail the algorithmic implementation of multiple stacks....

Explain in detail the algorithmic implementation of multiple stacks.

Write down the algorithm of quick sort, Write down the algorithm of quick s...

Write down the algorithm of quick sort. An algorithm for quick sort: void quicksort ( int a[ ], int lower, int upper ) {  int i ;  if ( upper > lower ) {   i = split ( a,

Write an algorithm to display this repeated calculation, The following form...

The following formula is used to calculate n: n = x * x/(1 - x) . Value x = 0 is used to stop algorithm. Calculation is repeated using values of x until value x = 0 is input. There

Array implementation of lists, In the array implementation of the lists, we...

In the array implementation of the lists, we will use the array to hold the entries and a separate counter to keep track of the number of positions are occupied. A structure will b

Write functions for both addition and subtraction, You will write functions...

You will write functions for both addition and subtraction of two numbers encoded in your data structure. These functions should not be hard to write. Remember how you add and subt

Algorithm, Ask question #MWhich of the following is not a characteristic of...

Ask question #MWhich of the following is not a characteristic of good algorithm? inimum 100 words accepted#

Perfect matching polytope ppm, Let G=(V,E) be a graph for which all nodes h...

Let G=(V,E) be a graph for which all nodes have degree 5 and where G is 5-edge is connected. a) Show that the vector x which is indexed by the edges E and for which xe = 1/5 for

EM13845162, Do you have a library solution for this problem?

Do you have a library solution for this problem?

Search on a heap file, Consider the file " search_2013 ". This is a text fi...

Consider the file " search_2013 ". This is a text file containingsearch key values; each entry is a particular ID (in the schema given above). You are tosimulate searching over a h

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd