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.
26.
a) Use Huan coding to encode these symbols with frequencies a: 04, b: 0.2, C: 0.2, d 0.1, e: 0.1 in two different ways by breaking ties inthe aorithmdifferenUy, First. among the trees of minimum weight select two trees with the largest ntunberof vertices to
combineateachstageoftheaorithni Second, amongthe trees of mmimmweightselectreeswiththesmaflestnumberof
vertices at each stage.
b) Compute the average number of bits required to encode a symbol with each code and compute the variances of this number of bits for each code. Which tie-breaking procedure produced the smaller variance in the number of bits required to encode a symbol?
![Check Mark](/static/check-mark.png)
Want to see the full answer?
Check out a sample textbook solution![Blurred answer](/static/blurred-answer.jpg)
Chapter 11 Solutions
Discrete Mathematics and Its Applications
- Female Male Totals Less than High School Diploma 0.077 0.110 0.187 High School Diploma 0.154 0.201 0.355 Some College/University 0.141 0.129 0.270 College/University Graduate 0.092 0.096 0.188 Totals 0.464 0.536 1.000arrow_forwardUse Euler's method to numerically integrate dy dx -2x+12x² - 20x +8.5 from x=0 to x=4 with a step size of 0.5. The initial condition at x=0 is y=1. Recall that the exact solution is given by y = -0.5x+4x³- 10x² + 8.5x+1arrow_forwardFind an equation of the line tangent to the graph of f(x) = (5x-9)(x+4) at (2,6).arrow_forward
- Find the point on the graph of the given function at which the slope of the tangent line is the given slope. 2 f(x)=8x²+4x-7; slope of the tangent line = -3arrow_forwardUse the product rule to find the derivative of the following. p(y) (y¹ + y²) (6y¯³-10y¯4)arrow_forwardWhat is the area of this figure? 22 mm 5 mm 3 mm 3 mm 7 mm 4 mm Write your answer using decimals. Use 3.14 for л. Submit square millimetersarrow_forward
- Suppose you know that Bob's test score is above the mean, but he doesn't remember by how much. At least how many students must score lower than Bob?arrow_forwardIf 0 = 0 = 10元 3 10元 then find exact values for the following. If the trigonometric function is undefined fo enter DNE. > 3 sec(0) equals csc(0) equals tan(0) equals cot (0) equals من Question Help: Video B من B Submit Question Jump to Answerarrow_forwardplease dont use chat gptarrow_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
![Text book image](https://www.bartleby.com/isbn_cover_images/9781259676512/9781259676512_smallCoverImage.jpg)
![Text book image](https://www.bartleby.com/isbn_cover_images/9780134392790/9780134392790_smallCoverImage.gif)
![Text book image](https://www.bartleby.com/isbn_cover_images/9781938168024/9781938168024_smallCoverImage.jpg)
![Text book image](https://www.bartleby.com/isbn_cover_images/9780134683713/9780134683713_smallCoverImage.gif)
![Text book image](https://www.bartleby.com/isbn_cover_images/9781337694193/9781337694193_smallCoverImage.jpg)
![Text book image](https://www.bartleby.com/isbn_cover_images/9781259985607/9781259985607_smallCoverImage.gif)