Mathematics Behind the Internet James H. Davenport University of - - PowerPoint PPT Presentation

mathematics behind the internet
SMART_READER_LITE
LIVE PREVIEW

Mathematics Behind the Internet James H. Davenport University of - - PowerPoint PPT Presentation

Mathematics Behind the Internet James H. Davenport University of Bath 21 September 2009 Google a new word? Google a new word? I met this woman last night at a party and I came right home and googled her. Google


slide-1
SLIDE 1

Mathematics Behind the Internet

James H. Davenport

University of Bath

21 September 2009

slide-2
SLIDE 2

“Google” — a new word?

slide-3
SLIDE 3

“Google” — a new word?

I met this woman last night at a party and I came right home and googled her.

slide-4
SLIDE 4

“Google” — a new word?

I met this woman last night at a party and I came right home and googled her. 2001 N.Y. Times 11 Mar. III. 12/3

slide-5
SLIDE 5

“Google” — a new word?

I met this woman last night at a party and I came right home and googled her. 2001 N.Y. Times 11 Mar. III. 12/3

slide-6
SLIDE 6

“Google” — a new word?

I met this woman last night at a party and I came right home and googled her. 2001 N.Y. Times 11 Mar. III. 12/3 Part of the Oxford English Dictionary’s definition of this verb.

slide-7
SLIDE 7

Googol

10100 = 10, 000, 000, 000, 000, 000, 000, 000, 000, 000, 000, 000, 000, 000, 000, 000, 000, 000, 000, 000, 000, 000, 000, 000, 000, 000, 000, 000, 000, 000, 000, 000, 000, 000

slide-8
SLIDE 8

Googol

10100 = 10, 000, 000, 000, 000, 000, 000, 000, 000, 000, 000, 000, 000, 000, 000, 000, 000, 000, 000, 000, 000, 000, 000, 000, 000, 000, 000, 000, 000, 000, 000, 000, 000, 000 The name “googol” was invented by a child (Dr. Kasner’s nine-year-old nephew) who was asked to think up a name for a very big number, namely, 1 with a hundred zeros after it. Oxford English Dictionary

slide-9
SLIDE 9

Googol

10100 = 10, 000, 000, 000, 000, 000, 000, 000, 000, 000, 000, 000, 000, 000, 000, 000, 000, 000, 000, 000, 000, 000, 000, 000, 000, 000, 000, 000, 000, 000, 000, 000, 000, 000 The name “googol” was invented by a child (Dr. Kasner’s nine-year-old nephew) who was asked to think up a name for a very big number, namely, 1 with a hundred zeros after it. Oxford English Dictionary We chose our system name, Google, because it is a common spelling of googol, or 10100 and fits well with

  • ur goal of building very large-scale search engines.
slide-10
SLIDE 10

Googol

10100 = 10, 000, 000, 000, 000, 000, 000, 000, 000, 000, 000, 000, 000, 000, 000, 000, 000, 000, 000, 000, 000, 000, 000, 000, 000, 000, 000, 000, 000, 000, 000, 000, 000, 000 The name “googol” was invented by a child (Dr. Kasner’s nine-year-old nephew) who was asked to think up a name for a very big number, namely, 1 with a hundred zeros after it. Oxford English Dictionary We chose our system name, Google, because it is a common spelling of googol, or 10100 and fits well with

  • ur goal of building very large-scale search engines.

The Anatomy of a Large-Scale Hypertextual Web Search Engine by Sergey Brin and Lawrence Page (1998).

slide-11
SLIDE 11

How does Google choose what to show

  • !"#

$%&% %'

()**+%$,

slide-12
SLIDE 12

“I’m feeling lucky” is often right

  • !!"#$%&'()

*&# !!+$

  • &)%%%)%%

