Results 1 to 3 of 3
  1. #1
    wiggsfly is offline Member
    Join Date
    Oct 2008
    Posts
    1
    Rep Power
    0

    Question 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. #2
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    17,562
    Rep Power
    25

    Default

    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. #3
    hardwired's Avatar
    hardwired is offline Senior Member
    Join Date
    Jul 2007
    Posts
    1,576
    Rep Power
    9

    Default

    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.

Similar Threads

  1. Eclipse with VERY LARGE source trees
    By wyrickre in forum Eclipse
    Replies: 0
    Last Post: 02-01-2008, 02:23 AM
  2. ElegantJ Trees Bean 1.1
    By JavaBean in forum Java Software
    Replies: 0
    Last Post: 07-06-2007, 02:59 PM

Posting Permissions

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