1. Dr. Bob Hummel
Potomac Institute for Policy Studies
hummel@PotomacInstitute.org
ORCON: Ask permission before redistributing
Not intended for publication
2. STEM: Science, Technology,
Engineering, & Mathematics
ž STEM includes mathematics
ž But when you call it STEM, do
you think “mathematics”?
ž Math is at the tail end
Are these people learning math?
The Art of Number Theory
February 4, 2013 Dr. Bob Hummel 2
3. The Phenomenon of Math Phobia
ž Math is cumulative
ž For most of the math curriculum
— If you fall behind, you remain
behind
— Answers in math are generally right or wrong
Why do we even bother to teach math?
Don’t calculators and computers obviate math?
The Art of Number Theory
February 4, 2013 Dr. Bob Hummel 3
4. What we teach
ž Arithmetic 2+2= 7X6= 4–6=–2 0+5=5
ž Word problems Sally has 23 cents. She…
ž Algebra 5+x=8
ž Geometry
ž Graphing, pre-calc
ž Calculus f ' (x )dx = f (b) − f (a )
∫
Mostly builds one topic to the next.
Parents reinforce children phobia.
The Art of Number Theory
February 4, 2013 Dr. Bob Hummel 4
5. Why do we teach these?
They are useful…
ž Arithmetic in daily life
ž Word problems are about thinking
ž Calculus for
engineering
February 4, 2013 The Art of Number Theory 5
6. But few actually ever use higher
mathematics
ž Riemann Surfaces
ž Category Theory
ž Homotopy Theory
ž Lipschitz Functions
ž Riemann-Roch
Theorem
ž Algebraic Topology
The Art of Number Theory
February 4, 2013 Dr. Bob Hummel 6
7. Some higher math ends up being
very important
ž Riemannian geometry is the
key to General Relativity
Partial Differential Equations
leads to Computational Fluid
Bernard Riemann
Dynamics, and then flight b. 1826
control
And number
theory, and
theory of
primes, leads
to
cryptography
Lehmer Sieve
The Art of Number Theory
February 4, 2013 Dr. Bob Hummel 7
8. But the real point is to teach
logical thinking
ž We justify math education as
a route to logical thinking
ž Proofs
ž Analysis, vice arguments
ž Brain exercises
The Art of Number Theory
February 4, 2013 Dr. Bob Hummel 8
9. And those STEM fields benefit from
mathematical thinking
ž Mathematics is about analytic
thinking
ž Proofs
ž Intuition: What is provable?
The Art of Number Theory
February 4, 2013 Dr. Bob Hummel 9
10. Let us think
Deeply of Simple Things
ž Arnold E. Ross
— The Ross Math Program
○ 1957 to 2000
○ Dan Shapiro continues the program
— The Ohio State Math program
for High School Students
— Based on Number Theory
The Art of Number Theory
February 4, 2013 Dr. Bob Hummel 10
11. Outcome of the Ross Program
ž A rather large percentage of
graduates became practicing
mathematicians
— Also some famous physicists
ž The big advantage of number theory:
— After some basics, many topics are
independent of one another
— And the basics are simple
The Art of Number Theory
February 4, 2013 Dr. Bob Hummel 11
12. Clock Arithmetic
Example: 10:00 + 3hr = 1:00
10+3≡1 mod 12
10+2≡0 mod 12 10+9=7 mod 12
The Art of Number Theory
February 4, 2013 Dr. Bob Hummel 12
13. Clock Arithmetic with a different clock
7
6
1 4:00 mod 7
Add 5 “hours”
5
2
7
4 3 6
1
5
2
4+5≡2 mod 7
4 3
4+3≡0 mod 7
The Art of Number Theory
February 4, 2013 Dr. Bob Hummel 13
14. Addition table mod 7
+
0
1
2
3
4
5
6
0
0
1
2
3
4
5
6
1
1
2
3
4
5
6
0
2
2
3
4
5
6
0
1
3
3
4
5
6
0
1
2
4
4
5
6
0
1
2
3
5
5
6
0
1
2
3
4
6
6
0
1
2
3
4
5
The Art of Number Theory
February 4, 2013 Dr. Bob Hummel 14
15. But what about multiplication?
X
0
1
2
3
4
5
6
Examples:
0
0
0
0
0
0
0
0
1
0
1
2
3
4
5
6
3X5≡1 mod 15
2
0
2
4
6
1
3
5
2X5≡3 mod 7
3
0
3
6
2
5
1
4
4
0
4
1
5
2
6
3
5X5≡4 mod 7
5
0
5
3
1
6
4
2
6X6≡1 mod 7
6
0
6
5
4
3
2
1
The Art of Number Theory
February 4, 2013 Dr. Bob Hummel 15
16. Under multiplication, Up is an
Abeilian Group
ž Zp, p a prime, = {0,1,2,3,… p–1}
ž Up, p a prime, = {1,2,3,… p–1}
ž All group properties inherited from R,
except:
— Multiplicative inverses
ž For any a in Up, other than 0, find a–1
such that a X a–1=1 mod p
Z7, Z17, Z213466917–1
February 4, 2013 The Art of Number Theory 16
17. Greatest common divisor, also called
the greatest common factor
ž gcd(6,9)=3
ž gcd(55,121)=11
ž gcd(35,49)=7
ž In general, a common divisor larger than
every other common divisor
ž a and b are “relatively prime” if gcd(a,b)=1
ž If p is prime, then gcd(a,p)=1 unless a=np
— I.e., unless a ≡ 0 mod p
February 4, 2013 The Art of Number Theory 17
18. Diophantine Equation
ž Given a, b nonzero integers, find x, y
such that ax+by=gcd(a,b)
ž Theorem: There always exist an x and
y, integers, that solve the Diophantine
Equation
ž Examples
— 6X(-1)+9X(1)=3
— 55X(-2)+121X(1)=11
— 35X(3)+49X(-2)=7
February 4, 2013 The Art of Number Theory 18
19. A lovely math theorem
ž LetUn = { x | gcd(x,n)=1}, under
multiplication mod n
ž Then Un is an Abelian Group
ž n a prime is a special case
ž The proof is constructive!
February 4, 2013 The Art of Number Theory 19
20. Some examples
ž U21 = { 1, 2, 4, 5, 8, 10, 11, 13, 16, 17, 19, 20}
ž Inverses:
— 1, 2, 4, 5, 8, 10, 11, 13, 16, 17, 19, 20
— 1, 11, 16, 17, 8, 19, 2, 13, 4, 5, 10, 20
ž Check it out
ž How come this works?
ž And, incidentally, this will be important for
encryption
February 4, 2013 The Art of Number Theory 20
21. Euclid’s Algorithm to find gcd’s
1
gcd( 35, 49) = 7
35 49
35 2
14 35
28
2
b.325 BC
7 14
14
This is the gcd And 1, 2, 2 are the partial quotients
0
1
1+ Continued fraction!
2+ 1
2
February 4, 2013 The Art of Number Theory 21
22. Another Example
2 p=563
230 563 a=230
460 2
103 230 2 2 4 3 2 3
206 4
24 103
563 1
96 3 = 2+
7 24 230 1
21 2 2+
1
3 7 4+
1
6 3 3+
1
2+
1 3 3
3
0 2, 5/2, 22/9, 71/29, 164/67, 563/230
February 4, 2013 The Art of Number Theory 22
23. So, what is the inverse of 230 mod 563
p=563
Answer: −164 = 399
a=230
Diophantine: – 164 · 230 + 67 · 563 = 1
2 2 4 3 2 3
So (– 164) · 230 = 1 mod 563 1
2+
1
I.e., 230 – 1 = 399 mod 563 2+
1
4+
1
Check: 230 · 399 = 91770 = 563 · 163 + 1 3+
1
2+
3
2, 5/2, 22/9, 71/29, 164/67, 563/230
February 4, 2013 The Art of Number Theory 23
24. A faster way of computing partial
quotients
p=563
a=230
2 2 4 3 2 3
0 1 2 5 22 71 164 563
1
1 0 1 2 9 29 67 230 2+
1
2+
1
4+
1
3+
1
2+
Inverse is either 164 or –164 3
2, 5/2, 22/9, 71/29, 164/67, 563/230
February 4, 2013 The Art of Number Theory 24
25. Fermat’s Theorem
ž For any a other than 0 mod p,
a p = a mod p
ž Equivalently
a p–1 ≡ 1 mod p
b. 1601 (or maybe 1607)
February 4, 2013 The Art of Number Theory 25
26. Euler’s Theorem
ž Generalizes Fermat’s Theorem
If gcd(a,n) = 1
a φ(n) ≡ 1 mod n
where φ(n) is the number in the set Un
b. 1707
February 4, 2013 The Art of Number Theory 26
27. This would seem to have little to
do with encryption
ž After all, the simplest encryption is a
letter cipher:
A→N
B→O
C→P
D→Q
…
M→Z
ž This encryption method, indeed, any
simple cipher, is easily broken
February 4, 2013 The Art of Number Theory 27
28. Public key encryption is
completely different concept
ž I tell you how to encrypt a message to
me Encryption key
Me You
ž You encrypt, and send the message to
me Encrypted message
Me You
ž Only I know how to decrypt A variation allows
one to “sign”
Me You messages to
prove authentication
Decrypt
February 4, 2013 The Art of Number Theory 28
29. RSA Public Key encryption
ž Uses number theory!
ž First, I need to tell you how to encrypt a
message
I choose two prime numbers, p and q
Set N = p·q
Choose any E such that gcd(E, (p–1)·(q–1)) = 1
I send you N and E
Me
N and E You
February 4, 2013 The Art of Number Theory 29
30. Quick Aside
ž Finding primes p and q is quick and easy
— Uses a probabilistic algorithm
— Works even if p and q involve hundreds of
digits
ž Also, choosing an E is quick and easy
February 4, 2013 The Art of Number Theory 30
31. RSA Public Key encryption
ž Next,you encrypt the message
ž You have N and E
— As does everyone else
Your message is m1, m2, m3, … Converted to numbers
You compute ni ≡ miE mod N for each mi
You send me ni for each i
ni
Me You
February 4, 2013 The Art of Number Theory 31
32. Quick aside 2
ž Computing xE mod N is easy and fast, by
repeatedly squaring
February 4, 2013 The Art of Number Theory 32
33. In order to decrypt, I need to use the
algorithm to find inverses
ž Recall: E satisfies gcd(E, (p–1)·(q–1)) = 1
ž So I can use the continued fraction
algorithm to find D such that:
ED ≡ 1 mod (p–1)·(q–1)
February 4, 2013 The Art of Number Theory 33
34. And now I can decrypt the message
ž To decrypt: I compute
niD mod N for each ni
ž Amazingly,
mi ≡ niD mod N for each ni
ž But if someone else doesn’t know D,
they can’t decrypt
February 4, 2013 The Art of Number Theory 34
35. How to factor N
ž Given N=p·q, find p and q
ž I.e., factorization
ž Believed to be “hard”
ž But no one knows for sure
February 4, 2013 The Art of Number Theory 35
36. So, the big outstanding question:
How to factor large numbers that are
a product of two primes?
ž As of right now, there is no good way
ž There is also no proof that it can’t be done
February 4, 2013 The Art of Number Theory 36
37. But if we had a quantum computer,
there is a reasonably fast way
ž Based on Shor’s Algorithm
— A probabilistic algorithm, specifically for a
quantum computer
ž Uses number theory:
1. Choose any a in UN (mod N)
2. Find r = o(a) mod N Smallest r such that ar ≡ 1 mod N
3. If r is odd, go back to 1, and try again
4. Compute gcd(ar/2 – 1, N), which be a divisor of N I.e., 1, p, or q
5. If it is 1, then try again (at step 1)
The Art of Number Theory
February 4, 2013 Dr. Bob Hummel 37
38. Quantum Computer role in
breaking RSA
ž Powers of a form a periodic series:
a, a2, a3, a4, a5, …, ar, a, a2, … ar, a, a2, …
ž A quantum computer can quickly do an FFT
to find the period of a periodic series
— The periodic series can be held in log2N qubits
The Art of Number Theory
February 4, 2013 Dr. Bob Hummel 38
39. Prognosis
ž Bob’s opinion:
— Breakthrough’s are coming too fast to
believe there won’t be a practical quantum
computer soon
— RSA will get broken, but some time later
○ Needs a lot of qubits
○ Needs control and a good programming ability
— Quantum computers will mostly be used to
break RSA
○ And for quantum key distribution
The Art of Number Theory
February 4, 2013 Dr. Bob Hummel 39
40. Greater prognosis
ž Can we get over math phobia?
Yes, I hope so.
Enthusiastic, energetic teachers
Who encourage thinking deeply of simple
things
ž But maybe not today
The Art of Number Theory
February 4, 2013 Dr. Bob Hummel 40