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

Define strictly binary tree, Define Strictly Binary Tree Strictly Bina...

Define Strictly Binary Tree Strictly Binary Tree: - If each non leaf node in binary tree has non empty left and right sub-trees , then the tree is known as a strictly binary t

Parallel implementation of the raytracer, You are supposed to do the follow...

You are supposed to do the following: Write a parallel implementation of the raytracer using pthreads. Measure and compare the execution times for (i) the sequential ver

Graph & optimal scheduling, You are given an undirected graph G = (V, E) in...

You are given an undirected graph G = (V, E) in which the edge weights are highly restricted. In particular, each edge has a positive integer weight of either {1,2,...,W}, where W

Representation of arrays, REPRESENTATION OF ARRAYS This is not uncommon...

REPRESENTATION OF ARRAYS This is not uncommon to determine a large number of programs which procedure the elements of an array in sequence. However, does it mean that the eleme

Declaring a two dimensional array, Declaring a two dimensional array   A...

Declaring a two dimensional array   A two dimensional array is declared same to the way we declare a one-dimensional array except that we state the number of elements in both di

Sequential files, In this section, we will discuss about Sequential file or...

In this section, we will discuss about Sequential file organization. Sequential files have data records stored in a particular sequence. A sequentially organized file might be stor

Explain best - fit method, Best - Fit Method: - This method obtains the sma...

Best - Fit Method: - This method obtains the smallest free block whose  size is greater than or equal to get such a block by traversing the whole free list follows.

Algorithm, write an algorithm given each students name and grade points for...

write an algorithm given each students name and grade points for six courses.find his grade point average and group students into the gpa groups 3.5

Algorithms, characteristics of a good algorithm

characteristics of a good algorithm

Construction of a binary tree , Q. Construct a binary tree whose nodes in i...

Q. Construct a binary tree whose nodes in inorder and preorder are written as follows: Inorder : 10, 15, 17, 18, 20, 25, 30, 35, 38, 40, 50 Preorder: 20, 15, 10

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