mersenneforum.org  

Go Back   mersenneforum.org > Great Internet Mersenne Prime Search > Math

Closed Thread
 
Thread Tools
Old 2015-12-09, 15:30   #1
ramshanker
 
ramshanker's Avatar
 
"Ram Shanker"
May 2015
Delhi

2616 Posts
Default Probabilistic optimization of P-1 efforsts?

Hi all,
Lately I have been banging my head over alternate implementation of P-1 test. Having checked quite a few factors, I can't recall seeing any high (say >10) power for factors of "k" in 2kp.

Smaller digits seem to have sometimes up to 7th or 8th power, specially 2,3 & 5. However higher factors rarely go up to 3rd power.

So would it not be justified, in a probabilistic way to use only fewer powers while calculating E? Notation as in http://www.mersenne.org/various/math.php


I know you can't guarantee that you undertook P-1 test on an exponent with reduction in powers, but than this could be backed by probabilistic distribution of data based on 10s of million of known factors. :)


While we are at it, am I allowed to scrap primenet server for known factors / factoring status?

I am yet to understand why B2 bound work.
ramshanker is offline  
Old 2015-12-09, 15:52   #2
R.D. Silverman
 
R.D. Silverman's Avatar
 
Nov 2003

22×5×373 Posts
Default

Quote:
Originally Posted by ramshanker View Post
Hi all,
Lately I have been banging my head over alternate implementation of P-1 test. Having checked quite a few factors, I can't recall seeing any high (say >10) power for factors of "k" in 2kp.

Smaller digits seem to have sometimes up to 7th or 8th power, specially 2,3 & 5. However higher factors rarely go up to 3rd power.

So would it not be justified, in a probabilistic way to use only fewer powers while calculating E?
The probability that an integer N is divisible by p^k, is very nearly 1/p^k. SUM from p=2 to oo of 1/p^k converges
very rapidly. We do not expect high powers of primes to appear very often.

The phrase "justified, in a probabilistic way" is meaningless without an objective function.
What objective function do you propose? What optimization do you propose?

There is always a possibility that we may fail to find a factor p|N when p-1 is divisible by a high power.
This is the nature of the algorithm. The same applies for ECM.

It is not necessary to pre-calculate E to run the algorithm.



Quote:
I know you can't guarantee that you undertook P-1 test on an exponent with reduction in powers, but than this could be backed by probabilistic distribution of data based on 10s of million of known factors. :)
What is the antecedent of the word "this" in your last sentence? What do you mean by "backed"?
What are you measuring? We don't need empirical data. The distribution of prime factors of p-1
is well known theoretically.

Quote:
While we are at it, am I allowed to scrap primenet server for known factors / factoring status?

I am yet to understand why B2 bound work.
What do you mean by "scrap primenet"? Running P-1 does not require adherence to any organized effort.

As for understanding B2, one can only read descriptions of the algorithm. I can help, but without
knowing what it is that you don't understand, I can't give any specific information.
R.D. Silverman is offline  
Old 2015-12-09, 16:19   #3
R.D. Silverman
 
R.D. Silverman's Avatar
 
Nov 2003

1D2416 Posts
Default

