Round Robin Tournament Scheduling

Create a "balanced" schedule for 10 players and 2 courts over 25 weeks

karyn · 3 · 520

karyn

  • Newbie
  • *
    • Posts: 0
I am trying to create a schedule for 10 tennis players over 25 weeks.

Every week, there will be 2 courts of 4 people.  Two people will have a bye each week.  

Once on the court, the 4 people will decide amongst themselves who wants to play with whom.

I would like to balance the schedule, as much as is possible with 10 people, so that no two people are on the same court together a disproportionate amount of time.  To be clear, I don't care if anyone is always playing on court 1 or mostly on court 2; I just don't want, for example, Person 1 and Person 2 being on the same court together 15 times and Person 1 and Person 8 only ever being on the same court together 3 times.

Any help would be appreciated.  I've gotten pretty close with modifying some of what I've seen here, but find myself thinking that for those with skills, it's probably a short and elegant piece of code...


Ian Wakeling

  • Forum Moderator
  • God Member
  • *****
    • Posts: 1140
I think the schedule below should work with all pairs of players meeting on court together either 6 or 7 times.

   ( 3  8  6  7) ( 5  4  2  9)   ( 1 10)
   ( 4  9  7  8) ( 1  5  3 10)   ( 2  6)
   ( 5 10  8  9) ( 2  1  4  6)   ( 3  7)
   ( 1  6  9 10) ( 3  2  5  7)   ( 4  8)
   ( 2  7 10  6) ( 4  3  1  8)   ( 5  9)

   ( 5  7  4  9) ( 8  2  6  3)   ( 1 10)
   ( 1  8  5 10) ( 9  3  7  4)   ( 2  6)
   ( 2  9  1  6) (10  4  8  5)   ( 3  7)
   ( 3 10  2  7) ( 6  5  9  1)   ( 4  8)
   ( 4  6  3  8) ( 7  1 10  2)   ( 5  9)

   ( 5  9  6  7) ( 2  3 10  4)   ( 1  8)
   ( 1 10  7  8) ( 3  4  6  5)   ( 2  9)
   ( 2  6  8  9) ( 4  5  7  1)   ( 3 10)
   ( 3  7  9 10) ( 5  1  8  2)   ( 4  6)
   ( 4  8 10  6) ( 1  2  9  3)   ( 5  7)

   ( 7  5  2  4) (10  6  3  9)   ( 1  8)
   ( 8  1  3  5) ( 6  7  4 10)   ( 2  9)
   ( 9  2  4  1) ( 7  8  5  6)   ( 3 10)
   (10  3  5  2) ( 8  9  1  7)   ( 4  6)
   ( 6  4  1  3) ( 9 10  2  8)   ( 5  7)

   ( 2  7  8  4) ( 5 10  9  3)   ( 1  6)
   ( 3  8  9  5) ( 1  6 10  4)   ( 2  7)
   ( 4  9 10  1) ( 2  7  6  5)   ( 3  8)
   ( 5 10  6  2) ( 3  8  7  1)   ( 4  9)
   ( 1  6  7  3) ( 4  9  8  2)   ( 5 10)


karyn

  • Newbie
  • *
    • Posts: 0
Ian - 

I have just wandered back to here and found your reply and solution.

I like it!  Thank you so much!

Karyn