## Round-robins the easy way

The scariest thing of all is Protobowl
Cody
2008-09 Male Athlete of the Year
Posts: 2125
Joined: Sun Nov 15, 2009 12:57 am
Location: Richmond

### Round-robins the easy way

I don't think this is documented anywhere, so I'm putting it up for anyone's reference.

It's trivial to generate round-robin schedules using Excel or another spreadsheet application (Google Spreadsheet, etc.). This serves the dual purpose of ensuring accuracy (as opposed to pulling from a random site) and making sure that teams are "balanced" in rooms.

I'll refer to this spreadsheet, which should be pretty self-explanatory, for the rest of this post.

The first steps are to generate a round-robin using the pivot-method documented on Wikipedia and other places. This is easy to understand on paper and is super easy to generate in a spreadsheet.

First, divide the number of teams by 2: this is the number of rooms you need. If you have an odd number of teams, add 1 before dividing by two; the additional team will be the "BYE". To do this quickly, you'll need 2 columns per room (each column being 1 team in the match). So columns should = number of teams, with each team assigned a number 1 to {number of teams} somewhere else.

In the second column, count down from the number of teams (this including the additional team for an odd number of teams) to 2; in our case, we simply do {last team} then {last team – 1} and drag down the rest of the way. Populate the first column with 1s commensurate with the rows you needed to get to 2. This is also the number of rounds you'll need.

Copy from the column w/ number of teams through 2; distribute across columns as shown in the "9 Teams" sheet (first: diagonally right; then: diagonally left). The last room should always have the last team twice in a row, around {half teams + 1} rounds into the schedule, or so.

Now chop off everything below 1 v 2 and fill in everything about the last team (going up: 2, 3, 4…{last team – 1}) as necessary. Every number should appear once in a row and, except for 1, appear once in a column (twice in a room); if this isn't the case, you've done something wrong.

This completes generation of the schedule; now comes room balancing.

For an odd number of teams (where the last team is a bye), getting a balanced schedule for rooms is easy: switch all the "x v 10" with "1 v y". Whoever was playing 10 for a given round now has the bye. This usually goes 1, {last team - 2}, {last team - 4}, .., {last team - 1}, {last team - 3}, ... or some such discernible pattern.

For an even number of teams, you want to find switches where switching "1 v x" into a room doesn't create situation where a team is in a non-first room more than twice. These occur in pairs.

For instance, the following usually holds:
– Switch the first and last "1 v x" (i.e. 1 v {last team} and 1 v 2) rounds with the room to the right, then (for more than 4 teams):
– Switch the middle "1 v x" (i.e. 1 v {last team / 2 + 1}) with the last room, then (for more than 6 teams):
– Switch the "1 v x" above and below the middle "1 v x" with the matches two rooms to the right, then (for more than 8 teams):
– Switch the "1 v x" above and below the first/last "1 v x" with the matches three rooms to the right, then (for more than 10 teams):
– Etc.

You can see this process on the '10 Team' sheet, with switches illustrated by bolding.

The first room should have two or so teams 3 times, and the last room will only see team 1 once, but this is pretty much as room-balanced as you can get.

Lastly, you can use the concatenate function to make a table that's easily pasted into Word. (=CONCATENATE(A1, " v ", B1), for instance).

These instructions are kind of long, but it's really quite easy once you've done it once or twice.
Cody Voight, VCU ‘14. I write lots of science and am an electrical engineer.
VCU Tournament Director ‘13-‘17. HSAPQ President ‘15-16.
Hero of Socialist Quizbowl Labor (NSC ‘14). “esteemed colleague” of Snap Wexley, ca. 2016. Stats Hero (Nats ‘16).
Quizbowl at VCU

ryanrosenberg
Auron
Posts: 1188
Joined: Thu May 05, 2011 5:48 pm
Location: Chicago, Illinois

### Re: Round-robins the easy way

What would be really awesome would be to create a set of public schedules for common field sizes where all a TD would have to do is change a list of teams and rooms to the actual teams and rooms and it would auto-populate a schedule. I'll try and make a small version of what I'm envisioning later tonight.
Ryan Rosenberg
North Carolina '16 | Ardsley '12
PACE | ACF

