PDA

View Full Version : Equation for efficiency



jasong
11-06-2005, 04:05 PM
I'm actually over at Riesel Sieve, but this forum gets more traffic, and it's basically the same idea, so here I am. Here's the thing:

I need help coming up with an equation that, using statistical analysis, plus maybe a poll or two, can tell a person where their computers will be most useful. The goal will be to set things up so that primes are found as quickly as possible. I know people go where they want, this equation is for people who just like crunch(like me) and who's goals don't have a lot to do with anything but personal challenges.

In another thread, I came up with the equation 10,000,000*1.5^v=9,000,000

Originally, I thought this would give the relative value of a n=9,000,000 test compared to a 10,000,000. On further review, I'm not really sure if the equation is even useful.

My education was cut short in the tenth grade, so things like logarithms are mildly mysterious to me, although I vaguely understand their connections to exponents. My tested knowledge scores as if I were the average Junior in college, but their were only about 50 questions on the test(the test was at a place that helps people improve their job skills).

Anyway, any help is appreciated.

Thoughts:

It would be helpful if things like sieving speed and time to LLR, as well as relative n-value and sieving depth could be incorporated into the equation.

jasong
11-09-2005, 08:24 PM
Okay, no one seems to be posting, so I'll attempt to do a little on my own and hope someone jumps in. I'm going to assume that for 10,000,000*(10^n)=9,000,000 that n tells the proportion of effort it takes to do n=9M when compared to 10M.

Also, I believe x/log x tells how often you find primes up to the number x, and

x/log x - y/log y where y is the lower number is x is the higher number tells how prevalent primes are from x to y.

So...for the first equation, we'll change it to 10M*(10^n)=averagenumber where average number is the 10 numbers from 10.5 to 19.5 with differences of 1. So we get

average number---n

10.5
11.5
12.5
13.5
14.5
15.5
16.5
17.5
18.5
19.5

(Okay, guys, I need your help, the only way I know how to do this is through trial and error. If there's a way to do it easily on a scientific calculator, I'm not aware of it.)

My theory(feel free to pick it apart):

The found number n times (averagenumber+5M/log avg.num.+5M) minus (avg.num.-5M/logavg.num.-5M) equals a certain number)

Basically, I'm attempting(am I succeeding?) to correlate the difficulty of LLR with the actual statistical prevalence of primes. Not being able to generate these numbers easily(lack of scientific calculator skills), I'm thinking I've come up with the beginnings of a way to gauge the best proportion of LLR to sieving. UNfortunately, since I don't know what kinds of numbers this generates, I can't make even a remotely informed opinion. Can someone help me?
--------------------------------------------------
Edit: I've thought about it and I've come up with something new:

10M*(10^x)=the number whether it's factored or PRPed or sieved. We multiply this by the log of the number(I think), so it's x times the log of the number. Unless I screwed up(50/50 chance in my opinion), this might be the equation, or part of it, needed to figure the value of sieving to prping to factoring. Basically, you'd take each determined value generated by the k/n pair, whether by sieving or PRPing or factoring, add them up, and the method that gets the highest number would be the most efficient.

I haven't done hard math in a very long time, so if I'm wrong don't be afraid to tell me.

