Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
Also products of Sophie Germain primes seem trivial to break.
Divide the product by 2.
Square root the result and floor it.
I must be missing something. -
Quirinus7525yYeah, reinventing stuff feels good and bad at the same time. Bad because someone already did it before you, but good because it's a confirmation of your work and thinking - you did something meaningful.
I accidentally reinvented the WKBJ method in physics. I was hyped because I invented something important and meaningful, until I realized it not only already existed, but that I already knew about it (I came to it in a slightly different way though). -
@Quirinus
hey cool! Just learned about the WKBJ method thanks to you.
It's amazing how much interesting knowledge and ideas fail to get passed on and have to be stumbled on by people still learning. -
I also attempted aproximation by square roots to reduce the search space. Kinda works.
Problem is you end up having to deal with decimals.
And you can iterate individual decimal digits, generate a set of values based on each iteration and try to find the closest to the products actual root, but theres local minima all over the place, which means you end up just having to go through fractional increments the way you'd do anything: by brute forcing.
If you take the root of the product P, and then the root of the root though, it DOES make brute forcing simpler.
Not enough to make a difference.
I'm looking at a combination of finding the nearest aproximation of the smallest factor beneath the root of the product by taking the root of the root and brute forcing it, and iterating digit by digit (N*10, rather than 10^N) through the fractional part of the root in question.
Related Rants
So I accidentally reinvented Pollard's algorithm.
https://en.wikipedia.org/wiki/...
Fuuuuuuuuu.....
rant
algorithms
prime factorization