Tuesday, September 1, 2009

When soccer and nerdiness combine

So it's been a while since I've posted, school started back a couple weeks ago and I've been busy settling in to a new schedule. But things are starting to normalize and hopefully I'll be posting more, especially since I even less people to discuss soccer with now that I'm not living at home.

So as you're well aware, the Champions League draw was this past Thursday. What you may not be aware of is the number of possible groups that could have been formed. When I saw the four pots from which the groups are drawn from on Wednesday night, I became so curious that, after a quick Google search to make sure no one else had already done it, I decided to calculate it myself. I figured I had a decent knowledge of statistics and my engineering brain knew I could find a solution somehow, even if it took forever. But it was a Wednesday night, I was waiting for CONCACAF Champions League games to start, and this was far more interesting than the Physics 3 homework I had been working on before the idea struck me.

This task would have been a lot easier, of course, if teams from the same country were allowed to be in the same group. Then it would have been just 4(8!), or 161280. But of course UEFA has to make it more complicated than that. My calculation doesn't take into account teams being drawn already- that would have made it way too complicated. For my purposes, I assumed all 8 teams in each pot were available for group placement.

I started out listing all four pots on the white board, with team names as well as their country. I then put each team from pot 1 in their own group. Then I went through pot 2 and wrote down the number of possible teams each pot 1 team could play. I then went through pot 3 and summed up all the possibilities from say, Barca-Lyon, Barca-Inter, et al, then I did the same premise for pot 4 to get the final number. 3,196.

An hour and half's worth of work.


Looking back on it, the easiest way to have done this would have been to write up a big recursive function in MATLAB, since that's pretty much what I did by hand on the white board, but besides the fact that I'm not that great at coding from scratch, I also never installed MATLAB on my new laptop. And of course, I could have saved myself a lot of time by just skipping the steps for pots 1 and 2 and pots 1, 2, and 3, because the final step took both of those steps into account, but whatever. It was made easier by the fact that four of the groups started out with an English team, so the calculation for one of them was the same for all four. I used the same consideration for the two Spanish teams. So really in the end, I only had to make four calculations, but I'd say overall it was worth the work.

4 comments:

  1. I do hate to toss an annoying variable into the mix, but did your calculations include other UEFA regulations, like pairing clubs from the larger countries (if I recall, they talked about splitting the draw into red and blue groups for that purpose). Do correct me if I'm wrong though!

    ReplyDelete
  2. The red and blue groups are for TV purposes. They split up teams from the same country so half of them are playing Tuesday and the other half are playing Wednesday. I split up the teams in pot 1 that way, but I didn't bother with the others. UEFA did say that the red and blue groups "don't have any effect on the draw" and really I could have just shuffled around the groups between A-H until they worked out TV-wise. The only real rule is keeping teams from the same country out of the same group.

    ReplyDelete
  3. Ah, I see now. Do love the number-crunching, though. Hope that your posts resume somewhat regularly now!

    ReplyDelete