Größter gemeinsamer Teiler

aus Wikipedia, der freien Enzyklopädie
(Weitergeleitet von Gekürzter Bruch)
Zur Navigation springen Zur Suche springen

Der größte gemeinsame Teiler (ggT) ist die jeweils größte natürliche Zahl m {\displaystyle m} {\displaystyle m}, durch die sich zwei oder mehr gegebene ganze Zahlen ohne Rest teilen lassen. Weiterhin sind auch alle (echten) Teiler von m {\displaystyle m} {\displaystyle m} dann Teiler aller beteiligten Zahlen, aber nicht die größten Teiler. Ist der größte gemeinsame Teiler 1 {\displaystyle 1} {\displaystyle 1}, sind die beteiligten Zahlen teilerfremd. In der elementaren Mathematik ist dessen wichtigste Anwendung das Kürzen von Brüchen.

So ist der ggT ( 10 ,   15 ) = 5 {\displaystyle \operatorname {ggT} (10,\ 15)=5} {\displaystyle \operatorname {ggT} (10,\ 15)=5}, da sich sowohl 10 {\displaystyle 10} {\displaystyle 10} und 15 {\displaystyle 15} {\displaystyle 15} durch 5 {\displaystyle 5} {\displaystyle 5} teilen lassen. Der Bruch 10 15 {\displaystyle {\tfrac {10}{15}}} {\displaystyle {\tfrac {10}{15}}} lässt sich zu 2 3 {\displaystyle {\tfrac {2}{3}}} {\displaystyle {\tfrac {2}{3}}} kürzen. Die beiden „verbleibenden" Zahlen 2 {\displaystyle 2} {\displaystyle 2} und 3 {\displaystyle 3} {\displaystyle 3} sind nun teilerfremd und lassen sich nicht weiter kürzen.

Sein Pendant ist das kleinste gemeinsame Vielfache (kgV). Beide spielen unter anderem in der Arithmetik, der Algebra und der Zahlentheorie eine Rolle.

Wichtigste Anwendung ist heutzutage die Kryptografie.

Das Konzept des größten gemeinsamen Teilers lässt sich auf Gaußsche Zahlen, Polynome und vieles andere erweitern.

Der größte gemeinsame Teiler ggT zweier ganzen Zahlen a {\displaystyle a} {\displaystyle a} und b {\displaystyle b} {\displaystyle b}, von denen mindestens eine ungleich Null ist, ist die größte ganze Zahl m {\displaystyle m} {\displaystyle m}, so dass m {\displaystyle m} {\displaystyle m} ein Teiler sowohl von a {\displaystyle a} {\displaystyle a} als auch von b {\displaystyle b} {\displaystyle b} ist. Das heißt, es gibt ganze Zahlen α {\displaystyle \alpha } {\displaystyle \alpha } und β {\displaystyle \beta } {\displaystyle \beta }, so dass

a = m α {\displaystyle a=m\cdot \alpha \quad } {\displaystyle a=m\cdot \alpha \quad } und b = m β {\displaystyle \quad b=m\cdot \beta } {\displaystyle \quad b=m\cdot \beta }

ist und m {\displaystyle m} {\displaystyle m} die größte Zahl mit dieser Eigenschaft ist.

Als Operator wird er ggT ( a ,   b ) {\displaystyle \operatorname {ggT} (a,\ b)} {\displaystyle \operatorname {ggT} (a,\ b)} in deutschsprachigen Texten, gcd ( a ,   b ) {\displaystyle \operatorname {gcd} (a,\ b)} {\displaystyle \operatorname {gcd} (a,\ b)} (greatest common divisor) in englischsprachigen Texten geschrieben, wobei letztere Schreibweise auch in deutschsprachigen Texten zu finden ist. Eine weitere Bezeichnung ist greatest common factor.

Ist eine der beiden Zahlen a {\displaystyle a} {\displaystyle a} und b {\displaystyle b} {\displaystyle b} Null, so ist der ggT der absolute Wert der betragsmäßig größeren Zahl:

ggT ( 0 ,   a ) = max ( | 0 | ,   | a | ) = max ( 0 ,   | a | ) = | a | {\displaystyle \operatorname {ggT} (0,\ a)=\operatorname {max} (|0|,\ |a|)=\operatorname {max} (0,\ |a|)=|a|} {\displaystyle \operatorname {ggT} (0,\ a)=\operatorname {max} (|0|,\ |a|)=\operatorname {max} (0,\ |a|)=|a|},

da | a | 0 {\displaystyle |a|\geq 0} {\displaystyle |a|\geq 0} ist und was auch mit 0 = | a | 0 {\displaystyle 0=|a|\cdot 0} {\displaystyle 0=|a|\cdot 0} und a = | a | sgn ( a ) {\displaystyle a=|a|\cdot \operatorname {sgn} (a)} {\displaystyle a=|a|\cdot \operatorname {sgn} (a)} übereinstimmt, wobei sgn ( a ) {\displaystyle \operatorname {sgn} (a)} {\displaystyle \operatorname {sgn} (a)} hier für + 1 {\displaystyle +1} {\displaystyle +1} für positive und 1 {\displaystyle -1} {\displaystyle -1} für negative Zahlen steht. Dieser Fall ist weiterhin wichtig für den Abschluss des euklidischen Algorithmus.

Sind beide Zahlen Null, so ergibt letztere Regel

ggT ( 0 ,   0 ) = max ( | 0 | ,   | 0 | ) = max ( 0 ,   0 ) = 0 {\displaystyle \operatorname {ggT} (0,\ 0)=\operatorname {max} (|0|,\ |0|)=\operatorname {max} (0,\ 0)=0} {\displaystyle \operatorname {ggT} (0,\ 0)=\operatorname {max} (|0|,\ |0|)=\operatorname {max} (0,\ 0)=0},

was wiederum mit 0 = 0 0 {\displaystyle 0=0\cdot 0} {\displaystyle 0=0\cdot 0} und 0 = 0 0 {\displaystyle 0=0\cdot 0} {\displaystyle 0=0\cdot 0} übereinstimmt, auch wenn die Zahl 0 {\displaystyle 0} {\displaystyle 0} mit dem Begriff größter gemeinsamer Teiler nicht harmonisiert (obwohl es für den ggT gar keiner Division bedarf, siehe Definition).

Diese Definition bzw. Konvention wird meist auch verwendet, da sie einige Konzepte vereinfacht (wie z. B. die Bézout-Identität). Auch die meisten Computeralgebrasysteme, wie z. B. Wolfram Alpha benutzen diese Definition. Einige Autoren lassen ggT ( 0 ,   0 ) {\displaystyle \operatorname {ggT} (0,\ 0)} {\displaystyle \operatorname {ggT} (0,\ 0)} jedoch ähnlich wie 0 0 {\displaystyle {\tfrac {0}{0}}} {\displaystyle {\tfrac {0}{0}}} undefiniert.

Der ggT von a {\displaystyle a} {\displaystyle a} und b {\displaystyle b} {\displaystyle b} ist ihr größter gemeinsamer positiver Teiler in der Quasiordnung der Teilbarkeit. Das bedeutet, dass die gemeinsamen Teiler von a {\displaystyle a} {\displaystyle a} und b {\displaystyle b} {\displaystyle b} genau die Teiler ihres ggT sind. Dies wird in der Regel mit Hilfe des Lemma von Euklid, des Fundamentalsatzes der Arithmetik oder des euklidischen Algorithmus bewiesen. Dies ist die Bedeutung von „größte", die für die Verallgemeinerung des Konzepts des ggT verwendet wird. Dies spielt eine wesentliche Rolle, wenn man die Schulmathematik verlässt und nicht nur Zahlen, sondern komplexere mathematische Konzepte wie Polynome, Funktionen und Matrizen verwendet.

Größter gemeinsamer Teiler zweier Zahlen

[Bearbeiten | Quelltext bearbeiten ]

ggT ( 12 ,   18 ) {\displaystyle \operatorname {ggT} (12,\ 18)} {\displaystyle \operatorname {ggT} (12,\ 18)}[1]

  • 12 {\displaystyle 12} {\displaystyle 12} hat die Teiler: 1 , 2 , 3 , 4 , 6 ,       12 {\displaystyle 1,2,3,4,6,\ \ \ 12} {\displaystyle 1,2,3,4,6,\ \ \ 12}.
  • 18 {\displaystyle 18} {\displaystyle 18} hat die Teiler: 1 , 2 , 3 ,     , 6 , 9 ,       18 {\displaystyle 1,2,3,\ \ ,6,9,\ \ \ 18} {\displaystyle 1,2,3,\ \ ,6,9,\ \ \ 18}.
  • Die gemeinsamen Teiler von 12 {\displaystyle 12} {\displaystyle 12} und 18 {\displaystyle 18} {\displaystyle 18} sind: 1 , 2 , 3 {\displaystyle 1,2,3} {\displaystyle 1,2,3} und 6 {\displaystyle 6} {\displaystyle 6}.
Der größte gemeinsame Teiler ist 6 {\displaystyle 6} {\displaystyle 6}:
ggT ( 12 ,   18 ) = 6 {\displaystyle \operatorname {ggT} (12,\ 18)=6} {\displaystyle \operatorname {ggT} (12,\ 18)=6}

Größter gemeinsamer Teiler dreier Zahlen

[Bearbeiten | Quelltext bearbeiten ]

ggT ( 12 ,   18 ,   30 ) {\displaystyle \operatorname {ggT} (12,\ 18,\ 30)} {\displaystyle \operatorname {ggT} (12,\ 18,\ 30)}[2]

  • 12 {\displaystyle 12} {\displaystyle 12} hat die Teiler: 1 , 2 , 3 , 4     , 6 ,         12 {\displaystyle 1,2,3,4\ \ ,6,\ \ \ \ 12} {\displaystyle 1,2,3,4\ \ ,6,\ \ \ \ 12}.
  • 18 {\displaystyle 18} {\displaystyle 18} hat die Teiler: 1 , 2 , 3 ,         , 6 , 9 ,               18 {\displaystyle 1,2,3,\ \ \ \ ,6,9,\ \ \ \ \ \ \ 18} {\displaystyle 1,2,3,\ \ \ \ ,6,9,\ \ \ \ \ \ \ 18}.
  • 30 {\displaystyle 30} {\displaystyle 30} hat die Teiler: 1 , 2 , 3 ,     5 , 6 ,   10 ,   15 ,     30 {\displaystyle 1,2,3,\ \ 5,6,\ 10,\ 15,\ \ 30} {\displaystyle 1,2,3,\ \ 5,6,\ 10,\ 15,\ \ 30}.
  • Die gemeinsamen Teiler von 12 {\displaystyle 12} {\displaystyle 12}, 18 {\displaystyle 18} {\displaystyle 18} und 30 {\displaystyle 30} {\displaystyle 30} sind: 1 , 2 , 3 {\displaystyle 1,2,3} {\displaystyle 1,2,3} und 6 {\displaystyle 6} {\displaystyle 6}.
Der größte gemeinsame Teiler ist 6 {\displaystyle 6} {\displaystyle 6}:
ggT ( 12 , 18 , 30 ) = 6 {\displaystyle \operatorname {ggT} (12,18,30)=6} {\displaystyle \operatorname {ggT} (12,18,30)=6}

Größter gemeinsamer Teiler zweier Polynome

[Bearbeiten | Quelltext bearbeiten ]

Die „Größe" wird hier gemessen im Polynomgrad.

