50 lines
1009 B
TeX
Raw Normal View History

2023-01-19 11:58:53 -08:00
\section{Bonus}
\problem{}
2023-01-19 20:37:46 -08:00
Find the inverse of 19 in $\mathbb{Z}_{23}$ \\
\hint{Recall the Euclidean Algorithm}
2023-01-19 11:58:53 -08:00
\begin{solution}
17
\end{solution}
\vfill
\problem{}
2023-01-23 16:11:45 -08:00
Prove Fermat's little theorem:
2023-01-19 11:58:53 -08:00
$$
a^p = a \text{ (mod p)}
$$
2023-01-19 20:37:46 -08:00
For positive integers $a, p$
2023-01-19 11:58:53 -08:00
\vfill
\problem{}
2023-01-19 20:37:46 -08:00
Let $a$ and $m$ be integers so that $a < m$. \\
2023-01-19 11:58:53 -08:00
Show that $a$ has an inverse mod $m$ iff $\gcd(a, m) = 1$ \\
\begin{solution}
Assume $a^\star$ is the inverse of $a \pmod{m}$. \\
Then $a^\star \times a \equiv 1 \pmod{m}$ \\
Therefore, $aa^\star - 1 = km$, and $aa^\star - km = 1$ \\
We know that $\gcd(a, m)$ divides $a$ and $m$, therefore $\gcd(a, m)$ must divide $1$. \\
$\gcd(a, m) = 1$ \\
Now, assume $\gcd(a, m) = 1$. \\
By the Extended Euclidean Algorithm, we can find $(u, v)$ that satisfy $au+mv=1$ \\
So, $au-1 = mv$. \\
$m$ divides $au-1$, so $au \equiv 1 \pmod{m}$ \\
$u$ is $a^\star$.
\end{solution}
\vfill
\problem{}
Show that for any integers $a, b, c$, \\
$\gcd(ac + b, a) = \gcd(a, b)$\\
\vfill