summaryrefslogtreecommitdiff
path: root/math/math.tex
diff options
context:
space:
mode:
authorPaul Jungeblut <paul.jungeblut@gmail.com>2016-10-08 23:06:01 +0200
committerPaul Jungeblut <paul.jungeblut@gmail.com>2016-10-08 23:06:01 +0200
commitf5316545b46edfc511b628430cd883ca2c56f1ca (patch)
treeb6bd3656a1feb8603be51f1974e715efd49a3e59 /math/math.tex
parente452172df888771469ee27e55e940aa0ca66d86a (diff)
New extended euclid code without global variables.
Diffstat (limited to 'math/math.tex')
-rw-r--r--math/math.tex20
1 files changed, 9 insertions, 11 deletions
diff --git a/math/math.tex b/math/math.tex
index b0ff8da..7d36c00 100644
--- a/math/math.tex
+++ b/math/math.tex
@@ -4,18 +4,16 @@
\lstinputlisting{math/gcd-lcm.cpp}
\lstinputlisting{math/extendedEuclid.cpp}
-\subsubsection{Multiplikatives Inverses von $x$ in $\mathbb{Z}/n\mathbb{Z}$}
-Sei $0 \leq x < n$. Definiere $d := \gcd(x, n)$.
-\begin{description}
- \item[Falls $d = 1$:] ~
- \begin{itemize}[nosep]
- \item Erweiterter euklidischer Algorithmus liefert $\alpha$ und $\beta$ mit
- $\alpha x + \beta n = 1$.
- \item Nach Kongruenz gilt $\alpha x + \beta n \equiv \alpha x \equiv 1 \mod n$.
- \item $x^{-1} :\equiv \alpha \mod n$
+\paragraph{Multiplikatives Inverses von $x$ in $\mathbb{Z}/n\mathbb{Z}$}
+Sei $0 \leq x < n$. Definiere $d := \gcd(x, n)$.\newline
+\textbf{Falls $d = 1$:}
+\begin{itemize}[nosep]
+ \item Erweiterter euklidischer Algorithmus liefert $\alpha$ und $\beta$ mit
+ $\alpha x + \beta n = 1$.
+ \item Nach Kongruenz gilt $\alpha x + \beta n \equiv \alpha x \equiv 1 \mod n$.
+ \item $x^{-1} :\equiv \alpha \mod n$
\end{itemize}
- \item[Falls $d \neq 1$:] Es existiert kein $x^{-1}$.
-\end{description}
+\textbf{Falls $d \neq 1$:} Es existiert kein $x^{-1}$.
\lstinputlisting{math/multInv.cpp}
\subsection{Mod-Exponent über $\mathbb{F}_p$}