From 463e389ea499dcc26314196c014a85ee9b124847 Mon Sep 17 00:00:00 2001 From: Paul Jungeblut Date: Sat, 15 Oct 2016 23:30:44 +0200 Subject: Adding primitive root and discrete logarithm. --- math/math.tex | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'math/math.tex') diff --git a/math/math.tex b/math/math.tex index ba94b18..a27c992 100644 --- a/math/math.tex +++ b/math/math.tex @@ -73,6 +73,24 @@ Vorberechnen, wenn häufig benötigt. \end{itemize} \lstinputlisting{math/phi.cpp} +\subsection{Primitivwurzeln} +\begin{itemize}[nosep] + \item Primitivwurzel modulo $n$ existiert genau dann wenn: + \begin{itemize}[nosep] + \item $n$ ist $1$, $2$ oder $4$, oder + \item $n$ ist Potenz einer ungeraden Primzahl, oder + \item $n$ ist das Doppelte einer Potenz einer ungeraden Primzahl. + \end{itemize} + + \item Sei $g$ Primitivwurzel modulo $n$. + Dann gilt:\newline + Das kleinste $k$, sodass $g^k \equiv 1 \mod n$, ist $k = \varphi(n)$. +\end{itemize} +\lstinputlisting{math/primitiveRoot.cpp} + +\subsection{Diskreter Logarithmus} +\lstinputlisting{math/discreteLogarithm.cpp} + \subsection{Polynome \& FFT} Multipliziert Polynome $A$ und $B$. \begin{itemize}[nosep] -- cgit v1.2.3