User:Lukeus Maximus

Article No.1 : Infinite factor databases

In the calculation of the factors of very large numbers, various methods are employed to find these factors in the shortest time possible. Such factorisation algorithms include Trial_division and the General_number_field_sieve. However, these algorithms, whilst they are the current state of the art, take an increasingly long time to factorise larger integers. It may be a better solution to attempt the creation of an infinite factor database.

What is it?
An infinite factor database is a databse where each integer (from 1 to infinity) is factorised into non-trivial factors (Prime_numbers) and can have its entry in the database searched out quickly, instead of spending a very long time calculating its factors from scratch if the number is sufficiently large. There is also the advantage that, once calculated, the factors of any integer need not be calculated again.

The Problem with Infinity
If an infinite factor database were constructed then no matter how you do it the database will always be of infinite size and will thus not fit in a finite amount of memory. Also worth noting is the point that as long as there are an infinity of numbers, there will always be another integer to factorise and so the database will never be completed. In other words, a database that is forever increasing its size cannot be completed within a finite period of time, no matter how long that time period may be.

However, we can make sure that in calculating and storing all integer factorisations that we take as little time and memory as possible.

Calculating the factors
We know that any integer that is not prime can be factorised into a unique series of prime factors. For example, 65 may be factorised to 5 x 13 and 144 factorises to 2 x 2 x 2 x 2 x 3 x 3. Generally, bigger integers have more factors but this is not always the case (ie, primes). If we are computing factors however, if we use Trial_division to calculate factors by dividing the number in question by each prime in ascending order, we find that we need only find one factor per integer. This is because that once we have found a prime divisor p (an integer), we can find the corresponding divisor q (also an integer) easily (such that n / p = q where n is the integer in question). Q will have all but one of the prime factors of n and will be smaller than n. As q is smaller than n then we have already caclulated its factors previously. Thus n can inherit q's factors without the need for extra calculation.

Storing the Factors
As we have seen, we need only find one divisor for n to find all of it's factors in the database. From this logic, we need only store this divisor of n. If we wish to find all of n's prime factors, we need only access the database repeatedly. This would be done by finding n in the database and adding the connected entry p to our factor list for n. By dividing n by p we get q. By going to q's entry, we would find another prime divisor p2. Divide q by p2 to find q2 and go to its database entry, and so on until the division of px by qx+1 returns a prime number. By repeating this process, the entire factor list for n can be found.

Also, note that to find primes in the table, we need only find the database entries with q values of 0. With the final division in finding the factor list for n, going to qx+1's entry in the database, we would find 0 for it's first prime factor (for there isn't one).

Feasiblility
Infinite factor databases are indeed feasible with today's technology, but many still hold out for an Integer factorisation algorithm that can quickly compute prime factors, no matter how large the integer may be. Also, with an infinite factor database we again return to the problem of infinity; a database of infinite size that forever increases its size would have an infinite cost as it would require an infinite amount of memory, computing power and electricity.