Jul 5, 2007

Something borrowed

I had an assignment which I had to complete in 24 hours time. I was supposed to write a program which generates prime numbers upto a high value say 50000. And I had to do it efficiently. Which meant I had to show mine was efficient by comparing it with another primitive primality algorithm. I googled "primality" for any algorithms that could be useful for my undertaking. I clicked on a site from the list of hits it returned. I clicked on a particular one which had a "blogspot" word in it. Instead of an algorithm this is what I got. Made my head much clearer and my stomach hurt and my eyes water.(Exaggeration thaan! Blogger's licence!).

# Mathematician: 3 is a prime, 5 is a prime, 7 is a
prime, and by induction - every odd integer higher than 2 is a prime.
# Physicist: 3 is a prime, 5 is a prime, 7 is a prime,
9 is an experimental error, 11 is a prime,...
# Engineer: 3 is a prime, 5 is a prime, 7 is a prime,
9 is a approximately prime, ...
# Programmer: 3 is a prime, 5 is a prime, 7 is a prime,
7 is a prime, 7 is a prime,...
# Salesperson: 3 is a prime, 5 is a prime, 7 is a prime,
9 -- we'll do for you the best we can,...
# Computer Software Salesperson: 3 is prime, 5 is prime,
7 is prime, 9 will be prime in the next release,...
# Biologist: 3 is a prime, 5 is a prime, 7 is a prime,
9 -- results have not arrived yet,...
# Advertiser: 3 is a prime, 5 is a prime, 7 is a prime,
11 is a prime,...
# Lawyer: 3 is a prime, 5 is a prime, 7 is a prime,
9 -- there is not enough evidence to prove that it is not a prime,...
# Accountant: 3 is prime, 5 is prime, 7 is prime, 9
is prime, deducing 10% tax and 5% other obligations.
# Statistician: Let's try several randomly chosen
numbers: 17 is a prime, 23 is a prime, 11 is a prime...
# Professor: 3 is prime, 5 is prime, 7 is prime, and
the rest are left as an exercise for the student,
# Computational linguist: 3 is an odd prime, 5
is an odd prime, 7 is an odd prime, 9 is a very odd prime,...
# Psychologist: 3 is a prime, 5 is a prime, 7 is
a prime, 9 is a prime but tries to suppress it,...
# Politician: 3 is a prime, 5 is a prime, 7 is
a prime, I can neither confirm or deny that 9 is a prime,
# Football player: what the fuck is a prime??
# Manager: 3 is a prime, 5 is a prime, 7 is a
prime, Bob will show that nine is a prime,
# Program Manager: 3 is a prime, 5 is a prime, 7
is a prime, the schedule shows that nine is overdue to be prime, 11 is a prime, ...
# Consultant: 3 is a prime, 5 is a prime, 7 is a
prime, and 9? Is it prime to you?,
# Pastor: 3 is a prime, 5 is a prime, 7 is a prime,
were praying for 9, 11 is a prime,
# Patent agent: the sequence is intellectual property
and cannot be disclosed
# Venture Capitalist: 3 is a prime, 5 is a prime,
7 is a prime, how much do you want for 9?, ...

In the end I finished the program. You know what? I'm seriously thinking of turning in this along with my code. Thanks to the one who had the sense to blog this!---> CLICK ME

Kapwing!!

P.s : A prime is a number divisible by only 1 and itself

P.P.S : 9 is not prime!! :D. But I think it is obvious don't you?? :P

6 comments :

Nithya said...

Andha blogarithm site la irukara aale adapted nu potirkaan...neeyum adhe pannitiya :D

Anyways loved it :) Ella answer um sooper...Football player oda answer =))

Unknown said...

My comment would be.... ":|"
coz told u the comment already.. :|

Aravind said...

I know that math is fun!
But I didnt know that prime numbers can be this fun!

Priya Iyer said...

sharan,
:-((

Anonymous said...

super.. :-)

SHIVA said...

dai...yaaru andha sings kutti...i want 2 introduce him to the math dept in my col...let him ruin their sleep :D