Im Ring Z [ x ] {\displaystyle \mathbb {Z} [x]} {\displaystyle \mathbb {Z} [x]}
ggT ( x 2 1 ,   x + 1 ) {\displaystyle \operatorname {ggT} (x^{2}-1,\ x+1)} {\displaystyle \operatorname {ggT} (x^{2}-1,\ x+1)}:
  • x 2 1 {\displaystyle x^{2}-1} {\displaystyle x^{2}-1} hat die Teiler x + 1 {\displaystyle x+1} {\displaystyle x+1}, x 1 {\displaystyle \;x-1} {\displaystyle \;x-1}. Beide haben den Grad 1.
  • x   +   1 {\displaystyle x\ +\ 1} {\displaystyle x\ +\ 1} hat den Teiler x + 1 {\displaystyle x+1} {\displaystyle x+1}.
Ergebnis: Der gradmäßig größte gemeinsame Teiler von x 2 1 {\displaystyle x^{2}-1} {\displaystyle x^{2}-1} und x + 1 {\displaystyle x+1} {\displaystyle x+1} ist x + 1 {\displaystyle \;x+1} {\displaystyle \;x+1}.
ggT ( x 2 1 ,   x + 1 ) = x + 1 {\displaystyle \qquad \qquad \Longrightarrow \operatorname {ggT} (x^{2}-1,\ x+1)=x+1} {\displaystyle \qquad \qquad \Longrightarrow \operatorname {ggT} (x^{2}-1,\ x+1)=x+1}.
ggT ( 2 x 3 + 9 x 2 + 6 x + 1 ,   3 x 3 + 14 x 2 + 11 x + 2 ) {\displaystyle \operatorname {ggT} (2x^{3}+9x^{2}+6x+1,\ 3x^{3}+14x^{2}+11x+2)} {\displaystyle \operatorname {ggT} (2x^{3}+9x^{2}+6x+1,\ 3x^{3}+14x^{2}+11x+2)}[3]
  • 2 x 3 +     9 x 2 +     6 x + 1 {\displaystyle 2x^{3}+\ \ 9x^{2}+\ \ 6x+1} {\displaystyle 2x^{3}+\ \ 9x^{2}+\ \ 6x+1} hat die Teiler 2 x + 1 {\displaystyle \;2x+1} {\displaystyle \;2x+1} und x 2 + 4 x + 1 {\displaystyle x^{2}+4x+1} {\displaystyle x^{2}+4x+1}.
  • 3 x 3 + 14 x 2 + 11 x + 2 {\displaystyle 3x^{3}+14x^{2}+11x+2} {\displaystyle 3x^{3}+14x^{2}+11x+2} hat die Teiler 3 x + 2 {\displaystyle \;3x+2} {\displaystyle \;3x+2} und x 2 + 4 x + 1 {\displaystyle x^{2}+4x+1} {\displaystyle x^{2}+4x+1}.
  • x 2 + 4 x + 1 {\displaystyle x^{2}+4x+1\;} {\displaystyle x^{2}+4x+1\;} lässt sich zwar darstellen als ( x + 2 3 ) ( x + 2 + 3 ) {\displaystyle \;(x+2-{\sqrt {3}})\cdot (x+2+{\sqrt {3}})} {\displaystyle \;(x+2-{\sqrt {3}})\cdot (x+2+{\sqrt {3}})}. Wegen 3 Z {\displaystyle {\sqrt {3}}\notin \mathbb {Z} } {\displaystyle {\sqrt {3}}\notin \mathbb {Z} } ist es aber prim im Ring Z [ x ] {\displaystyle \mathbb {Z} [x]} {\displaystyle \mathbb {Z} [x]}.
  • Die gemeinsamen Teiler von   2 x 3 + 9 x 2 + 6 x + 1   {\displaystyle \ 2x^{3}+9x^{2}+6x+1\ } {\displaystyle \ 2x^{3}+9x^{2}+6x+1\ } und   3 x 3 + 14 x 2 + 11 x + 2   {\displaystyle \ 3x^{3}+14x^{2}+11x+2\ } {\displaystyle \ 3x^{3}+14x^{2}+11x+2\ } sind im Ring Z [ x ] {\displaystyle \mathbb {Z} [x]} {\displaystyle \mathbb {Z} [x]}:
1 {\displaystyle 1\;} {\displaystyle 1\;} und x 2 + 4 x + 1 {\displaystyle \;x^{2}+4x+1} {\displaystyle \;x^{2}+4x+1}.
Ergebnis: Der gradmäßig größte gemeinsame Teiler ist: x 2 + 4 x + 1 {\displaystyle \;x^{2}+4x+1} {\displaystyle \;x^{2}+4x+1}
ggT ( 2 x 3 + 9 x 2 + 6 x + 1 ,   3 x 3 + 14 x 2 + 11 x + 2 ) = x 2 + 4 x + 1 {\displaystyle \qquad \qquad \Longrightarrow \operatorname {ggT} (2x^{3}+9x^{2}+6x+1,\ 3x^{3}+14x^{2}+11x+2)=x^{2}+4x+1} {\displaystyle \qquad \qquad \Longrightarrow \operatorname {ggT} (2x^{3}+9x^{2}+6x+1,\ 3x^{3}+14x^{2}+11x+2)=x^{2}+4x+1}.
Im Ring Q ( 3 ) [ x ] {\displaystyle \mathbb {Q} ({\sqrt {3}})[x]} {\displaystyle \mathbb {Q} ({\sqrt {3}})[x]}
Die gemeinsamen Teiler von   2 x 3 + 9 x 2 + 6 x + 1   {\displaystyle \ 2x^{3}+9x^{2}+6x+1\ } {\displaystyle \ 2x^{3}+9x^{2}+6x+1\ } und   3 x 3 + 14 x 2 + 11 x + 2   {\displaystyle \ 3x^{3}+14x^{2}+11x+2\ } {\displaystyle \ 3x^{3}+14x^{2}+11x+2\ } sind wegen
  • x 2 + 4 x + 1 = ( x + 2 3 ) ( x + 2 + 3 ) {\displaystyle x^{2}+4x+1\;=\;(x+2-{\sqrt {3}})\cdot (x+2+{\sqrt {3}})} {\displaystyle x^{2}+4x+1\;=\;(x+2-{\sqrt {3}})\cdot (x+2+{\sqrt {3}})}
  • 1 {\displaystyle 1} {\displaystyle 1}, x + 2 3 {\displaystyle \;x+2-{\sqrt {3}}} {\displaystyle \;x+2-{\sqrt {3}}}, x + 2 + 3   {\displaystyle \;x+2+{\sqrt {3}}\ } {\displaystyle \;x+2+{\sqrt {3}}\ } und x 2 + 4 x + 1 {\displaystyle \;x^{2}+4x+1} {\displaystyle \;x^{2}+4x+1}.
Ergebnis: Der größte gemeinsame Teiler im Ring Q ( 3 ) [ x ] {\displaystyle \mathbb {Q} ({\sqrt {3}})[x]} {\displaystyle \mathbb {Q} ({\sqrt {3}})[x]} ist: x 2 + 4 x + 1 {\displaystyle \;x^{2}+4x+1} {\displaystyle \;x^{2}+4x+1}
ggT ( 2 x 3 + 9 x 2 + 6 x + 1 ,   3 x 3 + 14 x 2 + 11 x + 2 ) = x 2 + 4 x + 1 {\displaystyle \qquad \qquad \Longrightarrow \operatorname {ggT} (2x^{3}+9x^{2}+6x+1,\ 3x^{3}+14x^{2}+11x+2)=x^{2}+4x+1} {\displaystyle \qquad \qquad \Longrightarrow \operatorname {ggT} (2x^{3}+9x^{2}+6x+1,\ 3x^{3}+14x^{2}+11x+2)=x^{2}+4x+1}.
Im Ring R [ x ] {\displaystyle \mathbb {R} [x]} {\displaystyle \mathbb {R} [x]}
  • ggT ( π x 2 π ,   x + 1 ) = x + 1 {\displaystyle \operatorname {ggT} (\pi x^{2}-\pi ,\ x+1)=x+1} {\displaystyle \operatorname {ggT} (\pi x^{2}-\pi ,\ x+1)=x+1}.

Rechenregeln für Zahlen

[Bearbeiten | Quelltext bearbeiten ]

Für ganze Zahlen a ,   b ,   c ,   k {\displaystyle a,\ b,\ c,\ k} {\displaystyle a,\ b,\ c,\ k} und | a | {\displaystyle |a|} {\displaystyle |a|} als dem Betrag von a {\displaystyle a,円} {\displaystyle a,円} gilt:

