Wheel Factorization - Analysis and Computer Implementation

Analysis and Computer Implementation

Given a number k > n, we know that it is not prime if k mod n and n are not relatively prime. The fraction of numbers that the wheel sieve eliminates is 1 - phi (n) / n, which is also the efficiency of the sieve. From the properties of phi, it can easily be seen that the most efficient sieve smaller than x is the one where and . It can also be demonstrated that this efficiency rises very slowly for large n.

To be of maximum use on a computer, we want the numbers that are smaller than n and relatively prime to it as a set. Using a few observations, the set can easily be generated :

  1. Start with, which is the set for .
  2. Let be the set where k has been added to each element of .
  3. Then where represents the operation of removing all multiples of x.
  4. 1 and will be the two smallest of when removing the need to compute prime numbers separately
  5. The set is symmetrical around, reducing storage requirements.

Read more about this topic:  Wheel Factorization

Famous quotes containing the words analysis and and/or computer:

    “Cubism had been an analysis of the object and an attempt to put it before us in its totality; both as analysis and as synthesis, it was a criticism of appearance. Surrealism transmuted the object, and suddenly a canvas became an apparition: a new figuration, a real transfiguration.”
    —Octavio Paz (b. 1914)

    “Family life is not a computer program that runs on its own; it needs continual input from everyone.”
    —Neil Kurshan (20th century)