Consider the following 2-3 tree containing data items whose keys are the names of the items:...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Consider the following 2-3 tree containing data items whose keys are the names of the items: Potion of Healing +1 Mace 2000 Blue loun Stone Blue loun Stone 20000 Leather Armor Plate Armor Leather Armor 10 Plate Armor 350 Potion of Healing 100 Vampiric Blade Vampiric Blade 12000 Draw the result of inserting the items (Potion of Growth, 300) and (Mantle of Protection, 4200), in that order. Draw the new tree after each insertion. Your answer should consist of two trees (you can show additional intermediate results if you like, but at a minimum you must show the two trees after each completed insertion). Hint Recall that once items are deleted from a 2-3 tree it is possible to have keys in the internal nodes that have no corresponding keyed item at the leaf level. This tree reflects that, for example, "Entropic Armor" is an internal node key, but there is no item with the key "Entropic Armor" at the leaf level. This normal and does not alter the deletion algorithm in any way. Just work with the keys that are there. I Consider the following 2-3 tree containing data items whose keys are the names of the items: Amulet of Health 2700 Armageddon Belt of Giant Donut Strength Armageddon Donut 12000 Dust of Deliciousness 300 Earthbound Boots Gauntlets of Arrow Catching Entropic Armor Earthbound Boots 1700 Flame Arrow 650 loun Stone Hideous Halberd 15 Kneepads of Allure loun Stone 4500 Kneepads of Allure 1400 Psionic Blader Rusty Sword Psionic Blade 9200 Rusty Sword 2 Scroll of Conjure Milk Unnatural Axe Star Razor Scroll of Conjure Milk 5 Sunblade 5000 Unnatural Axe 4200 Vorpal Blade Waffles of Shame Vorpal Blade 25000 Waffles of Shame 1 Draw the result of deleting the items (Hideous Halberd, 15), (Armageddon Donut, 12000), (Dust of Deliciousness, 300), and (Earthbound Boots, 1700) in that order. Draw the new tree after each deletion. Your answer should consist of four trees (you can show additional intermediate results if you like, but at a minimum you must show the four trees after each completed deletion). Hint Recall that once items are deleted from a 2-3 tree it is possible to have keys in the internal nodes that have no corresponding keyed item at the leaf level. This tree reflects that, for example, "Entropic Armor" is an internal node key, but there is no item with the key "Entropic Armor" at the leaf level. This normal and does not alter the deletion algorithm in any way. Just work with the keys that are there. Consider the following 2-3 tree containing data items whose keys are the names of the items: Potion of Healing +1 Mace 2000 Blue loun Stone Blue loun Stone 20000 Leather Armor Plate Armor Leather Armor 10 Plate Armor 350 Potion of Healing 100 Vampiric Blade Vampiric Blade 12000 Draw the result of inserting the items (Potion of Growth, 300) and (Mantle of Protection, 4200), in that order. Draw the new tree after each insertion. Your answer should consist of two trees (you can show additional intermediate results if you like, but at a minimum you must show the two trees after each completed insertion). Hint Recall that once items are deleted from a 2-3 tree it is possible to have keys in the internal nodes that have no corresponding keyed item at the leaf level. This tree reflects that, for example, "Entropic Armor" is an internal node key, but there is no item with the key "Entropic Armor" at the leaf level. This normal and does not alter the deletion algorithm in any way. Just work with the keys that are there. I Consider the following 2-3 tree containing data items whose keys are the names of the items: Amulet of Health 2700 Armageddon Belt of Giant Donut Strength Armageddon Donut 12000 Dust of Deliciousness 300 Earthbound Boots Gauntlets of Arrow Catching Entropic Armor Earthbound Boots 1700 Flame Arrow 650 loun Stone Hideous Halberd 15 Kneepads of Allure loun Stone 4500 Kneepads of Allure 1400 Psionic Blader Rusty Sword Psionic Blade 9200 Rusty Sword 2 Scroll of Conjure Milk Unnatural Axe Star Razor Scroll of Conjure Milk 5 Sunblade 5000 Unnatural Axe 4200 Vorpal Blade Waffles of Shame Vorpal Blade 25000 Waffles of Shame 1 Draw the result of deleting the items (Hideous Halberd, 15), (Armageddon Donut, 12000), (Dust of Deliciousness, 300), and (Earthbound Boots, 1700) in that order. Draw the new tree after each deletion. Your answer should consist of four trees (you can show additional intermediate results if you like, but at a minimum you must show the four trees after each completed deletion). Hint Recall that once items are deleted from a 2-3 tree it is possible to have keys in the internal nodes that have no corresponding keyed item at the leaf level. This tree reflects that, for example, "Entropic Armor" is an internal node key, but there is no item with the key "Entropic Armor" at the leaf level. This normal and does not alter the deletion algorithm in any way. Just work with the keys that are there.
Expert Answer:
Answer rating: 100% (QA)
Inserting Potion of Growth 300 We start by searching for the insertion point which is the leaf node that contains the largest key less than 300 In this case that node is Blue loun Stone 250 We then co... View the full answer
Related Book For
Introduction to Algorithms
ISBN: 978-0262033848
3rd edition
Authors: Thomas H. Cormen, Charles E. Leiserson, Ronald L. Rivest
Posted Date:
Students also viewed these programming questions
-
6. (a) (6%) You are given the following code. void foo (int w, int x, int y, int z) { } W = 11; x = 12; y = 13; z = Z * 2 ; int main() { int a = 1, b = 2, c = 3; foo (a, b, b, 2 * c); Suppose formal...
-
In April 1992, EuroDisney SCA opened its doors to European visitors. Located by the river Marne some 20 miles east of Paris, it was designed to be the biggest and most lavish theme park that Walt...
-
You will design and implement your own data class. The class will store data that has been read as user input from the keyboard (see Getting Input below), and provide necessary operations. As the...
-
Part A.: You are considering launching a strategic alliance with a competitor to join your separate skills to develop a new jointly owned technology. Both you and your partner have the option of...
-
The WKB approximation (see Challenge Problem 40.57) can be used to calculate the energy levels for a harmonic oscillator. In this approximation, the energy levels are the solutions to the Equation...
-
In the population of people in the United States, about 10% are left handed. After bumping elbows at lunch with several left-handed students, Simon wondered if more than 10% of students at his school...
-
Consider the air pollution and mortality data given in Table B.15. a. Is there a problem with collinearity? Discuss how you arrived at this decision. b. Perform a ridge trace on these data. c. Select...
-
Duval Ford, LLC, sold a new Ford F-250 pick-up truck to David Sweat. Before taking delivery, Sweat ordered a lift kit to be installed on the truck by a Duval subcontractor. Sweat also replaced the...
-
Case Study Read the FedEx Office Case before you begin this assignment. For this assignment, you will identify and fully analyze a minimum of three problems that the FedEx Office representative can...
-
The information listed below refers to the employees of Lemonica Company for the year ended December 31, 2016. The wages are separated into the quarters in which they were paid to the individual...
-
We will now transfer your pseudocode into a Python program. First open the Python IDLE program and create a new program called _PA2 in this Window. Add statements to the program to allow the user to...
-
How did the development of railroads impact the cattle industry?
-
Illustration 5 The following data are available for a bond Face value Coupon Rate Years to Maturity Redemption value Yield to maturity Calculate the duration and volatility of this bond? 1,000 16% 6...
-
Gojo will receive Php 12,000 per year for the next 10 years as royalty for her work on a finance book. What is the present value of her royalty income if the interest rate is 12 percent?
-
Hot Air Equipment, LLC. manufactures burners and other products for hot air balloons. Hot Air has traditionally used a plant-wide overhead rate for allocating cost to its products. Because of the...
-
This problem is a small experiment. The goal of this problem is to give students an opportunity to experimentally observe whether an insertion sort would be faster than a quicksort when an input size...
-
Why syn. generators r used for the production of electricity?
-
Using thermodynamic data from Appendix 4, calculate G at 258C for the process: 2SO 2 (g) + O 2 (g) 88n 2SO 3 (g) where all gases are at 1.00 atm pressure. Also calculate DG8 at 258C for this same...
-
Justify the O.1/ amortized time of FIB-HEAP-DECREASE-KEY as an average cost per operation by using aggregate analysis.
-
Find a feasible solution or determine that no feasible solution exists for the following system of difference constraints: X1 X2 < 4, X1 X5 < 5, X2 - X4 < -6, 1, X3 X2 < X4 X1 3, 5, X4 X3 X4 X5...
-
Suppose that each source s i in a flow network with multiple sources and sinks produces exactly p i units of flow, so that v f(s i , v)= P i. Suppose also that each sink t j consumes exactly q j...
-
A probability experiment consists of rolling a single fair die. (a) Identify the outcomes of the probability experiment. (b) Determine the sample space. (c) Define the event E = roll an even number....
-
Sophia has three tickets to a concert, but Yolanda, Michael, Kevin, and Marissa all want to go to the concert with her. To be fair, Sophia randomly selects the two people who can go with her. (a)...
-
A pair of fair dice is rolled. Fair die are die where each outcome is equally likely. (a) Compute the probability of rolling a seven. (b) Compute the probability of rolling snake eyes; that is,...
Study smarter with the SolutionInn App