Question

please step by step

Question V (B+ Trees) (16 pts] Consider the following B+ Tree where M=4 and L=5 2000 12|17| 271D I Show the B+ Tree after eac

0 0
Add a comment Improve this question Transcribed image text
Answer #1

We have been given the values of M and L which signify that:

  • Internal Node of order M has maximum 'M' number of pointers and 'M-1' number of keys, minimum ⌈ M/2 ⌉ number of keys.
  • Leaf Node of order L has maximum 'L' number of data elements and minimum ⌈ L/2 ⌉ number of values.

Thus for M = 4 and L = 5 we have,

  • Maximum 4 pointers & 3 keys in Internal Nodes, minimum 2 pointers.
  • Maximum 5 values and minimum 3 values in Leaf Nodes.

Lets, perform deletion first:

a) Delete(29):

After deleting 29, we'll have 2 elements in leaf node which violates the rules signified in the start which says that minimum 3 elements in leaf nodes.So, we need to merge in such a scenario.

201门 20 Delete 27 2 13 <3 27 29 33 20 27 20 12 Leat Nodis 2 22 18 14 33 5 22 26 20 o me r Merge with 20 20 22 hildren Bonrow

b) Insert(6), Insert(7), Insert(8):

Insert elements one by one and whenever the above mentioned conditions get violated then move values to left or right sibling accordingly.
Given 20 20 Insert 62 23 12 27 27 212 18 27 20 1구 2 (2 20 29 22 2.9 2 2.2 14 14 33 26 19 33 2 16 19 gnsert 20 १त 23 give to g

Add a comment
Know the answer?
Add Answer to:
please step by step Question V (B+ Trees) (16 pts] Consider the following B+ Tree where...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • 2. a) Consider the following AVL Tree. 50 / 25 75 10 Insert the following values...

    2. a) Consider the following AVL Tree. 50 / 25 75 10 Insert the following values in the given AVL Tree, one after another, and show the resulting tree after each insertion. You must justify your answer by explaining the rotation operation you performed during insertion. 17 40 10 90 5 100 b) Delete the root of the resulting tree in Question 2.a. Show the resulting AVL Tree. Justify your answer by showing every step during deletion.

  • (a) On an initially empty red-black tree, perform the following operations in this order: insert(1), insert(3),...

    (a) On an initially empty red-black tree, perform the following operations in this order: insert(1), insert(3), insert(5), insert(6), insert(7), delete(1) Show all the intermediate steps of your work (b) We can get another sorting algorithm by first inserting all the keys into a red-black tree, and then performing an in-order traversal of the tree. What's the time complexity of this algorithm? (As always, use O or Θ notation.)

  • Question 4. Consider the B+ tree shown below (also shown in one of the lecture slides),...

    Question 4. Consider the B+ tree shown below (also shown in one of the lecture slides), show the resulting B+ tree index for the following operations (40 points) B+ Tree Before Inserting 8* After Inserting 8* Root ZÍ DET I 10 15 20 221 20271205-3* 3| a. When an additional record with key value = 37 is inserted into the file (after the insert of a record with key value =8 has been completed). b. when an additional record with...

  • Consider the following values for the following questions: 87, 11, 34, 45, 123, 34, 66, 107...

    Consider the following values for the following questions: 87, 11, 34, 45, 123, 34, 66, 107 10. What are the two constraints for a binary tree to be a MaxHeap tree? 11. Construct a max heap tree with all the values. List all steps. 12. Insert 99 to the above tree. List all steps. 13. Perform delete operation, what value does it give? 14. After the above delete operation, how does the tree change? List all steps Consider the following...

  • 1. [10 pts.] AVL Trees: Example Operations (a) [5 pts.] Draw the AVL tree that results...

    1. [10 pts.] AVL Trees: Example Operations (a) [5 pts.] Draw the AVL tree that results from inserting key 45 into the following AVL tree. (b) [5 pts.] Draw the AVL tree that results from deleting key 70 from the following AVL tree. NOTE: When deleting a key from an AVL tree, please follow the textbook approach of finding the node with the key using the function for standard binary search trees. If the key is in the tree and...

  • B trees java NAME CSC 236 HW #3 (B-trees & heaps) 1. Given a B-tree of...

    B trees java NAME CSC 236 HW #3 (B-trees & heaps) 1. Given a B-tree of order 5, add the elements 1, 12, 8, 2, 25, 5, 14, 28, 17, 7, 52, 16, 48, 68, 3, 26, 29, 53, 55, 45 into a B-tree in this order. Draw the diagrams to show the B-tree after each element is added. 2. Add the elements 27, 35, 23, 22, 4, 45, 21, 5, 42, 19 into a heap in this order Draw...

  • 1. Given the two binary trees below: 14 16 Write a method called swapSubtrees, which swaps all of...

    in java ..write all complete program from a- e 1. Given the two binary trees below: 14 16 Write a method called swapSubtrees, which swaps all of the left and right subtrees in the above binary trees. Add this method to the class BinaryTree and create a program to test this method for these 2 trees. Show the original trees and the resulting trees. Note: To test your algorithm, first create a binary search tree. Write a method called singleParent,...

  • please do this lab in Java in given instructions by tomorrow morning. TkA CHRI - TREE...

    please do this lab in Java in given instructions by tomorrow morning. TkA CHRI - TREE UTH A HEAPOF PRESDNS CENETH CSC 236-Lab 6 (2 programs) trees 1. Given the two binary trees below: 14 18 16) Write a method called swapSubtrees, which swaps all of the left and right subtrees in the above binary trees. Add this method to the class BinaryTree and create a program to test this method for these 2 trees. Show the original trees and...

  • NOTE:  Completing the Third Chart is the most important. This is one question with three parts. (4 pts) Is the following array-based tree a min-heap or a max-heap or not a heap at all? 85 91 S8 95 1...

    NOTE:  Completing the Third Chart is the most important. This is one question with three parts. (4 pts) Is the following array-based tree a min-heap or a max-heap or not a heap at all? 85 91 S8 95 100 92 a. Min-heap b. Max-heap c. Not a heap 5 pts) Turn the following array-based binary tree into a max-heap. Show your work step by step. (You will not need all the columns) 34 7 12 47 19 5 pts) Show...

  • Red black trees Perform insertions of the following keys, 4, 7, 12, 15, 3, 5, 14,...

    Red black trees Perform insertions of the following keys, 4, 7, 12, 15, 3, 5, 14, 18, 16, 17 (left to right) into a redblack tree, then, perform deletions of keys 3, 12, 17, under the properties as provided below. • Root propoerty: the root is black. • External propoerty: every leaf is black. • Internal propoerty: the children of a red node are black. • Depth propoerty: all the leaves have the same black depth. Note that insertions have...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT