Showing posts with label uefa champions league. Show all posts
Showing posts with label uefa champions league. Show all posts

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.