0 #

Finished up summer reading. Went over Fed’s house yesterday and today for jam sessions where we worked on integrating lyrics to a tune, and we also improvised this new tune in about 5 minutes which came out really cool :)! So today, we recorded a cheap version of the new tune. Unfortunately, we didn’t have a bass guitar so I had to double as the bass player which trying to solo on the bass rhythm. In all, it was fun :)!

Why a flash resumé might not be the best idea…

2 #

laPinguina30: lol, i wish i was good at flash
laPinguina30: i’d make a flash resume
laPinguina30: and send it wherever
laPinguina30: and they’d load it up
laPinguina30: and it’d be like BAM!
laPinguina30: like that chef on tv
laPinguina30: and they’d be like
laPinguina30: wow! if we don’t all get epileptic seizures and die right now, we should admit this person!

Tags:

Case Closed: Google challenge

6 #

It’s a bit late, but I solved it nevertheless. Just last week, I was catching up on my RSS feeds after being away for so long and found that google had a challenge issued on July 12th. Supposedly, this challenge was a publicity stunt and a method to recruit the best minds in the computing field. The challenge was a cross between mathematics and computer science, and I decided to give it a try. After all, the challenge seemed fun and interesting—keeping my brain thinking.

The first clue was straightforward: “{first 10 digit prime found in consecutive digits of e }.com�
Google Billboard: {first 10 digit prime found in consecutive digits of e}.com

WARNING!!! CHALLENGE SPOILERS BELOW. IF YOU WANT A CHALLENGE BY SOLVING IT YOURSELF, DO NOT READ ON!!!

To solve this, I knew that I would have to take every 10 digit blocks of e, Euler’s constant, and test them for primality. When I find the first block of 10 digits that are prime, I would craft those numbers into a url (add the .com) and that should take me somewhere.

My first problem was finding enough digits of e. In day-to-day programming, built in constants to programming languages do not have the precision to handle or calculate e to many digits. For instance, in Java, calling Math.E results in only 15 or so decimal places, hardly enough to solve this challenge.

On the other hand, during my brief dip into the Maple math software at CMU, I learned a method to calculate e to any precision with the expression:
evalf(exp(1), [insert number of decimal places here]);
So initially, I was planning to write a program in Maple to solve the problem. However, programming in Maple was less than satisfactory. The language didn’t strike my fancy. Not wanting to work against something, I turned to alternative solutions.

I decided to try my hand at Python. Much hyped these days and used by many big names, Python has a good reputation of being easy to write and very powerful. Even Eric S. Raymond himself converted! Hm, that must be something.

After downloading Python, I looked for a way of generating the digits of e. I found the promising gmpy library, but no matter how much I searched, gmpy just didn’t seem to have a way of generating e. It could generate Pi easily however: gmpy.pi([number of decimal places here]). You’d think they would have: gmpy.e() or gmpy.exp(), but no, they don’t.

So hours of grueling work ensued until I finally found a library called real for python (I’m hosting it on this site because of its hard to find nature). Although outdated and very slow, real did what I wanted with an intuitive command: real.e([number of digits]). From here, I wrote two Python programs: PrimeCheck and Google01. PrimeCheck was an exercise for me in getting up to speed with Python. I could have used a pre-existing prime check library if I wanted to. Google01 was my attempt at solving the first google challenge:

# Solve google challenge 01
# Find first 10 digit prime from the digits of e

import real
from PrimeCheck import isPrime

digits = 1000
e = real.e(digits) #compute e to n digits
strDigitsOfE = str(e)[2:-3] #Omit first 2 “2.” and last 3 “+-2″

#Take every 10 digits and check for prime
for startDigitPlace in range(digits-10): #can’t select 10 digits from n-9th place
    #select blocks of every 10 digits and check for prime
    if isPrime(int(strDigitsOfE[startDigitPlace:startDigitPlace+10])):
        print strDigitsOfE[startDigitPlace:startDigitPlace+10],” | Position: “,startDigitPlace

