1

I encountered this problem that I do not fully understand.

Find the multiplicative inverse of $[45]$ in $Z_{101}$ . Then determine the integer x between 1 and 100 such that

$45^{99} \equiv x$ (mod 101)

Using the Euclidean algorithm the multiplicative inverse of $[45]$ can be found as [9].

However finding $x$ is where my effort halts.

Lets denote $a=45$, $e = 99$ and $p = 101$.

Since $p$ is a prime and $a \nmid p$ Fermat's little theorem gives

$a^{p-1} \equiv 1$ (mod p) = $45^{101-1} \equiv 1$ (mod 101)

in a case where $e > (p-1)$ we could simply evaluate $a^e$ as follows

$a^e = a^{k \cdot (p-1) + r} \equiv a^r$ (mod p) where $k$ and $r$ are integers.

Finally $a^r$ could be envaulted in mod p and x would be found.

However, in this problem, $e < (p-1)$ = $(99 < 100)$ and the evaluation described above is not possible. I.e. we can not evalute $45^{99}$ as $45^{k \cdot 100 + r}$.

In summary, how can $x$ be found in the equation

$a^e \equiv x$ (mod p)

when $e < (p-1)$?

MarkusAnd
  • 143
  • 7
    By little Fermat, $45^{100}\equiv 1\pmod {101}$. Hence $45^{99}\times 45\equiv 1\pmod {101}$, so $45^{99}$ is the modular inverse of $45\pmod {101}$. – lulu Jun 02 '21 at 15:48
  • 3
    In general, one good way to compute $a^b\pmod c$ is by iterated squaring. – lulu Jun 02 '21 at 15:50
  • 1
    You just multiply by as many times as the inverse as you have to go down, as per @lulu . In this case, only once. In general, however many times down you need to go (Only useful if that number is relatively small, obviously) – Alan Jun 02 '21 at 15:55
  • @lulu yes I see, but how can I use the modular inverse to find x in the equation? – MarkusAnd Jun 02 '21 at 16:10
  • I don't understand. By what I wrote, $x$ is the modular inverse. – lulu Jun 02 '21 at 16:15
  • 1
    If you are trying to find $0\leq y<100$ such that $45^{99}\equiv y\pmod{101}$, then use iterated (repeated) squaring as @lulu has already suggested. Do you understand what is meant by iterated squaring? – saulspatz Jun 02 '21 at 16:41
  • Thanks lulu and saulpatz, by looking into iterated squaring it finally clicked. – MarkusAnd Jun 02 '21 at 21:05

0 Answers0