aboutsummaryrefslogtreecommitdiffstats
path: root/vorlesungen/slides/4/ggt.tex
blob: e3c55e6bcf50cc1e7f095fae22c56153e4d23151 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
%
% ggt.tex -- GGT, Definition und Algorithmus
%
% (c) 2021 Prof Dr Andreas Müller, OST Ostschweizer Fachhochschuöe
%
\begin{frame}[t]
\frametitle{Grösster gemeinsamer Teiler}
\vspace{-15pt}
\setlength{\abovedisplayskip}{5pt}
\setlength{\belowdisplayskip}{5pt}
\begin{columns}[t,onlytextwidth]
\begin{column}{0.48\textwidth}
\begin{block}{Definition}
Gegeben: $a,b\in\mathbb Z$
\\
Gesucht: grösster gemeinsamer Teiler $\operatorname{ggT}(a,b)$
\end{block}
\begin{block}{Euklidischer Algorithmus}
$a_0 = a$, $b_0=b$
\begin{align*}
a_0&=b_0q_0 + r_0 & a_1 &=b_0 & b_1&=r_0 \\
a_1&=b_1q_1 + r_1 & a_2 &=b_1 & b_2&=r_\\
a_2&=b_2q_2 + r_2 & a_3 &=b_2 & b_3&=r_\\
   &\;\vdots      &     &     &    &     \\
a_n&=b_nq_n + r_n & r_n &= 0  & r_{n-1}&=\operatorname{ggT}(a,b)
\end{align*}
\end{block}
\end{column}
\begin{column}{0.48\textwidth}
\begin{block}{$\operatorname{ggT}(15,25) = 5$}
\begin{center}
\begin{tikzpicture}[>=latex,thick,scale=0.09]
\draw[->] (-1,0) -- (65,0) coordinate[label={$a$}];
\draw[->] (0,-1) -- (0,65) coordinate[label={right:$b$}];
\begin{scope}
\clip (-1,-1) rectangle (65,65);
\foreach \x in {0,...,4}{
	\draw[line width=0.2pt] ({\x*15},-2) -- ({\x*15},65);
}
\foreach \y in {0,...,2}{
	\draw[line width=0.2pt] (-2,{\y*25}) -- (65,{\y*25});
}
\foreach \x in {0,5,...,120}{
	\draw[color=blue] ({\x+2},-2) -- ({\x+2-70},{-2+70});
	\node[color=blue] at ({0.5*\x-0.5},{0.5*\x-0.5}) [rotate=-45,above] {\tiny $\x$};
}
\foreach \x in {0,...,4}{
	\foreach \y in {0,...,2}{
		\fill[color=red] ({\x*15},{\y*25}) circle[radius=0.8];
	}
}
\foreach \x in {0,5,...,60}{
	\fill[color=blue] (\x,0) circle[radius=0.5];
	\node at (\x,0) [below] {\tiny $\x$};
}
\end{scope}
\end{tikzpicture}
\end{center}
\end{block}
\end{column}
\end{columns}
\end{frame}