Monday, July 7, 2008

Vamos Rafa..... !!!!


When is a tennis match called a classic? It is when you cannot decide whom to applaud the most - the winner or the loser. And yesterday's Wimbledon's final between Roger Federer and Rafael Nadal is right up there as an all-time classic.

I have never had such a dilemma as to whom I wish should win. Deep in my heart, I am always a die-hard Roger fan. His class and composure cannot be matched. Period. But, back in 2005 when Nadal outclassed Federer in Roland Garros semi-final, I had a feeling that Nadal will be the one who can constantly challenge and outshine Federer in years to come. My feeling fortified in their subsequent clashes - Miami, Monte Carlo and Roland Garros again. Check out this link that highlights Federer-Nadal rivalry. But when Nadal demolished Federer 6-1 6-3 6-0 in the 2008 edition of French Open, I was shocked. 6-0 against Federer, no matter what surface, is truly remarkable and exceptional. The last time Federer lost a set 6-0 was in 1999 when he was 18 and was a non-entity.

Then the big thing happened. But, many saw it coming. Bjorn Borg was one. He tipped Nadal to win 2008 Wimbledon. I believed that after 2008 French Open final. I did not want Federer to lose, especially at SW19 where he won 5 Wimbledon titles in a row. But the way Nadal played, I did not want him to lose either. Had Federer won a 6th consecutive title, he would have been the first to do so in 122 years of Wimbledon history. But destiny had other ideas. Federer's 65 grass-court victory run (40 of them at Wimbledon) finally ended. And a new run has begun. I won't term it as change of guard. Not yet. But definitely phenomenal. Beating Federer on grass, in Wimbledon, in 5 sets is phenomenal. Nadal is now on a 24-match grass-court victory streak and has won French Open and Wimbledon back to back. How many times can he repeat it?

The Federer-Nadal rivalry has only beefed up with this match. Nadal is now 545 points shy of Federer's 6600 ATP points as World No. 1. With only US Open left this year, Nadal has a very good chance to dethrone Federer (again). I don't think I will see such a match again, where every point was fiercely competed and every stroke elegantly matched. I am also happy that Federer has true competition now and that will extract the best tennis out of him. And what is more blissful than watching Federer on the flow. But if Federer is an paint brush, Nadal is a sledge hammer. If Federer is an alpine craftsman, Nadal is a gladiator. And that adds beauty to their rivalry. I look forward to many more such encounters. And before I sign off, here is congratulating Rafael Nadal for his magnificient 6-4 6-4 6-7(5) 6-7(8), 9-7 Wimbledon victory. He was leading 5-2 in the third set. From Federer perspective, only solace is - How would 6-4 6-4 6-2 have been?

Vamos Rafa........

Wednesday, July 2, 2008

Best of CAT (Common Admission Test) - 1

After a relatively refreshing hibernation, I am back to my web log to write a simple terse article, which is the beginning of a series of such articles that deal with some of the best CAT puzzles I encountered. Computational Mathematics - a domain that I am wildly passionate about, is trying to solve these puzzles in both theory and programming. I will start off with a very simple CAT problem that I encountered sometime back. It was rather interesting and deals with Number Theory, which is one of my favorite areas in Mathematics. I transitioned this logic in C++ and it was truly a good exercise.

It is to determine number of zeros in a given number's factorial. Determining the number of zeros in say, 10! is pretty straightforward. But to determine number of zeros in 100! for example is unwieldly - especially from an examination point of view.

Question: What are the number of zeros in 100!

Solution: To determine number of 0's, it is equivalent to determine how many 10's make up the number. For that 10 = 2 x 5 and (2,5) are co-prime. Hence the number of 10's in number N can be determined by N/5 + N/5^2 + N/5^3+ ..... + N/5^n, as long as N/5^n > 1. '^' stands for exponential operator.

=> 100/5 + 100/5^2
=> 20 + 4 = 24.

Answer: 24

I built this into C++ and the code is intuitive.



Click on this code image to enlarge. Also, edit your headers/libs as necessary.

I will keep posting similar problems (especially from CAT) and I believe this would be mutually beneficial.