くろまる ggT ( a ,   b ) {\displaystyle \operatorname {ggT} (a,\ b)} {\displaystyle \operatorname {ggT} (a,\ b)} = ggT ( b , a ) {\displaystyle =\operatorname {ggT} (b,a)} {\displaystyle =\operatorname {ggT} (b,a)} Kommutativgesetz
くろまる ggT ( a ,   b ,   c ) {\displaystyle \operatorname {ggT} (a,\ b,\ c)} {\displaystyle \operatorname {ggT} (a,\ b,\ c)} = ggT ( a , ggT ( b , c ) ) = ggT ( ggT ( a , b ) , c ) {\displaystyle =\operatorname {ggT} (a,,円\operatorname {ggT} (b,c))=\operatorname {ggT} (\operatorname {ggT} (a,b),,円c)\qquad } {\displaystyle =\operatorname {ggT} (a,,円\operatorname {ggT} (b,c))=\operatorname {ggT} (\operatorname {ggT} (a,b),,円c)\qquad } Assoziativgesetz
くろまる ggT ( k a ,   k b ) {\displaystyle \operatorname {ggT} (k\cdot a,\ k\cdot b)} {\displaystyle \operatorname {ggT} (k\cdot a,\ k\cdot b)} = | k | ggT ( a ,   b ) {\displaystyle =|k|\cdot \operatorname {ggT} (a,\ b)} {\displaystyle =|k|\cdot \operatorname {ggT} (a,\ b)} Distributivgesetz
くろまる ggT ( ± a , ± b ) {\displaystyle \operatorname {ggT} (\pm a,\pm b)} {\displaystyle \operatorname {ggT} (\pm a,\pm b)} = ggT ( a ,   b ) {\displaystyle =\operatorname {ggT} (a,\ b)} {\displaystyle =\operatorname {ggT} (a,\ b)}
くろまる ggT ( a ,   0 ) {\displaystyle \operatorname {ggT} (a,\ 0)} {\displaystyle \operatorname {ggT} (a,\ 0)} = | a | {\displaystyle =|a|} {\displaystyle =|a|}
くろまる ggT ( a ,   1 ) {\displaystyle \operatorname {ggT} (a,\ 1)} {\displaystyle \operatorname {ggT} (a,\ 1)} = 1 {\displaystyle =1} {\displaystyle =1}
くろまる ggT ( a ,   a ) {\displaystyle \operatorname {ggT} (a,\ a)} {\displaystyle \operatorname {ggT} (a,\ a)} = | a | {\displaystyle =|a|} {\displaystyle =|a|}
くろまる ggT ( a ,   b ) {\displaystyle \operatorname {ggT} (a,\ b)} {\displaystyle \operatorname {ggT} (a,\ b)} = ggT ( a ,   b mod a ) = ggT ( a mod b ,   b ) {\displaystyle =\operatorname {ggT} (a,\ b{\bmod {a}})\;=\;\operatorname {ggT} (a{\bmod {b}},\ b)} {\displaystyle =\operatorname {ggT} (a,\ b{\bmod {a}})\;=\;\operatorname {ggT} (a{\bmod {b}},\ b)} für a , b 0 {\displaystyle a,b\neq 0} {\displaystyle a,b\neq 0}
くろまる ggT ( a ,   b + a c ) {\displaystyle \operatorname {ggT} (a,\ b+ac)} {\displaystyle \operatorname {ggT} (a,\ b+ac)} = ggT ( a ,   b ) {\displaystyle =\operatorname {ggT} (a,\ b)} {\displaystyle =\operatorname {ggT} (a,\ b)}
くろまる ggT ( a ,   b ) {\displaystyle \operatorname {ggT} (a,\ b)} {\displaystyle \operatorname {ggT} (a,\ b)} = ggT ( b a ,   b ) {\displaystyle =\operatorname {ggT} (b-a,\ b)} {\displaystyle =\operatorname {ggT} (b-a,\ b)} mindestens für 0 a b {\displaystyle 0\leq a\leq b} {\displaystyle 0\leq a\leq b}
くろまる ggT ( a ) {\displaystyle \operatorname {ggT} (a)} {\displaystyle \operatorname {ggT} (a)} = | a | {\displaystyle =|a|} {\displaystyle =|a|}
くろまる ggT ( a ,   b ,   c ,   ) {\displaystyle \operatorname {ggT} (a,\ b,\ c,\ \ldots )} {\displaystyle \operatorname {ggT} (a,\ b,\ c,\ \ldots )} = ggT ( a , ggT ( b ,   c ,   ) ) {\displaystyle =\operatorname {ggT} (a,,円\operatorname {ggT} (b,\ c,\ \ldots ))} {\displaystyle =\operatorname {ggT} (a,,円\operatorname {ggT} (b,\ c,\ \ldots ))}
くろまる ggT ( a 1 a n , b 1 b m ) {\displaystyle \operatorname {ggT} (a_{1}\!\ldots \!a_{n},b_{1}\!\ldots \!b_{m})} {\displaystyle \operatorname {ggT} (a_{1}\!\ldots \!a_{n},b_{1}\!\ldots \!b_{m})} = ggT ( ggT ( a 1 , a n ) ,   ggT ( b 1 , b m ) ) {\displaystyle =\operatorname {ggT} (\operatorname {ggT} (a_{1},\ldots a_{n}),\ \operatorname {ggT} (b_{1},\ldots b_{m}))} {\displaystyle =\operatorname {ggT} (\operatorname {ggT} (a_{1},\ldots a_{n}),\ \operatorname {ggT} (b_{1},\ldots b_{m}))}
くろまる ggT ( a ,   b ) kgV ( a ,   b ) {\displaystyle \operatorname {ggT} (a,\ b)\cdot \operatorname {kgV} (a,\ b)} {\displaystyle \operatorname {ggT} (a,\ b)\cdot \operatorname {kgV} (a,\ b)} = | a b | {\displaystyle =|ab|} {\displaystyle =|ab|} Verhältnis zwischen ggT und kgV
くろまる Ist k {\displaystyle k} {\displaystyle k} ein gemeinsamer Teiler von a {\displaystyle a} {\displaystyle a} und b {\displaystyle b} {\displaystyle b}, dann gilt:
k {\displaystyle \qquad k} {\displaystyle \qquad k}   teilt   ggT ( a , b ) {\displaystyle \operatorname {ggT} (a,b)} {\displaystyle \operatorname {ggT} (a,b)}   und
ggT ( a k ,   b k ) = ggT ( a ,   b ) | k | {\displaystyle \qquad \operatorname {ggT} {\Big (}{\tfrac {a}{k}},\ {\tfrac {b}{k}}{\Big )}\qquad ={\tfrac {\operatorname {ggT} (a,\ b)}{|k|}}} {\displaystyle \qquad \operatorname {ggT} {\Big (}{\tfrac {a}{k}},\ {\tfrac {b}{k}}{\Big )}\qquad ={\tfrac {\operatorname {ggT} (a,\ b)}{|k|}}} für k 0 {\displaystyle k\neq 0} {\displaystyle k\neq 0}
くろまる Ist a b   mod   c {\displaystyle a\equiv b\ {\bmod {\ }}c} {\displaystyle a\equiv b\ {\bmod {\ }}c}   ( a {\displaystyle a} {\displaystyle a} und b {\displaystyle b} {\displaystyle b} sind kongruent modulo c {\displaystyle c} {\displaystyle c}), dann gilt:
ggT ( a ,   c ) = ggT ( b ,   c ) {\displaystyle \qquad \operatorname {ggT} (a,\ c)\qquad \quad =\operatorname {ggT} (b,\ c)} {\displaystyle \qquad \operatorname {ggT} (a,\ c)\qquad \quad =\operatorname {ggT} (b,\ c)}

Aus der genannten Rechenregel ggT ( a , 0 ) = | a | {\displaystyle \operatorname {ggT} (a,0)=|a|} {\displaystyle \operatorname {ggT} (a,0)=|a|} ergibt sich speziell ggT ( 0 , 0 ) = 0 {\displaystyle \operatorname {ggT} (0,0)=0} {\displaystyle \operatorname {ggT} (0,0)=0}. Dies ergibt sich auch daraus, dass jede ganze Zahl a {\displaystyle a} {\displaystyle a} (sogar die 0 selbst) wegen a 0 = 0 {\displaystyle a\cdot 0=0} {\displaystyle a\cdot 0=0} Teiler der 0 ist, während umgekehrt 0 keine von 0 verschiedene Zahl teilt.

Hält man eines der beiden Argumente fest, dann ist ggT {\displaystyle \operatorname {ggT} } {\displaystyle \operatorname {ggT} } eine multiplikative Funktion, denn für teilerfremde Zahlen a {\displaystyle a} {\displaystyle a} und b {\displaystyle b} {\displaystyle b} gilt:

ggT ( a b , c ) = ggT ( a , c ) ggT ( b , c ) {\displaystyle \operatorname {ggT} (ab,c)=\operatorname {ggT} (a,c)\cdot \operatorname {ggT} (b,c)} {\displaystyle \operatorname {ggT} (ab,c)=\operatorname {ggT} (a,c)\cdot \operatorname {ggT} (b,c)}

Berechnung des größten gemeinsamen Teilers

[Bearbeiten | Quelltext bearbeiten ]

Berechnung mittels Primfaktorzerlegung

[Bearbeiten | Quelltext bearbeiten ]

Für die Berechnung mittels Primfaktorzerlegung zweier Zahlen a {\displaystyle a} {\displaystyle a} und b {\displaystyle b} {\displaystyle b} verwendet man alle Primfaktoren, die in jeder der beiden Zahlen vorkommen, mit der jeweils kleinsten vorkommenden Potenz.

Gegeben seien die Primfaktorzerlegungen:

a = p 1 α 1 p 2 α 2 p m α m {\displaystyle a=p_{1}^{\alpha _{1}}\cdot p_{2}^{\alpha _{2}}\cdot \;\cdots \;\cdot p_{m}^{\alpha _{m}}} {\displaystyle a=p_{1}^{\alpha _{1}}\cdot p_{2}^{\alpha _{2}}\cdot \;\cdots \;\cdot p_{m}^{\alpha _{m}}}
b = p 1 β 1 p 2 β 2 p m β m {\displaystyle ,円b=p_{1}^{\beta _{1}}\cdot p_{2}^{\beta _{2}}\cdot \;\cdots \;\cdot p_{m}^{\beta _{m}}} {\displaystyle ,円b=p_{1}^{\beta _{1}}\cdot p_{2}^{\beta _{2}}\cdot \;\cdots \;\cdot p_{m}^{\beta _{m}}}

mit α j {\displaystyle \alpha _{j}} {\displaystyle \alpha _{j}} resp. β j {\displaystyle \beta _{j}} {\displaystyle \beta _{j}} als den Exponenten des Primfaktors p j {\displaystyle p_{j}} {\displaystyle p_{j}} der Zahl a {\displaystyle a} {\displaystyle a} resp. der Zahl b {\displaystyle b} {\displaystyle b} (für j = 1 , , m {\displaystyle j=1,\ldots ,m} {\displaystyle j=1,\ldots ,m}). Da beide, a {\displaystyle a} {\displaystyle a} und b {\displaystyle b} {\displaystyle b}, ganze Zahlen sind, sind alle diese Exponenten 0 {\displaystyle \geq 0} {\displaystyle \geq 0}.

Der ggT ( a ,   b ) {\displaystyle \operatorname {ggT} (a,\ b)} {\displaystyle \operatorname {ggT} (a,\ b)} berechnet sich zu

ggT ( a ,   b ) = j = 1 m p j min ( α j ,   β j ) {\displaystyle \operatorname {ggT} (a,\ b)=\prod _{j=1}^{m}p_{j}^{\min(\alpha _{j},\ \beta _{j})}} {\displaystyle \operatorname {ggT} (a,\ b)=\prod _{j=1}^{m}p_{j}^{\min(\alpha _{j},\ \beta _{j})}}

mit min ( α j ,   β j ) {\displaystyle ,円\min(\alpha _{j},\ \beta _{j})} {\displaystyle ,円\min(\alpha _{j},\ \beta _{j})} als dem kleinsten Exponenten des Primfaktors p j {\displaystyle p_{j}} {\displaystyle p_{j}} beider Zahlen.

Beispiel

Gesucht ist der größte gemeinsame Teiler von 2970 {\displaystyle 2970} {\displaystyle 2970} und 12 936 {\displaystyle 12,936円} {\displaystyle 12,936円}.

Die beiden Primfaktorzerlegungen lauten:

  • 2970 = 2 1 3 3 5 1 7 0 11 1 {\displaystyle ,円,円,2970円,円=2^{\color {Red}1}\cdot 3^{\color {Gray}3}\cdot 5^{\color {Gray}1}\cdot 7^{\color {Red}0}\cdot 11^{\color {Red}1}} {\displaystyle ,円,円,2970円,円=2^{\color {Red}1}\cdot 3^{\color {Gray}3}\cdot 5^{\color {Gray}1}\cdot 7^{\color {Red}0}\cdot 11^{\color {Red}1}}
  • 12 936 = 2 3 3 1 5 0 7 2 11 1 {\displaystyle 12,936円=2^{\color {Gray}3}\cdot 3^{\color {Red}1}\cdot 5^{\color {Red}0}\cdot 7^{\color {Gray}2}\cdot 11^{\color {Red}1}} {\displaystyle 12,936円=2^{\color {Gray}3}\cdot 3^{\color {Red}1}\cdot 5^{\color {Red}0}\cdot 7^{\color {Gray}2}\cdot 11^{\color {Red}1}}

Dabei sind die jeweils kleinsten Exponenten in Rot, die anderen (irrelevanten) in Grau gesetzt.

Die jeweils kleinsten Exponenten sind ( 1 ,   1 ,   0 ,   0 ,   1 ) {\displaystyle ({\color {Red}1},\ {\color {Red}1},\ {\color {Red}0},\ {\color {Red}0},\ {\color {Red}1})} {\displaystyle ({\color {Red}1},\ {\color {Red}1},\ {\color {Red}0},\ {\color {Red}0},\ {\color {Red}1})}. Daher folgt:

ggT ( 2970 ,   12 936 ) = 2 1 3 1 5 0 7 0 11 1 = 2 3 1 1 11 = 66. {\displaystyle \operatorname {ggT} (2970,\ 12,936円)=2^{\color {Red}1}\cdot 3^{\color {Red}1}\cdot 5^{\color {Red}0}\cdot 7^{\color {Red}0}\cdot 11^{\color {Red}1}=2\cdot 3\cdot 1\cdot 1\cdot 11=66.} {\displaystyle \operatorname {ggT} (2970,\ 12,936円)=2^{\color {Red}1}\cdot 3^{\color {Red}1}\cdot 5^{\color {Red}0}\cdot 7^{\color {Red}0}\cdot 11^{\color {Red}1}=2\cdot 3\cdot 1\cdot 1\cdot 11=66.}

