Блог пользователя B3Natural

Автор B3Natural, история, 5 лет назад, По-английски

I got something interesting on this Problem.Generating X values it shows ϕ(N) for N.But i can't evaluate why this picture follows phi function.Can anyone explain me theory behind it? How co-primes are related with skipping X on this problem?

  • Проголосовать: нравится
  • +3
  • Проголосовать: не нравится

»
5 лет назад, # |
  Проголосовать: нравится +1 Проголосовать: не нравится

You number the mirrors with the point of the lazer as 0, next mirror as 1 and so on. Now if you fire the lazer at mirror numbered x it passes through the mirrors x, 2x mod(n), .., nx mod(n) which are all multiples of x taken modulo n. Now let g = gcd(x, n) if g > 1 the light comes back to the source mirror after hitting n / g mirrors (as x * (n / g) mod(n) = n * (x / g) mod(n) = 0). So they are not correct choice and the avaliable mirrors left are those for which gcd(x, n) = 1. Suppose we fired at one of those mirrors and the light comes back to source mirror at kth hit, so we have k * x mod(n) = 0 as (x, n) = 1 inverse of x modulo n exist, multiplying by its inverse we get k = 0 mod(n) which means k = n.

So all those mirrors for which we have gcd(x, n) = 1 are the right choices.

  • »
    »
    5 лет назад, # ^ |
      Проголосовать: нравится +3 Проголосовать: не нравится

    "light comes back to the source mirror after hitting n / g mirrors" ....thanks a lot.