CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5

Threaded View

  1. #3
    Join Date
    Oct 2008
    Posts
    3

    Re: Algorithm or not

    I've attached a screenshot of my application's datagrid, taken after the round-participant arrangement ran.

    The result is based on the following/your logic

    Code:
    foreach participant p1
    {
      for each round
      {
        foreach participant p2 != p1
        {
           if(
           p2 not in current round
           p1 not in current round
           p2 and p1 have not paired yet)
           then -> make unique pair and assign it to current round.
        }
      }
    }
    As you can see, I still end up with the situation that certain participants have to wait a round or two.
    (round 6 and 7 are not in the grid because of the round limitation I've set in the code.)

    Thanks alot for sharing your thoughts on this.
    Very much appreciated!!

    P.S. Deelnemer = Participant, RondeX = RoundX
    Attached Images Attached Images
    Last edited by Julmasara; October 8th, 2008 at 07:19 AM.

Posting Permissions

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





Click Here to Expand Forum to Full Width

Featured