Quote:
Originally Posted by R.D. Silverman View Post
The probability that an integer N is divisible by p^k, is very nearly 1/p^k. SUM from p=2 to oo of 1/p^k converges
very rapidly.
I forgot to add: for k > 1
R.D. Silverman is offline  
Old 2015-12-09, 16:35   #4
fivemack
(loop (#_fork))
 
fivemack's Avatar
 
Feb 2006
Cambridge, England

72×131 Posts
Default

Quote:
Originally Posted by ramshanker View Post
Hi all,
Lately I have been banging my head over alternate implementation of P-1 test. Having checked quite a few factors, I can't recall seeing any high (say >10) power for factors of "k" in 2kp.

Smaller digits seem to have sometimes up to 7th or 8th power, specially 2,3 & 5. However higher factors rarely go up to 3rd power.

So would it not be justified, in a probabilistic way to use only fewer powers while calculating E? Notation as in http://www.mersenne.org/various/math.php
I believe that is what's done; if you have B1=10^6 you will put in 2^19 (largest power of two less than 10^6), 3^12 (largest power of three less than 10^6), ..., 97^3, 101^2, ..., 997^2, 1009 ...
fivemack is offline  
Old 2015-12-09, 16:36   #5
ramshanker
 
ramshanker's Avatar
 
"Ram Shanker"
May 2015
Delhi

2·19 Posts
Default

Quote:
Originally Posted by R.D. Silverman View Post
What do you mean by "scrap primenet"? Running P-1 does not require adherence to any organized effort.
Downloading all the known factors stored by primenet server (from mersenne.org web pages) by an automated script.

Quote:
Originally Posted by R.D. Silverman View Post
The distribution of prime factors of p-1 is well known theoretically.
Ok. I will study more on that one. Thanks.
ramshanker is offline  
Old 2015-12-09, 16:46   #6
chris2be8
 
chris2be8's Avatar
 
Sep 2009

1000000111102 Posts
Default

Quote:
Originally Posted by R.D. Silverman View Post
What do you mean by "scrap primenet"?
He probably meant "scrape primenet". If so that's a question for George to answer (it probably depends how much load it'll put on the server).

Chris
chris2be8 is offline  
Old 2015-12-09, 16:55   #7
R.D. Silverman
 
R.D. Silverman's Avatar
 
Nov 2003

22·5·373 Posts
Default

Quote:
Originally Posted by ramshanker View Post
Downloading all the known factors stored by primenet server (from mersenne.org web pages) by an automated script.
This answer does not say what you mean by "scrap".
Nor does it explain why one needs to involve primenet. It is not needed to run P-1.
It might be needed for some particular project, but your post gave no indication of that.

It is also unclear as to why one needs to download known factors.

Last fiddled with by R.D. Silverman on 2015-12-09 at 16:57
R.D. Silverman is offline  
Old 2015-12-09, 17:06   #8
ramshanker
 
ramshanker's Avatar
 
"Ram Shanker"
May 2015
Delhi

2·19 Posts
Default

Quote:
Originally Posted by R.D. Silverman View Post
This answer does not say what you mean by "scrap".
Nor does it explain why one needs to involve primenet. It is not needed to run P-1.
It might be needed for some particular project, but your post gave no indication of that.

It is also unclear as to why one needs to download known factors.
Pardon my english. https://en.wikipedia.org/wiki/Web_scraping

I didn't know distribution of factors of P-1 is well known THEORETICALLY.

It can (?) be done numerically in following way. Let's say we collect 1 million known factors of mersenne number. Now if highest power of 2 in factors of (2kp) is let's say 7 (picking just random value here, it could be some other value). With this observation, we could skip to compute only a^(2^7) instead of a^(log B1 base 2).

It would introduce a "chance" to missing some factors, hence I said "probilistic", but hey we are skipping quite a few cycles.
ramshanker is offline  
Old 2015-12-09, 17:17   #9
R.D. Silverman
 
R.D. Silverman's Avatar
 
Nov 2003

1D2416 Posts
Default

Quote:
Originally Posted by ramshanker View Post
Pardon my english. https://en.wikipedia.org/wiki/Web_scraping

I didn't know distribution of factors of P-1 is well known THEORETICALLY.

It can (?) be done numerically in following way.
What is "it"??? i.e. What can be done numerically? I asked before and you did
not answer: What problem are you solving? What optimization are you doing?

Quote:
Let's say we collect 1 million known factors of mersenne number. Now if highest power of 2 in factors of (2kp) is let's say 7 (picking just random value here, it could be some other value). With this observation, we could skip to compute only a^(2^7) instead of a^(log B1 base 2).
You still fail to state your OBJECTIVE. And collecting known factors is irrelevant.
You say "could skip to only a^(2^7)". We could also sing hyms, paint pictures,
jump on a trampoline, run a marathon, or only ' skip to a^2^3'. We COULD do anything we want.
But unless you state an OBJECTIVE, saying "we could ......." is meaningless.

Quote:

It would introduce a "chance" to missing some factors, hence I said "probilistic", but hey we are skipping quite a few cycles.
You could skip even more cycles by not using prime powers at all: just use p^1.
Once again, what is your OBJECTIVE?????

Your statements so far are meaningless and vacuous.

Last fiddled with by R.D. Silverman on 2015-12-09 at 17:20
R.D. Silverman is offline  
Old 2015-12-09, 17:30   #10
ramshanker
 
ramshanker's Avatar
 
"Ram Shanker"
May 2015
Delhi

1001102 Posts
Default

OBJECTIVE: Reduce the number of computation required to perform P-1 factorization.

HOW: By reducing the power-to-raise during modular exponentiation phase.

MATH: To establish distribution of factors (and hence upper limit on power of small factors) of P-1 by observing the trend among collected factors of other mersenne number. As you stated, it is well know theoretically.

Consider this exploration only a personal effort.
ramshanker is offline  
Old 2015-12-09, 17:49   #11
R.D. Silverman
 
R.D. Silverman's Avatar
 
Nov 2003

164448 Posts
Default

Quote:
Originally Posted by ramshanker View Post
OBJECTIVE: Reduce the number of computation required to perform P-1 factorization.


HOW: By reducing the power-to-raise during modular exponentiation phase.
Reduce the power all the way to 1. This will save a lot of time.
Or even better: reduce the exponents to 0. This will save even more time.
There are many things one can do to reduce the computation. But they all
have a COST associated with them. I see no discussion of this cost in your
arguments. The cost is, of course, a reduction in the likelihood of finding a factor.
But unless you specify how the probability changes as a function of the reduction in time,
and unless you specify some objective for your probabilities, the discussion is meaningless.

One can, for example, reduce the time needed to ZERO. Do nothing. This gives
a zero probability of succeeding, but nothing in your statements places any kind
of constraint on what probability you are willing to accepy.


Quote:
MATH: To establish distribution of factors (and hence upper limit on power of small factors) of P-1 by observing the trend among collected factors of other mersenne number.
This proposal is not mathematics. It is simply making an empirical observation.
And it will fail to "establish distribution of factors".
It is just mindless numerology.

Perhaps you might take a university level course on probability and statistics?
It will allow you to gain some understanding of what you are trying (in vain)
to propose.

You should also take at least a semester on optimization methods/operations research.

Would someone else weigh in here? I do not seem to be getting through.
R.D. Silverman is offline  
Closed Thread



Similar Threads
Thread Thread Starter Forum Replies Last Post
Probabilistic primality tests faster than Miller Rabin? mathPuzzles Math 14 2017-03-27 04:00
probabilistic number theory wildrabbitt Math 57 2015-09-17 18:26
Elementary Literature on probabilistic aspects of prime searching hhh Math 7 2014-03-18 14:37
time complexity of probabilistic factoring algorithms koders333 Factoring 1 2005-12-13 13:58
ASM Optimization Cyclamen Persicum Hardware 4 2004-05-26 07:51

All times are UTC. The time now is 18:32.


Fri Jul 16 18:32:49 UTC 2021 up 49 days, 16:20, 1 user, load averages: 15.27, 8.23, 4.69

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.