Return to Video

Euler's Totient Function (phi function)

  • 0:02 - 0:05
    Euler continued to investigate the properties of numbers –
  • 0:05 - 0:09
    specifically the distribution of prime numbers.
  • 0:09 - 0:11
    One important function he defined
  • 0:11 - 0:13
    is called the 'phi function.'
  • 0:13 - 0:16
    It measures the breakability of a number.
  • 0:16 - 0:18
    So, given a number, say, 'n,'
  • 0:18 - 0:21
    it outputs how many integers are less than or equal to n
  • 0:21 - 0:25
    that do not share any common factors with n.
  • 0:25 - 0:28
    For example, if we want to find the phi of 8,
  • 0:28 - 0:31
    we look at all values from 1 to 8,
  • 0:31 - 0:33
    and then we count how many integers
  • 0:33 - 0:36
    8 does not share a factor greater than 1 with.
  • 0:36 - 0:37
    Notice, 6 is not counted,
  • 0:37 - 0:39
    because 6 and 8 share the factor 2,
  • 0:39 - 0:42
    while 1, 3, 5 and 7 are all counted,
  • 0:42 - 0:45
    because they only share the factor 1.
  • 0:45 - 0:49
    Therefore, phi(8) = 4.
  • 0:49 - 0:50
    What's interesting is that
  • 0:50 - 0:55
    calculating the Phi function is hard, except in one case.
  • 0:55 - 0:56
    Look at this graph.
  • 0:56 - 1:01
    It is a plot of values of phi over integers from 1 to 1000.
  • 1:01 - 1:05
    Now, notice any predictable pattern?
  • 1:05 - 1:08
    The straight line of points along the top
  • 1:08 - 1:11
    represents all the prime numbers.
  • 1:11 - 1:14
    Since prime numbers have no factors greater than 1,
  • 1:14 - 1:20
    the phi of any prime number, 'p,' is simply p-1.
  • 1:20 - 1:23
    To calculate phi of 7 – a prime number –
  • 1:23 - 1:25
    we count all integers except 7 –
  • 1:25 - 1:28
    since none of them share a factor with 7.
  • 1:28 - 1:32
    Phi of 7 = 6.
  • 1:32 - 1:38
    So if you are asked to find phi of 21,377, a prime number,
  • 1:38 - 1:41
    you would only need to subtract 1 to get the solution –
  • 1:41 - 1:44
    21,376.
  • 1:44 - 1:48
    phi of any prime is easy to compute.
  • 1:48 - 1:51
    This leads to an interesting result, based on the fact that
  • 1:51 - 1:54
    the phi function is also 'multiplicative.'
  • 1:54 - 2:01
    That is, phi(A x B)=phi(A) x Phi(B).
  • 2:01 - 2:03
    If we know some number, N,
  • 2:03 - 2:07
    is the product of two primes, P1 and P2,
  • 2:07 - 2:10
    then phi of N is just the value of
  • 2:10 - 2:13
    phi for each prime multiplied together, –
  • 2:13 - 2:17
    or (P1 - 1) x (P2 - 1).
Title:
Euler's Totient Function (phi function)
Description:

Euler's Totient Function (also Euler's Phi Function)

more » « less
Video Language:
English
Duration:
02:18

English subtitles

Revisions