Euklidischer Algorithmus

[Bearbeiten | Quelltext bearbeiten ]
Hauptartikel: Euklidischer Algorithmus

Die Berechnung der Primfaktorzerlegung großer Zahlen und damit auch die Bestimmung des größten gemeinsamen Teilers über die Primfaktorzerlegungen ist sehr aufwändig bis hin zu praktisch unmöglich. Allerdings benötigt man auch gar nicht die Primfaktoren der beteiligten Zahlen, um den ggT zu bestimmen. Mit dem euklidischen Algorithmus existiert ein effizientes Verfahren, um den größten gemeinsamen Teiler zweier Zahlen zu berechnen. So braucht man von 1 000 000 004 147 {\displaystyle 1,000円,000円,004円,147円} {\displaystyle 1,000円,000円,004円,147円} und 1 000 000 004 149 {\displaystyle 1,000円,000円,004円,149円} {\displaystyle 1,000円,000円,004円,149円} gar nicht die Primfaktoren zu kennen, um zu erkennen, dass der ggT ( 1 000 000 004 147 ,   1 000 000 004 149 ) = 1 {\displaystyle \operatorname {ggT} (1,000円,000円,004円,147,円\ 1,000円,000円,004円,149円)=1} {\displaystyle \operatorname {ggT} (1,000円,000円,004円,147,円\ 1,000円,000円,004円,149円)=1} ist. Über die Primfaktoren-Zerlegung wäre das eine Lebensaufgabe, mit dem euklidischen Algorithmus ist das Ergebnis sofort zu sehen.

Der klassische euklidische Algorithmus (wie von Euklid vor 2300 Jahren beschrieben) berechnet den größten gemeinsamen Teiler, indem er nach einem gemeinsamen „Maß" für die Längen zweier Linien sucht.[4] Dazu wird die kleinere zweier Längen von der größeren mehrfach abgezogen, bis ein Ergebnis übrig bleibt, das kleiner als die kleinere ist (erste zwei Schritte im Beispiel). Bei einer Differenz von 0 ist man fertig und die kleinere Länge das Ergebnis. Andernfalls wiederholt man dieses Abziehen – jetzt aber mit der kleineren Länge anstelle der größeren und der letzten Differenz anstelle der kleineren Länge (im Beispiel die Schritte drei bis sieben mit dem Rest 13 als der kleineren Länge und 65 als der jetzt größeren). Beispiel für den größten gemeinsamen Teiler von 143 und 65:

143 65 = 78 78 65 = 13  Die entstandene Differenz 13 ist nun kleiner als der Subtrahend 65, die beiden Zahlen werden getauscht. 65 13 = 52 52 13 = 39 39 13 = 26 26 13 = 13 13 13 =     0  Die entstandene Differenz ist 0, der letzte Minuend ist das Ergebnis. {\displaystyle {\begin{array}{rl|l}143-65&=78\78円-65&=13&\scriptstyle {\text{ Die entstandene Differenz 13 ist nun kleiner als der Subtrahend 65, die beiden Zahlen werden getauscht.}}\65円-13&=52\52円-13&=39\39円-13&=26\26円-13&=13\13円-13&=\ \ 0&\scriptstyle {\text{ Die entstandene Differenz ist 0, der letzte Minuend ist das Ergebnis.}}\\\end{array}}} {\displaystyle {\begin{array}{rl|l}143-65&=78\78円-65&=13&\scriptstyle {\text{ Die entstandene Differenz 13 ist nun kleiner als der Subtrahend 65, die beiden Zahlen werden getauscht.}}\65円-13&=52\52円-13&=39\39円-13&=26\26円-13&=13\13円-13&=\ \ 0&\scriptstyle {\text{ Die entstandene Differenz ist 0, der letzte Minuend ist das Ergebnis.}}\\\end{array}}}

Der größte gemeinsame Teiler von 143 und 65 ist somit 13.

Beim modernen euklidischen Algorithmus wird in aufeinanderfolgenden Schritten jeweils eine Division mit Rest durchgeführt, wobei im nächsten Schritt der Divisor zum neuen Dividenden und der Rest zum neuen Divisor wird. Der Divisor, bei dem sich Rest 0 ergibt, ist der größte gemeinsame Teiler der Ausgangszahlen. Beispiel für die Ausgangszahlen 143 und 65:

143 / 65 = 2  Rest 13     65 / 13 = 5  Rest 0: Der letzte Divisor 13 ist das Ergebnis. {\displaystyle {\begin{array}{rl|l}143,円,円/,円,65円&=,円,円,2円&\scriptstyle {\text{ Rest 13}}\\\ \ 65,円,円/,円,13円&=,円,円,5円&\scriptstyle {\text{ Rest 0: Der letzte Divisor 13 ist das Ergebnis.}}\\\end{array}}} {\displaystyle {\begin{array}{rl|l}143,円,円/,円,65円&=,円,円,2円&\scriptstyle {\text{ Rest 13}}\\\ \ 65,円,円/,円,13円&=,円,円,5円&\scriptstyle {\text{ Rest 0: Der letzte Divisor 13 ist das Ergebnis.}}\\\end{array}}}

Somit ist 13 der größte gemeinsame Teiler von 143 und 65.[5] Beide Verfahren sind auch kombinierbar, bei kleineren Unterschieden kann man Subtrahieren, bei größeren die Division/Modulo-Operation verwenden.

In der Programmiersprache C kann der Algorithmus für zwei vorzeichenlose 64-Bit-Ganzzahlen wie folgt formuliert werden:

#include<stdint.h>
uint64_tggT_Div_Schleife(uint64_ta,uint64_tb)
{
if(a==0)returnb;
if(b==0)returna;
do{
uint64_th=a%b;
a=b;
b=h;
}while(b!=0);
returna;
}

Eine Variante mit Rekursion (genauer: Endrekursion) lässt sich so formulieren:

uint64_tggT_Div_Rekursiv(uint64_ta,uint64_tb)
{
if(a==0)returnb;
if(b==0)returna;
returnggT_Div_Rekursiv(b,a%b);
}

Beide Versionen erzeugen mit Optimierung durch Auflösung der Endrekursion identischen Code.[6]

Steinscher Algorithmus

[Bearbeiten | Quelltext bearbeiten ]

Neben dem euklidischen Algorithmus mit Modulo-Operation (bekanntere Version) und dem euklidischen Algorithmus mit rekursiver Subtraktion (ursprüngliche Version von Euklid) gibt es den steinsche Algorithmus als clevere Modifikation des euklidischen Algorithmus mit rekursiver Subtraktion.

Auf aktuellen CPUs[7] läuft der Steinsche Algorithmus etwa dreimal langsamer als euklidischen Algorithmus mit Modulo-Operation.

Er vermeidet Divisionen und erkauft sich das durch viele schlecht vorhersagbare Sprünge. Erstere sind auf aktuelle CPUs mittlerweile relativ schnell (64-Bit-Ganzzahl- wie auch -Gleitkomma-Division: 14 ± 1 Takte Latenz), letztere bremsen aktuelle CPUs massiv aus (falsch vorhergesagter Sprung: 18 ± 3 Straftakte Latenz).

Im Gegensatz zum euklidischen Algorithmus mit rekursiver Subtraktion zeigt er nicht dessen asymptodisch extrem lange Laufzeiten im Worst-Case-Fall, wenn irgendwann bei der rekursiven Berechnung Operanden mit sehr unterschiedlicher Größe entstehen (die zur quasi endlosen rekursiven Subtraktions-Schleifen führen, siehe Kommentare).

Der Knuth-Algorithmus ist der von Donald E. Knuth optimierte Algorithmus auf heutige CPUs angewendet.

Das gemessene Laufzeitverhalten zeigt die folgende Tabelle. Die verwendete Implementierung des ggT der Code darunter. Alle vier Implementierungen liefern die gleichen numerischen Ergebnisse für a , b > 0 {\displaystyle a,b>0} {\displaystyle a,b>0}.

Ausführungszeiten in Nanosekunden für gleichverteilte Argumente (1 ... 2n − 1)[8] [9]
Zahlen-
paare
ggT(64 bit, 64 bit) ggT(64 bit, 48 bit) ggT(64 bit, 32 bit)
Euklid
(Div)
Knuth Stein Euklid
(Sub)
Euklid
(Div)
Knuth Stein Euklid
(Sub)
Euklid
(Div)
Knuth Stein Euklid
(Sub)
103 142 122 462 0591 111 113 345 307 · 103 76 105 317 05,0 · 109
104 142 122 387 1024 111 113 352 495 · 103 78 105 322 11,9 · 109
105 142 122 382 0800 111 113 348 729 · 103 78 106 322 zu lang*)
106 142 122 379 0843 111 114 351 520 · 103 78 106 325 zu lang*)
107 142 122 380 1754 111 113 336 zu lang*) 78 106 322 zu lang*)

*) Messung abgebrochen, da Ausführungsdauer zu lang

Quellcode für die vier Implementierungen
#include<cstdint>
#include<bit> // für std::countr_zero
#include<algorithm> // für std::swap
usingu64=uint64_t;
// Steinscher Algorithmus
u64Stein(u64a,u64b)
{
if(b==0)returna;
if(b&1)
returna<=b?Stein(a,b-a):Stein(b,a-b);
returna&1?Stein(a,b>>1):Stein(a>>1,b>>1)<<1;
}
// Klassischer Euklidscher Algorithmus mit Subtraktion
u64Euklid_Sub(u64a,u64b)
{
while(a!=b)
if(a>b)a-=b;// Wenn a ≫ b oder a ≪ b, dauert diese Ausführung längere Zeit.
elseb-=a;// Im schlimmsten Fall (UINT64_MAX, 1) mehrere hundert Jahre.
returna;
}
// Euklidscher Algorithmus mit Division
u64Euklid_Div(u64a,u64b)
{
returnb?Euklid_Div(b,a%b):a;
}
// Hilfsfunktion für Steinscher Algorithmus nach D. E. Knuth (für ab Mitte der 1980er Jahre entwickelte CPU EIN Maschinenbefehl)
unsignedlongCountZeros(u64x)// liefert für x>0 die Position des niedrigsten gesetzten Bits, für x=0 ist das Verhalten irrelevant
{
// return std::countr_zero(x); // ab C++20
// unsigned long ret; ::_BitScanForward64 (& ret, x); return ret;// für Microsoft VS
return__builtin_ffsll(x)-1;// für GnuC, Clang, ellcc, Intel icc, nvc, zigC++
}
// Steinscher Algorithmus nach D. E. Knuth
u64Knuth(u64a,u64b)
{
if(a==0||b==0)// falls eines oder beide Argumente 0 sind,
returna|b;// ist das andere Argument oder 0 das Ergebnis
unsignedlongconstzeros=CountZeros(a|b);// LSB-Nullen, werden einmalig bestimmt
a>>=CountZeros(a);
do{
b>>=CountZeros(b);
if(a>b)
std::swap(a,b);// vertausche Variablen, damit immer die kleinere von der größeren Zahl abgezogen wird
b-=a;
}while(b);
returna<<zeros;
}

Berechnung mittels Probieren

[Bearbeiten | Quelltext bearbeiten ]

Die einfachste, aber meist langsamste Methode ist das Probieren:

Beginnend von der kleinsten der Zahlen (daher sollte diese klein sein) wird abwärts zählend die Teilbarkeit geprüft.

ggT ( 8 , 12 ) {\displaystyle \operatorname {ggT} (8,,12円)} {\displaystyle \operatorname {ggT} (8,,12円)}