Ken_g6[TA]
11-10-2005, 12:55 AM
This is a very hard problem.:(

First of all, you're trying to find how hard it is/how long it takes to find a prime/prove a composite (I'm not really sure which it is you're after). This is doable, but not easy. The authors of SB tried to do it, but didn't do it right, as evidenced by the slowly increasing values of CEM/s. They're trying to fix that now, and I was hoping one would have piped up by now with that formula. Barring that, look at the bottom of this page (http://primes.utm.edu/bios/top20.php?type=person&by=ScoreRank) for some hints.

Second, you're trying to get the probability that sieving would achieve the same result (whatever that result is that you're searching for above), and compare it to PRPing. Unfortunately, I just realized that this is probably equivalent to scoring PRPing and sieving on the same scale. This has been discussed before (http://www.free-dc.org/forum/showthread.php?s=&threadid=9660), and was dismissed as impractical.

So while it would be very nice if you could do this, you'll probably just wind up :bang: . :(

hhh
11-10-2005, 12:50 PM
Well, one of the problems is that sieving saves PRP and primes save sieving work. My personal impression is that we can not predict primes. Thats why we can just compare time to wait for a factor, and the time for a test. As a prime has not a so big impact on sieving speed, especially at Riesel sieve, this means that right now, sieving is still more effective then PRP.
AND: PRP is done automatically, by all the people who don't want to care about their client. That's why I think that everybody who is ready to do some manual work should sieve, factor perhaps if he has a P4 with memory, and just let the flood of PRP come.

jasong
11-10-2005, 01:20 PM
Second, you're trying to get the probability that sieving would achieve the same result (whatever that result is that you're searching for above), and compare it to PRPing. Unfortunately, I just realized that this is probably equivalent to scoring PRPing and sieving on the same scale. This has been discussed before, and was dismissed as impractical.
In my case(I was the one who started the thread you referenced), I gave up because I realized my scoring method would discourage people, because higher k/n pairs had a tendency to score lower than lower k/n pairs. This time around, I'm simply interested in figuring out probabalistically where a person should go. If we were only worried about one k, you'd simply have to figure out the range of n(starting with the lowest proven composite) that would give you a 50/50 chance of finding a prime, then you'd see what method removes the most pairs within that range. This would change as things progressed, but in a perfect world one or two people would track it and give advice.

I can't help but noting that one could write an essay on why no does this and nobody would give a darn. But you could then write an essay on why socialism doesn't work, using basically the same concepts, and you'd get an A. There's a lesson here, but I'm not sure what it is.
:D :bs:

dudlio
11-15-2005, 09:43 PM
My personal impression is that we can not predict primes. Thats why we can just compare time to wait for a factor, and the time for a test.

THANK YOU this kid is a genius.

Jasong, the best way to think about this is that we are checking numbers and we know that 99.999999% of them are wrong. Therefore, whatever method identifies wrong numbers the fastest is the best method for pretty much everyone. In short, everyone should be sieving (or whatever is fastest these days). Finding primes (proth testing) is incidental because there is no way to predict them. Proth testing is just a shot in the dark. The real speed improvement is when you make the dark area smaller (sieving).

As for algorithms, good question. In comp sci, algorithms are judged in speed based on how fast they run at very large n. For example, if you were to scan an array and you could read 1 location per second, reading an array of 50 would take 50 seconds. That's order N, or linear performance. If you were to sort an array, you have to cross-index all 50 locations with themselves, so its order N^2, or 250 seconds. Then you have order N^3 algorithms and order N^N algorithms which are just horrendous.

If you are reading an equation like 5 + 96*N + 2*N^2, the highest power always overwhelms the smaller ones, in this case order N^2.

Keroberts1
11-15-2005, 10:24 PM
Dudlio did you really need to say the same thing over and over in 3 different threads? Are you currently participating in SB? If not what project are yo uparticipating in? Did they adopt your "more efficient" methods?

dudlio
11-15-2005, 11:41 PM
My bad for seeming to spam the forums with my one idea. I am re-examining SB to see if I can contribute again. Right now I am running the siever to see how many factors I get and then I will run the PRP to see how fast it is. After that I will probably take a look at Riesel sieving and the double-check method.

