Docsity

Randomness and Computation: Understanding Prime Numbers and Picking Random Primes, Slides of Discrete Mathematics

Partial preview of the text

Download Randomness and Computation: Understanding Prime Numbers and Picking Random Primes and more Slides Discrete Mathematics in PDF only on Docsity!

Randomness and Computation:

Some Prime Examples

Earth has huge file X that she transferred to Moon. Moon gets Y.

Earth: X Moon: Y

Did you get that file ok? Was the transmission accurate?

Uh, yeah.

Their estimates

x pi( x ) Gauss' Li Legendre x /(log x - 1) 1000 168 178 172 169 10000 1229 1246 1231 1218 100000 9592 9630 9588 9512 1000000 78498 78628 78534 78030 10000000 664579 664918 665138 661459 100000000 5761455 5762209 5769341 5740304 1000000000 50847534 50849235 50917519 50701542 10000000000 455052511 455055614 455743004 454011971

J-S Hadamard

Two independent

proofs of the

Prime Density

Theorem [1896]:

lim 1

n / ln

n

n n

De la Vallée Poussin

Riemann

The Riemann Hypothesis [1859]

lim ( )^ / ln 0 n

n n n n

π →∞

− (^) =

Slightly easier to show

π(n)/n ≥ 1/(2 logn).

Random k bit number is a
random number from 1..2 k
π(2k^ ) / 2k^ ≥ 1/2k
means that a random
k-bit number has
at least a 1/2k chance
of being prime.

Really useful fact

  • A random k-bit number has at least a 1/2k chance of being prime.

So if we pick 2k random k-bit numbers

the expected number of primes on the list is at least 1

Picking A Random Prime

  • “Pick a random n-bit prime.”
  • Strategy:
  1. Generate random n-bit numbers

  2. Test each one for primality

  • [more on this later in the lecture]

Picking A Random Prime

  • “Pick a random n-bit prime.”

1)Generate kn random n-bit numbers

Each trial has a ≥ 1/2n chance of being prime.

Pr[ all kn trials yield composites ] ≤ (1-1/2n) kn^ = (1-1/2n)2n * k/2^ ≤ 1/ek/

Moral of the story

  • Picking a random prime is “almost as easy as” picking a random number.
  • (Provided we can check for primality. More on this later.)
Earth has huge file X that she transferred to
Moon. Moon gets Y.

Earth: X Moon: Y

Did you get that file ok? Was the transmission accurate?

Uh, yeah.

Why is this any good?

  • Easy case:
  • If X = Y, then X ≡ Y (mod p)

Why is this any good?

  • Harder case:
  • What if X ≠ Y? We mess up if p | (X-Y).
  • Define Z = (X-Y). To mess up, p must divide Z.
  • Z is an n-bit number.
  • ⇒ Z is at most 2 n^.
  • But each prime ≥ 2.
  • Hence Z has at most n prime divisors.