05.01.2015 Views

Course notes (chap. 1 Number Theory, chap. 2 ... - McGill University

Course notes (chap. 1 Number Theory, chap. 2 ... - McGill University

Course notes (chap. 1 Number Theory, chap. 2 ... - McGill University

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Algorithm 2.2 ( Kalai randfact(n) )<br />

1: Generate a sequence n = s 0 ≥ s 1 ≥ s 2 ≥ ... ≥ s l =1by picking<br />

s i+1 ∈ R {1, 2,...,s i },untilreachings l =1.<br />

2: Let r be the product of the prime s i ’s, 1 ≤ i ≤ l.<br />

3: IF r ≤ n THEN with probability r/n RETURN (r, {prime s i ’s}).<br />

4: Otherwise, RESTART.<br />

∏<br />

Theorem 2.4 The probability of producing r at step 2 is M n /r, whereM n =<br />

(1 − 1/p).<br />

p≤n<br />

Thus by outputting r with probability r/n in step 3, each possible value<br />

is generated with equal probability M n r<br />

= M n<br />

r n n<br />

.Theoverallprobabilitythat<br />

some small enough r is produced and chosen in step 3 is ∑ M n<br />

1≤r≤n n<br />

= M n .<br />

Theorem 2.5 lim<br />

n→∞<br />

M n log n = e −γ ≈ 0.5614594836

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!