Keroberts1
11-16-2005, 12:25 AM
i apologize too i musthave interpreted your postings as much more hostile that you had ment for the mto be. Right now the sieving is yeilding an average of a single factor a day between 991 and 50,000,000. probably a 75% chance it will ever be used. i believe a PRP test takes about 3 weeks. Please keep in mind though that more of the factors found will be over 20,000,000 because it has not been sieved completely at the lower levels. Also remember that finding a prime will eliminate many thousands of tests under 50 mil. it ispredicted that there wil be another prime between 10 million and 16 milliion this prime would easily eliminate 100,000 tests up to 50,000,000. Also even at the rate we're going we'll probably reach the point where sieving is nolonger efficient long before that. (unless the supersiever gets finished) Have yo uheard the rumors of a siever that could be up to 10X faster? Has anyone any ideas on what the progress is on it? Could it possibly be that good? BTW if we sieve up to the point where one factor a month that may save a test or not we'll find approximatly 50,000 more factors. As to which would end up being more productive is up to alot of other random variables. Its probably best to just sieve if you're interested and PRP if yo uwanna find primes. Although i would encourage all of the slower machines to switch to sieving because they have a limited usefulness at actually performing PRPs.

BTW there is also the issue taht different types of processors are better at different tasks. AMDs are best at sieving and P4s are best at PRP.

BTW 2: Alien i believe me and dudlio had a slight miscommunication and i doubt there will be any more bickering.


If there is anyone here who could contribute better to our attempts to find a better efficiency formula (Wblipp?) i would love to hear some more opinions. I am skeptical that any gains made by a new formula would be enough to justify the effort t oimplement one but it does sound likea fun problem to work on especially if we can at the same time play around with the error rate info that we'reall eagerly awating final formulas on. I suspect the error rate will be a function of N. Perhaps we could find an ideal depth that sieve should be at and assist in determining how far behind the DC should drag behind the main project. Alien i don't know where you guys are currently in the process of developing these same formulas (or if you are working on them) But if you have any info that would possibly make this easier for us to create a more efficient project then perhaps with your guidance and a little advice we could assist and maybe ease up your workload. If you're already heavily into this however and would rather do it yourself just say the word and I'll drop it for good.

Nuri
11-16-2005, 01:42 AM
The best thing I like about this project is, you can do whatever you like... If you like to see your stats climb and fall, if you want to contribute the most efficient way, if you do not want to bother with manual intervention much, if you want to play around with the clients, if you want to see the increase in smaller tests, if you want to remove more candidates per given time, if you want to have the highest chance (personally) to find a prime, or if you're obsessed with, i dunno, leaning the density of remaining canidates in a particular area like smallest candidates, or if you want to see 999 on MikeH's stats page (like what I'm doing right now), or if you want to test for 10 m digit primes, whatever... you can create a variety of alternatives to play with our alternative clients.

I do not know of any other relatively larger project that offers this much variety.

And the most important thing is, you can actually try new alternatives, and you'll have poeple around willing to discuss and implement ideas.

Some people think this way, and some others think the other way. If you think this way is the best, you have the opportunity to this, and try to convince people do this as well. If others also think the way you look at the attack plan fits their style, then they'll join you. If not, they'll do something else. If you do not think what majority of people are doing fits your style, then you can find your own way of atack.

I'm with this project since last three years, and I've seen many ideas flourish, as well as many that did not find sufficient support to get implemented. Some made sense to me, and some did not. That's the way it is...

Please, fell free to participate the best way you think that fits your way of looking at the picture, and most importanly, ENJOY... In the end, that's why we all are here.

dudlio
11-16-2005, 02:02 AM
Thanks, I appreciate the replies. It looks like the project is now sieving past 900P so I will put a feather in my cap for suggesting 500T way back in Feb. 2003. :) Other than that, you guys have developed a tremendous amount of tools and analysis and I think I will have to do a lot of work before I can be a pain in the ass again.

hhh
11-16-2005, 05:57 AM
There is appearing the argument from time to time that a prime eliminates thousands of tests. That's not true.

In the perfect case where DC is at the right level in relation to Firstpass, we slowly procede until we find a prime. The tests above the N of the prime are never going to be tested, independent of the fact if we proceed slowly or fastly, if we do the work first or later.