,%(-%& !!.#%(-% /&0112)3&&%456&$ 7'%&* /')%(&/$ 3& !!8%)&&&&0$%1)&&* %&4%&*&&9$ 0&%$ :&*&;$<%0& 7<%&%%-%=72 57%5 !!8# %&%%&'&%1 752$ 7$-&0&%-&$ %'%9:&&4$-%&&=*>"+1"? )4$*%&& @1 .%4%%>$)%$#$ (3& !!+&4$(3&5/& !!8-3 0&%%%$-#$7"8/& !!8 %&%4$(3& !!8$A$#4 $ *%%B !!+5 !!84)"&@!!+!4&*@!!+85.!" @4*%=$() %@!"+@5.! "!%.! !?)%&&&<%$ *%%B !!85 !!?4)"%@!!+!4&*@!!+85.!" @4*%=$() %:$)$ *%%B !!?5 !!"!4)"%CC"!"?!4%%@!!+!4&* @!!+85.!" @4*%=$7-&"!$".D0 $ &%%%%$

39 455$$%$&5<5

slide-13
SLIDE 13

Whereas it has a lot to choose from

  • !"#"$%

&'

()"*+',*-. '"*" "/0,0#)#

+1((234$'"%

55'650# +1((234$'"%728881 +)"$498:8%'4.'!1,498:8+ 00# (;6#)(44#!#24

+<+)629

55'650# 4=;4>>>4>>>#>3#>8+<+)6 29?$!%4>>41+)"$498:8% 0"0)6# (;6#)(@#!#@

&6(

55'650# 2254>>>+<+)6&6 (A4@B. "/0,0+04# (;&6#!

1)")"#/(((

55'650# 6C)"*DC*D( ;&E"/'" ()((1 "/0,0A)## (' )((#!#4 F

  • !
slide-14
SLIDE 14

How do we decide which pages to choose

(It isn’t luck!)

slide-15
SLIDE 15

How do we decide which pages to choose

(It isn’t luck!) The basic idea is obvious,

slide-16
SLIDE 16

How do we decide which pages to choose

(It isn’t luck!) The basic idea is obvious, with hindsight. Choose the page with more links to it.

slide-17
SLIDE 17

How do we decide which pages to choose

(It isn’t luck!) The basic idea is obvious, with hindsight. Choose the page with more links to it. A B ↓ ↘ ↓ C D

slide-18
SLIDE 18

How do we decide which pages to choose

(It isn’t luck!) The basic idea is obvious, with hindsight. Choose the page with more links to it. A B ↓ ↘ ↓ C D Obviously D is more popular than C.

slide-19
SLIDE 19

But the Web is much more complicated!

slide-20
SLIDE 20

But the Web is much more complicated!

A B ↓ ↘ ↓ C D ↓ ↓ E F ↓ ↓ G H

slide-21
SLIDE 21

But the Web is much more complicated!

A B ↓ ↘ ↓ C D ↓ ↓ E F ↓ ↓ G H E and F each have only one link to them, but, since D is more popular than C, we should regard F as more popular than E (and H as more popular than G).

slide-22
SLIDE 22

But the Web is much more complicated!

And constantly changing.

slide-23
SLIDE 23

But the Web is much more complicated!

And constantly changing. A B ↓ ↘ ↓ C D ↓ ↙ ↓ E F ↓ ↓ G H

slide-24
SLIDE 24

But the Web is much more complicated!

And constantly changing. A B ↓ ↘ ↓ C D ↓ ↙ ↓ E F ↓ ↓ G H Now E is more popular than F.

slide-25
SLIDE 25

But the Web is much more complicated!

And constantly changing. A B ↓ ↘ ↓ C D ↓ ↙ ↓ E F ↓ ↓ G H Now E is more popular than F. And G is more popular than H,

slide-26
SLIDE 26

But the Web is much more complicated!

And constantly changing. A B ↓ ↘ ↓ C D ↓ ↙ ↓ E F ↓ ↓ G H Now E is more popular than F. And G is more popular than H, even though nothing has changed for G itself.

slide-27
SLIDE 27

But the Web is much much more complicated!

slide-28
SLIDE 28

But the Web is much much more complicated!

  • 1. The real Web contains (lots of) loops.
slide-29
SLIDE 29

But the Web is much much more complicated!

  • 1. The real Web contains (lots of) loops.
  • 2. The real Web is utterly massive — no-one, not even Google,

really knows how big.

slide-30
SLIDE 30

But the Web is much much more complicated!

  • 1. The real Web contains (lots of) loops.
  • 2. The real Web is utterly massive — no-one, not even Google,

really knows how big.

  • 3. The real Web keeps changing.
slide-31
SLIDE 31

But the Web is much much more complicated!

  • 1. The real Web contains (lots of) loops.
  • 2. The real Web is utterly massive — no-one, not even Google,

really knows how big.

  • 3. The real Web keeps changing.
  • 4. The real Web is commercially valuable, so there are incentives

to manipulate it.

slide-32
SLIDE 32

The real Web contains loops

slide-33
SLIDE 33

The real Web contains loops

Nevertheless, we could, in principle write down a set of (linear) equations for the popularity of each page,

slide-34
SLIDE 34

The real Web contains loops

Nevertheless, we could, in principle write down a set of (linear) equations for the popularity of each page, which would depend on the popularity of the pages which linked to it,

slide-35
SLIDE 35

The real Web contains loops

Nevertheless, we could, in principle write down a set of (linear) equations for the popularity of each page, which would depend on the popularity of the pages which linked to it, which would depend

  • n the popularity of the pages which linked to it . . . .
slide-36
SLIDE 36

The real Web contains loops

Nevertheless, we could, in principle write down a set of (linear) equations for the popularity of each page, which would depend on the popularity of the pages which linked to it, which would depend

  • n the popularity of the pages which linked to it . . . .

Then we could solve these equations.

slide-37
SLIDE 37

The real Web contains loops

Nevertheless, we could, in principle write down a set of (linear) equations for the popularity of each page, which would depend on the popularity of the pages which linked to it, which would depend

  • n the popularity of the pages which linked to it . . . .

Then we could solve these equations. These equations have a name: they are the equations for the principal eigenvector of the connectivity matrix of the Web.

slide-38
SLIDE 38

The real Web contains loops

Nevertheless, we could, in principle write down a set of (linear) equations for the popularity of each page, which would depend on the popularity of the pages which linked to it, which would depend

  • n the popularity of the pages which linked to it . . . .

Then we could solve these equations. These equations have a name: they are the equations for the principal eigenvector of the connectivity matrix of the Web. The genius of Brin and Page was to realise that these equations could be solved,

slide-39
SLIDE 39

The real Web contains loops

Nevertheless, we could, in principle write down a set of (linear) equations for the popularity of each page, which would depend on the popularity of the pages which linked to it, which would depend

  • n the popularity of the pages which linked to it . . . .

Then we could solve these equations. These equations have a name: they are the equations for the principal eigenvector of the connectivity matrix of the Web. The genius of Brin and Page was to realise that these equations could be solved, and in a distributed and iterative manner.

slide-40
SLIDE 40

The real Web contains loops

Nevertheless, we could, in principle write down a set of (linear) equations for the popularity of each page, which would depend on the popularity of the pages which linked to it, which would depend

  • n the popularity of the pages which linked to it . . . .

Then we could solve these equations. These equations have a name: they are the equations for the principal eigenvector of the connectivity matrix of the Web. The genius of Brin and Page was to realise that these equations could be solved, and in a distributed and iterative manner. It’s known as the “Page Rank” algorithm.

slide-41
SLIDE 41

The real Web contains loops

Nevertheless, we could, in principle write down a set of (linear) equations for the popularity of each page, which would depend on the popularity of the pages which linked to it, which would depend

  • n the popularity of the pages which linked to it . . . .

Then we could solve these equations. These equations have a name: they are the equations for the principal eigenvector of the connectivity matrix of the Web. The genius of Brin and Page was to realise that these equations could be solved, and in a distributed and iterative manner. It’s known as the “Page Rank” algorithm. Solving these equations is what makes Google work!

slide-42
SLIDE 42

The real Web contains loops

Nevertheless, we could, in principle write down a set of (linear) equations for the popularity of each page, which would depend on the popularity of the pages which linked to it, which would depend

  • n the popularity of the pages which linked to it . . . .

Then we could solve these equations. These equations have a name: they are the equations for the principal eigenvector of the connectivity matrix of the Web. The genius of Brin and Page was to realise that these equations could be solved, and in a distributed and iterative manner. It’s known as the “Page Rank” algorithm. Solving these equations is what makes Google work! So it’s not really “I’m feeling lucky”, it’s “I believe in eigenvectors”!

slide-43
SLIDE 43

Flow in the Internet

Assume the routers R1 and R2 have total capacity 1 each. A1 B1 ↓ ↓ C1 → R1 → R2 → C2 ↓ ↓ A2 B2

slide-44
SLIDE 44

Flow in the Internet

Assume the routers R1 and R2 have total capacity 1 each. A1 B1 ↓ ↓ C1 → R1 → R2 → C2 ↓ ↓ A2 B2 What is the best way of allocating bandwidth to the various flows A1 → A2, B1 → B2 and C1 → C2?

slide-45
SLIDE 45

Flow in the Internet

Assume the routers R1 and R2 have total capacity 1 each. A1 B1 ↓ ↓ C1 → R1 → R2 → C2 ↓ ↓ A2 B2 What is the best way of allocating bandwidth to the various flows A1 → A2, B1 → B2 and C1 → C2? Of course, it all depends what you mean by “best”.

slide-46
SLIDE 46

Network Most Efficient

slide-47
SLIDE 47

Network Most Efficient

A and B each get 1, and C nothing.

slide-48
SLIDE 48

Network Most Efficient

A and B each get 1, and C nothing. A1 B1 ↓ 1 ↓ 1 C1 − → R1 − → R2 − → C2 ↓ 1 ↓ 1 A2 B2 Total flow 2, but C might feel aggrieved.

slide-49
SLIDE 49

Max–min Fairness

slide-50
SLIDE 50

Max–min Fairness

The worst-off person gets as much as possible.

slide-51
SLIDE 51

Max–min Fairness

The worst-off person gets as much as possible. Each flow gets 1/2. A1 B1 ↓ 1/2 ↓ 1/2 C1 1/2 − → R1 1/2 − → R2 1/2 − → C2 ↓ 1/2 ↓ 1/2 A2 B2

slide-52
SLIDE 52

Max–min Fairness

The worst-off person gets as much as possible. Each flow gets 1/2. A1 B1 ↓ 1/2 ↓ 1/2 C1 1/2 − → R1 1/2 − → R2 1/2 − → C2 ↓ 1/2 ↓ 1/2 A2 B2 Total flow 1.5, but C is getting twice as much routing done for him as A and B are.

slide-53
SLIDE 53

Max–min Fairness

The worst-off person gets as much as possible. Each flow gets 1/2. A1 B1 ↓ 1/2 ↓ 1/2 C1 1/2 − → R1 1/2 − → R2 1/2 − → C2 ↓ 1/2 ↓ 1/2 A2 B2 Total flow 1.5, but C is getting twice as much routing done for him as A and B are. A and B might feel aggrieved.

slide-54
SLIDE 54

Proportional Fairness

slide-55
SLIDE 55

Proportional Fairness

Each flow gets the same amount of effort from the routers.

slide-56
SLIDE 56

Proportional Fairness

Each flow gets the same amount of effort from the routers. A and B each get 2/3, and C gets 1/3. A1 B1 ↓ 2/3 ↓ 2/3 C1 1/3 − → R1 1/3 − → R2 1/3 − → C2 ↓ 2/3 ↓ 2/3 A2 B2

slide-57
SLIDE 57

Proportional Fairness

Each flow gets the same amount of effort from the routers. A and B each get 2/3, and C gets 1/3. A1 B1 ↓ 2/3 ↓ 2/3 C1 1/3 − → R1 1/3 − → R2 1/3 − → C2 ↓ 2/3 ↓ 2/3 A2 B2 Total flow is now 5

3 ≈ 1.66, better than max-min, but not as good

as the flow where C gets nothing.

slide-58
SLIDE 58

But in the real world

slide-59
SLIDE 59

But in the real world

▶ Routers and links have widely different capacities

slide-60
SLIDE 60

But in the real world

▶ Routers and links have widely different capacities ▶ The network is much more complicated, and always changing

slide-61
SLIDE 61

But in the real world

▶ Routers and links have widely different capacities ▶ The network is much more complicated, and always changing ▶ No-one has overall knowledge of the flows.

slide-62
SLIDE 62

But in the real world

▶ Routers and links have widely different capacities ▶ The network is much more complicated, and always changing ▶ No-one has overall knowledge of the flows.

slide-63
SLIDE 63

But in the real world

▶ Routers and links have widely different capacities ▶ The network is much more complicated, and always changing ▶ No-one has overall knowledge of the flows.

Nevertheless, the purely local algorithm devised by van Jacobsen (earlier; published 1988) was shown in 1997 to converge to proportional fairness.

slide-64
SLIDE 64

Numbers rather than Padlocks (I)

A wishes to send x to B.

slide-65
SLIDE 65

Numbers rather than Padlocks (I)

A wishes to send x to B. A and B each think of a random number, say a and b.

slide-66
SLIDE 66

Numbers rather than Padlocks (I)

A wishes to send x to B. A and B each think of a random number, say a and b. A’s action Message B’s action multiply x by a xa ↘ multiply message by b xba = xab ↙ divide message by a xb ↘ divide message by b

slide-67
SLIDE 67

Numbers rather than Padlocks (I)

A wishes to send x to B. A and B each think of a random number, say a and b. A’s action Message B’s action multiply x by a xa ↘ multiply message by b xba = xab ↙ divide message by a xb ↘ divide message by b In practice, to avoid guessing, and numerical errors, x, a and b are whole numbers modulo some large prime p.

slide-68
SLIDE 68

Numbers rather than Padlocks (I) — snag

A’s action Message B’s action multiply x by a xa ↘ multiply message by b xba = xab ↙ divide message by a xb ↘ divide message by b

slide-69
SLIDE 69

Numbers rather than Padlocks (I) — snag

A’s action Message B’s action multiply x by a xa ↘ multiply message by b xba = xab ↙ divide message by a xb ↘ divide message by b Eavesdropper computes xa ⋅ xb xab

slide-70
SLIDE 70

Numbers rather than Padlocks (I) — snag

A’s action Message B’s action multiply x by a xa ↘ multiply message by b xba = xab ↙ divide message by a xb ↘ divide message by b Eavesdropper computes xa ⋅ xb xab = x.

slide-71
SLIDE 71

Numbers rather than Padlocks (I) — snag

A’s action Message B’s action multiply x by a xa ↘ multiply message by b xba = xab ↙ divide message by a xb ↘ divide message by b Eavesdropper computes xa ⋅ xb xab = x. So replacing the padlocks by numbers has given the eavesdropper the chance of doing arithmetic.

slide-72
SLIDE 72

Numbers rather than Padlocks (II)

Let’s be more subtle.

slide-73
SLIDE 73

Numbers rather than Padlocks (II)

Let’s be more subtle. A’s action Message B’s action raise x to power a xa ↘ raise message to power b (xb)a = (xa)b ↙ take ath root of message xb ↘ take bth root of message

slide-74
SLIDE 74

Numbers rather than Padlocks (II)

Let’s be more subtle. A’s action Message B’s action raise x to power a xa ↘ raise message to power b (xb)a = (xa)b ↙ take ath root of message xb ↘ take bth root of message Surely this frustrates the eavesdropper?

slide-75
SLIDE 75

But what about logarithms?

A’s action Message B’s action raise x to power a xa ↘ raise message to power b (xb)a = (xa)b ↙ take ath root of message xb ↘ take bth root of message Eavesdropper computes log(xa) ⋅ log(xb) log(xab)

slide-76
SLIDE 76

But what about logarithms?

A’s action Message B’s action raise x to power a xa ↘ raise message to power b (xb)a = (xa)b ↙ take ath root of message xb ↘ take bth root of message Eavesdropper computes log(xa) ⋅ log(xb) log(xab) = a log(x) ⋅ b log(x) ab log(x)

slide-77
SLIDE 77

But what about logarithms?

A’s action Message B’s action raise x to power a xa ↘ raise message to power b (xb)a = (xa)b ↙ take ath root of message xb ↘ take bth root of message Eavesdropper computes log(xa) ⋅ log(xb) log(xab) = a log(x) ⋅ b log(x) ab log(x) = log(x).

slide-78
SLIDE 78

But what about logarithms?

A’s action Message B’s action raise x to power a xa ↘ raise message to power b (xb)a = (xa)b ↙ take ath root of message xb ↘ take bth root of message Eavesdropper computes log(xa) ⋅ log(xb) log(xab) = a log(x) ⋅ b log(x) ab log(x) = log(x). Essentially the same trick as before, but with logarithms!

slide-79
SLIDE 79

Do logarithms exist?

slide-80
SLIDE 80

Do logarithms exist?

Remember that we are working modulo a large prime p.

slide-81
SLIDE 81

Do logarithms exist?

Remember that we are working modulo a large prime p. For simplicity, I will take p = 41, since it’s small enough, and logs base 5, so that log(5) = 1.

slide-82
SLIDE 82

Do logarithms exist?

Remember that we are working modulo a large prime p. For simplicity, I will take p = 41, since it’s small enough, and logs base 5, so that log(5) = 1. 1 2 3 4 5 6 7 8 9 10 1 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40

slide-83
SLIDE 83

Do logarithms exist?

Remember that we are working modulo a large prime p. For simplicity, I will take p = 41, since it’s small enough, and logs base 5, so that log(5) = 1. 1 2 3 4 5 6 7 8 9 10 1 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 2 31 32 33 34 35 36 37 38 39 40

slide-84
SLIDE 84

Do logarithms exist?

Remember that we are working modulo a large prime p. For simplicity, I will take p = 41, since it’s small enough, and logs base 5, so that log(5) = 1. 1 2 3 4 5 6 7 8 9 10 1 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 2 31 32 33 34 35 36 37 38 39 40 So log(125) = 3, but 125 = 3 ⋅ 41 + 2

slide-85
SLIDE 85

Do logarithms exist?

Remember that we are working modulo a large prime p. For simplicity, I will take p = 41, since it’s small enough, and logs base 5, so that log(5) = 1. 1 2 3 4 5 6 7 8 9 10 1 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 2 31 32 33 34 35 36 37 38 39 40 So log(125) = 3, but 125 = 3 ⋅ 41 + 2≡ 2 since we are working modulo 41.

slide-86
SLIDE 86

Do logarithms exist?

Remember that we are working modulo a large prime p. For simplicity, I will take p = 41, since it’s small enough, and logs base 5, so that log(5) = 1. 1 2 3 4 5 6 7 8 9 10 3 1 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 2 31 32 33 34 35 36 37 38 39 40

slide-87
SLIDE 87

Do logarithms exist?

Remember that we are working modulo a large prime p. For simplicity, I will take p = 41, since it’s small enough, and logs base 5, so that log(5) = 1. 1 2 3 4 5 6 7 8 9 10 3 1 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 2 31 32 33 34 35 36 37 38 39 40 And we can fill in: 10 = 2 ⋅ 5, so log(10) = 4.

slide-88
SLIDE 88

Do logarithms exist?

Remember that we are working modulo a large prime p. For simplicity, I will take p = 41, since it’s small enough, and logs base 5, so that log(5) = 1. 1 2 3 4 5 6 7 8 9 10 3 1 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 2 31 32 33 34 35 36 37 38 39 40 And we can fill in: 10 = 2 ⋅ 5, so log(10) = 4. Also 4 = 2 ⋅ 2 so log(4) = 3 + 3 = 6.

slide-89
SLIDE 89

Do logarithms exist?

Remember that we are working modulo a large prime p. For simplicity, I will take p = 41, since it’s small enough, and logs base 5, so that log(5) = 1. 1 2 3 4 5 6 7 8 9 10 3 6 1 9 4 11 12 13 14 15 16 17 18 19 20 12 7 21 22 23 24 25 26 27 28 29 30 2 31 32 33 34 35 36 37 38 39 40 15

slide-90
SLIDE 90

Do logarithms exist?

Remember that we are working modulo a large prime p. For simplicity, I will take p = 41, since it’s small enough, and logs base 5, so that log(5) = 1. 1 2 3 4 5 6 7 8 9 10 3 6 1 9 4 11 12 13 14 15 16 17 18 19 20 12 7 21 22 23 24 25 26 27 28 29 30 2 31 32 33 34 35 36 37 38 39 40 15 40 = 2 ⋅ 20, so log(40) = log(2) + log(20) = 3 + 7 = 10.

slide-91
SLIDE 91

Do logarithms exist?

Remember that we are working modulo a large prime p. For simplicity, I will take p = 41, since it’s small enough, and logs base 5, so that log(5) = 1. 1 2 3 4 5 6 7 8 9 10 3 6 1 9 4 11 12 13 14 15 16 17 18 19 20 12 7 21 22 23 24 25 26 27 28 29 30 2 31 32 33 34 35 36 37 38 39 40 15 10

slide-92
SLIDE 92

Do logarithms exist?

Remember that we are working modulo a large prime p. For simplicity, I will take p = 41, since it’s small enough, and logs base 5, so that log(5) = 1. 1 2 3 4 5 6 7 8 9 10 3 6 1 9 4 11 12 13 14 15 16 17 18 19 20 12 7 21 22 23 24 25 26 27 28 29 30 2 31 32 33 34 35 36 37 38 39 40 15 10 80 = 2 ⋅ 40, so log(80) = 13, but 80 ≡ 39, and so on

slide-93
SLIDE 93

Do logarithms exist?

Remember that we are working modulo a large prime p. For simplicity, I will take p = 41, since it’s small enough, and logs base 5, so that log(5) = 1. 1 2 3 4 5 6 7 8 9 10 3 6 1 9 4 11 12 13 14 15 16 17 18 19 20 12 7 21 22 23 24 25 26 27 28 29 30 2 31 32 33 34 35 36 37 38 39 40 15 19 16 13 10

slide-94
SLIDE 94

Do logarithms exist?

Remember that we are working modulo a large prime p. For simplicity, I will take p = 41, since it’s small enough, and logs base 5, so that log(5) = 1. 1 2 3 4 5 6 7 8 9 10 3 6 1 9 4 11 12 13 14 15 16 17 18 19 20 12 7 21 22 23 24 25 26 27 28 29 30 2 31 32 33 34 35 36 37 38 39 40 15 19 16 13 10 But 2 ⋅ 33 = 66 ≡ 25, so we deduce that log 25 ought to be 22.

slide-95
SLIDE 95

Logs aren’t as simple as we thought!

slide-96
SLIDE 96

Logs aren’t as simple as we thought!

If we continue this process, we find that we have logarithms of only half the numbers, but each one has two values, e.g. 25 seems to be 2 and 22.

slide-97
SLIDE 97

Logs aren’t as simple as we thought!

If we continue this process, we find that we have logarithms of only half the numbers, but each one has two values, e.g. 25 seems to be 2 and 22. A fatal snag?

slide-98
SLIDE 98

Logs aren’t as simple as we thought!

If we continue this process, we find that we have logarithms of only half the numbers, but each one has two values, e.g. 25 seems to be 2 and 22. A fatal snag? Not really.

▶ There’s a workround, which is messy, but not really difficult.

slide-99
SLIDE 99

Logs aren’t as simple as we thought!

If we continue this process, we find that we have logarithms of only half the numbers, but each one has two values, e.g. 25 seems to be 2 and 22. A fatal snag? Not really.

▶ There’s a workround, which is messy, but not really difficult. ▶ If we’d chosen a different base, say 7, then we would have

logarithms of every non-zero number.

slide-100
SLIDE 100

Logs aren’t as simple as we thought!

If we continue this process, we find that we have logarithms of only half the numbers, but each one has two values, e.g. 25 seems to be 2 and 22. A fatal snag? Not really.

▶ There’s a workround, which is messy, but not really difficult. ▶ If we’d chosen a different base, say 7, then we would have

logarithms of every non-zero number.

slide-101
SLIDE 101

Logs aren’t as simple as we thought!

If we continue this process, we find that we have logarithms of only half the numbers, but each one has two values, e.g. 25 seems to be 2 and 22. A fatal snag? Not really.

▶ There’s a workround, which is messy, but not really difficult. ▶ If we’d chosen a different base, say 7, then we would have

logarithms of every non-zero number. However, for suitable p, computing “discrete” logarithms is sufficiently hard that we can be sure of the safety of this scheme.

slide-102
SLIDE 102

But it takes three messages

slide-103
SLIDE 103

But it takes three messages

Can we do better?

slide-104
SLIDE 104

But it takes three messages

Can we do better? Let x be a public number.

slide-105
SLIDE 105

But it takes three messages

Can we do better? Let x be a public number. Again, A and B choose random numbers a and b.

slide-106
SLIDE 106

But it takes three messages

Can we do better? Let x be a public number. Again, A and B choose random numbers a and b. A’s action Message B’s action raise x to power a raise x to power b xa ↘ xb ↙ ↙↘ raise message to power a raise message to power b (xb)a (xa)b

slide-107
SLIDE 107

But it takes three messages

Can we do better? Let x be a public number. Again, A and B choose random numbers a and b. A’s action Message B’s action raise x to power a raise x to power b xa ↘ xb ↙ ↙↘ raise message to power a raise message to power b (xb)a (xa)b Now they are both in possession of (xa)b = (xb)a, which can be used as the key for any standard cipher.

slide-108
SLIDE 108

But it takes three messages

Can we do better? Let x be a public number. Again, A and B choose random numbers a and b. A’s action Message B’s action raise x to power a raise x to power b xa ↘ xb ↙ ↙↘ raise message to power a raise message to power b (xb)a (xa)b Now they are both in possession of (xa)b = (xb)a, which can be used as the key for any standard cipher. This is one reason why secure websites display a padlock: to assure you that they have gone through this process between your browser and the web site.

slide-109
SLIDE 109

A few lessons

slide-110
SLIDE 110

A few lessons

  • 1. Always check for the padlock, which indicates that the data

should be secure between you and the far end.

slide-111
SLIDE 111

A few lessons

  • 1. Always check for the padlock, which indicates that the data

should be secure between you and the far end.

  • 2. If possible, use your browser — your laptop/ BlackBerry/

whatever is safer than a browser in an Internet cafe.

slide-112
SLIDE 112

A few lessons

  • 1. Always check for the padlock, which indicates that the data

should be secure between you and the far end.

  • 2. If possible, use your browser — your laptop/ BlackBerry/

whatever is safer than a browser in an Internet cafe.

  • 3. If you do use an Internet cafe, make sure you reboot the

machine afterwards — not a guarantee, but definitely safer.