Cody
2008-09 Male Athlete of the Year
Posts: 2125
Joined: Sun Nov 15, 2009 12:57 am
Location: Richmond

### Re: Round-robins the easy way

The Predictable Consequences wrote:What would be really awesome would be to create a set of public schedules for common field sizes where all a TD would have to do is change a list of teams and rooms to the actual teams and rooms and it would auto-populate a schedule. I'll try and make a small version of what I'm envisioning later tonight.
Matt Weiner is working on a similar project, at least with respect to schedule templates. You should have a chat with him.

I don't know how quickly such a project will be completed, however, and I found this interesting from a theoretical perspective, so I posted it as a quick reference.
Cody Voight, VCU ‘14. I write lots of science and am an electrical engineer.
VCU Tournament Director ‘13-‘17. HSAPQ President ‘15-16.
Hero of Socialist Quizbowl Labor (NSC ‘14). “esteemed colleague” of Snap Wexley, ca. 2016. Stats Hero (Nats ‘16).
Quizbowl at VCU

Skepticism and Animal Feed
Auron
Posts: 3151
Joined: Sat Oct 30, 2004 11:47 pm
Location: Arlington, VA

### Re: Round-robins the easy way

The Predictable Consequences wrote:What would be really awesome would be to create a set of public schedules for common field sizes where all a TD would have to do is change a list of teams and rooms to the actual teams and rooms and it would auto-populate a schedule. I'll try and make a small version of what I'm envisioning later tonight.
This definitely used to exist - I vaguely want to say some guy from the University of Michigan had these on his personal site?
Bruce
Harvard '10 / UChicago '07 / Roycemore School '04
ACF Member emeritus
My guide to using Wikipedia as a question source

Important Bird Area
Posts: 5363
Joined: Thu Aug 28, 2003 3:33 pm
Location: San Francisco Bay Area
Contact:

### Re: Round-robins the easy way

The Predictable Consequences wrote:What would be really awesome would be to create a set of public schedules for common field sizes where all a TD would have to do is change a list of teams and rooms to the actual teams and rooms and it would auto-populate a schedule.
This is definitely a thing that exists.
Jeff Hoppes
President, Northern California Quiz Bowl Alliance
VP for Communication and history subject editor, NAQT
Editor emeritus, ACF

"I wish to make some kind of joke about Jeff's love of birds, but I always fear he'll turn them on me Hitchcock-style." -Fred

jonpin
Forums Staff: Moderator
Posts: 1997
Joined: Wed Feb 04, 2004 6:45 pm
Location: BCA NJ / WUSTL MO / Hackensack NJ

### Re: Round-robins the easy way

Just as a couple of notes on room-balancing:

* It's impossible to room-balance a single four-team round-robin. One team will be stationary for the three rounds (In case you're wondering: After round one, two teams switch rooms, leaving two teams that haven't moved. In round three, one of the stationary teams must travel to the other team's room.)
* Just from constantly using one and constantly being annoyed at people doing it wrong, I have a balanced 6-team round-robin memorized:
1-2 3-4 5-6
4-5 6-1 2-3
1-4 3-5 6-2
2-5 4-6 1-3
3-6 5-1 2-4
Each team visits two rooms twice and one room once.
* While I think it's preferable It is not always necessary to room balance. Particularly if coaches are reading, and you wish to avoid a coach reading for their own team, you might use a schedule where a team avoids one room. But it's lazy to use the schedule where Team 1 is in the same room all the time, and Team 2 is in the second room except for that one game.
* A number of TDs just order the teams in each group 1-N, which is perfectly fine. However, you might also choose to plan so that (if seeds hold) the last round is between two unbeaten teams (1 and 2 seeds); or if 2 teams are moving on from this stage to the next one, so that the 2nd and 3rd seeds meet in the last round.
Jon Pinyan
Coach, Bergen County Academies (NJ); former player for BCA (2000-03) and WUSTL (2003-07)
HSQB forum mod, PACE member
Stat director for: NSC '13-'15; NHBB '13-'15; ACF '14, '17; NASAT '11