Only 17 lines of code that did the trick:

7427466391 | Position: 98
7413596629 | Position: 122
6059563073 | Position: 148
...
...
4563549061 | Position: 920
0510115747 | Position: 947

The position part isn’t really necessary, but I added it in there to see if there were any patterns (hey, you never know!). The code executed quickly, and I had my answer.

Excited, I entered in the url: http://7427466391.com. The site featured a regular white page with another problem centered on the page. I felt like the Batman going after the Riddler!:

Congratulations. You’ve made it to level 2. Go to www.Linux.org and enter Bobsyouruncle as the login and the answer to this equation as the password.

f(1)= 7182818284
f(2)= 8182845904
f(3)= 8747135266
f(4)= 7427466391
f(5)= __________

Hidden inside the source code of the page was an interesting “no help here” comment. But anyway, this second part was a lot harder than the first part. Again, the question seemed straightforward. To me, it said: “Here are a few inputs and outputs of a function. Figure out f(5) or else we’ll post your biggest secret on our main page!” Okay, okay, maybe not the last part, but I had to find f(5).

Normally, when encountering a problem like this, one might try to reverse engineer the function based on its inputs and outputs. This was what I tried at first, using excel and maple to calculate best fit lines, but I did not have any success. The points plotted on a graph did resemble the top of a bell curve however. This threw me off track as I tried to best fit a gaussian plot to the points! Bad idea!

So exhausted from my failed attempts. I sought some hints using google’s own search engine. I stumbled on another page with full write ups, but since I wanted to solve this myself, I only read a small portion of the page for my hint: “all of the outputs of f() are digits of e”. Why, of course! How could I have not seen that! In my haste, I didn’t realize that the url I found was part of the outputs to f(). I made a mental note to be more careful in the future.

But then, what’s the correlation from input to output? What’s the pattern here? I tried finding the position where each output began in the digits of e and tried to discern a pattern there, but with no success. Finally, on a whim, I decided to add up the digits in each output: 49. Bingo. That’s it. So simple, yet so elusive.

From here, all the coding required was slight modifications of Google01. Essentially, I needed a function that summed the digits in a number, and instead of checking for prime, I check to see if the sum of the digits of 10-block numbers of e equaled 49. Google02 is as follows:

# Solve google challenge 02
# Sum of ten digit blocks from e that equal 49

import real

def sumOfDigits(inNumber):
    #convert to string
    strNum = str(inNumber)

    sum = 0 #sum of all digits

    for digit in strNum[:]:
        sum = sum + int(digit)

    return sum

digits = 1000
e = real.e(digits) #compute e to n digits
strDigitsOfE = str(e)[2:-3] #Omit first 2 “2.” and last 3 “+-2″

#Take every 10 digits and check for sum of 49
for startDigitPlace in range(digits-10): #can’t select 10 digits from n-9th place
    #select blocks of every 10 digits and check for sum of 49
    if (sumOfDigits(int(strDigitsOfE[startDigitPlace:startDigitPlace+10]))==49):
        print strDigitsOfE[startDigitPlace:startDigitPlace+10],” | Position: “,startDigitPlace

Around 31 lines this time. Not too bad. The output:


7182818284 | Position: 0
8182845904 | Position: 4
8747135266 | Position: 22
7427466391 | Position: 98
5966290435 | Position: 126
2952605956 | Position: 144
...
...
5209618369 | Position: 880
6965521267 | Position: 974

The first four outputs corresponded with the givens in part 2. Now, I had f(5) which equals 5966290435. Coolness. A quick trip to Linux.org entering in the login information dropped me at the end of the Google challenge–a recruiting page. Darn. I wanted to do more!

And thus, my google journey end. I hope you tried the challenge.

Tags:

Adventures of a plural form

0 #

I managed to piece together snippets of comments that constitute the mystery of why my alias is plural (which is a good question!).

Initiator:
[Penguin]
blahblah… mikeXstudio. Because you know what? I just realized he’s not plural!! =P

