A Taste of Pi: Clocks, Set, and the Secret Math of Spies Katherine - - PowerPoint PPT Presentation

a taste of pi clocks set and the secret math of spies
SMART_READER_LITE
LIVE PREVIEW

A Taste of Pi: Clocks, Set, and the Secret Math of Spies Katherine - - PowerPoint PPT Presentation

A Taste of Pi: Clocks, Set, and the Secret Math of Spies Katherine E. Stange SFU / PIMS-UBC October 16, 2010 The Math of Clocks Here is a picture of a clock. The Math of Clocks Here is a picture of a clock. 3 pm The Math of Clocks Here is


slide-1
SLIDE 1

A Taste of Pi: Clocks, Set, and the Secret Math of Spies

Katherine E. Stange SFU / PIMS-UBC October 16, 2010

slide-2
SLIDE 2

The Math of Clocks

Here is a picture of a clock.

slide-3
SLIDE 3

The Math of Clocks

Here is a picture of a clock. 3 pm

slide-4
SLIDE 4

The Math of Clocks

Here is a picture of a clock. 3 pm + 2 hours =

slide-5
SLIDE 5

The Math of Clocks

Here is a picture of a clock. 3 pm + 2 hours = 5 pm

slide-6
SLIDE 6

The Math of Clocks

Here is a picture of a clock. 3 pm + 2 hours = 5 pm 3 + 2 ≡ 5 mod 12

slide-7
SLIDE 7

The Math of Clocks

Here is a picture of a clock. 3 pm + 2 hours = 5 pm 3 + 2 ≡ 5 mod 12 2 pm +11 hours =

slide-8
SLIDE 8

The Math of Clocks

Here is a picture of a clock. 3 pm + 2 hours = 5 pm 3 + 2 ≡ 5 mod 12 2 pm +11 hours = 1 am

slide-9
SLIDE 9

The Math of Clocks

Here is a picture of a clock. 3 pm + 2 hours = 5 pm 3 + 2 ≡ 5 mod 12 2 pm +11 hours = 1 am 2 + 11 ≡ 1 mod 12

slide-10
SLIDE 10

The Math of Clocks

It’s a little like rolling up a long line of the integers into a circle:

slide-11
SLIDE 11

The Math of Clocks

We could have a clock with any number of hours on it. Here is a picture of a clock with 7 hours.

slide-12
SLIDE 12

The Math of Clocks

We could have a clock with any number of hours on it. Here is a picture of a clock with 7 hours. 2 o’clock +11 hours =

slide-13
SLIDE 13

The Math of Clocks

We could have a clock with any number of hours on it. Here is a picture of a clock with 7 hours. 2 o’clock +11 hours = 6 o’clock

slide-14
SLIDE 14

The Math of Clocks

We could have a clock with any number of hours on it. Here is a picture of a clock with 7 hours. 2 o’clock +11 hours = 6 o’clock 2 + 11 ≡ 6 mod 7

slide-15
SLIDE 15

The Math of Clocks

We could have a clock with any number of hours on it. Here is a picture of a clock with 7 hours. 2 o’clock +11 hours = 6 o’clock 2 + 11 ≡ 6 mod 7 1 o’clock −24 hours =

slide-16
SLIDE 16

The Math of Clocks

We could have a clock with any number of hours on it. Here is a picture of a clock with 7 hours. 2 o’clock +11 hours = 6 o’clock 2 + 11 ≡ 6 mod 7 1 o’clock −24 hours = 5 o’clock

slide-17
SLIDE 17

The Math of Clocks

We could have a clock with any number of hours on it. Here is a picture of a clock with 7 hours. 2 o’clock +11 hours = 6 o’clock 2 + 11 ≡ 6 mod 7 1 o’clock −24 hours = 5 o’clock 1 − 24 ≡ 5 mod 7

slide-18
SLIDE 18

The Math of Clocks

