Jump to content

Bach's algorithm

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by 192.75.48.150 (talk) at 20:59, 18 September 2006 (fix math tag). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

Bach's algorithm is an efficient algorithm for generating random numbers along with their factorization, named after its discoverer, Eric Bach. It is of interest because no algorithm is known that efficiently factors numbers, so the straightforward method, namely generating a random number and then factoring it, is impractical.

Kalai's algorithm is a simpler but less efficient way of doing the same thing.

Overview

Bach's algorithm produces a number x uniformly at random between a given limit N and N/2, specifically , along with its factorization. It does this by picking a prime number p and an exponent a such that , according to a certain distribution. Bach's algorithm is then recursively applied to generate a number y uniformly at random between M and M/2, where , along with the factorization of y. It then sets , and appends to the factorization of y to produce the factorization of x. This gives x which logarithmic distribution over the desired range; rejection sampling is then used to get a uniform distribution.

References

  • Bach, Eric. Analytic methods in the Analysis and Design of Number-Theoretic Algorithms, MIT Press, 1984. Chapter 2, "Generation of Random Factorizations", part of which is available online here.
  • Bach, Eric. How to Generate Factored Random Numbers, SIAM Journal of Computing, 17 (1988), pp 179-193.