So basically Fed has to win atleast 2 RRs and Nadal has to win London undefeated.
If Nadal loses a match along the way then its fine for Roger to win just 1 RR..
I think....
Nadal has to gain 950 more points than Federer does until the end of the year to end 2009 as #1. Nadal is participating in London (where he can add a maximum 1500 points to his ranking tally) AND the Davis Cup (where he can add 50 points to his ranking tally)
Davis Cup complicates things a bit. I'll spare the details, but Nadal has to win 2 singles rubbers at the Davis Cup to earn 50 points. He is scheduled for DC action, so as long as he is scheduled for 2 singles rubbers and wins them both, he will get 50 points added after everyone else in the Top 8 has already stopped playing for the season.
Nadal can become #1 in
London
a) if Federer wins no matches in London and Nadal makes it to the final undefeated or wins the title in any way.
b)if Federer wins just 1 RR, Nadal must win the title whilst losing a maximum of 1 match in RR.
c)if Federer wins 2 RR matches but loses in the semifinals, Nadal must win London undefeated.
d)if Federer gets out of the RR stage undefeated, Fed is the year-end #1.
Davis Cup, however, changes the dynamic a bit!!
In situation a) Nadal can afford to lose 1 round robin match provided he wins both Davis Cup rubbers in December - he'll be year end #1
In situation b) Nadal can afford to lose 1 more round robin match provided he wins both Davis Cup rubbers in December- he'll be year end #1
In situation c) Nadal can afford to lose 1 round robin match as long as he wins both Davis Cup rubbers in December- he'll be year end #1
In situation d) Nadal would have to win London undefeated and both Davis Cup rubbers AND Federer would have to lose in the semifinals- Nadal will be year end #1
So, it's possible Nadal doesn't overtake Federer as #1 in London, but does it, rather, at the Davis Cup.
In this scenario, Nadal would have a very slender lead over Federer and could lose it as soon as January- where he would be defending 45 points in Doha along with Federer defending 90 points.
----------------------------------------
It would be a funny situation, however, if somehow Nadal ends up 45 points behind Federer at the end of 2009.
In that case, the usually not-important Doha tournament would become the center of a battle for #1 where the order of the Top 2 seeds at the AO will be decided.