Show the resulting tree right after the insertion

Assignment Help Data Structure & Algorithms
Reference no: EM132291009

Design and Analysis of Algorithms Assignment Questions -

Q1. 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.

2092_figure.png

Q2. 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.

278_figure1.png

Attachment:- Assignment File.rar

Reference no: EM132291009

Questions Cloud

About the customer service desk from your interview : What you learned about the Customer Service Desk from your interview.
Different with external communications initiative : How might the metrics be similar or different with an external communications initiative?
Business contact information-social media presence : Business Contact Information, e.g. phone, email address or biography. Social Media Presence, e.g. Facebook, Twitter or Instagram
Penetration testing on ecommerce website : MN623 Cybersecurity and Analytics - Melbourne institute of technology - Penetration Testing Project for eCommerce Website - Learning Outcome
Show the resulting tree right after the insertion : CS6033 Design and Analysis of Algorithms Assignment Questions, New York University, USA. Show the resulting tree right after the insertion
Discuss at least one opposition or barrier : Discuss at least one opposition or barrier they may come across with each proposed action plan. Each action plan must include an evidence based in-text citation
Design benefits packages that their employees will value : What, if any, are the implications for organizations as they try to design benefits packages that their employees will value?
How you intend to use the resources : Clearly and thoroughly explain in detail how you intend to use these resources, and how they might benefit you academically and professionally.
Current-account deficit grew : The US current-account deficit grew rapidly from 1980 to 2005. Then it stopped growing from 2005 to 2017. What is/are the possible reason(s)?

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