The tournament sort is a sorting algorithm that works by building an ordered binary tree. We represent the elements to be sorted by vertices that sill become the leaves. We build up the tree one level at a time we would construct the tree representing the winners of matches in a tournament Working left to right, we compare pairs of consecutive elements, adding a parent vertex labeled with the larger of the two elements under comparison. We make similar comparisons between labels of vertices at each level until we reach the root of the tree that is labeled with the largest element. The tree constructed by the tournament sort of , 8.14,17,3,9,27,11 is ilinstrated in part(a)ef the figure. Once the argestelementhbeendetermined. The leaf with this labelisrelabeled by -s,which is definedtobelessthanevery element The labels of all vertices on the path from this vertex up to the root of the tree are recalculated, as shown in part (b) of the figure.
This produces the second largest element This process continues until the entire list has been sorted.
20. Construct the binary tree with prefix codes representing these coding schemes.
a) a: 11, e: o, t: 101, s: 100
b) a: 1, e: 01, t: 001, s: 0001, n: 00001
c) a: 1010, e: o, t: 11, s: 1011, n: 1001, 1: 10001

Want to see the full answer?
Check out a sample textbook solution
Chapter 11 Solutions
DISCRETE MATH.+ITS APPLICATIONS CUSTOM
- Write an equation for the polynomial graphed below 5+ 4 3 1 + + + -5-4-3-2 1 13 4 5 -1 -2 -3 -4 -5+ 4 5 Q y(x) =arrow_forward1. Name the ongiewing) 2. Name five pairs of supple 3 27 and 19 form a angles 210 and 21 are complementary angies 4. m210=32 mal!= 5 mc11-72 m10= 6 m210-4x mc11=2x x= 7 m210=x m 11 =x+20; x= 12 and 213 are supplementary angles 8 ma 12 2y m13-3y-15 y= 9 m 12-y+10 m13-3y+ 10: y= 10. The measure of 212 is five times the measure of 13. Find the 213 and 214 are complementary angles, and 14 and 15 are supplementary angies 11 mc13 47 m/14- 12 m 14-78 m13- m215- m15 13 m15-135 m. 13- m.14arrow_forward3. Solve the inequality, and give your answer in interval notation. - (x − 4)³ (x + 1) ≥ 0arrow_forward
- 1. Find the formula to the polynomial at right. Show all your work. (4 points) 1- 2 3 сл 5 6 -4 -3 -2 -1 0 2 3arrow_forward2. Find the leading term (2 points): f(x) = −3x(2x − 1)²(x+3)³ -arrow_forward1- √ √ √³ e³/√xdy dx 1 cy² 2- √ √² 3 y³ exy dx dy So 3- √ √sinx y dy dx 4- Jo √² Sy² dx dyarrow_forward
- A building that is 205 feet tall casts a shadow of various lengths æ as the day goes by. An angle of elevation is formed by lines from the top and bottom of the building to the tip of the shadow, as de seen in the following figure. Find the rate of change of the angle of elevation when x 278 feet. dx Round to 3 decimal places. Γ X radians per footarrow_forwardFind The partial fraction decomposition for each The following 2× B) (x+3) a 3 6 X-3x+2x-6arrow_forward1) Find the partial feraction decomposition for each of 5- X 2 2x+x-1 The following: 3 B) 3 X + 3xarrow_forward
- Use the information in the following table to find h' (a) at the given value for a. x|f(x) g(x) f'(x) g(x) 0 0 0 4 3 1 4 4 3 0 2 7 1 2 7 3 3 1 2 9 4 0 4 5 7 h(x) = f(g(x)); a = 0 h' (0) =arrow_forwardUse the information in the following table to find h' (a) at the given value for a. x f(x) g(x) f'(x) g'(x) 0 0 3 2 1 1 0 0 2 0 2 43 22 4 3 3 2 3 1 1 4 1 2 0 4 2 h(x) = (1/(2) ²; 9(x) h' (3)= = ; a=3arrow_forwardThe position of a moving hockey puck after t seconds is s(t) = tan a. Find the velocity of the hockey puck at any time t. v(t) ===== b. Find the acceleration of the puck at any time t. -1 a (t) = (t) where s is in meters. c. Evaluate v(t) and a (t) for t = 1, 4, and 5 seconds. Round to 4 decimal places, if necessary. v (1) v (4) v (5) a (1) = = = = a (4) = a (5) = d. What conclusion can be drawn from the results in the previous part? ○ The hockey puck is decelerating/slowing down at 1, 4, and 5 seconds ○ The hockey puck has a constant velocity/speed at 1, 4, and 5 seconds ○ The hockey puck is accelerating/speeding up at 1, 4, and 5 secondsarrow_forward
- Discrete Mathematics and Its Applications ( 8th I...MathISBN:9781259676512Author:Kenneth H RosenPublisher:McGraw-Hill EducationMathematics for Elementary Teachers with Activiti...MathISBN:9780134392790Author:Beckmann, SybillaPublisher:PEARSON
- Thinking Mathematically (7th Edition)MathISBN:9780134683713Author:Robert F. BlitzerPublisher:PEARSONDiscrete Mathematics With ApplicationsMathISBN:9781337694193Author:EPP, Susanna S.Publisher:Cengage Learning,Pathways To Math Literacy (looseleaf)MathISBN:9781259985607Author:David Sobecki Professor, Brian A. MercerPublisher:McGraw-Hill Education





