« previous | Tuesday, February 19, 2013 | next »
Inequality Relevant to Primes
For all , , we have
Recall the probability of picking a random number in (1,n) is greater than
So the chances of failing to pick a prime in tries is
By substituting for and for in the lemma above, the chances of failing to find a prime after tries is:
Therefore, after tries, the chances of you finding a prime is at least
A more precise estimate on the number of primes less than () is:
Riemann Hypothesis
(1859; One reformulation)
Complex analysis to number theory
(Still unproved)
Deeper question: count primes in arithmetic progression (very relevant to cryptography)
2 3 5 7 11 13 17 19 23 29 31 ...
equiv 3 mod 4: X X X X X X
What about primes of the form ?
and should be relatively prime, so there are many classes
Dirichlet's Theorem
Let π(x; n, a) = number of primes ≤ x which are ≡ a (mod n)
Then
Applied to Riemann Hypothesis, we get the Generalized Riemann Hypothesis:
GRH is a huge problem from analytic number theory and greatly impacts cryptography and algorithms
Jacobi Symbol
if with distinct primes , , and
We define
Note:
- Definition is absurd computationally! (requires factoring)
- Legendre symbol is a special case of the Jacobi symbol
- is not always (e.g. , whereas
- need not imply is a square mod
- means is not a square (i.e. one-sided check for square-ness
Jacobi yield a much faster way to compute Legendre symbols:
Theorem. If is odd,
- and then
- if then
- Gauss' law of quadratic reciprocity (1796): If is odd and then
Example
since but
by property 1
Apply properties 5 and 1 again...
Apply property 2...
This becomes by property 4
Apply 5 and 1 two more times...
Now this is the first time , so by property 5 and 1,
Note that , so by property 2,
Now we can compute as normal...
This was a lot faster than if we would have tried to compute . moral: quadratic reciprocity is much faster
Pratt's Theorem
Last lecture, Dr. Rojas claimed that Jacobi symbols lead to a fast randomized primality test. Let's see a related test:
Key idea: verifying vs. deciding NP problems are easily verified, but finding solution is hard
might go back earlier: Kraitchic-Lehmer
is prime iff there is an with AND , where is prime
Compositeness is easily verified: check a short certificate (candidate factor)
What about primality? Pratt's theorem tells us we can find small certificates to verify primality!
Example
Hint: this tree is the short certificate
617, (3)
|-- 2
|-- 7, (3)
| |-- 2
| `-- 3, (2)
`-- 11, (2)
|-- 2
`-- 5, (2)
`-- 2
For , works! In other words, and for all . These are exactly 2, 7, and 11, so to verify if these are prime, we recursively apply Pratt's theorem.
So a certificate of primality for consists of
- an satisfying the conditions of the theorem
- a list of all primes dividing
- Cirtificates fro those .
Verifyingprimality of takes only bit operations.
Finding certificate could be hard!