Teilbar durch 8?  8 ist nich teilbar, 12 ist nicht teilbar
Teilbar durch 7?  8 ist nicht teilbar, 12 ist nicht teilbar
Teilbar durch 6?  8 ist nicht teilbar, 12 ist nich teilbar
Teilbar durch 5?  8 ist nicht teilbar, 12 ist nicht teilbar
Teilbar durch 4?  8 ist nich teilbar, 12 ist nich teilbar ggT ( 8 , 12 ) = 4 {\displaystyle \quad \longrightarrow \operatorname {ggT} (8,,12円)=4} {\displaystyle \quad \longrightarrow \operatorname {ggT} (8,,12円)=4}

ggT ( 6 , 12 ) {\displaystyle \operatorname {ggT} (6,,12円)} {\displaystyle \operatorname {ggT} (6,,12円)}

Teilbar durch 6?  6 ist nich teilbar, 12 ist nich teilbar ggT ( 6 , 12 ) = 6 {\displaystyle \quad \longrightarrow \operatorname {ggT} (6,,12円)=6} {\displaystyle \quad \longrightarrow \operatorname {ggT} (6,,12円)=6}

ggT ( 6 , 93 099 ) {\displaystyle \operatorname {ggT} (6,,93円,099円)} {\displaystyle \operatorname {ggT} (6,,93円,099円)}

Teilbar durch 6?  6 ist nich teilbar, 93099 ist nicht teilbar, da ungerade
Teilbar durch 5?  6 ist nicht teilbar, 93099 ist nicht teilbar, da nicht auf 0 oder 5 endend
Teilbar durch 4?  6 ist nicht teilbar, 93099 ist nicht teilbar, da ungerade
Teilbar durch 3?  6 ist nich teilbar, 93099 ist offensichtlich teilbar ggT ( 6 ,   93 099 ) = 3 {\displaystyle \quad \longrightarrow \operatorname {ggT} (6,\ 93,099円)=3} {\displaystyle \quad \longrightarrow \operatorname {ggT} (6,\ 93,099円)=3}

Berechnung für mehrere Zahlen

[Bearbeiten | Quelltext bearbeiten ]

Berechnung mittels Primfaktorzerlegung

[Bearbeiten | Quelltext bearbeiten ]

Die Berechnung mittels Primfaktorzerlegung lässt nativ die Berechnung für eine beliebige Menge von Zahlen a 1 , , a k {\displaystyle a_{1},\ldots ,a_{k}} {\displaystyle a_{1},\ldots ,a_{k}} zu. Man verwendet alle Primfaktoren, die in jeder der Zahlen vorkommen, mit der jeweils kleinsten vorkommenden Potenz.

Gegeben seien die Primfaktorzerlegungen:

a 1 = p 1 e 1 , 1 p 2 e 1 , 2 p m e 1 , m a 2 = p 1 e 2 , 1 p 2 e 2 , 2 p m e 2 , m a k = p 1 e k , 1 p 2 e k , 2 p m e k , m {\displaystyle {\begin{array}{ccccc}a_{1}=&p_{1}^{e_{1,1}}&p_{2}^{e_{1,2}}&\cdots &p_{m}^{e_{1,m}}\\a_{2}=&p_{1}^{e_{2,1}}&p_{2}^{e_{2,2}}&\cdots &p_{m}^{e_{2,m}}\\\vdots \quad &\vdots \;&\vdots \;&\ddots &\vdots \;\\a_{k}=&p_{1}^{e_{k,1}}&p_{2}^{e_{k,2}}&\cdots &p_{m}^{e_{k,m}}\\\end{array}}} {\displaystyle {\begin{array}{ccccc}a_{1}=&p_{1}^{e_{1,1}}&p_{2}^{e_{1,2}}&\cdots &p_{m}^{e_{1,m}}\\a_{2}=&p_{1}^{e_{2,1}}&p_{2}^{e_{2,2}}&\cdots &p_{m}^{e_{2,m}}\\\vdots \quad &\vdots \;&\vdots \;&\ddots &\vdots \;\\a_{k}=&p_{1}^{e_{k,1}}&p_{2}^{e_{k,2}}&\cdots &p_{m}^{e_{k,m}}\\\end{array}}}

mit e i , j 0 {\displaystyle e_{i,j}\geq 0} {\displaystyle e_{i,j}\geq 0} dem jeweiligen Exponenten des Primfaktors p j {\displaystyle p_{j}} {\displaystyle p_{j}} der Zahl a i {\displaystyle a_{i}} {\displaystyle a_{i}} ( i = 1 , , k , j = 1 , , m {\displaystyle i=1,\ldots ,k,\;\;j=1,\ldots ,m} {\displaystyle i=1,\ldots ,k,\;\;j=1,\ldots ,m}).

Der ggT berechnet sich zu (mit min ( e 1 , j , e 2 , j , , e k , j ) {\displaystyle \min(e_{1,j},,円e_{2,j},,円\ldots ,e_{k,j})} {\displaystyle \min(e_{1,j},,円e_{2,j},,円\ldots ,e_{k,j})} dem kleinsten Exponenten des Primfaktors p j {\displaystyle p_{j}} {\displaystyle p_{j}} aller Zahlen):

ggT ( a 1 , a 2 , , a k ) = j = 1 m p j min ( e 1 , j , e 2 , j , , e k , j )   {\displaystyle \operatorname {ggT} (a_{1},a_{2},\ldots ,a_{k})=\prod _{j=1}^{m}p_{j}^{\min(e_{1,j},,円e_{2,j},,円\ldots ,e_{k,j})}\ } {\displaystyle \operatorname {ggT} (a_{1},a_{2},\ldots ,a_{k})=\prod _{j=1}^{m}p_{j}^{\min(e_{1,j},,円e_{2,j},,円\ldots ,e_{k,j})}\ }.
Beispiel

Gesucht ist der kleinste gemeinsame Teiler von 1574 ,   1760 {\displaystyle 1574,\ 1760} {\displaystyle 1574,\ 1760} und 1925 {\displaystyle 1925} {\displaystyle 1925}.

Die Primfaktorenzerlegung lautet, wobei die jeweils kleinsten Exponenten in Rot, die anderen (irrelevanten) in Grau gesetzt sind:

1584 = 2 4 3 2 5 0 7 0 11 1 {\displaystyle 1584=2^{\color {Gray}4}\cdot 3^{\color {Gray}2}\cdot 5^{\color {Red}0}\cdot 7^{\color {Red}0}\cdot 11^{\color {Red}1}} {\displaystyle 1584=2^{\color {Gray}4}\cdot 3^{\color {Gray}2}\cdot 5^{\color {Red}0}\cdot 7^{\color {Red}0}\cdot 11^{\color {Red}1}}
1760 = 2 5 3 0 5 1 7 0 11 1 {\displaystyle 1760=2^{\color {Gray}5}\cdot 3^{\color {Red}0}\cdot 5^{\color {Gray}1}\cdot 7^{\color {Red}0}\cdot 11^{\color {Red}1}} {\displaystyle 1760=2^{\color {Gray}5}\cdot 3^{\color {Red}0}\cdot 5^{\color {Gray}1}\cdot 7^{\color {Red}0}\cdot 11^{\color {Red}1}}
1925 = 2 0 3 0 5 2 7 1 11 1 {\displaystyle 1925=2^{\color {Red}0}\cdot 3^{\color {Red}0}\cdot 5^{\color {Gray}2}\cdot 7^{\color {Gray}1}\cdot 11^{\color {Red}1}} {\displaystyle 1925=2^{\color {Red}0}\cdot 3^{\color {Red}0}\cdot 5^{\color {Gray}2}\cdot 7^{\color {Gray}1}\cdot 11^{\color {Red}1}},

die kleinsten Exponenten sind ( 0 ,   0 ,   0 ,   0 ,   1 ) {\displaystyle ({\color {Red}0},\ {\color {Red}0},\ {\color {Red}0},\ {\color {Red}0},\ {\color {Red}1})} {\displaystyle ({\color {Red}0},\ {\color {Red}0},\ {\color {Red}0},\ {\color {Red}0},\ {\color {Red}1})}. Daher folgt:

ggT ( 1584 ,   1760 ,   1925 ) = 2 0 3 0 5 0 7 0 11 1 = 1 1 1 1 11 = 11. {\displaystyle \operatorname {ggT} (1584,\ 1760,\ 1925)=2^{\color {Red}0}\cdot 3^{\color {Red}0}\cdot 5^{\color {Red}0}\cdot 7^{\color {Red}0}\cdot 11^{\color {Red}1}=1\cdot 1\cdot 1\cdot 1\cdot 11=11.} {\displaystyle \operatorname {ggT} (1584,\ 1760,\ 1925)=2^{\color {Red}0}\cdot 3^{\color {Red}0}\cdot 5^{\color {Red}0}\cdot 7^{\color {Red}0}\cdot 11^{\color {Red}1}=1\cdot 1\cdot 1\cdot 1\cdot 11=11.}
Bemerkung

Bei Anwendung des jeweils größten Exponenten erhält man (analog) das kleinste gemeinsame Vielfache:

1584 = 2 4 3 2 5 0 7 0 11 1 {\displaystyle 1584=2^{\color {Gray}4}\cdot 3^{\color {Red}2}\cdot 5^{\color {Gray}0}\cdot 7^{\color {Gray}0}\cdot 11^{\color {Red}1}} {\displaystyle 1584=2^{\color {Gray}4}\cdot 3^{\color {Red}2}\cdot 5^{\color {Gray}0}\cdot 7^{\color {Gray}0}\cdot 11^{\color {Red}1}}
1760 = 2 5 3 0 5 1 7 0 11 1 {\displaystyle 1760=2^{\color {Red}5}\cdot 3^{\color {Gray}0}\cdot 5^{\color {Gray}1}\cdot 7^{\color {Gray}0}\cdot 11^{\color {Red}1}} {\displaystyle 1760=2^{\color {Red}5}\cdot 3^{\color {Gray}0}\cdot 5^{\color {Gray}1}\cdot 7^{\color {Gray}0}\cdot 11^{\color {Red}1}}
1925 = 2 0 3 0 5 2 7 1 11 1 {\displaystyle 1925=2^{\color {Gray}0}\cdot 3^{\color {Gray}0}\cdot 5^{\color {Red}2}\cdot 7^{\color {Red}1}\cdot 11^{\color {Red}1}} {\displaystyle 1925=2^{\color {Gray}0}\cdot 3^{\color {Gray}0}\cdot 5^{\color {Red}2}\cdot 7^{\color {Red}1}\cdot 11^{\color {Red}1}},

die größten Exponenten sind ( 5 ,   2 ,   2 ,   1 ,   1 ) {\displaystyle ({\color {Red}5},\ {\color {Red}2},\ {\color {Red}2},\ {\color {Red}1},\ {\color {Red}1})} {\displaystyle ({\color {Red}5},\ {\color {Red}2},\ {\color {Red}2},\ {\color {Red}1},\ {\color {Red}1})}. Daher folgt:

kgV ( 1584 ,   1760 ,   1925 ) = 2 5 3 2 5 2 7 1 11 1 = 32 9 25 7 11 = 554 400. {\displaystyle \operatorname {kgV} (1584,\ 1760,\ 1925)=2^{\color {Red}5}\cdot 3^{\color {Red}2}\cdot 5^{\color {Red}2}\cdot 7^{\color {Red}1}\cdot 11^{\color {Red}1}=32\cdot 9\cdot 25\cdot 7\cdot 11=554,400円.} {\displaystyle \operatorname {kgV} (1584,\ 1760,\ 1925)=2^{\color {Red}5}\cdot 3^{\color {Red}2}\cdot 5^{\color {Red}2}\cdot 7^{\color {Red}1}\cdot 11^{\color {Red}1}=32\cdot 9\cdot 25\cdot 7\cdot 11=554,400円.}