The only thing a prime saves is some sieving work, but not so much considering that the siever gets more effective if he has more work.
On the other hand, every factor saves at least one full PRP test. This is a mighty argument in the favor of sieving.

And anybody who wants a maximum of efficiency should look for the joint sieving with PSP, I'm not getting tired to repeat this.

Yours H.

Greenbank
11-16-2005, 06:17 AM
Originally posted by hhh
There is appearing the argument from time to time that a prime eliminates thousands of tests. That's not true.

Well it's true in the fact that we don't have to test any n values higher than the prime n, and we don't have to repeat any double-check tests for lower n values.

In the perfect case where DC is at the right level in relation to Firstpass, we slowly procede until we find a prime. The tests above the N of the prime are never going to be tested, independent of the fact if we proceed slowly or fastly, if we do the work first or later.

Ah, but the world is not a perfect case. What happens someone gets the N that would be prime (but of course we don't know) and their machine dies before completing the test. Eventually the test will expire and it will go back into the queue. In the mean time we've completed a whole bunch of higher n value tests.

There's nothing wrong with this, this is why the project admins put in the test expiry!

The only thing a prime saves is some sieving work, but not so much considering that the siever gets more effective if he has more work.

But it is still faster with less k values. One of my machines went from 400 to 450 kp/sec when k=4847 was removed. The sieve is more efficient with more k values but it will be slower.

On the other hand, every factor saves at least one full PRP test. This is a mighty argument in the favor of sieving.

And anybody who wants a maximum of efficiency should look for the joint sieving with PSP, I'm not getting tired to repeat this.

Neither am I. I've decided that any further speed increases we get in sieving (either through k removal or a faster client), I will put my computers towards other projects (PSP first, Riesel and 321 later when a combined Sierpinski/Riesel client appears).

garo
11-17-2005, 12:16 PM
Nuri,
It is not my intention to shill another project but I think you are off the mark when you say no other project of comparable size offers this much variety. GIMPS is the first project that comes to minds and it does everything that SoB does and a bit more.

That said SoB does have a lot of diversity and that's what makes it fun.

Nuri
11-17-2005, 02:51 PM
Haha, nice catch...

I agree with you on your GIMPS comment.


The difference is in the categorization, i.e. the wording of "relatively larger".


I see GIMPS as a large scale project, and SoB as a relatively large scale (or medium sized) project (both in terms of number of participants, of course).

vjs
11-17-2005, 03:00 PM
:rotfl:
Nuri!!!!

When did you do that --> "I love 67607"

That's just too funny :rotfl: if you know total scope.

Nuri
11-18-2005, 03:06 AM
Yeah, I find it funny as well... may be a wierd sense of humor, I dunno. :D

I did it a couple of days ago..

jasong
11-18-2005, 04:55 AM
Edit: I know I screwed up the following. But I feel like it's a good start. You decide.


Okay, I feel like a major dumbass. I've been assuming that I could come up with a good way of generating numbers and that the best number, in my mind the highest scoring method(by my not-yet-made-up numbers system) would be the way to go.

I didn't even consider the possibility that a lower number could show the better method.

Here you can find a programm called pr_prob.exe.
http://primes.utm.edu/links/programs/seeking_large_primes/
You can enter our sieve limit ~2^36 and the log[2] of our numbers. It will give you an pretty accurate probability. I don't know the exact formula it uses. You ll see the probability is much bettter than yours because of sieving.
As for time of exponent n vs exponent m you coult just use score(m)/score(n). That should be a rough estimate since few people complain about scores :-)
It is 100*(7.5^ln( exponent /524288)).

Edit:I can't figure out why the quote function isn't working, I've tried multiple ways. Oh, well, if anybody can figure out what I did wrong and is a moderator, feel free to edit.

