<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://en.zaoniao.it/index.php?action=history&amp;feed=atom&amp;title=Bach%27s_algorithm</id>
	<title>Bach's algorithm - Revision history</title>
	<link rel="self" type="application/atom+xml" href="http://en.zaoniao.it/index.php?action=history&amp;feed=atom&amp;title=Bach%27s_algorithm"/>
	<link rel="alternate" type="text/html" href="http://en.zaoniao.it/index.php?title=Bach%27s_algorithm&amp;action=history"/>
	<updated>2026-05-16T00:55:13Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.32.0</generator>
	<entry>
		<id>http://en.zaoniao.it/index.php?title=Bach%27s_algorithm&amp;diff=3130&amp;oldid=prev</id>
		<title>Admin: Created page with &quot;'''Bach's algorithm''' is a probabilistic polynomial time algorithm for generating random numbers along with their factorization,...&quot;</title>
		<link rel="alternate" type="text/html" href="http://en.zaoniao.it/index.php?title=Bach%27s_algorithm&amp;diff=3130&amp;oldid=prev"/>
		<updated>2019-04-11T04:05:19Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;&amp;#039;&amp;#039;&amp;#039;Bach&amp;#039;s algorithm&amp;#039;&amp;#039;&amp;#039; is a probabilistic &lt;a href=&quot;/index.php?title=Polynomial_time&amp;amp;action=edit&amp;amp;redlink=1&quot; class=&quot;new&quot; title=&quot;Polynomial time (page does not exist)&quot;&gt;polynomial time&lt;/a&gt; &lt;a href=&quot;/index.php?title=Algorithm&amp;amp;action=edit&amp;amp;redlink=1&quot; class=&quot;new&quot; title=&quot;Algorithm (page does not exist)&quot;&gt;algorithm&lt;/a&gt; for generating &lt;a href=&quot;/index.php?title=Pseudorandom_number_generator&amp;amp;action=edit&amp;amp;redlink=1&quot; class=&quot;new&quot; title=&quot;Pseudorandom number generator (page does not exist)&quot;&gt;random&lt;/a&gt; numbers along with their &lt;a href=&quot;/index.php?title=Factorization&amp;amp;action=edit&amp;amp;redlink=1&quot; class=&quot;new&quot; title=&quot;Factorization (page does not exist)&quot;&gt;factorization&lt;/a&gt;,...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;'''Bach's algorithm''' is a probabilistic [[polynomial time]] [[algorithm]] for generating [[pseudorandom number generator|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.&lt;br /&gt;
&lt;br /&gt;
The algorithm performs, in expectation, O(log n) [[primality tests]].&lt;br /&gt;
&lt;br /&gt;
A simpler, but less efficient algorithm (performing, in expectation, O(log&amp;amp;lt;sup&amp;amp;gt;2&amp;amp;lt;/sup&amp;amp;gt; n) primality tests), is known and is due to [[Adam Kalai]]&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
&lt;br /&gt;
Bach's algorithm produces a number ''x'' uniformly at random between a given limit ''N'' and ''N''/2, specifically &amp;amp;lt;math&amp;amp;gt;\frac{N}{2} &amp;amp;lt; x \le N&amp;amp;lt;/math&amp;amp;gt;, along with its factorization. It does this by picking a [[prime number]] ''p'' and an exponent ''a'' such that &amp;amp;lt;math&amp;amp;gt;p^a \le N&amp;amp;lt;/math&amp;amp;gt;, 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 &amp;amp;lt;math&amp;amp;gt;M = \frac{N}{p^a}&amp;amp;lt;/math&amp;amp;gt;, along with the factorization of ''y''. It then sets &amp;amp;lt;math&amp;amp;gt;x = p^{a}y&amp;amp;lt;/math&amp;amp;gt;, and appends &amp;amp;lt;math&amp;amp;gt;p^a&amp;amp;lt;/math&amp;amp;gt; 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.&lt;br /&gt;
&lt;br /&gt;
* [[Eric Bach|Bach, Eric]]. ''Analytic methods in the Analysis and Design of Number-Theoretic Algorithms'', MIT Press, 1984. Chapter 2, &amp;quot;Generation of Random Factorizations&amp;quot;, part of which is available online [http://www.cs.cmu.edu/afs/cs.cmu.edu/academic/class/15750-s02/www/dartboard.pdf here].&lt;br /&gt;
&lt;br /&gt;
==Source==&lt;br /&gt;
&lt;br /&gt;
[http://wikipedia.org/ http://wikipedia.org/]&lt;br /&gt;
==See Also on BitcoinWiki==&lt;br /&gt;
* [[Bitcoin.Me]]&lt;br /&gt;
* [[Bitcoin Blogger]]&lt;br /&gt;
* [[Abitgreedy]]&lt;br /&gt;
* [[Sources and Services]]&lt;br /&gt;
* [[Bitbook.ie]]&lt;/div&gt;</summary>
		<author><name>Admin</name></author>
		
	</entry>
</feed>