home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!pipex!warwick!uknet!acorn!armltd!dseal
- From: dseal@armltd.co.uk (David Seal)
- Newsgroups: sci.math
- Subject: Re: Factor 69 digit integer
- Message-ID: <10917@armltd.uucp>
- Date: 16 Dec 92 17:52:11 GMT
- References: <1gb5bkINNm71@roundup.crhc.uiuc.edu>
- Sender: dseal@armltd.uucp
- Distribution: sci
- Organization: A.R.M. Ltd, Swaffham Bulbeck, Cambs, UK
- Lines: 38
-
- In article <1gb5bkINNm71@roundup.crhc.uiuc.edu> hougen@focus.csl.uiuc.edu
- (Darrell Roy Hougen) writes:
-
- >[attributions removed, since they were wrong]
- >>>> Please help me. I need the prime factors of
- >>>> 132686104398972053177608575506090561429353935989033525802891469459697
- >
- >Write your own infinite precision arithmetic program to solve the
- >problem. Here's a start:
- >(1) Store each number in an array, e.g., A[1..69] where each element
- >of the array is a digit, ie., 0,1,...,9.
- >(2) Implement a divide and carry algorithm. For each remainder,
- >you'll have to try all dividends from 0 through 9 up the first that
- >doesn't work.
-
- Shouldn't you have put a large number of smileys after this? People might
- take it seriously...
-
- (For those who did:
- (a) implementing infinite precision arithmetic in *decimal* is distinctly
- unusual, not to say inefficient - a base like 2^16 or 2^32 would make
- more sense;
- (b) calculating a quotient digit by trying possibilities from 0 upwards
- until one doesn't work is highly inefficient, especially for
- reasonably large bases - binary chop would be better, some methods
- using the result of single precision divisions described in Knuth yet
- better;
- (c) if you've drawn the conclusion that you can then solve the problem by
- trial division, think again - if this number is at all difficult to
- factorise, you could run trial division on current hardware for the
- current age of the universe and still not have made any real inroads
- on the problem. Fortunately, there *are* better algorithms.
- )
-
- David Seal
- dseal@armltd.co.uk
-
- All opinions are mine only...
-