I'm trying to calculate the best and worst position for each team in the ranking based on the weekly matches.
Suppose we have 4 teams with these position:
Pos.| Name | Pts.
1 | Team A | 12
2 | Team B | 10
3 | Team C | 8
4 | Team D | 6
And during the week there are 2 matches A vs C and B vs D
If you don't know, in soccer you can win, lose or draw. A win are 3 points, draw 1 points each, lose 0 points.
In this scenario we have 9 possible combinatiosn [3^(number of matches)].
What I want to do is calculate the best and worst position each team can get based on all combination.
Of course is fairly simple to do with 4 teams (2 matches), but in real case scenario we would have about 10 matches (59000 combinations).
I guess the best way to approach the problem is to use recursion but I can't get to a real starting point.
Any help?