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.
19. Which of these codes are prefix codes?
a) a: 11, e: 00, t: 10, s: 01
b) a: o,e: l,t: ol,s: 001
c) a: 101, e: 11, t: 001, s: Oil, n: 010
d) a: 010, e: 11, t: O11,s: 1011, n: 1001, j: 10101

Want to see the full answer?
Check out a sample textbook solution
Chapter 11 Solutions
DISCRETE MATH.+ITS APPLICATIONS CUSTOM
- Fill in all the justifications to complete this formal proof, following all conventions from the textbook. 1. Ax~Q(x) 2. Ax(Q(x)vR(x)) 3. @n Premise Premise 4. | ~Q(n) 5. | Q(n)vR(n) 6. || Q(n) 7. || # 8. || R(n) 9. || R(n) 10. | R(n) 11. AxR(x)arrow_forwardFor f(x) = (x+3)² - 2 sketch f(x), f(x), f(x − 2), and f(x) — 2. State the coordi- nates of the turning point in each graph.arrow_forwardIn quadrilateral QRST, m<R=60, m<T=90, QR=RS, ST=8, TQ=8 How long is the longer diagonal of QRST? Find the ratio of RT to QS.arrow_forward
- No chatgpt pls will upvotearrow_forward4 For the function f(x) = 4e¯x, find f''(x). Then find f''(0) and f''(1).arrow_forwardLet R be field and X= R³/s Vector space over R M=(a,b,c)labic, e Rra+b= 3- <3 Show that Ms and why with proof. 1) is convexset and affine set of botost ii) is blanced set and symmetirs set of x iii) is hy per space and hyper plane ofx or hot iii) find f:MR st kerf = M 18/103 and finnd fiM→R/{0} st M= {xEX, f(t) = x, texiαER? jiii) show that Mis Maxsubspace or not and Mis a max. affine set or not.arrow_forward
- Solve the next ED: (see image)arrow_forwardWrite an equation for the polynomial graphed below. It will probably be easiest to leave your "a" value as a fraction. 8 7 + 9+ H 6 5 4 3 + 3 2 1 (-30) (-1,0) (1,0) (3,0) + -5 -4 -3 -2 2 3 4 7 2 -1 -2 3 (0,-3) f(x) = 456 -4 -5 -6+arrow_forwardWrite an equation for the polynomial graphed below 5+ 4 - 3 2 1 + + -5 4-3 -2 -1 1 2 3 4 5 -1 -2 y(x) = -3 -4 5 -5+ Qarrow_forward
- Write an equation for the polynomial graphed below 6+ 5 + -5 -4 3 y(x) = 4 3 2 1 -1 1 1 -1 -2 -3 -4 -5 2 3 4 5arrow_forwardWrite 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_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





