Round Robin Tournament Scheduling

### teams from same venue play each other first

Guest · 7 · 12364

#### thezone

• Guest
on: April 26, 2015, 07:43:34 PM
Hi...i have an an algo that generates round robin scheduling across multiple tournaments that share a finite amount of venues (clubs).

Its working nicely to try and balance home and away matches, as well as court splitting to manage conflicts.

The issue im running is that I need teams that share the same club to be scheduled first when generating the schedule...then the rest can follow.

I was unable to do it as part of the round robin algorithm as its very difficult to force specific match-ups. (See this page for more info on the maths behind it: http://en.wikipedia.org/wiki/Round-robin_tournament#Scheduling_algorithm)

So, the other option was to create all the matches first and then go through and bring those with the same club up to the first round. However, if you do that, then you have to move matches from the first round to another round because they can't play 2 matches in the same round. This has a knock-on effect and you end up having to iterate basically through every match to find a spot for it. Throw into the mix that some tournaments have teams playing each other twice and it opens up a whole new basket of issues.

Having the tournament admin manually fix it is also not an option. I feel like that would be very difficult and take forever.

Unless I am missing something some other simple out-of-the-box way to do this?

#### Ian Wakeling

• Forum Moderator
• God Member
• Posts: 1141
Reply #1 on: April 27, 2015, 04:20:29 AM
Have you seen my spread sheet here?.  This will make schedules where pairs of teams can share venues.  If you select Home/Away, "do not randomize", and uncheck Multi-table format, then adjacent rows in the schedules should have complementary background colours, so when one team in the pair is away, the other team is home.

#### thezone

• Guest
Reply #2 on: April 27, 2015, 05:25:38 PM
thanks for the response... I was more looking for the math    this looks like it might provide some insight:
http://stackoverflow.com/questions/29890455/sorting-round-robin-matches

from what I understand, its just a matter of feed the teams with the same club into the round robin first...thoughts?

#### Ian Wakeling

• Forum Moderator
• God Member
• Posts: 1141
Reply #3 on: April 28, 2015, 03:54:33 AM
It may well be impossible to have the maximum number of teams share venues and all play together in round one, sorry I can't help there.

At least if you used the code in the spread sheet you would have a general method of constructing a schedule where at least one pair of teams can share a venue and play together in round 1.  In some instances there are two pairs of teams who can share and play in round 1, e.g. 4, 8, 12, 16, etc. teams.

I can appreciate 'the basket of issues' with your algorithm, and I can see that you might even have problems getting back to a useable schedule where everyone plays once per round.  The problems will get worse as the number of teams increases.  With algorithms like this it is often important to take measures to stop it 'getting stuck', as there can be a short sequence of changes that cause it to loop.

I would also worry about having a balanced sequence of home and away games, as if there is any travelling involved teams may not thank you for having long sequences of away games.
« Last Edit: April 28, 2015, 03:59:35 AM by Ian »

#### wbport

• Senior Member
• Posts: 129
Reply #4 on: April 28, 2015, 07:38:52 AM
You might want to check out this earlier thread.  In that 10 player/team example, in Porter-Berger, 1 and 10 can share the same home stadium since they never play at home at the same time.  Also, they play each other in the first round.  In addition, (except for 1 & 5), players whose pairing number difference is 4 (next to each other in the ribbon) will also have complementery schedules and will complete on the right end position instead of the "ghost board".  This is the link to my round robin generator.

HTH
« Last Edit: March 20, 2019, 12:14:02 AM by Richard A. DeVenezia »

#### Ian Wakeling

• Forum Moderator
• God Member
• Posts: 1141
Reply #5 on: April 29, 2015, 04:14:56 AM
It is not impossible to have 10 teams sharing 5 venues, and to have the pairs who share play together in the first round.

Here is an example that I found by modifying one of these.  There is balance in the five columns, so the games in one column could all be assigned to one referee.

Below the 10 teams are represented by the numbers 0 to 9.

`round  HA HA HA HA HA  1    89 53 42 17 06  2    07 12 56 83 49  3    61 74 30 95 28  4    52 08 97 46 13  5    34 69 81 20 75  6    15 90 67 48 32  7    73 86 01 29 54  8    62 41 93 50 78  9    04 27 85 36 19`
« Last Edit: April 29, 2015, 04:18:38 AM by Ian »

#### cblaze22

• Junior Member
• Posts: 33
Reply #6 on: November 18, 2023, 10:08:35 AM
@thezone can you provide your algorithm on how you balance home/away between venues who share multiple teams.  We are doing a league and struggling to evenly distribute home/away games between locations when some locations have a finite amount of spots and multiple teams like 6ht, 7th and 8th grade teams.