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

Compound interest, Write the algorithm for compound interest

Write the algorithm for compound interest

DAA, what do we use asymptotic notation in study of algorithm?Describe vari...

what do we use asymptotic notation in study of algorithm?Describe various asymptotic notation and give their significance.

State warnock algorithm, Warnock's Algorithm An interesting approach to...

Warnock's Algorithm An interesting approach to the hidden-surface problem was presented by Warnock. His method does not try to decide exactly what is happening in the scene but

Best case, for i=1 to n if a[i}>7 for j=2 to n a[j]=a{j}+j for n=2 to n a...

for i=1 to n if a[i}>7 for j=2 to n a[j]=a{j}+j for n=2 to n a[k]=a[j]+i else if a[1]>4 && a[1] for 2 to a[1] a[j]= a{j]+5 else for 2to n a[j]=a[j]+i ..

Red-black tree after insertion, The above 3 cases are also considered conve...

The above 3 cases are also considered conversely while the parent of Z is to the right of its own parent. All the different kind of cases can be illustrated through an instance. Le

Algorithm, algorithm to search a node in linked list

algorithm to search a node in linked list

Tree traversal, Q. What do you understand by the tree traversal? Write down...

Q. What do you understand by the tree traversal? Write down the procedure for traversing a binary tree in preorder and execute it on the following tree.    Ans: Th

Multiplication, Implement multiple stacks in a single dimensional array. Wr...

Implement multiple stacks in a single dimensional array. Write algorithms for various stack operations for them.

Data Mining and Neural Networks, I am looking for some help with a data min...

I am looking for some help with a data mining class with questions that are about neural networks and decision trees. Can you help? I can send document with questions.

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