Sports League Planning Algorithm

I am creating a small volleyball website (personal interest). Appreciate the help in the game planning algorithm so that

  • It can work for any number of teams and groups. Round ronin inside each group. Therefore, if there are 6 teams in a group, this group will have a total of 15 games.
  • The game lasts 30 minutes
  • The schedule is evenly distributed, i.e. a team is not required to play sequentially
  • Each team plays at approximately equal intervals, i.e. the team must not play their first game at 8 a.m. and wait until the evening for the next two games.
  • We can plan games from 8:00 to 16:00.

6 teams is just an example. I am looking for a general algorithm that works for an arbitrary number of teams, ships and groups.

Sincerely.

+5
source share
2 answers

I'm not sure if this requires an algorithm. Since this is a round robin with a fixed number of teams and games, you can simply set up a schedule (the same on both ships).

Let me explain and say if you need anything else.

There will be 15 games, each team will play with each other so that each team plays 5 games. You can start 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

, , - 4 (2 ). . .

7,5 , 8 4 .

. . , , 3- , 4, . ( 3 3 4). , , , , , .

+1

All Articles