|XP is just a number|
Possible pairings for first knockout round of UEFA champions leagueby LanX (Chancellor)
|on Dec 21, 2012 at 17:16 UTC||Need Help??|
LanX has asked for the
wisdom of the Perl Monks concerning the following question:
The UEFA Champions League is the uber league for European club football¹, combining the best teams of different associations.
Now some conspiracy theories came up after the last drawings for the next round, because an UEFA official predicted the exact pairings at a test screening.
ATM a German news paper tried to calculate the likelihood for this to happen and said that the rules are too complicated for a mathematical approach and a computer program counted 5463 possible pairings
Now I tried the same, with the following script I counted also 5463 possible pairings.
It's the first time that I used the smart match as an in-operator in arrays, it's not the most efficient way but it clarifies the program logic
I came pretty far with pencil and paper, but the edge cases for teams from the same qualification group take too much effort...
Anyway I'm not sure that all possible combinations have the same probability to happen...
¹) association football somewhere also known as soccer