# Outside the Beltway

## Mathematics of Sports Scheduling

### Putting together a fair slate of games is a whole lot harder than it looks.

Fans love to complain about the scheduling gods screwing over their teams. Whether it’s back-to-back-to-back road games, facing too many teams coming off a bye week, or too many cross-country flights, it never seems fair. The NFL, for one, is trying to do something about this. It turns out, it’s harder than it looks.

Four years ago, a group of University at Buffalo researchers submitted a paper to the MIT Sloan Sports Analytics Conference, outlining a mathematical approach by which the NFL could potentially produce a materially fair and largely disparity-free schedule.

NFL executives weren’t so sure at first. Creating the annual schedule is a difficult task, and a league spokesman offered a gentle, public rebuke, noting that the researchers focused “only on fairness” while failing to consider a series of unavoidable constraints, including accommodating television partners and working around stadium limitations. But as the NFL prepares to release its 2019 schedule this week, the league and the Buffalo researchers – led by Mark Karwan, Ph.D., a professor of operations research — are now working together.

The NFL agreed to a three-year research grant in November 2018 to provide year-round method development and schedule testing. The league confirmed the agreement but did not comment further.

“This is a field I’ve worked in for 46 years, including 43 as a professor,” Karwan said by phone last week. “I’ve worked on very difficult problems that take more than 12 hours on the supercomputer to solve. And this is by far the hardest any of us have ever seen.”

ESPN, “How mathematicians are trying to make NFL schedules fairer”

At first blush, that seems absurd. It’s 32 teams playing football games 16 times each over the course of 17 weeks. How hard can it be?

Karwan calculates there are more possible NFL schedules (10 to the 300th) in a given year than there are atoms in the universe (10 to the 80th).

Well, okay. That sounds pretty hard.

The NFL has managed to create a national holiday out of the schedule release, in part because it makes the upcoming season feel imminent but also because of the anger and debate it sparks. And with the full list of constraints in hand, Karwan and his team — including one of his Ph.D. students, Zach Steever — determined it is impossible to eliminate every potential quirk or disparity. But working with a dedicated computer chained to a wall for security, on a secure internet connection in a room that requires a password to enter — “It’s like working for the Department of Defense,” Karwan said — the team is focused on lowering the number of those undesirable outcomes.

In developing the schedule, NFL assigns “penalty points” to outcomes such as three-game road trips, games between teams with disparate rest, and road trips following a Monday night road game. In their final proof of concept in 2017 before receiving the grant, Karwan and Steever took the 2016 schedule and lowered the penalty total by 20 percent.

What is the approach? It’s, in a word, complicated. Karwan and Steever suggest viewing each NFL schedule possibility as a grain of sand. Even for a powerful computer, the beach is too big to look at every grain. So the challenge is to narrow down the possibilities in a way that prompts the NFL’s computers to find better possibilities “in smarter areas of the beach,” Steever said.

Again, at first blush this seems bizarre. After all, the NFL and other sports leagues have been doing this for a very long time. They didn’t even have computers when they first started.

The first step is based in both math and reality. Before creating the schedule, the NFL identifies a small number of games — usually between 40 and 50 — to lock in. The league refers to this as “seeding.” It helps accommodate expectations from television partners for key games in certain time slots, as well as about 200 annual requests from owners who prefer their stadiums not be used in a given week because of concerts, baseball games, marathons and other potential complications.

That step is also crucial for the math, however. Establishing one game — which also means assigning a week, a time slot, a network and a stadium — eliminates many multiples of schedule possibilities.

“Without it,” Karwan said, “there are too many possibilities for any computer you would have. It would never solve.”

At that point, the NFL asks its computers to run schedule simulations until it finds one that has an acceptable penalty total. Usually that means juggling the 40 to 50 pre-seeded games. Karwan and Steever believe the key to improving the schedule is to better choose those pre-seeded games, allowing the computer to see stronger schedules that would otherwise be blocked by the initial choices through a process known as integer programming.

There’s a lot pre-baked into the NFL schedule. Every team has to play the other three teams in its division twice every regular season, once at home and once on the road. They also have to play every team from a rotating division in their conference and a rotating division in the other conference—and every other team in their division also has to play those teams. And they also play a couple of games based on the previous season’s finish, such that division champions play other division champions and division cellar dwellers play other cellar dwellers in order to facilitate parity.

As noted, those parameters actually help quite a bit, in that they eliminate a vast number of possibilities. But, obviously, they also act as rather rigid restraints that makes the “fairness” issues that started us on this odyssey harder to alleviate.