We could have a clock with any number of hours on it. Here is a picture of a clock with 7 hours. 2 o’clock +11 hours = 6 o’clock 2 + 11 ≡ 6 mod 7 1 o’clock −24 hours = 5 o’clock 1 − 24 ≡ 5 mod 7 2 o’clock ×4 =

slide-19
SLIDE 19

The Math of Clocks

We could have a clock with any number of hours on it. Here is a picture of a clock with 7 hours. 2 o’clock +11 hours = 6 o’clock 2 + 11 ≡ 6 mod 7 1 o’clock −24 hours = 5 o’clock 1 − 24 ≡ 5 mod 7 2 o’clock ×4 = 1 o’clock

slide-20
SLIDE 20

The Math of Clocks

We could have a clock with any number of hours on it. Here is a picture of a clock with 7 hours. 2 o’clock +11 hours = 6 o’clock 2 + 11 ≡ 6 mod 7 1 o’clock −24 hours = 5 o’clock 1 − 24 ≡ 5 mod 7 2 o’clock ×4 = 1 o’clock 2 × 4 ≡ 1 mod 7 We could label these with days of the week...

slide-21
SLIDE 21

The Math of Clocks

We call the N-hour clock ZN, and it has N elements: ZN = {0, 1, 2, 3, . . . , N − 1} We can add, subtract and multiply elements of ZN (and get back elements of ZN).

slide-22
SLIDE 22

The Math of Clocks

◮ The math of clocks is called Modular Arithmetic and N is

called the modulus.

◮ Two numbers A and B are the same “modulo N” if A and B

differ by adding N some number of times.

slide-23
SLIDE 23

The Math of Clocks

◮ The math of clocks is called Modular Arithmetic and N is

called the modulus.

◮ Two numbers A and B are the same “modulo N” if A and B

differ by adding N some number of times.

◮ We could say that a hamburger and a cheeseburger are

the same modulo cheese.

slide-24
SLIDE 24

The Math of Clocks

◮ The math of clocks is called Modular Arithmetic and N is

called the modulus.

◮ Two numbers A and B are the same “modulo N” if A and B

differ by adding N some number of times.

◮ We could say that a hamburger and a cheeseburger are

the same modulo cheese.

◮ Some people say Gauss invented modular arithmetic, but

humans have used it as long as we’ve had...

◮ clocks ◮ weeks ◮ gears ◮ money ◮ ...

◮ It’s the beginning of the study of Number Theory.

slide-25
SLIDE 25

The Math of Clocks

Let the festivities begin!

slide-26
SLIDE 26

The Math of Clocks - Multiplication Tables

Z2 0 1 0 0 0 1 0 1 Z3 0 1 2 0 0 0 1 0 1 2 2 0 2 1

slide-27
SLIDE 27

The Math of Clocks - Multiplication Tables

Z4 0 1 2 3 0 0 0 0 1 0 1 2 3 2 0 2 0 2 3 0 3 2 1 Z5 0 1 2 3 4 0 0 0 0 0 1 0 1 2 3 4 2 0 2 4 1 3 3 0 3 1 4 2 4 0 4 3 2 1

slide-28
SLIDE 28

The Math of Clocks - Multiplication Tables

Z6 0 1 2 3 4 5 0 0 0 0 0 0 1 0 1 2 3 4 5 2 0 2 4 0 2 4 3 0 3 0 3 0 3 4 0 4 2 0 4 2 5 0 5 4 3 2 1

slide-29
SLIDE 29

The Math of Clocks - Multiplication Tables

Z7 0 1 2 3 4 5 6 0 0 0 0 0 0 0 1 0 1 2 3 4 5 6 2 0 2 4 6 1 3 5 3 0 3 6 2 5 1 4 4 0 4 1 5 2 6 3 5 0 5 3 1 6 4 2 6 0 6 5 4 3 2 1

slide-30
SLIDE 30

The Math of Clocks - Multiplication Tables

