Learning graph theory by playing football

One of the challenges in presenting maths in an accessible way is making it participatory. Engineers can allow kids to play with their robots, chemists can show them how to create patterns in petri dish, computer scientists can put VR headsets on the heads of students, what can mathematicians do?

We can play football!

At Scifest in Uppsala this year, I used football to illustrate the travelling salesman problem and to present how clubs use maths and stats. Instead of just talking and showing slides, I had the students play the game.

The set up is straightforward. I had a 10m by 15m pitch (any sized area will do). I placed out pairs of cones, as shown below:

Rules of the game. Get the ball through all the cones as many times as possible in 3 minutes.

I then explained the following rules.

  • The aim is to get the ball through all of the pairs of cones as many times as possible.
  • The only special rule is that the same player can’t pass the ball through cones twice in a row. Otherwise, normal football rules apply.
  • There are five players and they have three minutes.
  • Now go!

I worked with groups of 15 students, so while the 5 players passed the ball, the other students used two different forms of graphs to trace the play.

The other participants made passing networks and followed the path of the ball, while a crowd looked on.

The first was a trace of where the ball went.The second was a passing network. Every time a pass was made, they noted who had passed who. Examples of both of these networks from the first time the players played the game are given below.

How the ball travelled (top) and which players passed each other (bottom).

After the first three minute trial the players returned to their classmates and it was time to analyse what went on. The representations above were pretty typical of the first attempts. The ball went randomly between the cones and often two or three players were more involved than the others. They had definitely not found the shortest path around the pitch.

I asked the students to discuss this and think what they could do better the second time around. Here we saw some very nice solutions. The proposal shown here from one of the students (top) is very close to the optimal solution (below) that I worked out before hand. It even has some advantages in terms of passing angles.

Finding the shortest path was usually straightforward, after a bit of thought, but the challenge is that their are six pairs of cones and five people. The trick is to get one player to stand in the middle and pass both along the top and the bottom of the pitch. There are other solutions too, if you think a bit about it.

Once the second group of players had played, we varied what we did with the last group. If they had already come up with a very good solution we changed the setup to the one below.

A new setup. Now the middle cones are in a straight line and one of the edge cones has moved in a bit.

This proved interesting, because most groups continued to have only one player in the middle. But now the optimal strategy is to have two players in the middle who sequentially roll the ball through, before one of them moves out to the far cones. A small change in the setup, requires a completely different solution.

The mathematical problem solved by the football players is the travelling salesman problem. The ball has to take the shortest possible path through all of the cones. After we had discussed the solution and all groups had played. I showed Randy Olson’s work on the Travelling Salesman Problem using Google maps for planning a Road Trip around Europe.

The fastest Europe road trip solving the travelling salesman problem.

From football to Google mapping algorithms with just a few kicks of the ball.

I went on to show them passing networks created by Barcelona, emphasising that in the best teams, all the players are involved in play. The more structure there is to the passing network, the better the team performance.

Passing network for a Barcelona match. Thickness of connections is number of passes made.

Different people took different things away from the activity. Football players saw the maths behind what they do for the first time, some of the kids who tend to dominate social situations saw that they had been greedy with the ball to the detriment of the team, and some students who were good at maths already saw a coupling between the logic they use in school and real life.

After five intensive hours of non-stop mathematical football. Björn, my PhD student who helped me run activity, discussed what we had achieved. We didn’t think any of the participants would really have improved their maths skills through the exercise, but they hopefully experienced that they are active participants in mathematical structures, like networks and flows, all of the time. We had a lot more contact and discussions with the students than would have been the case if I had just talked and answered questions. We both found it particularly rewarding to talk to a group of young immigrants, who are learning Swedish (but spoke the language better than me, noted Björn), and thinking about their future. Many of them were interested in football and some started to think about how they might use maths. There are lots of opportunities to work in interesting jobs (in football or at Google) if you learn to reason mathematically.

It was intensive for us and for them. There was no slacking off, they had to be active the whole time, both with their brains and their feet. With so much happening, it was more difficult to give one simple message about mathematics than I might be able to give through a presentation, but that kept Björn and I on our toes.

Most of all it was a lot of fun.

Professor of Applied Mathematics. Books: The Ten Equations (2020); Outnumbered (2018); Soccermatics (2016) and Collective Animal Behavior (2010).