-1

So I'm trying to find the inverse of $24$ in $\mathbb{Z}_{35}$. I know this means that there must be some $ab \equiv 1 \pmod{n}$ But when I try this:

$24b \equiv 1 \pmod{35}$

$1 = 35*0 + 1$

$24b = 1$

$b = 1/24$

But this isn't an integer, so I'm not sure what I'm doing wrong here.

Bill Dubuque
  • 272,048
Riley
  • 1

3 Answers3

0

Since $2\cdot 18 \equiv 36 \equiv 1 \pmod{35}$, you have an inverse for $2$. Since $3\cdot 12 \equiv 36 \equiv 1\pmod{35}$ you have an inverse for $3$. Since $24 = 2^3 3$ you can easily construct its inverse.

  • It's $18^312\equiv(18\cdot2)^218\cdot3\equiv18\cdot3$ – J. W. Tanner Feb 03 '21 at 17:51
  • Easier done by reducing the fraction $,\dfrac{1}{24}\equiv \dfrac{36}{24},$ see my comment on the question. – Bill Dubuque Feb 03 '21 at 19:04
  • @BillDubuque I wasn't going for easy. I was giving hint so he could work it out himself, even not knowing the Euclidean Algorithm. You and Tanner pretty much ruined that. – B. Goddard Feb 03 '21 at 21:07
  • Not sure what you mean be "ruined that". Your answer boils down to the fact that it is easy to invert a product of integers each having an easy inverse (dividing modulus $\pm 1).,$ This is a special case of the more general algorithms in the linked dupes. – Bill Dubuque Feb 03 '21 at 22:09
0

Start by computing $\text{gcd}(24, 35)$ using the Euclidean algorithm. We have that: \begin{align*} &35 = 24(1) + 11 \\ &24 = 11(2) + 2 \\ &11 = 2(5) + 1 \end{align*}

So $\text{gcd}(24, 35) = 1$. Our goal now is to work backwards:

\begin{align*} &11 = 2(5) + 1 \implies 1 = 11 - 2(5) \\ &24 = 11(2) + 2 \implies 1 = 11 - 5[24 - 11(2)] = 11(11) - 5(24) \\ &35 = 24 + 11 \implies 1 = 11(35 - 24) - 5(24) = 11(35) - 16(24) \end{align*}

So $11(35) - 16(24) = 1$. Thus, $24^{-1} \equiv -16 \pmod{35}$. Note that $-16 \equiv 19 \pmod{35}$.

ml0105
  • 14,674
0

Hint:

First, $1/24$ is an integer in $\mathbb{Z}_{35}$. It just doesn't look like it yet because you haven't performed the division operation. This is similar to how $0.\overline{9}$ or $1/.5$ might not look like integers, but they are.

The easiest way is to simply go through every element of $\mathbb{Z}_{35}$ and see if it is the inverse of $24$.

$1\cdot 24=24$, so $1/24\neq 1$.

$2\cdot 24=48\equiv 13$, so $1/24\neq 2$.

$\vdots$

Again, we are looking for a value that when we multiply by 24, we get 1.

ndhanson3
  • 1,365
  • Brute force search is rarely the "easiest way" to compute modular inverses and fractions. See my comment on the question for many truly easy ways that work generally. – Bill Dubuque Feb 03 '21 at 19:03
  • My apologies. I meant most straightforward, lowest-level, easiest to understand. Given the wording and amount of understanding demonstrated in the question, I wanted to make sure what the goal of your analysis really is. – ndhanson3 Feb 03 '21 at 21:39
  • Ok, thanks for clarifying. – Bill Dubuque Feb 03 '21 at 21:57