"A [...] wizard who controls the weather" - Jerry Vinokurov

Cold Stone Steve Austin
Wakka
Posts: 161
Joined: Sun Apr 21, 2013 6:52 pm
Location: UCLA

### Re: Round-robins the easy way

Personally, I'm just using Jonah's LaTeX schedules, and editing them to my needs. However, this requires both LaTeX software (free to download) and knowledge of the LaTeX language (which I don't have, I'm just learning as I go).

https://github.com/jonahgreenthal/qbschedule
http://latex-project.org/ftp.html
Hidehiro Anto
Menlo School '14
UCLA '18

"Those who cannot remember 'Black Magic Woman' are condemned to repeat it." - Carlos Santayana

Cody
2008-09 Male Athlete of the Year
Posts: 2125
Joined: Sun Nov 15, 2009 12:57 am
Location: Richmond

### Re: Round-robins the easy way

Hidehiro Anto wrote:Personally, I'm just using Jonah's LaTeX schedules, and editing them to my needs. However, this requires both LaTeX software (free to download) and knowledge of the LaTeX language (which I don't have, I'm just learning as I go).

https://github.com/jonahgreenthal/qbschedule
http://latex-project.org/ftp.html
I don't like these schedules for two reasons.

Primarily, and this is by far my biggest problem with them, I greatly dislike the way they look. Compare to the schedules for VCU Fall and PADAWAN, which I also did w/ LaTeX. I even prefer the look of the old Word schedules I made.

Secondarily, they don't cover nearly the formats that need to be covered. Compare the available schedules to this list I just generated. (there may be some mistakes as this was a quick effort). It's far easier to generate a schedule yourself and paste the table into Word (or convert to LaTeX using http://www.tablesgenerator.com if you're into that sort of thing).
Cody Voight, VCU ‘14. I write lots of science and am an electrical engineer.
VCU Tournament Director ‘13-‘17. HSAPQ President ‘15-16.
Hero of Socialist Quizbowl Labor (NSC ‘14). “esteemed colleague” of Snap Wexley, ca. 2016. Stats Hero (Nats ‘16).
Quizbowl at VCU

Skepticism and Animal Feed
Auron
Posts: 3151
Joined: Sat Oct 30, 2004 11:47 pm
Location: Arlington, VA

### Re: Round-robins the easy way

Also the vast majority of quizbowl will never learn or use LaTeX
Bruce
Harvard '10 / UChicago '07 / Roycemore School '04
ACF Member emeritus
My guide to using Wikipedia as a question source

cvdwightw
Auron
Posts: 3447
Joined: Tue May 13, 2003 12:46 am
Location: Southern CA
Contact:

### Re: Round-robins the easy way

Cody wrote:Secondarily, they don't cover nearly the formats that need to be covered. Compare the available schedules to this list I just generated. (there may be some mistakes as this was a quick effort). It's far easier to generate a schedule yourself and paste the table into Word (or convert to LaTeX using http://www.tablesgenerator.com if you're into that sort of thing).
This spreadsheet I made a while ago covers basically every single one of those formats you listed except the ones requiring wild-card tiebreakers, plus suggested formats for 25-36 teams given 13 non-finals non-tiebreaker packets, plus schedules for as many numbers of teams between 37 and 48 as I could figure out.

It also has room-balanced schedules for the tricky numbers (6, 10, 16).

1) Find row with appropriate number of teams and non-finals/non-tiebreaker rounds in the "Look Here First!" sheet
2) Read the information in the row
3) Copy the appropriate schedules from the other sheets to your own Excel file

You can "disguise" seeds by having a 6-team bracket seeded 1-6 but their actual "numbers" are 4, 3, 6, 5, 1, 2, for instance.

I'll work on the "auto-populate" part.
Dwight Wynne
socalquizbowl.org
UC Irvine 2008-2013; UCLA 2004-2007; Capistrano Valley High School 2000-2003

