home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: sci.math
- Path: sparky!uunet!gatech!usenet.ins.cwru.edu!agate!dog.ee.lbl.gov!hellgate.utah.edu!fcom.cc.utah.edu!news
- From: NAHAJ@CC.UTAH.EDU (John B 'Nahaj' Halleck, UUCC)
- Subject: SUMMARY of answers: What is this factoring algorithm called?
- Message-ID: <1993Jan6.185027.3219@fcom.cc.utah.edu>
- Sender: news@fcom.cc.utah.edu
- Organization: UNIVERSITY OF UTAH COMPUTER CENTER
- Date: Wed, 6 Jan 93 18:50:27 GMT
- X-News-Reader: VMS NEWS 1.24
- Lines: 40
-
- [I posted a factoring algorithm, and asked what it was called, and where
- I could read up on it.]
-
- Algorithm in question: (C version)
-
- q=p=(long) sqrt(n); guess = p*q;
-
- while (guess != n) {
- if (guess>n) { guess -= p; q--; }
- else { guess += q; p++; }
- }
- printf ("two possibly non-prime factors are %ld, %ld.\n",q,p);
-
- Summary:
-
- Every single reply, without exception, received to date has pointed out
- that it can't be used to factor large numbers. I thought this was
- self evident, but since everyone that answered pointed this out, I'm
- putting it in the summary.
-
- Nobody had a specific name or literature references for the algorithm
- itself. Although several people miss-identified it as Fermat's method.
- Since it factor's by addition and subtraction, and there is a square
- root in the setup, and it adjusts two parameters, it does have superficial
- resemblance to Fermat's method. But a closer look will show that it is
- not.
-
- The most generally usefull answer was that this is one of the infinite
- class of "potential function" factoring algorithms. These are in form
- identical to certain potential function curve drawing algorithms. The
- graphics routines draw curves by trying to stay as close to the zero
- curve of the function as they can, while staying on the latitice. The
- factoring algorithms do the same (for a curve known to go through the
- factors) but also check to see if we are on a lattice point.
- This point is somewhat obscured in the form given by the test
- guess == n
- if one rewrites the test as guess - n = 0 then the potential function
- character of the algorithm becomes more clear.
- [Answer provided by LeRoy Eide <lneide@cc.utah.edu> in a phone call]
-
-