Das Produkt aus ggT {\displaystyle \operatorname {ggT} } {\displaystyle \operatorname {ggT} } und kgV {\displaystyle \operatorname {kgV} } {\displaystyle \operatorname {kgV} } ist 6 098 400 {\displaystyle 6,098円,400円} {\displaystyle 6,098円,400円}, das der drei Zahlen ist 5 366 592 000 {\displaystyle 5,366円,592円,000円} {\displaystyle 5,366円,592円,000円}, womit man sieht, dass die Multiplikationsregel für ggT {\displaystyle \operatorname {ggT} } {\displaystyle \operatorname {ggT} } und kgV {\displaystyle \operatorname {kgV} } {\displaystyle \operatorname {kgV} } für mehr als zwei Zahlen nicht gilt.

Berechnung mittels Verkettung

[Bearbeiten | Quelltext bearbeiten ]

Wie wir schon festgestellt haben, ist die Berechnung über die Primfaktorenzerlegung nicht die effizienteste Methode.

Die Berechnung des ggT {\displaystyle \operatorname {ggT} } {\displaystyle \operatorname {ggT} } erfolgt durch Verkettung. Die Reihenfolge (sowohl kommutativ wie assoziativ) ist dabei irrelevant:

ggT ( a , b , c ) = ggT ( ggT ( a , b ) , c ) = ggT ( a , ggT ( b , c ) ) {\displaystyle \operatorname {ggT} (a,b,c)=\operatorname {ggT} (\operatorname {ggT} (a,b),c)=\operatorname {ggT} (a,\operatorname {ggT} (b,c))} {\displaystyle \operatorname {ggT} (a,b,c)=\operatorname {ggT} (\operatorname {ggT} (a,b),c)=\operatorname {ggT} (a,\operatorname {ggT} (b,c))}
= ggT ( b , a , c ) = ggT ( b , ggT ( c , a ) ) = {\displaystyle \qquad \qquad \quad =\operatorname {ggT} (b,a,c)=\operatorname {ggT} (b,\operatorname {ggT} (c,a))=\ldots } {\displaystyle \qquad \qquad \quad =\operatorname {ggT} (b,a,c)=\operatorname {ggT} (b,\operatorname {ggT} (c,a))=\ldots }

Für die Berechnung von ggT ( 1584 , 1760 , 1925 ) {\displaystyle \operatorname {ggT} (1584,,1760,円,1925円)} {\displaystyle \operatorname {ggT} (1584,,1760,円,1925円)} berechnet man z. B. zuerst

ggT ( 1584 , 1760 ) = 176 {\displaystyle \operatorname {ggT} (1584,,1760円)=176\qquad } {\displaystyle \operatorname {ggT} (1584,,1760円)=176\qquad } und im zweiten Schritt
ggT (     176 , 1925 ) =     11 {\displaystyle \operatorname {ggT} (\ \ 176,,1925円)=\ \ 11} {\displaystyle \operatorname {ggT} (\ \ 176,,1925円)=\ \ 11}.

Der Hintergrund, warum das funktioniert, ist die Eigenschaft des Minimum-Operators:

min ( A B ) = min ( min ( A ) , min ( B ) ) {\displaystyle \min({\mathcal {A}}\cup {\mathcal {B}})=\min(\min({\mathcal {A}}),,円\min({\mathcal {B}}))} {\displaystyle \min({\mathcal {A}}\cup {\mathcal {B}})=\min(\min({\mathcal {A}}),,円\min({\mathcal {B}}))},  der sich durch das Anwenden auf die Exponenten auf die ggT {\displaystyle \operatorname {ggT} } {\displaystyle \operatorname {ggT} } durchschlägt:
ggT ( A B ) = ggT ( ggT ( A ) , ggT ( B ) ) {\displaystyle \operatorname {ggT} ({\mathcal {A}}\cup {\mathcal {B}})=\operatorname {ggT} (\operatorname {ggT} ({\mathcal {A}}),,円\operatorname {ggT} ({\mathcal {B}}))} {\displaystyle \operatorname {ggT} ({\mathcal {A}}\cup {\mathcal {B}})=\operatorname {ggT} (\operatorname {ggT} ({\mathcal {A}}),,円\operatorname {ggT} ({\mathcal {B}}))}.

A {\displaystyle {\mathcal {A}}} {\displaystyle {\mathcal {A}}} und B {\displaystyle {\mathcal {B}}} {\displaystyle {\mathcal {B}}} bezeichnen hier jeweils nichtleere Mengen an ganzen Zahlen, d. h. man kann eine Menge M {\displaystyle {\mathcal {M}}} {\displaystyle {\mathcal {M}}} in (sinnvollerweise, aber nicht notwendigerweise echte) nichtleere Teilemengen A M {\displaystyle \emptyset \subset {\mathcal {A}}\subseteq {\mathcal {M}}} {\displaystyle \emptyset \subset {\mathcal {A}}\subseteq {\mathcal {M}}} und B M {\displaystyle \emptyset \subset {\mathcal {B}}\subseteq {\mathcal {M}}} {\displaystyle \emptyset \subset {\mathcal {B}}\subseteq {\mathcal {M}}} mit A B = M {\displaystyle {\mathcal {A}}\cup {\mathcal {B}}={\mathcal {M}}} {\displaystyle {\mathcal {A}}\cup {\mathcal {B}}={\mathcal {M}}} zerlegen und dann die Operation rekursiv anwenden.

Dies rechtfertigt die Schreibweise ggT ( a 1 ,   a 2 a n ) {\displaystyle \operatorname {ggT} (a_{1},\ a_{2}\ldots a_{n})} {\displaystyle \operatorname {ggT} (a_{1},\ a_{2}\ldots a_{n})}.[10]

Bemerkung

Das Gleiche gilt für das kleinste gemeinsame Vielfache, nur dass hier das Minimum jeweils durch das Maximum (der Exponenten) ersetzt wird.

Berechnen für Polynome

[Bearbeiten | Quelltext bearbeiten ]

Die Bestimmung des ggT {\displaystyle \operatorname {ggT} } {\displaystyle \operatorname {ggT} } für Polynome läuft auf geschicktes Raten und Polynomdivisionen bzw. auf die Bestimmung der Nullstellen der Polynome hinaus.

Letzteres erfolgt folgendermaßen:

ggT ( i = 0 k a i x i , i = 0 m b i x i ) = ggT ( a k i = 0 k ( x x a , i ) , b m i = 0 m ( x x b , i ) ) = ggT ( a k , b m ) x i M ( x x i ) {\displaystyle \operatorname {ggT} \left(\sum _{i=0}^{k}a_{i}x^{i},\;\sum _{i=0}^{m}b_{i}x^{i}\right)=\operatorname {ggT} \left(a_{k}\prod _{i=0}^{k}(x-x_{a,i}),\;b_{m}\prod _{i=0}^{m}(x-x_{b,i})\right)=\operatorname {ggT} (a_{k},,円b_{m})\prod _{x_{i}\in {\mathcal {M}}}\!\!(x-x_{i})} {\displaystyle \operatorname {ggT} \left(\sum _{i=0}^{k}a_{i}x^{i},\;\sum _{i=0}^{m}b_{i}x^{i}\right)=\operatorname {ggT} \left(a_{k}\prod _{i=0}^{k}(x-x_{a,i}),\;b_{m}\prod _{i=0}^{m}(x-x_{b,i})\right)=\operatorname {ggT} (a_{k},,円b_{m})\prod _{x_{i}\in {\mathcal {M}}}\!\!(x-x_{i})}

wobei M {\displaystyle {\mathcal {M}}} {\displaystyle {\mathcal {M}}} die Menge aller paarweise identischen Nullstellen der beiden Polynome umfasst.

Beispiel
ggT ( 2 x 5 28 x 4 + 138 x 3 296 x 2 + 280 x 96 , 6 x 5 72 x 4 + 312 x 3 612 x 2 + 546 x 180 ) = {\displaystyle \operatorname {ggT} (2x^{5}-28x^{4}+138x^{3}-296x^{2}+280x-96,\;6x^{5}-72x^{4}+312x^{3}-612x^{2}+546x-180)=} {\displaystyle \operatorname {ggT} (2x^{5}-28x^{4}+138x^{3}-296x^{2}+280x-96,\;6x^{5}-72x^{4}+312x^{3}-612x^{2}+546x-180)=}
ggT ( 2 ( x 1 ) ( x 1 ) ( x 2 ) ( x 4 ) ( x 6 ) , 6 ( x 1 ) ( x 1 ) ( x 2 ) ( x 3 ) ( x 5 ) ) {\displaystyle \operatorname {ggT} (2(x-1)(x-1)(x-2)(x-4)(x-6),\;6(x-1)(x-1)(x-2)(x-3)(x-5))} {\displaystyle \operatorname {ggT} (2(x-1)(x-1)(x-2)(x-4)(x-6),\;6(x-1)(x-1)(x-2)(x-3)(x-5))}.

Die gemeinsamen Nullstellen sind die doppelte Nullstelle + 1 {\displaystyle +1} {\displaystyle +1} und die einfache Nullstelle + 2 {\displaystyle +2} {\displaystyle +2}, weiterhin ist das ggT ( 2 , 6 ) = 2 {\displaystyle \operatorname {ggT} (2,,6円)=2} {\displaystyle \operatorname {ggT} (2,,6円)=2}.

ggT ( 2 x 4 20 x 3 + 64 x 2 76 x + 30 ,   2 x 4 16 x 3 + 42 x 2 44 x + 16 ) = 2 ( x 1 ) ( x 1 ) ( x 2 ) = 2 x 3 8 x 2 + 10 x 4 {\displaystyle \operatorname {ggT} (2x^{4}-20x^{3}+64x^{2}-76x+30,\ 2x^{4}-16x^{3}+42x^{2}-44x+16)=2(x-1)(x-1)(x-2)=2x^{3}-8x^{2}+10x-4} {\displaystyle \operatorname {ggT} (2x^{4}-20x^{3}+64x^{2}-76x+30,\ 2x^{4}-16x^{3}+42x^{2}-44x+16)=2(x-1)(x-1)(x-2)=2x^{3}-8x^{2}+10x-4}.

Der rationale Bruch

2 x 5 28 x 4 + 138 x 3 296 x 2 + 280 x 96 6 x 5 72 x 4 + 312 x 3 612 x 2 + 546 x 180 {\displaystyle {\frac {2x^{5}-28x^{4}+138x^{3}-296x^{2}+280x-96}{6x^{5}-72x^{4}+312x^{3}-612x^{2}+546x-180}}} {\displaystyle {\frac {2x^{5}-28x^{4}+138x^{3}-296x^{2}+280x-96}{6x^{5}-72x^{4}+312x^{3}-612x^{2}+546x-180}}}

lässt sich für x 1 , 2   {\displaystyle x\neq 1,\;2\ } {\displaystyle x\neq 1,\;2\ } kürzen zu:

( x 6 ) ( x 4 ) 3 ( x 5 ) ( x 3 ) {\displaystyle {\frac {(x-6)(x-4)}{3(x-5)(x-3)}}} {\displaystyle {\frac {(x-6)(x-4)}{3(x-5)(x-3)}}}

Lemma von Bézout

[Bearbeiten | Quelltext bearbeiten ]
Hauptartikel: Lemma von Bézout

