mersenneforum.org  

Go Back   mersenneforum.org > Extra Stuff > Miscellaneous Math

Closed Thread
 
Thread Tools
Old 2015-11-06, 19:33   #89
a1call
 
a1call's Avatar
 
"Rashid Naimi"
Oct 2015
Remote to Here/There

80716 Posts
Default

Please see the attached screenshot along with the command documentation.
It takes less than 2 seconds.

You can try the command yourself with a free account.
Attached Thumbnails
Click image for larger version

Name:	AXC-100-C.jpg
Views:	107
Size:	664.1 KB
ID:	13377  
a1call is offline  
Old 2015-11-06, 19:39   #90
chalsall
If I May
 
chalsall's Avatar
 
"Chris Halsall"
Sep 2002
Barbados

230038 Posts
Default

Quote:
Originally Posted by a1call View Post
Please see the attached screenshot along with the command documentation.
What you are forgetting is empirical time is different than computational time.
chalsall is online now  
Old 2015-11-06, 19:42   #91
a1call
 
a1call's Avatar
 
"Rashid Naimi"
Oct 2015
Remote to Here/There

3·5·137 Posts
Default

Which means it actually takes a fraction of a second on the server, right or am I missing something.
a1call is offline  
Old 2015-11-06, 19:50   #92
chalsall
If I May
 
chalsall's Avatar
 
"Chris Halsall"
Sep 2002
Barbados

973110 Posts
Default

Quote:
Originally Posted by a1call View Post
Which means it actually takes a fraction of a second on the server, right or am I missing something.
It means you are missing a lot!

Sure, in our modern age, we just "throw hardware at the problem". And that might make some sense. Machines and energy are cheap(ish). Programmers are expensive.

BUT... Some actually want to optimize the equations.

That also makes sense....
chalsall is online now  
Old 2015-11-06, 20:13   #93
science_man_88
 
science_man_88's Avatar
 
"Forget I exist"
Jul 2009
Dumbassville

26×131 Posts
Default

Quote:
Originally Posted by a1call View Post
Which means it actually takes a fraction of a second on the server, right or am I missing something.
I think what is being pointed out is that:

this code takes 4 milliseconds for this single computation isn't necessarily useful ( though I do that a lot myself) because without knowing how the time scales people won't be sure if it's worth putting in the time it would take for other inputs for example two inputs a and b=2*a;

if for input of b we double the time then the algorithm may be linear time complexity, if it quadruples the time it may be exponential, if b=a^2 and time doubles then maybe the algorithm may be logarithmic. same with number of operations if you say this algorithm takes 4 operations okay is that 4 additions, 4 multiplications, 4 divisions ( divisions are typically slow for computations unless they use a way of dividing that doesn't use much if any actual dividing). that and that it takes time to display an answer.

Last fiddled with by science_man_88 on 2015-11-06 at 20:15
science_man_88 is offline  
Old 2015-11-07, 00:20   #94
danaj
 
"Dana Jacobsen"
Feb 2011
Bangkok, TH

22×227 Posts
Default

The point is that you're comparing two completely different operations.

PrimeQ is similar to Pari/GP's ispseudoprime, Perl/ntheory's is_prime, or mpz_prp's mpz_bpsw_prp (used by Python's gmpy 2.0). It runs very fast. It is a probable prime test. Nobody really knows what the Wolfram / Mathematica implementation really is (Pinch noted their "Lucas test" was not what the rest of the world calls a Lucas test and was strictly weaker than what BPSW should use, but that was 22 years ago). BPSW is great test, but I'm not sure how it applies here. It's meaningless in the EFF challenges. I have an old web page that does similar tests, though not factoring. It runs on the slow web host server rather than the browser, so the proof size is pretty limited.

