[RESOLVED] Data Distribution issue
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 6 of 6

Thread: [RESOLVED] Data Distribution issue

  1. #1
    Join Date
    Jan 2011
    Posts
    4

    [RESOLVED] Data Distribution issue

    I'm running a tournament and I need help evenly distributing the players. I have 9 players, 3 courts, and 5 time periods. There will be 3 players per court per time period. So, the data should/can look something like this:

    Time period||Court1||Court2||Court3
    9am||1,2,3||4,5,6||7,8,9
    9:30am||1,3,6||2,5,8||4,7,9
    10am||1,4,9||2,5,7||3,6,8
    10:30am||...||...||...
    11am||...||...||...

    A number can only be listed once per time period. No one can play in the same group of three more than once (ie group 1,2,3 can only play together in this threesome once during the tourney).

    You would think that randomizing programs would make this an easy task, but it's not. Well, it's not to me at least.

    Let me know if you have any questions!

    Thanks!

  2. #2
    Join Date
    Jun 2010
    Location
    Germany
    Posts
    2,594

    Re: Data Distribution issue

    Quote Originally Posted by wendt80 View Post
    Let me know if you have any questions!
    Could it be that you have some questions? Or why else did you write this post?

    Ah, and, anyway... Welcome to CodeGuru!
    I was thrown out of college for cheating on the metaphysics exam; I looked into the soul of the boy sitting next to me.

    This is a snakeskin jacket! And for me it's a symbol of my individuality, and my belief... in personal freedom.

  3. #3
    Join Date
    Jan 2011
    Posts
    4

    Re: Data Distribution issue

    I definitely have questions. Or rather one BIG question that I would LOVE to get answered!

  4. #4
    Join Date
    Jan 2006
    Location
    Singapore
    Posts
    6,391

    Re: Data Distribution issue

    So, what is the question? You should make an attempt first, describe what you tried, and then ask a specific question.
    C + C++ Compiler: MinGW port of GCC
    Build + Version Control System: SCons + Bazaar

    Look up a C/C++ Reference and learn How To Ask Questions The Smart Way
    Kindly rate my posts if you found them useful

  5. #5
    Join Date
    Jan 2011
    Posts
    4

    Re: Data Distribution issue

    The question is this: How can I evenly distribute these 9 players between three courts for each of the 5 time periods listed?

    All 9 players must be listed for each time period.
    Each threesome can only play together once during the tournament ( ie. if group 1,2,3 plays, then group 3,1,2 cannot be listed since they've already played together).
    Each player must play in a group with each of the other players at least once (ex: group 1,2,3, group 1,4,5, group 1,6,7, and group 1,8,9 satisfies this criteria for player 1)

    I'm not sure if the last criteria can be met with only 5 time periods available. If not, then I'll be happy with getting the closest to satifying the criteria.

    I used SAS to create a dataset listing all possible 3 player combinations for the 9 players (84 different combinations total), and then I tried randomly assigning these groups to the time period/courts grid, but I could never quite satisfy the last part of my criteria.

    Let me know if you need additional info.

    Thanks!

  6. #6
    Join Date
    Jan 2011
    Posts
    4

    Re: [RESOLVED] Data Distribution issue

    I found the answer in another forum.

Posting Permissions

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


Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center