# Thread: Help With Tournament Trees

1. Member
Join Date
Oct 2008
Posts
1
Rep Power
0

## Help With Tournament Trees

I'm having some trouble with an assignment I was given. I understand the concept of bins and all, but I'm just not sure how to apply it in this situation. Any Suggestions:

Use a tournament tree to generate sorted runs that are greater than the size of memory. Assume that the memory can hold a tournament tree with 4 elements and we have 16 elements to be input in the following order: 10, 5, 13, 9, 16, 2, 8, 14, 1, 7, 11, 3, 4, 15, 6, 12. Show the results of the sorted runs.

2. Need a few definitions beyond the statement of your assignment.
What is a a tournament tree?
What is a bin?
What are sorted runs?
How does this relate to java programming?
What code do you have for it?

3. numberOfValues = 16
memory = 4
So we can do a tournament sort on numberOfValues/memory = 4
subsets of the values array and end up with the minimum for each subset.
This gives another four values which we can sort to get the minimum value.

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•