[Dave]
She’s right mike. You’re not plural.
Yet.
[Penguin]
Unless my sensors are off, that “yet� was distinctly ominous.
What will we do with multiple Mikes?
Now I’m scared.
[Dave]
Nefarious, if I am not mistaken.
What will we do with multiple mikes? Merge their brains and apply them to world conquest, using their empty shells as undead soldiers for our massive horde, of course.
In case you didn’t realize, George Wang has taken over my brain using tubules.
[Mike]
Ah, that explains it.

The final word……………..
[Mike]
I am plural! Back when I was a little kid, I ran into a mathamagician who multiplied me by X. I think. Therefore, I am plural.

Ta-da! There you go. That’s why I’m plural.

Yay for Penguin changing Mike’s lazy < and > into [ and ]. Your source doesn’t view. You’re welcome, Mike.

Tags:

Distributed Stream Information Propagation for End System Multicast

0 #

This was the research paper Andrew McGuier and I completed at Carnegie Mellon University as part of the Pennsylvania Governor’s School for the Sciences. This project was conducted under Dr. Jibin Zhan and the ESM research group. In addition to the research paper, a presentation was given at the end of the 5-week program at the PGSS Symposium.

Abstract:

Whereas traditional broadcasting solutions suffer from the high costs of high-end centralized servers and high bandwidth dedicated internet connections, new broadcasting solutions utilizes multicasting technology for more efficient data routing and load distribution. End System Multicast (ESM) is an implementation of the multicast specifications on the end system level and provides a cost-effective method of high quality real-time internet broadcasting with the network load distributed among peers participating on the system. The proposed extension to the ESM system, eXsm, provides a decentralized method of locating broadcast stream information and also includes the use of XML to encapsulate stream information. eXsm is demonstrated by a client written in the Java programming language utilizing the decentralized Gnutella network. In addition, client design decisions and challenges will be discussed.

Easily succumbing to greater forces of good…

0 #

[11:28] Santa’s Lil Helper… All you Georgians better watch out ;): somehow i think i may not be able to [procrastinate] here
[11:28] mikeXstudios: just think of all of the good books to read!
[11:29] mikeXstudios: and all of the good movies to watch!
[11:29] mikeXstudios: and all of the good music to listen to!
[11:29] Santa’s Lil Helper… All you Georgians better watch out ;): YAY!

I can’t believe she still believed it…

0 #

At SHARP one day, Angel and I told Liz that we accidently melted down this $10,000 Lithium Niobate crystal that was used in holographic data storage….it turns out that she actually believed it! Wow!

[11:41] Santa’s Lil Helper… All you Georgians better watch out ;): did he ever figure out you guys destroyed the crystal?
[11:41] mikeXstudios: lolol
[11:41] mikeXstudios: are you being serious?
[11:42] Santa’s Lil Helper… All you Georgians better watch out ;): i thought you guys melted down a crystal
[11:42] Santa’s Lil Helper… All you Georgians better watch out ;): was angel lying to me?
[11:42] mikeXstudios: jejejeje
[11:42] mikeXstudios: aw man, that’s priceless!
[11:42] Santa’s Lil Helper… All you Georgians better watch out ;): was he!
[11:42] Santa’s Lil Helper… All you Georgians better watch out ;): gasp!
[11:42] mikeXstudios: I can’t believe you’re still falling for that joke!
[11:42] Santa’s Lil Helper… All you Georgians better watch out ;): oh my gosh!
[11:42] mikeXstudios: lololol
[11:42] Santa’s Lil Helper… All you Georgians better watch out ;): it was a joke!
[11:42] mikeXstudios: wow, that didn’t think you were *that* gullible!

Tags:

Back! But not in Black!

0 #

Yeah, yeah, yeah, I know, it’s kind of late. It’s Tuesday so I’ve been back for two days (I arrived late Saturday so I’m not counting that as a day). It feels good to be back home, but of course, I’ll probably be tired of staying home again quite soon. Anywho, I’m alive, and I will be a busy kid.