Z8 0 1 2 3 4 5 6 7 0 0 0 0 0 0 0 0 1 0 1 2 3 4 5 6 7 2 0 2 4 6 0 2 4 6 3 0 3 6 1 4 7 2 5 4 0 4 0 4 0 4 0 4 5 0 5 2 7 4 1 6 3 6 0 6 4 2 0 6 4 2 7 0 7 6 5 4 3 2 1

slide-31
SLIDE 31

The Math of Clocks - Multiplication Tables

Z9 0 1 2 3 4 5 6 7 8 0 0 0 0 0 0 0 0 0 1 0 1 2 3 4 5 6 7 8 2 0 2 4 6 8 1 3 5 7 3 0 3 6 0 3 6 0 3 6 4 0 4 8 3 7 2 6 1 5 5 0 5 1 6 2 7 3 8 4 6 0 6 3 0 6 3 0 6 3 7 0 7 5 3 1 8 6 4 2 8 0 8 7 6 5 4 3 2 1

slide-32
SLIDE 32

The Math of Clocks - Multiplication Tables

Z11 1 2 3 4 5 6 7 8 9 10 1 1 2 3 4 5 6 7 8 9 10 2 2 4 6 8 10 1 3 5 7 9 3 3 6 9 1 4 7 10 2 5 8 4 4 8 1 5 9 2 6 10 3 7 5 5 10 4 9 3 8 2 7 1 6 6 6 1 7 2 8 3 9 4 10 5 7 7 3 10 6 2 9 5 1 8 4 8 8 5 2 10 7 4 1 9 6 3 9 9 7 5 3 1 10 8 6 4 2 10 10 9 8 7 6 5 4 3 2 1

slide-33
SLIDE 33

The Math of Clocks

slide-34
SLIDE 34

The Math of Clocks

  • 1. When N is a prime number, then you can divide in ZN.
slide-35
SLIDE 35

The Math of Clocks

  • 1. When N is a prime number, then you can divide in ZN.
  • 2. This makes ZN a really great number system: it has +, −,

× and ÷.

slide-36
SLIDE 36

The Math of Clocks

  • 1. When N is a prime number, then you can divide in ZN.
  • 2. This makes ZN a really great number system: it has +, −,

× and ÷.

  • 3. It’s even better than the integers (there’s no 1/2 in the

integers!).

slide-37
SLIDE 37

The Math of Set

The graph of the line y = x + 2 in Z5:

2 X 1 X 0 X 4 X 3 X 3 4 0 1 2

slide-38
SLIDE 38

The Math of Set

The graph of the line y = x + 2 in Z5:

2 X 1 X 0 X 4 X 3 X 3 4 0 1 2

The graph is a little like Asteroids!

slide-39
SLIDE 39

The Math of Set

The graph of the line y = 3x + 4 in Z5:

2 X 1 X X 4 X 3 X 3 4 0 1 2

slide-40
SLIDE 40

The Math of Set

slide-41
SLIDE 41

The Math of Set

Set images due to Diane Maclagan and Ben Davis

slide-42
SLIDE 42

The Math of Set

http://www.setgame.com/

slide-43
SLIDE 43

The Math of Spies

Here’s the graph of y2 = x3 − 3x + 6 in the usual world (real numbers):

slide-44
SLIDE 44

The Math of Spies

Adding two points to get another: P + Q + R = O.

slide-45
SLIDE 45

The Math of Spies

Adding a point and its negative: P + Q + Q = O.

slide-46
SLIDE 46

The Math of Spies

Adding a point and its negative: P + −P = O.

slide-47
SLIDE 47

The Math of Spies

A point which adds with itself to zero: P + P = O.

slide-48
SLIDE 48

The Math of Spies

The graph of y2 = x3 + 2x + 1 in Z5:

2 X X 1 X 4 X 3 X X 3 4 0 1 2

This is called an “Elliptic Curve”

slide-49
SLIDE 49

The Math of Spies

