Solving modulo equations with one variable

632 Views Asked by At

Given the following equation:

$$10 = 4^x \pmod {18}$$

How can one know what are the correct values for $x$ ?

2

There are 2 best solutions below

0
On

$$2^{2x}\equiv10\pmod{18}\ \ \ \ (i)$$

$$\iff2^{2x-1}\equiv5\pmod{\dfrac{18}{(2^{2x},10)}}\iff2^{2x}\equiv10\equiv1\equiv9\ \ \ \ (ii)$$

Now $2^2\equiv4,2^3\equiv8\equiv-1\pmod9\implies$ord$_92=6=\phi(9)$

So, $2$ is a primitive root

Taking Discrete logarithm wrt $2$ on $(ii)$

$$2x\equiv0\pmod{\phi(9)}\iff2x\equiv0\pmod6\iff x\equiv0\pmod3$$

0
On

First, $x>0$, because $x=0$ is not a solution, and $4$ has no inverse mod $18$.

Also, $2$ is a primitive root mod $9$, because by Euler's Theorem (since $\phi(9)=6$ and $\gcd(2,9)=1$) we get $2^6\equiv 1\pmod{9}$, also $2^{6/2}\equiv 8\not\equiv 1\pmod{9}$ and $2^{6/3}\equiv 4\not\equiv 1\pmod{9}$.

$$4^x\equiv 10\pmod{18}\stackrel{:2}\iff 2^{2x-1}\equiv 5\equiv 2^5\pmod{9}$$

$$\iff 2x-1\equiv 5\pmod{6}\iff 2x\equiv 6\pmod{6}$$

$$\stackrel{:2}\iff x\equiv 3\equiv 0\pmod{3}\iff x=3k$$

for some $k\in\mathbb Z^+$. This is your solution.