Nach dem Lemma von Bézout lässt sich der größte gemeinsame Teiler zweier ganzer Zahlen m {\displaystyle m} {\displaystyle m} und n {\displaystyle n} {\displaystyle n} als Linearkombination von m {\displaystyle m} {\displaystyle m} und n {\displaystyle n} {\displaystyle n} mit ganzzahligen Koeffizienten darstellen:

  • ggT ( m , n ) = s m + t n {\displaystyle \operatorname {ggT} (m,,円n)=s\cdot m+t\cdot n} {\displaystyle \operatorname {ggT} (m,,円n)=s\cdot m+t\cdot n}  mit s , t Z {\displaystyle s,t\in \mathbb {Z} } {\displaystyle s,t\in \mathbb {Z} }[11]

Beispielsweise besitzt der größte gemeinsame Teiler von 12 {\displaystyle 12} {\displaystyle 12} und 18 {\displaystyle 18} {\displaystyle 18} die folgende Darstellung:

  • ggT ( 12 , 18 ) = 6 = ( 1 ) 12 + 1 18 {\displaystyle \operatorname {ggT} (12,,18円)=6=(-1)\cdot 12+1\cdot 18} {\displaystyle \operatorname {ggT} (12,,18円)=6=(-1)\cdot 12+1\cdot 18}

Die Koeffizienten s {\displaystyle s} {\displaystyle s} und t {\displaystyle t} {\displaystyle t} können mit dem erweiterten euklidischen Algorithmus berechnet werden.

Für gerades e {\displaystyle e} {\displaystyle e}, ungerades d {\displaystyle d} {\displaystyle d} sowie ganzes i , j , k {\displaystyle i,j,k} {\displaystyle i,j,k} gilt:

ggT ( e 1 ,   e + 2 ) = 1 ggT ( 2 e ,   e 2 1 ) = 1 ggT ( 2 d ,   d 2 1 ) = 2 ggT ( 2 k ( k + 1 ) ,   2 k + 1 ) = 1 ggT ( 4 k ,   4 k 2 1 ) = 1 ggT ( i j ,   1 + i + j ) = ggT ( 1 + 2 j ,   1 + 2 i ) ggT ( a ,   b ) = 2 ggT ( a 2 ,   b 2 ) falls  a  und  b  gerade ggT ( a ,   b ) = ggT ( a 2 ,   b ) falls  a  gerade und  b  ungerade ggT ( a ,   b ) = ggT ( a b 2 ,   b ) falls  a  und  b  ungerade {\displaystyle {\begin{array}{lll}\operatorname {ggT} (e-1,\ e+2)&=1\\\operatorname {ggT} (2e,\ e^{2}-1)&=1\\\operatorname {ggT} (2d,\ d^{2}-1)&=2\\\operatorname {ggT} (2k(k+1),\ 2k+1)&=1\\\operatorname {ggT} (4k,\ 4k^{2}-1)&=1\\\operatorname {ggT} (i-j,\ 1+i+j)&=\operatorname {ggT} (1+2j,\ 1+2i)\\\operatorname {ggT} (a,\ b)&=2\operatorname {ggT} {\big (}{\tfrac {a}{2}},\ {\tfrac {b}{2}}{\big )}&{\text{falls }}a{\text{ und }}b{\text{ gerade}}\\\operatorname {ggT} (a,\ b)&=\operatorname {ggT} {\big (}{\tfrac {a}{2}},\ b{\big )}&{\text{falls }}a{\text{ gerade und }}b{\text{ ungerade}}\\\operatorname {ggT} (a,\ b)&=\operatorname {ggT} {\big (}{\tfrac {a-b}{2}},\ b{\big )}&{\text{falls }}a{\text{ und }}b{\text{ ungerade}}\\\end{array}}} {\displaystyle {\begin{array}{lll}\operatorname {ggT} (e-1,\ e+2)&=1\\\operatorname {ggT} (2e,\ e^{2}-1)&=1\\\operatorname {ggT} (2d,\ d^{2}-1)&=2\\\operatorname {ggT} (2k(k+1),\ 2k+1)&=1\\\operatorname {ggT} (4k,\ 4k^{2}-1)&=1\\\operatorname {ggT} (i-j,\ 1+i+j)&=\operatorname {ggT} (1+2j,\ 1+2i)\\\operatorname {ggT} (a,\ b)&=2\operatorname {ggT} {\big (}{\tfrac {a}{2}},\ {\tfrac {b}{2}}{\big )}&{\text{falls }}a{\text{ und }}b{\text{ gerade}}\\\operatorname {ggT} (a,\ b)&=\operatorname {ggT} {\big (}{\tfrac {a}{2}},\ b{\big )}&{\text{falls }}a{\text{ gerade und }}b{\text{ ungerade}}\\\operatorname {ggT} (a,\ b)&=\operatorname {ggT} {\big (}{\tfrac {a-b}{2}},\ b{\big )}&{\text{falls }}a{\text{ und }}b{\text{ ungerade}}\\\end{array}}}

Setzt man eine Primzahl aus zwei echten Summanden zusammen, gilt für diese stets Teilerfremdheit:

Aus p = a + b , 0 < b a < p , a N , b N , p P {\displaystyle \;p=a+b,\;0<b\leq a<p,\;a\in \mathbb {N} ,\;b\in \mathbb {N} ,\;p\in \mathbb {P} \;} {\displaystyle \;p=a+b,\;0<b\leq a<p,\;a\in \mathbb {N} ,\;b\in \mathbb {N} ,\;p\in \mathbb {P} \;} folgt ggT ( a , b ) = 1 {\displaystyle \;\operatorname {ggT} (a,b)=1} {\displaystyle \;\operatorname {ggT} (a,b)=1}.

Kürzen von Brüchen

[Bearbeiten | Quelltext bearbeiten ]

Beim Kürzen wird ein gemeinsamer Faktor von Zähler und Nenner eines Bruches entfernt, wobei sich der Wert des Bruches nicht ändert, z. B. 12 18 = 6     2 9     2 = 6 9 {\displaystyle {\tfrac {12}{18}}={\tfrac {6\ \!\cdot \ \!2}{9\ \!\cdot \ \!2}}={\tfrac {6}{9}}} {\displaystyle {\tfrac {12}{18}}={\tfrac {6\ \!\cdot \ \!2}{9\ \!\cdot \ \!2}}={\tfrac {6}{9}}}. Kürzt man mit dem größten gemeinsamen Teiler von Zähler und Nenner, entsteht ein Bruch, der nicht weiter kürzbar ist.[12] Zum Beispiel ist ggT ( 12 , 18 ) = 6 {\displaystyle \operatorname {ggT} (12,,18円)={\color {Red}6}} {\displaystyle \operatorname {ggT} (12,,18円)={\color {Red}6}}, also

12 18 = 2 6 3 6 = 2 3 {\displaystyle {\frac {12}{18}}={\frac {2\cdot {\color {Red}6}}{3\cdot {\color {Red}6}}}={\frac {2}{3}}} {\displaystyle {\frac {12}{18}}={\frac {2\cdot {\color {Red}6}}{3\cdot {\color {Red}6}}}={\frac {2}{3}}}

Ein Bruch mit Zähler a {\displaystyle a} {\displaystyle a} und Nenner b {\displaystyle b} {\displaystyle b}, bei dem ggT ( a , b ) = 1 {\displaystyle \operatorname {ggT} (a,b)=1} {\displaystyle \operatorname {ggT} (a,b)=1} ist, ist nicht weiter kürzbar. Er wird voll gekürzt[13] , in der Mathematik vollständig oder maximal gekürzter Bruch genannt. In der englischsprachigen Literatur wird er „Simplified fraction" oder „Reduced fraction" genannt.

Zusammenhang zwischen größtem gemeinsamen Teiler (ggT) und kleinstem gemeinsamen Vielfachen (kgV)

[Bearbeiten | Quelltext bearbeiten ]
Satz
ggT ( a , b ) kgV ( a , b ) = a b {\displaystyle \operatorname {ggT} (a,b)\cdot \operatorname {kgV} (a,b)=a\cdot b} {\displaystyle \operatorname {ggT} (a,b)\cdot \operatorname {kgV} (a,b)=a\cdot b}
Beweis
Nachweis für positive ganze Zahlen m {\displaystyle m} {\displaystyle m} und n {\displaystyle n} {\displaystyle n}, alle anderen Fälle lassen sich analog behandeln. Sei k = kgV ( m , n ) {\displaystyle k=\operatorname {kgV} (m,n)} {\displaystyle k=\operatorname {kgV} (m,n)}, dann ist k {\displaystyle k} {\displaystyle k} auch Teiler des Produkts m n {\displaystyle m\cdot n} {\displaystyle m\cdot n}. Die Zahl g {\displaystyle g} {\displaystyle g} enthalte dagegen alle Primfaktoren des Produkts m n {\displaystyle m\cdot n} {\displaystyle m\cdot n}, die k {\displaystyle k} {\displaystyle k} nicht enthält. Betrachtet man, wie der ggT ( m , n ) {\displaystyle \operatorname {ggT} (m,n)} {\displaystyle \operatorname {ggT} (m,n)} aus der Primfaktordarstellung des Produkts aus m {\displaystyle m} {\displaystyle m} und n {\displaystyle n} {\displaystyle n} berechnet wird, dann folgt g = ggT ( m , n ) {\displaystyle g=\operatorname {ggT} (m,n)} {\displaystyle g=\operatorname {ggT} (m,n)}. Daraus ergibt sich die obige Gleichung.[14]

Weitere algebraische Strukturen mit ggT

[Bearbeiten | Quelltext bearbeiten ]

Der Begriff des ggT {\displaystyle \operatorname {ggT} } {\displaystyle \operatorname {ggT} } baut auf dem Begriff der Teilbarkeit auf, wie er in Ringen definiert ist. Man beschränkt sich bei der Diskussion des ggT {\displaystyle \operatorname {ggT} } {\displaystyle \operatorname {ggT} } auf nullteilerfreie Ringe, im kommutativen Fall sind das die Integritätsringe.

Ein Integritätsring, in dem je zwei Elemente einen ggT {\displaystyle \operatorname {ggT} } {\displaystyle \operatorname {ggT} } besitzen, heißt ggT-Ring oder ggT-Bereich. (In einem ggT {\displaystyle \operatorname {ggT} } {\displaystyle \operatorname {ggT} }-Ring haben je zwei Elemente auch ein kgV {\displaystyle \operatorname {kgV} } {\displaystyle \operatorname {kgV} }.)

Im Allgemeinen besitzen solche Ringe keine Halbordnung, die antisymmetrisch ist, wie die ganzen oder die natürlichen Zahlen eine haben. Häufig ist die Teilbarkeitsrelation, die eine Quasiordnung ist, die einzige Ordnungsrelation. Deshalb lässt sich der ggT {\displaystyle \operatorname {ggT} } {\displaystyle \operatorname {ggT} } gegebenenfalls nicht mehr eindeutig als nicht-negativ normieren, sondern nur bis auf Assoziiertheit bestimmen. Zwei Elemente a {\displaystyle a} {\displaystyle a} und b {\displaystyle b} {\displaystyle b} sind assoziiert, in Zeichen a b {\displaystyle a\sim b} {\displaystyle a\sim b}, wenn es eine Einheit ϵ {\displaystyle \epsilon } {\displaystyle \epsilon } mit a = b ϵ {\displaystyle a=b\cdot \epsilon } {\displaystyle a=b\cdot \epsilon } gibt.