Here’s an elliptic curve in Z10007.

slide-50
SLIDE 50

The Math of Spies

2 A C 1 B 4

  • B

3 -A

  • C

3 4 0 1 2

slide-51
SLIDE 51

The Math of Spies

2 A C 1 X B X 4

  • B

3 -A

  • C

3 4 0 1 2

slide-52
SLIDE 52

The Math of Spies

2 A C 1 X B X 4

  • B

3 -A

  • C

3 4 0 1 2

−A + −B + C = 0

slide-53
SLIDE 53

The Math of Spies

2 A C 1 X B X 4

  • B

3 -A

  • C

3 4 0 1 2

−A + −B + C = 0 A + B = C

slide-54
SLIDE 54

The Math of Spies

2 A C 1 B 4

  • B

3 -A

  • C

3 4 0 1 2

slide-55
SLIDE 55

The Math of Spies

2 A C 1 B X X 4

  • B

3 -A X

  • C

3 4 0 1 2

slide-56
SLIDE 56

The Math of Spies

2 A C 1 B X X 4

  • B

3 -A X

  • C

3 4 0 1 2

A + A + −B = 0

slide-57
SLIDE 57

The Math of Spies

2 A C 1 B X X 4

  • B

3 -A X

  • C

3 4 0 1 2

A + A + −B = 0 A + A = B

slide-58
SLIDE 58

The Math of Spies

2 A C 1 2A 4

  • 2A

3 -A

  • C

3 4 0 1 2

A + A + −B = 0 A + A = B So B = 2A

slide-59
SLIDE 59

The Math of Spies

2 A C 1 2A 4

  • 2A

3 -A

  • C

3 4 0 1 2

A + A + −B = 0 A + A = B So B = 2A From last slide: C = A + B = A + 2A = 3A

slide-60
SLIDE 60

The Math of Spies

2 A 3A 1 2A 4

  • 2A

3 -A

  • 3A

3 4 0 1 2

A + A + −B = 0 A + A = B So B = 2A From last slide: C = A + B = A + 2A = 3A So C = 3A

slide-61
SLIDE 61

The Math of Spies

2 A 3A 1 2A 4 5A 3 6A 4A 3 4 0 1 2

With a little more work, we find out that −3A = 4A, −2A = 5A and −A = 6A, and finally that 7A = O.

slide-62
SLIDE 62

The Math of Spies - Elliptic Curve Addition Table

E O A 2A 3A 4A 5A 6A O O A 2A 3A 4A 5A 6A A A 2A 3A 4A 5A 6A O 2A 2A 3A 4A 5A 6A O A 3A 3A 4A 5A 6A O A 2A 4A 4A 5A 6A O A 2A 3A 5A 5A 6A O A 2A 3A 4A 6A 6A O A 2A 3A 4A 5A

slide-63
SLIDE 63

The Math of Spies - Modular Arithmetic Addition Table

Z7 O 1 2 3 4 5 6 O 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

slide-64
SLIDE 64

The Math of Spies

◮ Suppose I gave you two numbers, P = 9 and Q = 45 and I

said,

slide-65
SLIDE 65

The Math of Spies

◮ Suppose I gave you two numbers, P = 9 and Q = 45 and I

said, “How many times need I add P to itself to get Q?”

slide-66
SLIDE 66

The Math of Spies

◮ Suppose I gave you two numbers, P = 9 and Q = 45 and I

said, “How many times need I add P to itself to get Q?”

◮ You would divide 45 by 9 and get the answer: 5. Division is

fairly easy for integers!

slide-67
SLIDE 67

The Math of Spies

◮ Suppose I gave you two numbers, P = 9 and Q = 45 and I

said, “How many times need I add P to itself to get Q?”

◮ You would divide 45 by 9 and get the answer: 5. Division is

fairly easy for integers!

◮ It takes more time as the numbers get bigger, but the time

it takes grows with the number of digits of the numbers.

