Tuesday, November 14, 2006

 

Prime counting: code challenge!!!

The poster Tim Peters makes several claims in his bid to convince the newsgroups that MY prime counting function is old math, old hat and not worth your interest, AND he claims to be a code guru himself with the Python scripting language.

But is he really? Or is he full of hot air?

Time for a code challenge!!!

Rather than have all these dumb arguments with an increasing number of threads I say, let the computers tell the truth here:

http://groups-beta.google.com/group/extrememathematics/web/PrimeCountingApplet.zip

At my new Google Groups "ExtremeMathematics" you can get MY CODE, a Java applet, and you do NOT have to be a programmer to run it, test it, and see it scream through prime counts as you can download un-zip it and just open the html file to safely run the applet.

Java rules.

(If a tar-ball would be appreciated I could put one on the site.)

In the other corner the loudmouth Tim Peters can show if Python has what it takes with optimizations he claims can be easily done to Legendre's Formula to prove that my research is not valuable.

I CHALLENGE him to put up Python code against my prime counting applet code, where JAVA RULES!!!

Python is not up to the challenge with him as a programmer. He is too weak. His math skills and coding skills are not strong enough.

He CANNOT WIN.

Since the easy way for Peters to cheat is to go to other algorithms done by other people versus doing his own, I will add that he is to put up the prime counting function that his code uses.

The key expression in my code is

N/2 -(N-4)/6 - (N-16)/10 + (N-16)/30 - (N-8)/14 + (N-22)/42 + (N-106)/70 - (N-106)/210 +2 - S

where then the prime counting function sieve form algorithm being used is as follows.

With natural numbers x and n, where p_i is the i_th prime:

P(x,n) = x - x/2 +(x-4)/6 + (x-16)/10 - (x-16)/30 + (x-8)/14 - (x-22)/42 - (x-106)/70 + (x-106)/210 - 2 - sum for i=4 to n of {(P(x/p_i,i-1) - (i-1))}

where if n is greater than the count of primes up to and including sqrt(x) then n is reset to that count.

(Hint: Do timing tests of my applet against Mathematica or other math software.)

The program I use PrimeCountH.java relies on extra use of memory as well some other smart coding ideas for speed enhancement, so Peters can use whatever else he can figure out--as a supposed Python guru—around the core mathematics.

My program can also be seen at the ExtremeMathematics group, or you can simply open the jar file to see what it is using to confirm important details.

The point of this challenge is the sad reality that there are people that lie to you about mathematics, and they lie quite boldly, or Peters can deliver the code.

I delivered.

Can he?

Keep up with the challenge HERE on these newsgroups and nowhere else as the blow-by-blow of Java against Python in the math software challenge of the year commences!!!

Read to see whether or not Peters is all talk or can actually code!!!

Read to see if the bizarre and annoying tactic of empty postings to obscure the mathematical truth by him and his dark cabal continue to work!

READ to find out the truth about prime counting.

And oh yeah, nothing against scripting languages like Python, but Java is the dominant programming language on the planet.

And don't you forget it.





<< Home

This page is powered by Blogger. Isn't yours?