 mersenneforum.org (https://www.mersenneforum.org/index.php)
-   Factoring (https://www.mersenneforum.org/forumdisplay.php?f=19)
-   -   Multiplication method for factoring natural numbers (https://www.mersenneforum.org/showthread.php?t=24247)

 nesio 2019-04-01 16:59

Multiplication method for factoring natural numbers

Hi! If someone is interested in the subject and knows the Russian language then you can see a new publication here: [URL]https://arxiv.org/ftp/arxiv/papers/1903/1903.12449.pdf[/URL]

It's abstract ([URL]https://arxiv.org/abs/1903.12449[/URL]):
We offer multiplication method for factoring big natural numbers which extends the group of the Fermat's and Lehman's factorization algorithms and has run-time complexity O(n^1/3). This paper is argued the finiteness of proposed algorithm depending on the value of the factorizable number n. We provide here comparative tests results of related algorithms on a large amount of computational checks. We describe identified advantages of the proposed algorithm over others. The possibilities of algorithm optimization for reducing the complexity of factorization are also shown here.
Regards

 nesio 2019-04-01 18:25

Sorry. Its annotation is here: [url]https://arxiv.org/abs/1903.12449[/url]

 DukeBG 2019-04-02 08:06

Interesting. Didn't read it thoroughly, just skimmed it for now. Not sure if phrasing "[i]big[/i] natural numbers" is warranted – the included tests are just up to 16 decimal digits. But anyway...

 henryzz 2019-04-02 12:08

Translating from Russian is a bit of an issue for most here.

Am I correct in understanding that you believe you have found an improvement to Lehman's method that should find more factors and runs in slightly less time(basically the same)?

 nesio 2019-04-02 13:29

[QUOTE=DukeBG;512428]Interesting. Didn't read it thoroughly, just skimmed it for now. Not sure if phrasing "[i]big[/i] natural numbers" is warranted – the included tests are just up to 16 decimal digits. But anyway...[/QUOTE]

Lehman improved Fermat's algorithm. His way is mathematically formal.
Hart showed an improvement in Fermat's algorithm. His way is heuristic.
We also have tried to improve Fermat's algorithm. Our way seems mathematically formal to us.
According to the test results for the selected comparison metric, the MMFFNN-RM algorithm is faster than Lehman more than twice and partly faster than the MMFFNN-SM algorithm (a-la-Hart).
Also, the MMFFNN-RM algorithm reveals some theoretical limitations of the MMFFNN-SM algorithm, which is useful to know when you'll use the latter.

 Dr Sardonicus 2019-04-02 15:11

The algorithms [i]are[/i] given in English; but, maddeningly (at least to me), they aren't in ordinary text...

 DukeBG 2019-04-02 15:55

[QUOTE=henryzz;512433]Am I correct in understanding that you believe you have found an improvement to Lehman's method that should find more factors and runs in slightly less time(basically the same)?[/QUOTE]

The relevant part of the paper to answer your question is this table. r is the decimal digit size. The numbers are the average (over 20000 tests of composite numbers) of total square root attempts when factoring an r-size number. Used as a metric for work amount.
[URL="https://funkyimg.com/i/2SRxA.png"]https://funkyimg.com/i/2SRxA.png[/URL]

[QUOTE]The algorithms are given in English; but, maddeningly (at least to me), they aren't in ordinary text...[/QUOTE]
They're given in pseudo-code and relevant parts described "in language" in Russian. Giving that in English I think should be by just translating the whole paper into English properly...

 nesio 2019-04-02 18:57

[QUOTE=Dr Sardonicus;512448]The algorithms [i]are[/i] given in English; but, maddeningly (at least to me), they aren't in ordinary text...[/QUOTE]

If you have any general or specific questions about the pseudo-code of algorithms, please send to us. We will try to answer them.

 Till 2019-04-02 19:53

[QUOTE=nesio;512465]If you have any general or specific questions about the pseudo-code of algorithms, please send to us. We will try to answer them.[/QUOTE]

Hi Nesio,
this looks quite interesting.

I have a question concerning the "simple multiplication" algorithm: Could you explain in english how 'm' is determined? I found that m=5040 works ok but is there something better than choosing a constant?

 danaj 2019-04-02 21:13

The SM method looks to be Hart's OLF (as alluded to in the text) using a multiplier. Translating the "Simple Multiplication algorithm" from pseudocode into C becomes [b]exactly[/b] my existing code for HOLF. The recursive SM is where things look interesting for larger values.

For multipliers 5040, 720, and 480 work pretty well as constants but the issue often becomes what fits without overflow.

Table 1 shows SM (e.g. Hart's OLF) beating Lehman in the chosen measure. There is some debate on what is faster in practice, and the recent improved Lehman would be very competitive.

 nesio 2019-04-02 22:26

[QUOTE=Till;512470]Hi Nesio,
this looks quite interesting.

I have a question concerning the "simple multiplication" algorithm: Could you explain in english how 'm' is determined? I found that m=5040 works ok but is there something better than choosing a constant?[/QUOTE]

Till!
In MMFFNN method (both in SM and RM) sought factor “k” most often has a number of prime divisors. So multiplier “m” sets some initial value of “k”. Besides “m > 1” is helpful for special hard-factoring numbers of MMFFNN method (see the examples of such numbers for RM algorithm in the article).
In common case “m” is non-linear from r (r is a decimal digits size of factoring number “n”). But there is an optimum of “m” as a compromise between negative (cost of multiplication and growth of N =m*n*k) and positive (growth of the number of prime divisors of “m”) factors.
If apply equal (balanced) value “m” to SM and RM algorithms as m_sm = 4 * m_rm there is a critical number of decimal digits r* when the complexity q(r) of SM will be always some greater than of RM: r* = [6 * log10 (m_rm)], where the square brackets indicate of rounding up.

All times are UTC. The time now is 06:06.