slide-68
SLIDE 68

The Math of Spies

◮ Suppose I gave you two numbers modulo 5, P = 2 and

Q = 3 and I said,

slide-69
SLIDE 69

The Math of Spies

◮ Suppose I gave you two numbers modulo 5, P = 2 and

Q = 3 and I said, “How many times need I add P to itself to get Q?”

slide-70
SLIDE 70

The Math of Spies

◮ Suppose I gave you two numbers modulo 5, P = 2 and

Q = 3 and I said, “How many times need I add P to itself to get Q?”

◮ This is trickier. You could complete a multiplication table

and look in it to search for the answer. It turns out there are faster ways.

slide-71
SLIDE 71

The Math of Spies

◮ Suppose I gave you two numbers modulo 5, P = 2 and

Q = 3 and I said, “How many times need I add P to itself to get Q?”

◮ This is trickier. You could complete a multiplication table

and look in it to search for the answer. It turns out there are faster ways.

◮ The smartest algorithms (can you come up with one?), are

about as fast as division for the integers. The time it takes grows with the number of digits of the modulus.

slide-72
SLIDE 72

The Math of Spies

2 P X 1 X 4 Q 3 X X 3 4 0 1 2

◮ Suppose I gave you the

points P and Q and I said “How many times need I add P to itself to get Q?”

slide-73
SLIDE 73

The Math of Spies

2 P X 1 X 4 Q 3 X X 3 4 0 1 2

◮ Suppose I gave you the

points P and Q and I said “How many times need I add P to itself to get Q?”

◮ You might remember that

we found Q = 5P from our multiplication table.

slide-74
SLIDE 74

The Math of Spies

2 P X 1 X 4 Q 3 X X 3 4 0 1 2

◮ Suppose I gave you the

points P and Q and I said “How many times need I add P to itself to get Q?”

◮ You might remember that

we found Q = 5P from our multiplication table.

◮ But it was a lot of work! Is

there an easy way to do this?

slide-75
SLIDE 75

The Math of Spies

No one knows any efficient way to solve this problem!!

slide-76
SLIDE 76

The Math of Spies

No one knows any efficient way to solve this problem!! The time taken by good algorithms grows with about the square root of the size of the modulus.

slide-77
SLIDE 77

The Math of Spies

Modern cryptography is based on mathematical operations that are easy to do and hard to undo. Example:

slide-78
SLIDE 78

The Math of Spies

Modern cryptography is based on mathematical operations that are easy to do and hard to undo. Example:

◮ Getting pregnant.

slide-79
SLIDE 79

The Math of Spies

Modern cryptography is based on mathematical operations that are easy to do and hard to undo. Example:

◮ Getting pregnant. ◮ Multiplying numbers is easy, but factoring them is hard.

slide-80
SLIDE 80

The Math of Spies

Modern cryptography is based on mathematical operations that are easy to do and hard to undo. Example:

◮ Getting pregnant. ◮ Multiplying numbers is easy, but factoring them is hard. ◮ On an elliptic curve, adding a point P to itself many times is

  • easy. Figuring out how many times it was added (if you

weren’t watching) is hard. This is the elliptic curve discrete logarithm problem.

slide-81
SLIDE 81

The Math of Spies

Alice and Bob want to share a secret.

slide-82
SLIDE 82

The Math of Spies

Alice and Bob want to share a secret. A point P on an elliptic curve is general knowledge. Alice Bob

slide-83
SLIDE 83

The Math of Spies

Alice and Bob want to share a secret. A point P on an elliptic curve is general knowledge. Alice Bob secret a b

slide-84
SLIDE 84

The Math of Spies

Alice and Bob want to share a secret. A point P on an elliptic curve is general knowledge. Alice Bob secret a b public aP bP

slide-85
SLIDE 85

The Math of Spies

Alice and Bob want to share a secret. A point P on an elliptic curve is general knowledge. Alice Bob secret a b public aP bP Alice and Bob can both compute abP.

