| солдат ( @ 2004-07-22 19:51:00 |
| Current mood: | accomplished |
| Current music: | Masada - Purple Sky |
The Google Challenge
I solved the google billboard challenge. I'm not really interested in working for google I don't think (google is way too Zaibatsu for me), but I can't resist a good challenge.
The challenge was basically to calculate the value of e and then test portions of the result for primality. It was placed on the Billboard in the Bay area:

After solving the challenge, I learned that the answer was posted to the web by a trade rag. Since the info's already out there, I figure I mightas well post the source code here so people can learn how it was solved. Right now they can just learn the answer. Google already needs to come up with a more difficult challenge and new email address, anyway.
So here's how I did it:
To solve the problem the first thing I did was calculate the value of e to 8,585th place with the program e.c. I made use of the GNU MP BigNum library to provide me with large number support. Now that I had e calculated and written to a file, I wrote a second program to test the primality of the resulting values extracted from e. This program was called primetest.c and was also written in c and made use of the gmp library. Specifically, it used the gmp function mpz_probab_prime_p with ten reps. To test for primality, the function does some trial divisions, then some Miller-Rabin probabilistic primality tests.
After I ran the primality testing program I realized that I really didn't need to calculate e out to very much precision at all. So, if you want to run the e.c program, you can reduce the precision and the value in the for loop for a faster run time. The run time right now on my PIII 600mhz with 768MB RAM is just under 6 minutes.
The answer to the challenge was 7427466391.com. When you visit the site you find another challenge that was subbosta be more difficult. However, the solution is rather simple. The numbers listed are all 10 digit values extracted from the value of e and all add up to the value 49. I spun my wheels for a bit thinking the functions where related to file positions or a common factor, but eventually figured it out a few hours later while having a Guinness at the Market Street Pub.
I wrote a third and final C program to find the next value with that property. That program was called 49.c.
...and that's how I solved the google challenge.
There's some guy, a google engineer, who used to join an IRC chat room that I used to hang out in a few years ago. He called himself eeeeeee, so I bet that's where the relation to e came from and I bet he came up with the challenge. I never asked him why he called himself eeeeeee. I haven't been to that chat room in a really long time, I wonder if it's still there.