# Africa Cup of Nations qualifying comes down to maths

The teams who will fill the 10 remaining places in the finals of the 2012 Africa Cup of Nations in Equatorial Guinea and Gabon will finally be determined this weekend.

Senegal, Ivory Coast, Botswana and - subject to a legal case - Burkina Faso are already through, alongside the co-hosts.

But whilst crucial, tense matches take place all over the continent this weekend, fans will need their calculators handy as well.

The BBC's Steve Vickers has been looking at the permutations and what it might mean for your team.

________________________________________________________

First of all, the simple part is that the winners of groups A to J qualify automatically, along with the top two teams in Group K - which has five teams.

The two remaining places are reserved for the best runners-up in groups A to J, and there will be a great deal of calculating taking place all weekend to find out who has qualified on that basis.

Most groups have four teams, except for Group F which has only three, and to level the playing field the Confederation of African Football (Caf) is using a complicated formula to determine the best runners-up.

First of all, we must determine which side is placed second, and the head-to-head record with other teams finishing on the same number of points will be used first.

Then if teams are still equal, their goal difference in the group as a whole will be considered.

For example, if Mali draw with Liberia this weekend and Cape Verde win at home to Zimbabwe, both the Eagles and the islanders would have 10 points.

But Mali have the advantage on head-to-head with Cape Verde, losing 1-0 in Praia but winning 3-0 at home, and that superior record would see them through and leave Cape Verde in second.

After we have determined the group winners, we then get to the very complicated mathematics, as in the groups that have four sides, the results between the second-placed countries and the fourth-placed sides will be erased.

So if Guinea were to finish second in Group B behind Nigeria they would lose their four points gained against the bottom-placed team - which is likely to be Madagascar.

If Nigeria are second, they would have six points taken away for this decisive final calculation, if Madagascar finish bottom.

Goals scored and conceded against the bottom-placed team will also be erased.

We will then end up with the nine runners-up in the four-team groups with their recalculated totals for points gained and goal difference.

They will be put alongside the runners-up in Group F, who will not have their results altered at all.

The totals for these 10 teams will then be compared, and only the best two will qualify for next year's finals.

Group D is the most difficult group to predict, as all four teams could finish on eight points - we are set for a nail-biting weekend!