I am building a small website for volleyball (personal interest). Appreciate help in algorithm for scheduling the games such that
6 teams is just an example. I am looking for a general algorithm that works for arbitrary number of teams, courts and groups.
Regards.
I'm not sure this needs an algorithm. Since it's round robin with a fixed number of teams and games, you can really just set up a schedule (same on both courts).
Let me explain and tell me if you need something more.
There will be 15 games, with each team playing each other team so each team plays 5 games. You can run the tournament by playing 5 sets of 3 games where each team plays once in each set.
Example:
1-2
3-4
5-6
1-3
2-5
4-6
3-5
1-4
2-6
1-5
2-4
3-6
4-5
1-6
2-3
The longest interval possible for any team between games is 4 slots (2 hours). No team will play two consecutive games. Just plug the team names in and go.
Total playing time is 7.5 hours which just fits within your 8am-4pm window.
Note: I just put this together quickly. It may be possible to re-order things so that the longest interval is actually 3 games, not 4 without sacrificing the no-consecutive-game rule. As it stands, only one team goes the max interval (team 3 between sets 3 and 4). If that matters, it's worth looking into, but practically speaking, I think this would be fine.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With