Round Robin Tournament Scheduling

Schedules - You must register to Post and Download => Requests => Topic started by: cblaze22 on August 14, 2011, 08:04:06 PM

Title: Basketball Tournament Pools
Post by: cblaze22 on August 14, 2011, 08:04:06 PM
I am trying to figure out an algorithm in C# on how to generate a schedule for each pool in a basketball tournament. I figured it out for 4 teams, but 6 is where I am having trouble with.  I am trying to do a first-fit with 6 teams.

If you check out this link https://www.devenezia.com/downloads/round-robin/rounds.php and go to first fit with 6 teams, that is what I am trying to accomplish.  But on round 2 I always get 5 playing 6 again because the second game is seeing 2 and 4.
Title: Re: Basketball Tournament Pools
Post by: Richard on August 16, 2011, 04:46:37 PM
Quote
...But on round 2 I always get 5 playing 6 again because the second game is seeing 2 and 4.

Your first fit is probably going as such
1-2 3-4 5-6
1-3 2-4 5-6 at this point you have to eliminate 2-4 as a candidate because it leads to the reuse of a pair (5-6).  Back up and try the next pair after 2-4 which would be 2-5.
1-3 2-5 4-6 Voila!

The important step of backtracking is missing from your program.
Take a look at source (https://www.devenezia.com/downloads/round-robin/schedule-source.html) and musings (https://www.devenezia.com/downloads/round-robin/Schedule-musings.pdf).