slide-86
SLIDE 86

The Math of Spies

Alice and Bob want to share a secret. A point P on an elliptic curve is general knowledge. Alice Bob secret a b public aP bP Alice and Bob can both compute abP. No one else can compute it!

slide-87
SLIDE 87

The Math of Spies

Here the size of the modulus N we use for this algorithm in your web browser, when you log onto a secure site: N = 68647976601306097149819007990813932172694353 0014330540939446345918554318339765605212255964066 1454554977296311391480858037121987999716643812574 028291115057151

slide-88
SLIDE 88

The Math of Spies

◮ The hard problem of factoring is used for cryptography

called RSA.

slide-89
SLIDE 89

The Math of Spies

◮ The hard problem of factoring is used for cryptography

called RSA.

◮ The elliptic curve discrete logarithm problem is used for

elliptic curve cryptography (ECC).

slide-90
SLIDE 90

The Math of Spies

◮ The hard problem of factoring is used for cryptography

called RSA.

◮ The elliptic curve discrete logarithm problem is used for

elliptic curve cryptography (ECC).

◮ Together, these two hard problems are used for pretty

nearly all the cryptography in the modern world: your bank, your cell phone, your computer.

slide-91
SLIDE 91

The Math of Spies

◮ The hard problem of factoring is used for cryptography

called RSA.

◮ The elliptic curve discrete logarithm problem is used for

elliptic curve cryptography (ECC).

◮ Together, these two hard problems are used for pretty

nearly all the cryptography in the modern world: your bank, your cell phone, your computer.

◮ (No one has come up with a security method based on

pregnancy.)

slide-92
SLIDE 92

The Math of Spies

◮ The hard problem of factoring is used for cryptography

called RSA.

◮ The elliptic curve discrete logarithm problem is used for

elliptic curve cryptography (ECC).

◮ Together, these two hard problems are used for pretty

nearly all the cryptography in the modern world: your bank, your cell phone, your computer.

◮ (No one has come up with a security method based on

pregnancy.)

◮ If you can come up with a fast algorithm for these hard

problems,

slide-93
SLIDE 93

The Math of Spies

◮ The hard problem of factoring is used for cryptography

called RSA.

◮ The elliptic curve discrete logarithm problem is used for

elliptic curve cryptography (ECC).

◮ Together, these two hard problems are used for pretty

nearly all the cryptography in the modern world: your bank, your cell phone, your computer.

◮ (No one has come up with a security method based on

pregnancy.)

◮ If you can come up with a fast algorithm for these hard

problems, you would immediately become hugely famous,

slide-94
SLIDE 94

The Math of Spies

◮ The hard problem of factoring is used for cryptography

called RSA.

◮ The elliptic curve discrete logarithm problem is used for

elliptic curve cryptography (ECC).

◮ Together, these two hard problems are used for pretty

nearly all the cryptography in the modern world: your bank, your cell phone, your computer.

◮ (No one has come up with a security method based on

pregnancy.)

◮ If you can come up with a fast algorithm for these hard

problems, you would immediately become hugely famous, you would get job offers from every government in the world,

slide-95
SLIDE 95

The Math of Spies

◮ The hard problem of factoring is used for cryptography

called RSA.

◮ The elliptic curve discrete logarithm problem is used for

elliptic curve cryptography (ECC).

◮ Together, these two hard problems are used for pretty

nearly all the cryptography in the modern world: your bank, your cell phone, your computer.

◮ (No one has come up with a security method based on

pregnancy.)

◮ If you can come up with a fast algorithm for these hard

problems, you would immediately become hugely famous, you would get job offers from every government in the world, and would get invited on Oprah.

slide-96
SLIDE 96

Thank you!

◮ Thanks to SFU, Veselin Jungic, Malgorzata Dubiel and

Nadia Nosrati, and Jonathan Wise.

◮ And to you! Feel free to email me anytime (email on my

website).