Above it talks about llr scores. I don't know if prp scores work the same way. Anyway, I took the point value, which is approximately proportionate to the time it takes to do the test. I then used the program listed to determine the odds(I think 50% chance of finding a prime is the place to look for the odds to use) I then multiplied the numbers together. Basically you do this for all your numbers within the span of, say, a week. Then you add up the scores. In my opinion, the method with the lowest score is the best method for the project.

Edit:I've decided to add the following.

Here is some of the work I've done at Riesel Sieve

0.5M 91 10.5M 41941 0.5M 4142 10.5M 86994
1.5M 831 11.5M 50378 1.5M 12427 11.5M 95279
2.5M 2327 12.5M 59995 2.5M 20712 12.5M 103564
3.5M 4584 13.5M 69591 3.5M 28997 13.5M 111850
4.5M 7607 14.5M 80368 4.5M 37283 14.5M 120135
5.5M 11397 15.5M 91927 5.5M 45568 15.5M 128420
6.5M 15958 16.5M 104268 6.5M 53853 16.5M 136705
7.5M 21291 17.5M 117393 7.5M 62138 17.5M 144990
8.5M 27399 18.5M 131301 8.5M 70423 18.5M 153276
9.5M 34281 19.5M 145994 9.5M 78709 19.5M 161561

The odd numbered columns are the n-value multiples I'm concerned with. The numbers to the right of the first two n-value columns is the llr point value, which is approximately proportionate to the time it takes to do a test. The numbers to the right of the third and fourth n-value columns is the odds against an unsieved value, at Riesel Sieve's level of sieving, being prime.

Now we need to concern ourselves with how important a test is. If I'm not mistaken, a sieved test is worth 2 if it hasn't been LLRed, a sieved test after being LLRed once is worth .7, a test about to be LLRed is worth about .97(because of error rate), and a test about to be LLRed a second time is worth .7. If any of this is wrong(I'm combining Riesel Sieve and SeventeenorBust stuff since I can't see any difference in this instance)

Anyway, we're almost to two million. So the equation for the value of those tests is:

((91+831)/2)*((4142+12427))/.7=10911870 This is a combo of two values, so:5455935

