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.
18. Show that the tournament sort requires (3(n log n) comparisons to sort a list of n elements. [Hint: By iierting the appropriate number of dummy elements defined to be smaller than all integers, such as -z, assume that n = 2k for some positive integer k.]
![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 MATH
- Question 4 Calculate the Moment about the point D in Nx m B 500 N A 2 m 300 N 10 E 1.2 m 0.5 m D 0.8 m 200 N Carrow_forwardQuestion 6 Calculate the Moment about the point C in Nx m B A 2 m 500 N 1.2 m 0.8 m 300 N C 7arrow_forwardQuestion 2 Calculate the Moment about the point A in Nx m B 500 N A 2 m 300 N 10 E 1.2 m 0.5 m D 0.8 m 200 N Carrow_forward
- Question 3 Calculate the Moment about the point B in Nxm A 300 N 2 m 500 N 4 B с 0.8 m 1.2 marrow_forwardQuestion 5 Calculate the Moment about the point B in Nx m B 500 N A 2 m 1.2 m 0.8 m 300 N 7arrow_forwardQuestion 1 Calculate the Moment about the point A in Nx m A 300 N 2 m 500 N 4 B C 0.8 m 1.2 marrow_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)