"It's a competition, but it's not a sport. On a scale, if football is a 10, then rowing would be a two. One would be Quiz Bowl." --Matt Birk on rowing, SI On Campus, 10/21/03

"If you were my teammate, I would have tossed your ass out the door so fast you'd be emitting Cerenkov radiation, but I'm not classy like Dwight." --Jerry

Cody
2008-09 Male Athlete of the Year
Posts: 2125
Joined: Sun Nov 15, 2009 12:57 am
Location: Richmond

### Re: Round-robins the easy way

cvdwightw wrote:This spreadsheet I made a while ago covers basically every single one of those formats you listed except the ones requiring wild-card tiebreakers, plus suggested formats for 25-36 teams given 13 non-finals non-tiebreaker packets, plus schedules for as many numbers of teams between 37 and 48 as I could figure out.
This is some hot stuff.
Cody Voight, VCU ‘14. I write lots of science and am an electrical engineer.
VCU Tournament Director ‘13-‘17. HSAPQ President ‘15-16.
Hero of Socialist Quizbowl Labor (NSC ‘14). “esteemed colleague” of Snap Wexley, ca. 2016. Stats Hero (Nats ‘16).
Quizbowl at VCU

ryanrosenberg
Auron
Posts: 1188
Joined: Thu May 05, 2011 5:48 pm
Location: Chicago, Illinois

### Re: Round-robins the easy way

I decided to extend the concept of "auto-filling schedule" a bit further, and made an Excel workbook for a 16 team tournament that's part schedule, part re-bracketer. Just enter the game scores in the schedule and the standings and playoff schedule will automatically update. While this won't replace other stat-keeping, it provides a quick and easy way to get printable prelim and playoff schedules. If this is something that would be useful for tournament hosts, it's not too much work to make them for other field sizes, and I could do some common ones (12, 18, 24, etc.) pretty easily.

Attachments
16 teams.xlsx
Ryan Rosenberg
North Carolina '16 | Ardsley '12
PACE | ACF

Joshua Rutsky
Tidus
Posts: 550
Joined: Mon Oct 24, 2005 9:59 am
Location: Hoover, AL

### Re: Round-robins the easy way

Ryan, can you explain a little about the Letters portion of this sheet? I think I get the idea, but I would like to be clear about it before trying it out.
Joshua Rutsky
Coach, Hoover High School, Hoover, AL
Member of the Qwiz Team!

ryanrosenberg
Auron
Posts: 1188
Joined: Thu May 05, 2011 5:48 pm
Location: Chicago, Illinois

### Re: Round-robins the easy way

"Numbers" and "Letters" are bracket names, and {Team One, Team Two,...} and {Team A, Team B,...} are the teams in the brackets. To fill out your schedule, edit the cells containing bracket names, teams, and rooms. For game results, enter them under the team name in the proper round. Below is an example of a schedule after Round 1 (the image may be a little cut off, click on it to see the full view).

Ryan Rosenberg
North Carolina '16 | Ardsley '12
PACE | ACF

Cody
2008-09 Male Athlete of the Year
Posts: 2125
Joined: Sun Nov 15, 2009 12:57 am
Location: Richmond

### Re: Round-robins the easy way

Having had occasion to use this again over the past weekend, I've compiled a round robin schedule for 3 to 12 teams onto the first sheet. The 9 team and some other sheets are left there as examples of how to generate your own. Same link.
Cody Voight, VCU ‘14. I write lots of science and am an electrical engineer.
VCU Tournament Director ‘13-‘17. HSAPQ President ‘15-16.
Hero of Socialist Quizbowl Labor (NSC ‘14). “esteemed colleague” of Snap Wexley, ca. 2016. Stats Hero (Nats ‘16).
Quizbowl at VCU

Cody
2008-09 Male Athlete of the Year
Posts: 2125
Joined: Sun Nov 15, 2009 12:57 am
Location: Richmond

### Re: Round-robins the easy way