Mathematically, they believe, there are ways to identify games that will minimize the elimination of good schedules. A smarter mix of obvious major matchups with others that are friendlier to the math would, in theory, reduce the penalty totals and thus minimize the disparities in the schedule.

Even if all goes well in the coming years, only the most ardent schedule analysis will reveal the hoped-for improvements. But there are plenty of ancillary advantages from a broader sense, Steever explained.

“The hope would be that you notice it in the quality of the games,” he said. “Every team knows its opponents before the schedule comes out, but where you place them in the schedule matters. If you create a schedule that minimizes, say, long trips on short weeks or evens out the rest disparity, those kinds of things can factor into quality of the play.”
If you’re motivated enough, you will never fail to identify slights against your team — real or perceived — when the NFL schedule is released. But in the coming years, you might have to work a little harder to find them.

If it’s that hard for the NFL, which has by far the shortest schedule of the major professional leagues, imagine the challenges for the NBA, with 82 regular season games, or Major League Baseball, with 162.

FILED UNDER: Sports, , , , , , ,
James Joyner is Professor and Department Head of Security Studies at Marine Corps University's Command and Staff College. He's a former Army officer and Desert Storm veteran. Views expressed here are his own. Follow James on Twitter @DrJJoyner.

1. Kathy says:

I think what makes things really hard is the requirement to avoid long trips consecutively, or Thursday games after Monday games, things like that. Also the matter of ratings for Monday nights.

I don’t know if any reserved dates exist, save that on Thanksgiving Dallas and Detroit each host a game.

I remember when all games were on Sunday morning or afternoon, and on Monday night, plus two games on Thanksgiving. now you also have Sunday nights, more games on Thanksgiving, Thursday nights mid-season, and there was a proposal a few years back to extend the season to 18 games (knocking off two preseason games to do so).

2
2. @Kathy:

Don’t forget the Saturday regular season games in December.

2
3. Kit says:

If it’s that hard for the NFL, which has by far the shortest schedule of the major professional leagues, imagine the challenges for the NBA, with 82 regular season games, or Major League Baseball, with 162.

Disagree: the longer the season, the more all of these factors tend to balance. In a two-game season, the difference between the easiest and hardest season is extreme. In a 10,000-game season, nothing really matters.

4
4. @Kit:

Yep, this is why a single game loss is basically inconsequential in baseball while in the NFL, and in college football, it can make the difference between making a playoff berth. getting a wild card spot, or spending January and February at home.

1
5. steve says:

This is basically the traveling salesman problem, which I think every computer geek knows is a tough one to solve. According to number one son, for reasons I can never remember, this would be much easier if we ever develop real quantum computing.

Steve

6. Stormy Dragon says:

@steve:

According to number one son, for reasons I can never remember, this would be much easier if we ever develop real quantum computing.

Grover’s algorithm

7. The biggest problem with sports scheduling, of course, is that it is generally not flexible. Ideally, there would be a way to adjust a team’s schedule based on their performance, the performance of other teams. historic rivalries, and the playoff picture. That’s especially not possible in football at either the college or NFL levels and would be hard even for the NBA, NHL, or even MLB.

There is something to be said for the idea, though, when it results in one team fighting for a playoff spot facing a ridiculously easy schedule in the final weeks of the season while another team fighting for the same spot faces a far more difficult one.

8. MarkedMan says:

Some years ago (but well into the era where “everything” was done by computer) I read a long profile of the married couple who scheduled virtually all pro games, not just football. A quick search shows that Henry and Holly Stephenson lost the baseball franchise in 2004. Aside from being amazingly good at what they did, their main asset was a reputation for total neutrality.

9. MarkedMan says:

@MarkedMan: A correction to my post on the Stephensons. They scheduled baseball, basketball and soccer, and may have schedule hockey, but as near as I can tell they did the NFL schedules as demonstrations. I didn’t find any reference to them actually winning the contract. Interestingly, almost all the articles I came across only discuss MLB, and that may be because baseball Manager’s took to blaming them by name when they were having a bad season. Here’s an article from earlier in their career.

10. Andre Kenji de Sousa says:

The problem of the NFL are the divisions. Just ditch the divisions and create four random groups for each conference with the teams that went to the runoffs as seeds. It would be far more competitive. One of the reasons that the Patriots won so many Super Bowls is that AFC East is weak in general.

11. DrDaveT says:

@steve:

This is basically the traveling salesman problem

No, not really*. It’s a very different and even harder NP-Complete problem, closely related to the school timetabling problem.

*In theory, any NP-complete problem is reducible to every other NP-complete problem, but in practice the resulting algorithms are hopelessly inefficient.