MATH 470 Lecture 4

From Notes
Jump to navigation Jump to search

« previous | Thursday, January 24, 2013 | next »


Motivation and Math History

How to calculate ?

  1. 4th grade . . .
  2. 8th grade: k = [0..]; remainders = repeat [1, 2, 4]; by the pattern (when does it repeat?)
  3. College:
  4. Even faster! (secret: )
    • How to find in general for mod ?

Order

Definition: For any prime , and , the order of in is the minimum positive integer such that .

For example,

  • the order of 2 in is 3:
  • the order of 1 in is 1:
  • the order of 5 in is 6:


Fermat's Little Theorem

(See Fermat's Little Theorem→)


Given any prime and any integer ,

This is often written as , then

Note: may not be the smallest integer for .

Proof

Why is when ?

Define modulo classes .

Multiply by : .

  • none are 0
  • No two are the same. (suppose not, then — contradiction)
  • therefore, each will map uniquely to modulo classes

Take prouct of each group:

We can divide by since it is not a multiple of .

Q.E.D.

Corollary 1

For any such that , the order of is a factor of . Why?

Proof. If and , then — contradiction.

Q.E.D.

We know:

  • is order in

Corollary 2

If and are integers such that and , then .

Proof. Rewrite as .

By Fermat's little theorem,

Corollary 3

If , then the function defined by has inverse .

Application Example

Written on board at beginning of class:

plaintext:  ITWASABOUTELEVENOCLOCKINTHEMORNING
ciphertext: MISGXGZFDILULOLGFEUFEPMJICLQFNJMJR


The code was build by with function .

Correspondence

A B C D . . .  Z
2 3 4 5       27

We omit 0 and 1 since . That's not very secure.

For example, we take the first letter 'I' with correspondence 10:


How to break coding scheme (), we need to find "cubic root" mod 29.

Corollary 2 and 3 tell us that for and , we need to find :


Generalization

What about when we replace by any integer ?

For example, "What is the last digit of ?" is another way of asking "3^{17} \equiv \Box \pmod{10}"

Can we find a number such that ? YES

For any integer , we define to be the set of all integers in with .

Examples:

  • :
  • :
  • :
  • :


Euler's Totient Function

Let

From previous examples,

  • Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle \phi(9) = 6}
  • Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle \phi(12) = 4}

In particular, Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle \phi(p) = p-1}

Computation

How to compute ?

Basic fact: Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle \phi(p) = p-1}

Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle \phi(p^n) = p^n - p^{n-1} = p^{n-1}(p-1)}

since there are Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle p^{n-1}} multiples of Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle p} between 0 and .

Properties: Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle \phi(m \,n) = \phi(m) \, \phi(n)}

Take the product of the totients of the prime factorization of the number

Example

Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle 100 = 2^2 \cdot 5^2}

Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle \phi(100) = \phi(2^2) \, \phi(5^2) = (2^2-2^1) \, (5^2-5^1)}


Euler's Theorem

For any integers Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle n} , such thta Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle \mathrm{GCD}(x,n) = 1} ,

Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle x^{\phi(n)} \equiv 1 \pmod{n}}


Example

What are the last two digits of Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle 3^{4081}} ? (Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle 3^{4081} \equiv \Box \pmod{100}} )

Let Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle n = 100} , then Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle \phi(100) = 40} .

Therefore Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle 3^{4081} = (3^{40})^\Box \cdot 3^1 \equiv 3 \pmod{100}}

And the last two digits are "03"