Q5. (5+5+5+15 Points) Number of Internal Nodes Let n > 2. We define M(n) to be...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Q5. (5+5+5+15 Points) Number of Internal Nodes Let n > 2. We define M(n) to be the maximum number of internal nodes that can be attained by a 2-3 tree of size n. Similarly, let µ(n) be the minimum number of internal nodes that can be attained by a 2-3 tree of size n. For instance, you should convince yourself of the values in this table: 71 2 3 4 113 5 67 8 9 3 4 4 M(n): μ(n): 1 1 3 3 3 4 4 ? REMEMBER our instruction at the beginning of this homework: you must always briefly justify how your answers, especially answers that requires a single number! (a) What is M(9) and (9) in the above table? (b) Compute M (200). (c) Compute (200). (d) Prove that M (n) ≤ n - 1 for n ≥ 2. HINT: If you look at the above table, you see that M (n) < n - 1 is true. When do you get M(n) = n - 1 in the table? Outline of an inductive Proof: Let the level profile of the 2-3 tree of height h>1 and size n > 2 be (lo, ls,... lk) where lo 1 and , - n. We must prove that lo + ls + + lr-2 + ln-1 ≤ lr-1=n-1. Use induction on h. Don't forget to work out the base case where h = 1. Q5. (5+5+5+15 Points) Number of Internal Nodes Let n > 2. We define M(n) to be the maximum number of internal nodes that can be attained by a 2-3 tree of size n. Similarly, let µ(n) be the minimum number of internal nodes that can be attained by a 2-3 tree of size n. For instance, you should convince yourself of the values in this table: 71 2 3 4 113 5 67 8 9 3 4 4 M(n): μ(n): 1 1 3 3 3 4 4 ? REMEMBER our instruction at the beginning of this homework: you must always briefly justify how your answers, especially answers that requires a single number! (a) What is M(9) and (9) in the above table? (b) Compute M (200). (c) Compute (200). (d) Prove that M (n) ≤ n - 1 for n ≥ 2. HINT: If you look at the above table, you see that M (n) < n - 1 is true. When do you get M(n) = n - 1 in the table? Outline of an inductive Proof: Let the level profile of the 2-3 tree of height h>1 and size n > 2 be (lo, ls,... lk) where lo 1 and , - n. We must prove that lo + ls + + lr-2 + ln-1 ≤ lr-1=n-1. Use induction on h. Don't forget to work out the base case where h = 1.
Expert Answer:
Answer rating: 100% (QA)
23 Trees 23 tree is a tree data structure in which every internal node nonleaf node has either one d... View the full answer
Related Book For
Algorithm Design And Applications
ISBN: 9781118335918
1st Edition
Authors: Michael T. Goodrich, Roberto Tamassia
Posted Date:
Students also viewed these programming questions
-
The following additional information is available for the Dr. Ivan and Irene Incisor family from Chapters 1-5. Ivan's grandfather died and left a portfolio of municipal bonds. In 2012, they pay Ivan...
-
Planning is one of the most important management functions in any business. A front office managers first step in planning should involve determine the departments goals. Planning also includes...
-
? Fisheries Bhd is a small listed company involves in fishing and selling fish to the public via retail outlets. The company owns a building that was acquired in early September 2014 for RM1,200,000,...
-
If someone commits an unethical act, how can he or she rationalize it to make it seem right?
-
If z = 5x 2 + y 2 and (x, y) changes from (1, 2) to (1.05, 2.1), compare the values of Dz and dz.
-
Plaintiff sought to enforce against the defendant estate a promise made by his now-deceased uncle to pay Plaintiff a sum of money if Plaintiff refrained from the use of alcohol and tobacco for a...
-
For the office layout shown in question number 2, determine the closeness desirability rating using the rating table below. Treat the hallway as if it doesnt exist (i.e., the Production and...
-
3. Assume that the web-hosting service industry is pertectly competitive and that all web-hosting service providers are identical. Also assume that web-hosting services occur at datacenters that...
-
Dwight Donovan, the president of Donovan Enterprises, is considering two investment opportunities. Because of limited resources, he will be able to invest in only one of them. Project A is to...
-
The school of thought that views trade as the interplay between power, security and technology as forces that promote national strength is called: a. Institutionalism. b. Constitutionalism. c....
-
The next dividend payment by Halestorm, Inc., will be $9.08 per share. The dividends are anticipated to maintain a growth rate of 1.31 percent forever. If the stock currently sells for $1.1 per...
-
Answer each question thoroughly using examples from the film(s) and writing(s) they reference. Please cite your sources - you may paraphrase or use quotation, but please be sure to cite if even...
-
Add the contact's cell phone number to the complex list. The list should display the contact name on the first line and Home: the number Cell: the number on the second line. 2. Find a small...
-
What are some of the biggest differences between a manager and a leader? Which do you think is the most important for an effective manager or leader? Why?
-
Activity 2 Identify the appropriate form of communication in each of the situations below Situation You have to take time off work. Invite someone to the movies Invite your boss to dinner Cancel an...
-
1. A uniform supersonic flow at Mach 2.0, with static pressure of 75 kPa and a temperature of 250 K, expands around a 10 degrees convex corner. Determine the downstream Mach number M,, pressure p, ,...
-
The swap spread is the difference between the swap rate and the equivalent-maturity Treasury bond yield. Explain why a widening swap spread may be a signal of deteriorating economic conditions. Plot...
-
Describe how to modify the MaxsubFastest algorithm so that it uses just a single loop and, instead of computing n + 1 different Mt values, it maintains just a single variable M.
-
Show that the SUBSET-SUM problem is in NP.
-
Suppose you are given a sorted set, S, of n items, stored in a binary search tree. How many different range queries can be done where both of the values, k 1 and k 2 , in the query range [k 1 , k 2 ]...
-
Briefly describe what is meant by DEI efforts.
-
Explain each of the four examples of a bona fide occupational qualification.
-
What important precedents were set by the Griggs v. Duke Power Company case? The Albemarle v. Moody case?
Study smarter with the SolutionInn App