Deletion algorithm of b-trees

Assignment Help Data Structure & Algorithms
Reference no: EM132264397

Question 1.
(a) Textbook Exercise 11.2-2 (page 261). Just write down your final result.

(b) Textbook Exercise 11.4-1 (page 277). For each method, just write down your final result.

Question 2.
Consider the AVL-tree T as shown in Fig. 1 below, where the numbers are the keys stored.
(a) Copy the tree in your write-up, and for each node v label the height of the subtree rooted at v. (We define the height of a null node to be 0 and the height of a leaf to be 1). Verify that this is indeed a valid AVL-tree.

(b) Suppose now we insert a key 19 to the tree T, and then insert another key 4 to T. For each insertion, show the resulting tree right after the insertion (i.e., before any re-balancing), and the tree after each structural change during re-balancing, as well as the final tree.

(c) Ignoring the insertions in part (b), suppose we delete the key 14 from the tree T as shown in the figure. We use the policy that when an internal node with no null child is deleted, we replace the deleted key with its successor key in the tree whenever the successor key is available. Show the tree right after the deletion (i.e., before any re-balancing), and the tree after each structural change during re-balancing, as well as the final tree.

2457_AVL tree.jpg

Figure 1: The AVL-tree for Question 2.

Question 3.

Show the results of deleting keys 18, 15, 13, in that order, from the (2,4)-tree shown in Fig. 2 below

(where the numbers shown are the keys stored), using the one-pass top-down deletion algorithm of B-trees as discussed in class and described in the Textbook pages 500-502.) Note that for both the transfer and the fusion operations in Step 3a and Step 3b, if the immediate left and right sib-lings are both available for the operation, we use the policy of always using the left sibling. For each deletion, show the tree after each structural change and the final tree, and also state the case number being applied.

(Note: 5 points for each deletion.)

146_tree.jpg

Figure 2: The (2,4)-tree for Question 3.

Question 4. Textbook Problem 11-2 (page 283, slot-size bound for chaining).

Do every part but skip part (d). However, assume the results of part (d) to do part (e), i.e., assume that some constant c > 1 exists such that Qko < 1/n3 for k0 = c lg n/ lg lg n and that Pk < 1/n2 for all k > ko (and of course k < n).

Hints:
1. You may find the following Bool's inequality (as discussed and proved in class) useful: Let Ai be an event for i = 1, 2, ...., n. Then Pr{A1 U A2 U ..... U An} ≤ ∑ni=1 Pr {Ai}.

2. For part (c), first show that Qk < 1/k!, (by arguing that (1 - 1/n)n-k < 1 and so on), and then apply Stirling's approximation on k!. You do not need to prove Stirling's approximation.

3. For part (e), observe that

E[M] = ∑nx=0 x Pr{M = x} = ∑x≤t x Pr{M = x} + ∑nx>t x Pr{M = x},

where ∑x≤t x Pr{M = x} is related to Pr{M ≤ t} and ∑nx>t x Pr{M = x} is related to Pr{M > t}, for any t  ∈ (0, n). Compare with the E[M] formula to be proved and choose a suitable value for t. Finally, use this E[M] formula and the results of part (d) as stated above to derive the O() bound for E[M].

Question  5.

Textbook Problem 18-2 (page 503, joining and splitting 2-3-4 trees).
(Notes: 4 points for (a), 6 points for (b), 10 points for (c), and 7 points for (d).)

Reference no: EM132264397

Questions Cloud

What are the ways that it can help comply with legal : What are the ways that IT can help comply with legal requirements and social responsibilities surrounding the sales of alcohol?
Identify means to remove the causes of defects : Execute the improve phase of the Six Sigma DMAIC project including the following: Identify means to remove the causes of defects.
Summarize the most impactful external opportunities : Summarize the most impactful external opportunities and threats that have recently affected MCM
Developing the policy : Name the key stakeholders you will consult when developing the policy. How will you explain the benefits of the policy to them?
Deletion algorithm of b-trees : CS6033 Design and Analysis of Algorithms - For each deletion, show the tree after each structural change and the final tree, and also state the case number
Write the new investment in 3D image techniques : Question: Write the new investment in 3D image techniques in last two years
Discuss the significance of applying evidence-based practice : Discuss the significance of applying evidence-based practice to nursing care and explain how the academic preparation of the RN-BSN nurse supports.
Commonwealth human rights and equal opportunity act : Explain how you will incorporate the following legislation into your policy: Commonwealth Human Rights and Equal Opportunity Act
Toms is a brand that has established itself as humanitarian : Toms is a brand that has established itself as humanitarian. Whether the brand takes anything away from other shoe manufacturers

Reviews

Write a Review

Data Structure & Algorithms Questions & Answers

  Implement an open hash table

In this programming assignment you will implement an open hash table and compare the performance of four hash functions using various prime table sizes.

  Use a search tree to find the solution

Explain how will use a search tree to find the solution.

  How to access virtualised applications through unicore

How to access virtualised applications through UNICORE

  Recursive tree algorithms

Write a recursive function to determine if a binary tree is a binary search tree.

  Determine the mean salary as well as the number of salaries

Determine the mean salary as well as the number of salaries.

  Currency conversion development

Currency Conversion Development

  Cloud computing assignment

WSDL service that receives a request for a stock market quote and returns the quote

  Design a gui and implement tic tac toe game in java

Design a GUI and implement Tic Tac Toe game in java

  Recursive implementation of euclids algorithm

Write a recursive implementation of Euclid's algorithm for finding the greatest common divisor (GCD) of two integers

  Data structures for a single algorithm

Data structures for a single algorithm

  Write the selection sort algorithm

Write the selection sort algorithm

  Design of sample and hold amplifiers for 100 msps by using n

The report is divided into four main parts. The introduction about sample, hold amplifier and design, bootstrap switch design followed by simulation results.

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