And the equation for the "other side"(I'm going to solve it rather than write it) is:

1018000*1768876/2=900357884000 Combo of 18 values: so...50019882444

Add them up, you get: 50030794314.

But now we need to calculate the value of an llr'ed number, which, at 2000000 is 1485 times 16570 equals 24606450. So, unless I'm totally nuts(very possible since I'm suffering from insomnia) all things being equal, I should be llr-ing.

One last thing: If you decide to incorporate your time to sieve a factor and your time to llr a factor, multiply the llr time by the sieve score, and the llr score(my score) times the sieve time. This will maintain things.

jasong
11-18-2005, 07:13 AM
Okay, I figured out what I did wrong. Instead of averaging the sieved values I should have added them up. 475434612+4898924934+32100666026+86792262060=124267287632.

And multiply the llr value by 20=29690

Now I just have to figure out how prp fits in in terms of time.

jasong
11-19-2005, 09:44 PM
After everyone has probably lost faith in my abilities to finish a math problem, I think I've finally nailed it. The key, it seems to me, lies in incredibly small numbers generated by the point values of a test(in the case of SOB, the point values of the new system, assuming it's as good as they say it is) and the odds of that individual test yielding a prime.

If you go here (http://www.rieselsieve.com/forum/viewtopic.php?p=5879), look at the last post. I think I finally nailed it. Unfortunately, the scientific calculator I downloaded off the internet doesn't like negative exponents. Basically what you do is you multiply the point value(not cem/s, but the new method when it comes out) by the odds that it will yield prime and then press 1/x. This tiny number is the value of the test, at least it is if you're looking for the most efficient method for your computer. Basically, you take this value, divide it by the value of how many tests you've saved(0.7, 0.97, or 2, the middle number being a first time LLR value of a test and the first and third values being the value of a sieved, once LLRed test and a sieved un-LLRed test.) Once this is done(I'd advise using averages and programming skills involving arrays) you have the value of a test. If you go to my above link and search a bit, you will find link to a program that yields the odds at certain sieve depths(I believe you've sieved a couple bits deeper than us). Anyway, you add up these generated values Through statistical analysis, and it yields the number.

Non-mathematical example of what to do: Let's say that we're LLRing at exactly n=10M. For all sieved values under 10M(we're assuming 20M dat and equal distribution of factors) we multiply the value of the test by it's odds of proving prime and then multiply by 0.7(I can't decide whether you should multiply or divide, the flipflop nature of the numbers confuses me, I think you should multiply it by the number which would also mean dividing the denominator) and you get the value. It's
the same for numbers more than 10M, except you muliply by 2.

Anyway, I believe I've finally found, after much trial and error, especially error(if I'm going to be honest), the secret to determining the most efficient method. Unfortunately, I've made such an ass of myself, I don't think anyone will care.:cry:

ShoeLace
11-20-2005, 06:40 AM
FYI:
if i recall correctly.. the time taken for a PRP test using the current SOB client is proportional to (x/log(x))^2... (ie (x/log(x)) *(x/log(x) ) where x is then n value

if it help sthat can be rewrittenn 2*x*log(x) / (log(x) * log(x) )

and using a base 10 log you get some nice answers. :)

hope that helps guys

Greenbank
11-21-2005, 06:24 AM
[EDIT] Bah. Nevermind. Brain not working, not enough coffee.

jasong
11-21-2005, 03:39 PM
Originally posted by Greenbank
[EDIT] Bah. Nevermind. Brain not working, not enough coffee.
I know how you feel, the only reason I got as far as I did is my high IQ and the fact I have something that is or resembles Asberger's Syndrome.(Asberger's is a mild form of autism, I think. haven't done much research since I don't think there's a cure)

Keroberts1
11-21-2005, 04:24 PM
thats interesting I have been speaking to a psyciatrist because my physician thinks i have the same diagnosis. It doesn't really have any sort of major impact on my life its just that we see the world in a slightly different way. In my opinion is makes you alot more aware of people's inner workings and lesslikely to lets emotional insecurities influence your actions. Also we have slightly heightened senses that are sometimes fun. Ever hear people talking about something secret and wonder why they don't know you can hear them? Its cause you're special like that. Just gotta keep those hands clean, i don't know if you get that too but anything sticky or oily on my hands and I'll flip out.

jasong
11-21-2005, 10:13 PM
Originally posted by Keroberts1
thats interesting I have been speaking to a psyciatrist because my physician thinks i have the same diagnosis. It doesn't really have any sort of major impact on my life its just that we see the world in a slightly different way. In my opinion is makes you alot more aware of people's inner workings and lesslikely to lets emotional insecurities influence your actions.
Unfortunately, I'm also paranoid skizophrenic, which is a rather extreme counterbalance. I suffer from extreme paranoia, so sometimes I have temper tantrums when I'm stressed. I used to constantly accuse my mother of hating me and thought the chest pains these accusations caused in her were lies. Now I feel bad.

Also we have slightly heightened senses that are sometimes fun. Ever hear people talking about something secret and wonder why they don't know you can hear them? Its cause you're special like that. Just gotta keep those hands clean, i don't know if you get that too but anything sticky or oily on my hands and I'll flip out. Dirty hands don't bother me, but if I shake hands or sit next to a pretty girl, it's like I'm making out with her. Shhhhhhhh, don't tell Sarah. Kind of makes asking girls out difficult when their very presence makes butterflies. "Oh, don't worry about me trying to get you to put out. Just put your hand on my shoulder and I'll be good for a solid week."

ShoeLace
11-22-2005, 01:48 AM
Originally posted by jasong
"Oh, don't worry about me trying to get you to put out. Just put your hand on my shoulder and I'll be good for a solid week." [/B]

forgive the poor humour but...

I bet she'd be happy if you were solid for a good week instead.

:p :D :eek:

dudlio
11-22-2005, 04:32 AM
Asperger Syndrome or (Asperger's Disorder) is a neurobiological disorder named for a Viennese physician, Hans Asperger, who in 1944 published a paper which described a pattern of behaviors in several young boys who had normal intelligence and language development, but who also exhibited autistic-like behaviors and marked deficiencies in social and communication skills.

I think this would describe any nerd growing up. The question is, are you a nerd because you want to be, or because your parents wanted you to be? I know the answer in my case because I had to fight over a decade for people to see me differently.

I have to laugh when I see virtually every car and refrigerator in suburbia these days has an "autism awareness" magnet on it. Pretty vague and pervasive message. Knowing that most of the people in my area are catholic, a lot of jokes could be made.

jasong
03-16-2006, 04:33 PM
I have to laugh when I see virtually every car and refrigerator in suburbia these days has an "autism awareness" magnet on it. Pretty vague and pervasive message. Knowing that most of the people in my area are catholic, a lot of jokes could be made.
I have no idea what's funny about that, but I like jokes.

Btw, would anyone be interested in me calculating whether prping or sieving is better? It's different for every machine, but I can do 90% of the leg-work and give simple instructions on what to do next.

I just need to know where we're at in sieving(the bit depth), and where LLR is.

ShoeLace
03-16-2006, 05:38 PM
you might get your answers from http://www.aooq73.dsl.pipex.com/scores_p.htm

jasong
03-16-2006, 07:44 PM
Using the website ShoeLace gave me, I was able to make a start of it. You should get the answer posted by me in about 4 hours, maybe less.

One thing I noticed was LLR doesn't scale as well as PRP when comparing differences between n. Of course, the problem with that is the fact that I haven't run PRP in awhile, so I don't know the time taken for, say, n=10000000.

I'll probably download the program tonight and see how things stack up on my Sempron.

right now, I'm going to a Christian singles thing.

c-ya

jasong
03-16-2006, 10:55 PM
Okay, I've finished the calculations(some of you may be surprised at the results).

I think I need to preface this with an explanation of my methods.

There are basically two variables, the length of a test and the odds of it yielding prime after a certain amount of sieving. I calculated the length of a test as (x/log x)^2 (Now that I think about it, I really hope I'm not supposed to use the natural log, because that would make me want to throw a fit:swear: ) And I calculated the odds of a test being prime after not being sieved at a certain bit depth(2^50.04)

Anyway, for the length of a test with sieving, I calculated the length for all tests 11x-50x where the numbers go, whole numbers only, from 11-50, and x is 1,000,000. For the odds, I used a program someone showed me that calculates the odds of a test yielding prime at a certain n after a certain amount of sieving.

So we've got two numbers, the length of a test, and the odds it yields prime. We multiply the two numbers together and get a third, which we think of as the "value" of a test in terms of the project as a whole. We take each "third" value and we add them all up, this is the approximate value of sieving.(I'm leaving a lot out, I'll explain my logic in a new reply after this one). We then take the length value of the median test in the range we're on which is 10495031(the middle value of the range 10395031-10595031), multiply it by the odds yielding prime, then multiply that by 40, since that's the number of values we had in the sieving portion.

We get two numbers: 2.1841E20 for sieving, and 7.2763E18 for PRP. We knock of 18 zeroes from each side and get 218.41 for sieving and 7.2763 for PRP.

So, assuming it wasn't supposed to be natural log(that's ln, ln, ln, #$$*&^%*) you need to be able to sieve 30 values above we're at for every one you prp, on average, or you should be prping.

jasong
03-16-2006, 11:04 PM
My reasoning:

If two tests have equal odds of yielding a prime, then their value is inversely proportionate to the amount of time they take. If one test takes 60 seconds, one takes 15 seconds, and they have equal odds of yielding a prime, then the 15 second test is worth 4 times as much as the 60 second test.

Now if two tests take the same amount of time, but one has a 1/100 chance of proving prime, and the other has a 1/500 chance of proving prime, than the 1/100 chance test is worth more than a 1/500 chance test, which means you concentrate on the 1/100 tests first.

So, basically, to maximize efficiency(this is not an order, do whatever you want), one would want to get rid of tests that, put together, are more "valuable" for the efficiency of the project. As they get higher in n-value they're worth less, but if you get rid of a lot, that's great. On the other hand, if you don't get rid of a lot of tests, but the tests you concentrate on have a higher overall chance of yielding prime, you are at a good place.

But you can do whatever you want. This is a volunteer project, and this thread is simply the rant of a person with nothing better to do.

Man, I hope natural log isn't the right way.:bang:

Keroberts1
03-17-2006, 12:20 AM
i believe the natural log is the correct answer but you ar still o nthe right track. where is the program for calculating odds of finding a prime That coudl be very useful for calculating second pass's optimal location.

jasong
03-17-2006, 01:03 AM
i believe the natural log is the correct answer but you ar still o nthe right track. where is the program for calculating odds of finding a prime That coudl be very useful for calculating second pass's optimal location.
Here you go!!! (http://primes.utm.edu/links/programs/seeking_large_primes/)
Anyway, I calculated with natural log, and it's right at about 30 factors above PRP for every one you can PRP as the break even point(where either way is just as efficient)

jasong
03-17-2006, 10:53 AM
I apologize, I got confused and said things backwards. Unless you can PRP 30 values for every one you sieve, you should be sieving.

Sorry, people.

Mystwalker
03-17-2006, 04:21 PM
Did you consider that a found prime

1. takes out
1.1. a lot of candidates that needn't be tested anymore and
1.2. a whole k, which considerably speeds up sieving and

2. makes a great amount of found factors obsolete?

I think these factors (no pun intended) put the relation more in favor of PRPing.

jasong
03-17-2006, 04:55 PM
Did you consider that a found prime

1. takes out
1.1. a lot of candidates that needn't be tested anymore and
1.2. a whole k, which considerably speeds up sieving and

2. makes a great amount of found factors obsolete?

I think these factors (no pun intended) put the relation more in favor of PRPing.
I believe my method, from a statistical standpoint, deals with all those factors. Because of the length of tests and reduced odds of prime at higher k, lower tests are "worth" more. On the other hand, depending on the odds that a k will or won't be found prime, a higher test can be worth a bit, too.

I'm not saying my math is right, I just believe it's the best answer so far. What I'd really like to see is a program that determines the odds a k will be found prime by a certain n, and let that affect the value of tests. My method MIGHT already reflect that, but I don't have the analytical skills to form an opinion.

jasong
03-17-2006, 05:12 PM
I apologize, I got confused and said things backwards. Unless you can PRP 30 values for every one you sieve, you should be sieving.

Sorry, people.
This inverse proportion stuff is a real bugger to me. My apologies, but unless you can sieve at least 30 values ABOVE where we're at, PRP is more efficient.

I've got two absolutely HUGE numbers I'm dealing with. And, to add to that, I'm having to deal with inverse proportions.

Again, my apologies.

---------------------------------------------

Edit: for those who want to try to duplicate my results, the "value" of a test, in terms of time, is 1/((n/ln n)^2). And the probability for a test uses this program (http://primes.utm.edu/links/programs/seeking_large_primes/) for calculations. You simply multiply the numbers together, and you get an extremely tiny number that represents the relative value of a number when considered against other numbers.

Basically, for sieving, I figured the values of a the numbers that were a multiple of a million from 11M to 50M. Then I took the value of an n at what I considered to be the approximate location of tests and multiplied it by 40. So basically, you want to be beat the resultant ratio. Or beat it more efficiently if both of your methods beat the ratio.