Wir erweitern den Begriff des ggT {\displaystyle \operatorname {ggT} } {\displaystyle \operatorname {ggT} } auf die Menge aller größten gemeinsamen Teiler der Elemente einer Teilmenge M {\displaystyle M} {\displaystyle M} eines Ringes R {\displaystyle R} {\displaystyle R}, formal:

d ggT ( M ) :⟺ y R : ( x M : y x ) y d {\displaystyle d\in \operatorname {ggT} (M)\quad :\Longleftrightarrow \quad \forall y\in R:(\forall x\in M:y\mid x)\Leftrightarrow y\mid d} {\displaystyle d\in \operatorname {ggT} (M)\quad :\Longleftrightarrow \quad \forall y\in R:(\forall x\in M:y\mid x)\Leftrightarrow y\mid d}.

In Worten: Die Teiler von d {\displaystyle d} {\displaystyle d} sind genau die Elemente aus R {\displaystyle R} {\displaystyle R}, die alle Elemente aus M {\displaystyle M} {\displaystyle M} teilen. Die ggT {\displaystyle \operatorname {ggT} } {\displaystyle \operatorname {ggT} } sind untereinander assoziiert.

Man kann den ggT {\displaystyle \operatorname {ggT} } {\displaystyle \operatorname {ggT} } z. B. auch für Polynome bilden. Statt der Primfaktorzerlegung nimmt man hier die Zerlegung in irreduzible Faktoren:

f ( X , Y ) = X 2 + 2 X Y + Y 2 = ( X + Y ) 2 g ( X , Y ) = X 2 Y 2 = ( X + Y ) ( X Y ) {\displaystyle {\begin{aligned}f(X,Y)&=X^{2}+2XY+Y^{2}=(X+Y)^{2}\\g(X,Y)&=X^{2}-Y^{2}=(X+Y)(X-Y)\end{aligned}}} {\displaystyle {\begin{aligned}f(X,Y)&=X^{2}+2XY+Y^{2}=(X+Y)^{2}\\g(X,Y)&=X^{2}-Y^{2}=(X+Y)(X-Y)\end{aligned}}}

Dann ist

ggT ( f , g ) X + Y {\displaystyle \operatorname {ggT} (f,g)\sim X+Y} {\displaystyle \operatorname {ggT} (f,g)\sim X+Y}

Der Polynomring Q [ X ] {\displaystyle \mathbb {Q} [X]} {\displaystyle \mathbb {Q} [X]} in einer Variablen X {\displaystyle X} {\displaystyle X} ist euklidisch. Dort gibt es zur Berechnung des ggT {\displaystyle \operatorname {ggT} } {\displaystyle \operatorname {ggT} } eine Division mit Rest.

Gaußscher Zahlenring

[Bearbeiten | Quelltext bearbeiten ]

Im gaußschen Zahlenring Z + i Z {\displaystyle \mathbb {Z} +\mathrm {i} \mathbb {Z} } {\displaystyle \mathbb {Z} +\mathrm {i} \mathbb {Z} } ist der größte gemeinsame Teiler von 2 {\displaystyle 2} {\displaystyle 2} und 1 + 3 i {\displaystyle 1+3\mathrm {i} } {\displaystyle 1+3\mathrm {i} } gerade 1 + i {\displaystyle 1+\mathrm {i} } {\displaystyle 1+\mathrm {i} }, denn 2 = i ( 1 + i ) 2 {\displaystyle 2=-\mathrm {i} (1+\mathrm {i} )^{2}} {\displaystyle 2=-\mathrm {i} (1+\mathrm {i} )^{2}} und 1 + 3 i = ( 1 + i ) ( 2 + i ) {\displaystyle 1+3\mathrm {i} =(1+\mathrm {i} )(2+\mathrm {i} )} {\displaystyle 1+3\mathrm {i} =(1+\mathrm {i} )(2+\mathrm {i} )}. Genau genommen ist 1 + i {\displaystyle 1+\mathrm {i} } {\displaystyle 1+\mathrm {i} } nur ein größter gemeinsamer Teiler, da alle zu dieser Zahl assoziierten Zahlen ebenfalls größte gemeinsame Teiler sind. (Die Einheiten sind ± 1 , ± i {\displaystyle \pm 1,\pm \mathrm {i} } {\displaystyle \pm 1,\pm \mathrm {i} }.)

Integritätsringe

[Bearbeiten | Quelltext bearbeiten ]

Im Integritätsring R = Z [ 3 ] {\displaystyle R=\mathbb {Z} [{\sqrt {-3}}]} {\displaystyle R=\mathbb {Z} [{\sqrt {-3}}]} haben die Elemente

a := 4 = 2 2 = ( 1 + 3 ) ( 1 3 ) , b := ( 1 + 3 ) 2 {\displaystyle a:=4=2\cdot 2=(1+{\sqrt {-3}})(1-{\sqrt {-3}}),\quad b:=(1+{\sqrt {-3}})\cdot 2} {\displaystyle a:=4=2\cdot 2=(1+{\sqrt {-3}})(1-{\sqrt {-3}}),\quad b:=(1+{\sqrt {-3}})\cdot 2}

keinen ggT {\displaystyle \operatorname {ggT} } {\displaystyle \operatorname {ggT} }: Die Elemente 1 + 3 {\displaystyle 1+{\sqrt {-3}}} {\displaystyle 1+{\sqrt {-3}}} und 2 {\displaystyle 2} {\displaystyle 2} sind zwei maximale gemeinsame Teiler, denn beide haben den gleichen Betrag, aber diese zwei Elemente sind nicht zueinander assoziiert. Also gibt es keinen ggT {\displaystyle \operatorname {ggT} } {\displaystyle \operatorname {ggT} } von a {\displaystyle a} {\displaystyle a} und b {\displaystyle b} {\displaystyle b}.

Die genannten Elemente 1 + 3 {\displaystyle 1+{\sqrt {-3}}} {\displaystyle 1+{\sqrt {-3}}} und 2 {\displaystyle 2} {\displaystyle 2} haben aber ihrerseits einen ggT {\displaystyle \operatorname {ggT} } {\displaystyle \operatorname {ggT} }, nämlich 1 {\displaystyle 1} {\displaystyle 1}. Dagegen haben sie kein kgV {\displaystyle \operatorname {kgV} } {\displaystyle \operatorname {kgV} }, denn wenn v {\displaystyle v} {\displaystyle v} ein kgV {\displaystyle \operatorname {kgV} } {\displaystyle \operatorname {kgV} } wäre, dann folgt aus der „ggT-kgV-Gleichung", dass v {\displaystyle v} {\displaystyle v} assoziiert zu k := ( 1 + 3 ) 2 {\displaystyle k:=(1+{\sqrt {-3}})\cdot 2} {\displaystyle k:=(1+{\sqrt {-3}})\cdot 2} sein muss. Das gemeinsame Vielfache 4 {\displaystyle 4} {\displaystyle 4} ist jedoch kein Vielfaches von k {\displaystyle k} {\displaystyle k}, also ist k {\displaystyle k} {\displaystyle k} kein kgV {\displaystyle \operatorname {kgV} } {\displaystyle \operatorname {kgV} } und die beiden Elemente haben gar kein kgV {\displaystyle \operatorname {kgV} } {\displaystyle \operatorname {kgV} }.

Ist R {\displaystyle R} {\displaystyle R} ein Integritätsring und haben die Elemente a {\displaystyle a} {\displaystyle a} und b {\displaystyle b} {\displaystyle b} ein kgV {\displaystyle \operatorname {kgV} } {\displaystyle \operatorname {kgV} }, dann haben sie auch einen ggT {\displaystyle \operatorname {ggT} } {\displaystyle \operatorname {ggT} }, und es gilt die Gleichung:

a b ggT ( a , b ) kgV ( a , b ) {\displaystyle a\cdot b\sim \operatorname {ggT} (a,b)\cdot \operatorname {kgV} (a,b)} {\displaystyle a\cdot b\sim \operatorname {ggT} (a,b)\cdot \operatorname {kgV} (a,b)}

Ein euklidischer Ring ist ein Hauptidealring, der ein faktorieller Ring ist, der schließlich ein ggT-Ring ist. Ebenso ist jeder Hauptidealring ein Bézoutring, der wiederum stets ein ggT-Ring ist.

Ein Beispiel für einen nicht-kommutativen ggT-Ring sind die Hurwitzquaternionen.

Analytische Zahlentheorie

[Bearbeiten | Quelltext bearbeiten ]

In der elementaren Zahlentheorie gehört der größte gemeinsame Teiler t {\displaystyle t} {\displaystyle t} von zwei ganzen Zahlen m , n Z { 0 } {\displaystyle m,n\in \mathbb {Z} \setminus \lbrace 0\rbrace } {\displaystyle m,n\in \mathbb {Z} \setminus \lbrace 0\rbrace } zu den wichtigsten Grundkonzepten. Man schreibt dort regelmäßig t = ( m , n ) {\displaystyle t=(m,n)} {\displaystyle t=(m,n)} und meint damit dann den positiven ggT {\displaystyle \operatorname {ggT} } {\displaystyle \operatorname {ggT} }, geht also von t N {\displaystyle t\in \mathbb {N} } {\displaystyle t\in \mathbb {N} } aus.

In der analytischen Zahlentheorie kann die ggT-Funktion Z { 0 } N ; m ( m , n ) {\displaystyle \mathbb {Z} \setminus \lbrace 0\rbrace \rightarrow \mathbb {N} ;\;m\mapsto (m,n)} {\displaystyle \mathbb {Z} \setminus \lbrace 0\rbrace \rightarrow \mathbb {N} ;\;m\mapsto (m,n)} in einer Variablen für festes n N { 0 } {\displaystyle n\in \mathbb {N} \setminus \lbrace 0\rbrace } {\displaystyle n\in \mathbb {N} \setminus \lbrace 0\rbrace } analytisch zu einer ganzen Funktion fortgesetzt werden. → Siehe Ramanujansumme.

Einzelnachweise

[Bearbeiten | Quelltext bearbeiten ]
  1. Wolfram Alpha zu ggT(12, 18)
  2. Wolfram Alpha zu ggT(12, 18, 30)
  3. Wolfram Alpha zu ggT(2x3 + 9x2 + 6x + 1, 3x3 + 14x2 + 11x + 2)
  4. Lambacher Schweizer: Mathematik für Gymnasien 5 Niedersachsen. Klett Verlag, Stuttgart 2006, ISBN 978-3-12-734551-3, S. 197.
  5. Schüler-Duden: Die Mathematik I. Dudenverlag Mannheim, 1990, ISBN 3-411-04205-2, S. 100
  6. Compiler Explorer
  7. C++, Microsoft Compiler, 64 bit-Code, Prozessoren um das Jahr 2020, Intel Cannon Lake, Raptor Lake, AMD ZEN 3, ZEN 4
  8. AMD Ryzen 9 3900X, Microsoft VC 2022, Optionen /GL /O2
  9. Compiler Explorer
  10. Harald Scheid: Einführung in die Zahlentheorie. Klett Verlag, Stuttgart, 1972, ISBN 3-12-983240-8, S. 78.
  11. Lemma von Bézout.
  12. Lutz Engelmann (Hrsg.): Kleiner Leitfaden Mathematik. Paetec, Berlin 1997, ISBN 3-89517-150-6, S. 51/2.
  13. Schüler-Duden: Die Mathematik I. Dudenverlag, Mannheim. Leipzig, Wien, Zürich 1990, ISBN 3-411-04205-2, S. 48.
  14. § 4. ggT und kgV. In: math-www.uni-paderborn.de. S. 14.
Abgerufen von „https://de.wikipedia.org/w/index.php?title=Größter_gemeinsamer_Teiler&oldid=253374567#gekürzter_Bruch"