I recently had a chance to look at creating better room balanced round robins and have created a new front sheet with a number of "perfectly" room balanced round robins. There's also a page with room balanced schedules for round robins of 13 thru 18 teams if for some reason you were running some kind of insane schedule. Same link. I've done a pretty thorough check on most of the 5-12 schedules but if you notice any errors, please let me know!

It's probably possible to improve "spread" (i.e. less occurrences of teams playing in a room 2x in a row), but I haven't looked into it at all yet.

For a round robin of n teams:
• n % 2 == 1: perfect room balance (every team plays 2 games in every room) (ex. 5, 7, 9, 11 teams)
• n % 2 == 0 and n % 3 != 1: as-perfect-as-possible room balance (every team plays 1 game in 1 room and 2 games in every other room) (ex. 6, 8, 12 teams)
• n % 2 == 0 and n % 3 == 1: room balance only possible using a balanced tournament design (BTD) or partition balanced tournament design (PBTD), which I haven't done yet (ex. 10 teams)
• n == 4: room balance not possible, 1 team has to play 3 games in 1 room; everyone else plays 2 games in 1 room and 1 game in 1 room"
Some Python code documented with the theory (all from other sources, obviously) for those interested:

Code: Select all

``````def roundRobin(teamCount):
"""Input # of teams as an integer, n. Output is the schedule as a list of lists of lists: list of n - 1 rounds (n rounds for n % 2 == 1), each of which is a list of n / 2 pairings ([n + 1] / 2 pairings for n % 2 == 1), each of which has 1 element iff bye and 2 elements iff match."""
if teamCount % 2 != 0:
bye = True
teamCount = teamCount + 1
teams = list(range(teamCount))
else:
bye = False
teams = list(range(1, teamCount+1))

halfCount = teamCount // 2
roundCount = teamCount - 1
schedule = []

for x in range(roundCount):
round = []

for y in range(halfCount):
if teams[y] == 0:
round.insert(0,[teams[teamCount-y-1]])
elif teams[teamCount-y-1] == 0:
round.insert(0,[teams[y]])
else:
"""sorted() ensures that format is smaller no. v bigger no., useful when combined with alphabetized brackets later"""
round.append(sorted([teams[y], teams[teamCount-y-1]]))

if bye:
"""fix team 0 (bye), rotate all other by one position"""
teams.insert(1, teams.pop())
elif teamCount % 3 != 1:
for y in range(halfCount-1):
"""fix team 1, rotate all others by n / 2 - 1 positions"""
teams.insert(1, teams.pop())
if x < halfCount-1:
"""for rounds 1 to n / 2 - 1, switch room 1 and room # matching round #"""
round[0], round[x+1] = round[x+1], round[0]
elif x < roundCount:
"""for rounds n / 2 to n - 1, switch room 1 and room # matching n - round #"""
round[0], round[roundCount-x-1] = round[roundCount-x-1], round[0]
else:
#give up, use my heuristic
teams.insert(1, teams.pop())
if x == 0 or x == roundCount-1:
round[0], round[1] = round[1], round[0]
if teamCount > 4:
if x == halfCount-1:
round[0], round[halfCount-1] = round[halfCount-1], round[0]
elif x == halfCount-2 or x == halfCount:
round[0], round[2] = round[2], round[0]
elif x == 1 or x == roundCount-2:
round[0], round[3] = round[3], round[0]
if teamCount > 10:
if x == halfCount-3 or x == halfCount+1:
round[0], round[4] = round[4], round[0]
elif x == 2 or x == roundCount-3:
round[0], round[5] = round[5], round[0]
elif x == halfCount-4 or x == halfCount+2:
round[0], round[6] = round[6], round[0]

schedule.append(round)

return schedule``````
Cody Voight, VCU ‘14. I write lots of science and am an electrical engineer.
VCU Tournament Director ‘13-‘17. HSAPQ President ‘15-16.
Hero of Socialist Quizbowl Labor (NSC ‘14). “esteemed colleague” of Snap Wexley, ca. 2016. Stats Hero (Nats ‘16).
Quizbowl at VCU