The test you're running with alpertron is a proof. APR-CL I believe (but could be wrong). That would be similar to Pari/GP's isprime, mpz_aprcl's mpz_aprcle, or FLINT's new APRCL code (not in master yet). Comparable to the ECPP methods of Primo or Perl/ntheory's is_provable_prime. They take massively longer to run than the probable prime test. A certificate (ECPP, Pratt, etc.) would work for EFF, but you can't just give a general form number of 1M digits to Primo and expect it to ever produce something. Hence the idea of building up the certificate, which at least isn't loony with today's resources (I was going to say practical, but that's stretching it).
danaj is offline  
Old 2015-11-07, 00:54   #95
a1call
 
a1call's Avatar
 
"Rashid Naimi"
Oct 2015
Remote to Here/There

80716 Posts
Default

There is nothing in the documentation about the command being a probable prime test.
For the record none of these has anything to do with the EFF challenge. I think that can only be satisfied with mathematical proof and without calculating the the digits of the prime.
a1call is offline  
Old 2015-11-07, 03:56   #96
danaj
 
"Dana Jacobsen"
Feb 2011
Bangkok, TH

22×227 Posts
Default

Quote:
Originally Posted by a1call View Post
There is nothing in the documentation about the command being a probable prime test.
Under "Implementation notes":

http://reference.wolfram.com/languag...tion.html#6849

It states that PrimeQ does trial division with small primes (typical for performance), then M-R bases 2 and 3, then a Lucas test. M-R base 2 plus a proper Lucas test makes the BPSW test. Adding base 3 is either to add more certainty over just BPSW, or (the cynical view) to mask an improper Lucas test.

It points out you need to use ProvablePrimeQ to get a proof.

Last fiddled with by danaj on 2015-11-07 at 03:56
danaj is offline  
Old 2015-11-07, 04:42   #97
a1call
 
a1call's Avatar
 
"Rashid Naimi"
Oct 2015
Remote to Here/There

3·5·137 Posts
Default

Quote:
Originally Posted by danaj View Post
Under "Implementation notes":

http://reference.wolfram.com/languag...tion.html#6849

It states that PrimeQ does trial division with small primes (typical for performance), then M-R bases 2 and 3, then a Lucas test. M-R base 2 plus a proper Lucas test makes the BPSW test. Adding base 3 is either to add more certainty over just BPSW, or (the cynical view) to mask an improper Lucas test.

It points out you need to use ProvablePrimeQ to get a proof.
I stand corrected.
Thank you again for your insight danaj.
a1call is offline  
Old 2015-11-07, 05:02   #98
a1call
 
a1call's Avatar
 
"Rashid Naimi"
Oct 2015
Remote to Here/There

205510 Posts
Default

I tried the ProvablePrimeQ command it aborted after 1 minute. The online tool is still running with no end in sight.
My PARI/gp is not configured yet because of memory shortages on my desktop, but someone told me that the test took 8 minutes on a slow computer.

Can someone please let me know if the 2947digit integer that I posted is prime or not.

Thanks in advance.
a1call is offline  
Old 2015-11-07, 05:26   #99
Batalov
 
Batalov's Avatar
 
"Serge"
Mar 2008
Phi(4,2^7658614+1)/2

36×13 Posts
Default

Quote:
Originally Posted by a1call View Post
...someone told me that the test took 8 minutes on a slow computer.
That someone also doesn't know how to do primality tests.

The 2947digit candidate can be tested with Primo in ~1 hour with 4-8 threads (surely not 8 minutes).
Get Primo and run the test.
Batalov is offline  
Closed Thread



Similar Threads
Thread Thread Starter Forum Replies Last Post
Is CEMPLLA 1.5 "the only software in the world capable of discovering" something? Not really. CRGreathouse Number Theory Discussion Group 51 2018-12-16 21:55
Aouessare-El Haddouchi-Essaaidi "test": "if Mp has no factor, it is prime!" wildrabbitt Miscellaneous Math 11 2015-03-06 08:17
"Subproject" #10: 200k-300k to 110 digits RobertS Aliquot Sequences 9 2011-05-07 15:30
Would Minimizing "iterations between results file" may reveal "is not prime" earlier? nitai1999 Software 7 2004-08-26 18:12
Search for a number theoretic function related to "prime divisor sums" juergen Math 2 2004-07-10 23:01

All times are UTC. The time now is 04:23.


Sat Jul 17 04:23:10 UTC 2021 up 50 days, 2:10, 1 user, load averages: 2.33, 2.51, 2.39

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.

This forum has received and complied with 0 (zero) government requests for information.

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation.
A copy of the license is included in the FAQ.