Skip to content
Snippets Groups Projects
Commit bad4cc71 authored by Peter Gerwinski's avatar Peter Gerwinski
Browse files

Lehrmaterialien und Tafelbilder 17.5.2018

parent 3d287f73
Branches
No related tags found
No related merge requests found
../common/Zeichen_123.pdf
\ No newline at end of file
File added
% ad-20180517.pdf - Lecture Slides on Algorithms and Data Structures in C/C++
% Copyright (C) 2018 Peter Gerwinski
%
% This document is free software: you can redistribute it and/or
% modify it either under the terms of the Creative Commons
% Attribution-ShareAlike 3.0 License, or under the terms of the
% GNU General Public License as published by the Free Software
% Foundation, either version 3 of the License, or (at your option)
% any later version.
%
% This document is distributed in the hope that it will be useful,
% but WITHOUT ANY WARRANTY; without even the implied warranty of
% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
% GNU General Public License for more details.
%
% You should have received a copy of the GNU General Public License
% along with this document. If not, see <http://www.gnu.org/licenses/>.
%
% You should have received a copy of the Creative Commons
% Attribution-ShareAlike 3.0 Unported License along with this
% document. If not, see <http://creativecommons.org/licenses/>.
% README: Datenorganisation: balancierte Bäume
\documentclass[10pt,t]{beamer}
\usepackage{pgslides}
\usepackage{tikz}
\usepackage{soul}
\newcommand{\underconstruction}{%
\begin{picture}(0,0)
\color{black}
\put(7,-2.2){\makebox(0,0)[b]{\includegraphics[width=1.5cm]{Zeichen_123.pdf}}}
\put(7,-2.5){\makebox(0,0)[t]{\shortstack{Änderungen\\vorbehalten}}}
\end{picture}}
\lstdefinestyle{math}{basicstyle=\footnotesize\color{structure},
language={},
columns=fixed,
moredelim=**[is][\color{darkred}]{¡}{¿},
moredelim=**[is][\color{darkgreen}]{°}{¿}}
\title{Algorithmen und Datenstrukturen in C/C++}
\author{Prof.\ Dr.\ rer.\ nat.\ Peter Gerwinski}
\date{17.\ Mai 2018}
\begin{document}
\maketitleframe
\nosectionnonumber{\inserttitle}
\begin{frame}
\shownosectionnonumber
\begin{itemize}
\item[\textbf{1}] \textbf{Einführung}
\underconstruction
\hfill\makebox(0,0)[br]{\raisebox{2.25ex}{\url{https://gitlab.cvh-server.de/pgerwinski/ad.git}}}
\item[\textbf{2}] \textbf{Einführung in C++}
\item[\textbf{3}] \textbf{Datenorganisation}
\begin{itemize}
\item[3.1] Standard-Container-Templates
\item[3.2] Iteratoren
\item[3.3] Hash-Tabellen
\color{medgreen}
\item[3.4] Balancierte Bäume
\color{black}
\item[3.5] Intelligente Zeiger
\end{itemize}
\item[\textbf{4}] \textbf{Datenkodierung}
\begin{itemize}
\color{orange}
\item[4.0] Parität
\color{medgreen}
\item[\hbox to 1.39em{4.\boldmath$(x^2-1)$\hss}]\hspace*{3.14em} Der Herr der Ringe: Manchmal ist $1 + 1 = 0$.
\item[4.1] Fehlererkennung durch CRC
\color{red}
\item[4.2] Ausfall- und Fehlerkorrektur durch Reed-Solomon-Code
\end{itemize}
\item[\textbf{5}] \textbf{Hardwarenahe Algorithmen}
% \begin{itemize}
% \item FFT, CORDIC, \dots
% \end{itemize}
\item[\textbf{6}] \textbf{Optimierung}
% \begin{itemize}
% \item Wegfindung, \dots
% \end{itemize}
\color{gray}
\item[\textbf{7}] \textbf{Numerik}
\end{itemize}
\end{frame}
\setcounter{section}{3}
\section{Datenkodierung}
\setcounter{subsection}{-1}
\subsection{Parität}
\subsubsection{Fehlererkennung durch Parität}
\begin{frame}
\showsection
\vspace{-\smallskipamount}
\showsubsection
\vspace{-\smallskipamount}
\showsubsubsection
Zusätzlich zu den Daten: Paritäts-Bit
\medskip
Quersumme einschließlich Paritäts-Bit muß gerade/ungerade sein\\
\textarrow\ \newterm{gerade/ungerade Parität}\\
Wenn nicht: Fehler erkannt
\bigskip
\begin{minipage}[t]{6cm}
Beispiel:
\smallskip
\begin{tabular}{ll}
Nachricht: & \lstinline|11010110|\\[\medskipamount]
gerade Parität: & Paritäts-Bit: \lstinline|1|\\
kodierte Nachricht: & \lstinline|110101101|\\[\medskipamount]
ungerade Parität: & Paritäts-Bit: \lstinline|0|\\
kodierte Nachricht: & \lstinline|110101100|
\end{tabular}
\end{minipage}\hfill
\begin{minipage}[t]{5.5cm}
1 falsches Bit wird erkannt.\\
2 falsche Bits werden nicht erkannt.\\
3 falsche Bits werden erkannt.\\
\dots\\
Eine ungerade Anzahl falscher Bits wird erkannt.
\end{minipage}
\end{frame}
\subsubsection{Ausfallsicherheit durch Parität: RAID}
\begin{frame}[fragile]
\showsection
\vspace{-\smallskipamount}
\showsubsection
\vspace{-\smallskipamount}
\showsubsubsection
Daten mit Parität\\
1 Bit fehlt, ansonsten korrekt\\
\textarrow\ fehlendes Bit rekonstruierbar
\bigskip
Anwendung: RAID
zusätzliche Platte speichert (gerade) Parität
\smallskip
\begingroup
\renewcommand{\arraystretch}{1.2}
\begin{tabular}{|c|c|c|}\hline
Platte 1 & Platte 2 & Platte 3 \\\hline
\lstinline|A1| & \lstinline|A2| &
\lstinline|A3 = A1 xor A2|\\\hline
\end{tabular}
\endgroup
\bigskip
\begin{minipage}{3.5cm}
Parität berechnen:
\smallskip
\begin{tabular}{lll}
& \lstinline|0101| & \lstinline|A1|\\
\lstinline|xor| & \lstinline|0011| & \lstinline|A2|\\\cline{2-2}\\[-1.5\medskipamount]
& \lstinline|0110| & \lstinline|A3|
\end{tabular}
\end{minipage}\hfill
\begin{minipage}{8.5cm}
Verlorene Bits rekonstruieren:
\smallskip
\begin{tabular}{lll}
& \lstinline|0101| & \lstinline|A1|\\
\lstinline|xor| & \lstinline|0110| & \lstinline|A3|\\\cline{2-2}\\[-1.5\medskipamount]
& \lstinline|0011| & \lstinline|A2|
\end{tabular}
\end{minipage}
\end{frame}
\begin{frame}[fragile]
\showsection
\vspace{-\smallskipamount}
\showsubsection
\vspace{-\smallskipamount}
\showsubsubsection
\begin{tabular}{ll}
\newterm{RAID 3} & Speicherung bitweise \\
\newterm{RAID 4} & Speicherung blockweise \\
\newterm{RAID 5} & Speicherung blockweise, Parität wandert
\end{tabular}
\bigskip
\begingroup
\renewcommand{\arraystretch}{1.2}
\begin{tabular}{|c|c|c|} \hline
Platte 1 & Platte 2 & Platte 3 \\\hline
\lstinline|A1| & \lstinline|A2| & \lstinline|A3 = A1 xor A2|\\\hline
\lstinline|B1 = B2 xor B3| & \lstinline|B2| & \lstinline|B3|\\\hline
\lstinline|C1| & \lstinline|C2 = C1 xor C3| & \lstinline|C3|\\\hline
\lstinline|D1| & \lstinline|D2| & \lstinline|D3 = D1 xor D2|\\\hline
\dots & \dots & \dots
\end{tabular}
\endgroup
\begin{picture}(0,0)
\put(5.6,4.45){\makebox(0,0)[l]{$\left.\rule{0pt}{1.3em}\right\}$
Paritätsplatte ist "`Flaschenhals"'}}
\end{picture}
\end{frame}
\subsubsection{Fehlerkorrektur durch Hamming-Code}
\begin{frame}[fragile]
\showsection
\vspace{-\smallskipamount}
\showsubsection
\vspace{-\smallskipamount}
\showsubsubsection
\begin{tabular}{lll}
Nachricht: & \lstinline|11010110| \\
defekte Nachricht: & \lstinline|11000110| & \newterm{Hamming-Abstand} 1
\end{tabular}
\medskip
\begin{itemize}
\item
"`zu viele"' Symbole senden
\smallskip
Beispiel: 7 Bit senden \textarrow\ 128 Symbole,\\
davon nur 16 Symbole gültig \textarrow\ 4 Bit
\medskip
\item
gültige Symbole so anordnen,\\
daß Hamming-1-Nachbarn zugerechnet werden können
\medskip
\arrowitem
1 fehlerhaft übertragenes Bit kann korrigiert werden.
\end{itemize}
\end{frame}
\begin{frame}[fragile]
\showsection
\vspace{-\smallskipamount}
\showsubsection
\vspace{-\smallskipamount}
\showsubsubsection
\textbf{\boldmath$(3,1)$-Hamming-Code}
\medskip
\begin{tabular}{ll}
Nachricht: & \lstinline[style=math]|1 1 0 1 0 1 1 0 | \\
kodierte Nachricht: & \lstinline[style=math]|111111000111000111111000| \\
defekte Nachricht: & \lstinline[style=math]|111111010111000110111010| \\
Rekonstruktion: & \lstinline[style=math]|1 1 0 1 0 1 1 0 |
\end{tabular}
\bigskip
Analog: \textbf{\boldmath$(5,1)$-Hamming-Code}
\end{frame}
\begin{frame}[fragile]
\showsection
\vspace{-\smallskipamount}
\showsubsection
\vspace{-\smallskipamount}
\showsubsubsection
\textbf{(7,\,4)-Hamming-Code}
\medskip
\lstinline[style=math]{ p p d p d d d}
\begin{itemize}
\item
1.\ Paritäts-Bit: Parität über jedes zweite Bit
\item
2.\ Paritäts-Bit: Parität über jedes dritte und vierte von 4 Bit
\item
3.\ Paritäts-Bit: Parität über jedes fünfte bis achte von 8 Bit
\end{itemize}
\end{frame}
\subsectionnonumber{\boldmath 4.$(x^2 - 1)$\quad Der Herr der Ringe: Manchmal ist $1 + 1 = 0$.}
\subsubsectionnonumber{\boldmath 4.$(x^2 - 1).x$\quad Motivation}
\begin{frame}
\showsection
\showsubsectionnonumber
\showsubsubsectionnonumber
Man kann auch mit sehr merkwürdigen Objekten\\
wie mit "`ganz normalen"' Zahlen rechnen.
\bigskip
Anwendungen:
\begin{itemize}
\item Funktionsweise von Computern (\textarrow\ Rechnertechnik)
\item Fehlererkennung
\item Fehlerkorrektur
\item Verschlüsselung
\item Digitale Signaturen
\end{itemize}
\end{frame}
\subsubsectionnonumber{\boldmath 4.$(x^2 - 1).(x + 1)$\quad Gruppen}
\begin{frame}
\showsection
\showsubsectionnonumber
\showsubsubsectionnonumber
\textbf{Definition:}
Sei $G$ eine Menge, $*$ eine Verknüpfung auf $G$.
Wenn
\begin{itemize}
\item
$\forall a, b, c \in G$: $(a * b) * c = a * (b * c)$ \quad (Assoziativgesetz),
\item
$\exists e \in G$: $\forall a \in G$: $a * e = e * a = a$ \quad (neutrales Element),
\item
$\forall a \in G$: $\exists a^{-1} \in G$: $a * a^{-1} = a^{-1} * a = e$ \quad (inverses Element),
\end{itemize}
dann heißt $(G,*)$ eine \newterm{Gruppe}.
\pause
\bigskip
\textbf{Definition:}
Sei $(G,*)$ eine Gruppe.
Wenn zusätzlich
\begin{itemize}
\item
$\forall a, b \in G$: $a * b = b * a$ \quad (Kommutativgesetz),
\end{itemize}
dann heißt $(G,*)$ eine \newterm{kommutative Gruppe}.
\end{frame}
\subsubsectionnonumber{\boldmath 4.$(x^2 - 1).(x + 2)$\quad Ringe}
\begin{frame}
% \showsection
\showsubsectionnonumber
\showsubsubsectionnonumber
\textbf{Definition:}
Sei $R$ eine Menge; seien $+$ und $\cdot$ Verknüpfungen auf $R$.
Wenn
\begin{itemize}
\item
$(R,+)$ eine kommutative Gruppe ist,
\item
$\forall a, b, c \in R$: $(a \cdot b) \cdot c = a \cdot (b \cdot c)$ \quad (Assoziativgesetz),
\item
$\forall a, b, c \in R$: $(a + b)\cdot c = a\cdot c + b\cdot c$
und $a\cdot(b + c) = a\cdot b + a\cdot c$ \quad (Distributivgesetze),
\end{itemize}
dann heißt $(R,+,\cdot)$ ein \newterm{Ring}.
\pause
\bigskip
\textbf{Definition:}
Sei $(R,+,\cdot)$ ein Ring.
Wenn zusätzlich
\begin{itemize}
\item
$\forall a, b \in R$: $a \cdot b = b \cdot a$ \quad (Kommutativgesetz),
\end{itemize}
dann heißt $(R,+,\cdot)$ ein \newterm{kommutativer Ring}.
\pause
\bigskip
\textbf{Definition:}
Sei $(R,+,\cdot)$ ein (kommutativer) Ring.
Wenn zusätzlich
\begin{itemize}
\item
ein $e \in G$ existiert, so daß für alle $a \in G$ gilt: $a \cdot e = e \cdot a = a$\\
(neutrales Element),
\end{itemize}
dann heißt $(R,+,\cdot)$ ein \newterm{(kommutativer) Ring mit 1}.
\vspace*{-1cm}
\end{frame}
\subsubsectionnonumber{\boldmath 4.$(x^2 - 1).(x + 3)$\quad Körper}
\begin{frame}
% \showsection
\showsubsectionnonumber
\showsubsubsectionnonumber
\textbf{Definition:}
Sei $K$ eine Menge; seien $+$ und $\cdot$ Verknüpfungen auf $K$.
Wenn
\begin{itemize}
\item
$(K,+,\cdot)$ ein Ring mit 1 ist und
\item
$(K \backslash \{0\},\cdot)$ eine kommutative Gruppe ist,
\end{itemize}
dann heißt $(K,+,\cdot)$ ein \newterm{Körper}.
\end{frame}
\subsection{Fehlererkennung durch CRC}
\begin{frame}[fragile]
\showsubsection
\vspace{-\medskipamount}
\begin{itemize}
\item
Verallgemeinerung von "`gerade/ungerade"':\\
Rest bei Polynomdivision über Körper mit 2 Elementen (1 + 1 = 0)
\item
Rest = Prüfwert
\end{itemize}
\smallskip
\begin{onlyenv}<1>
\begin{lstlisting}[style=math,gobble=6]
1 0 1 1 0 1 0 0 1 1 1 0 0 0 : 1 1 0 1
1 1 0 1
-------
1 1 0 0
1 1 0 1
-------
1 1 0 0
1 1 0 1
-------
1 1 1 1
1 1 0 1
-------
1 0 0 0
1 1 0 1
--------
1 0 1 0
1 1 0 1
--------
1 1 1
\end{lstlisting}
\begin{picture}(0,0)
\put(4,5){\mbox{Prüfwert ermitteln}}
\end{picture}
\end{onlyenv}
\begin{onlyenv}<2->
\begin{lstlisting}[style=math,gobble=6]
1 0 1 1 0 1 0 0 1 1 1 1 1 1 : 1 1 0 1
1 1 0 1
-------
1 1 0
1 1 0 1
-------
1 1 0 0
1 1 0 1
-------
1 1 1 1
1 1 0 1
-------
1 0 1 1
1 1 0 1
--------
1 1 0 1
1 1 0 1
--------
0
\end{lstlisting}
\begin{picture}(0,0)
\put(4,5){\mbox{Daten prüfen}}
\end{picture}
\end{onlyenv}
\vspace*{-1cm}
\end{frame}
\subsection{Ausfall- und Fehlerkorrektur durch Reed-Solomon-Code}
\begin{frame}
\showsection
\showsubsection
\begin{itemize}
\item Polynome über endlichen Körpern
\item $n$ Zahlen {\boldmath$\longleftrightarrow$} Polynom vom Grad $n - 1$\\
Beispiel: 3 Stützstellen \textarrow\ Parabel
\smallskip
\item mehr als $n$ Zahlen \textarrow\ Polynom überbestimmt
\smallskip
\alt<1>{\arrowitem Ausfall- und Fehlerkorrektur möglich \textarrow\ \newterm{Reed-Solomon-Code}}{\medskip}
\smallskip
\begin{onlyenv}<2>
\item Variante 1 (BCH):\\
Nachricht = Koeffizienten des Polynoms\\
Übertragung = Funktionswerte an Stützstellen
\smallskip
\item Variante 2 (systematische Kodierung):\\
Übertragung enthält Nachricht = Funktionswerte an Stützstellen\\
Koeffizienten berechnen \textarrow\ Funktionswerte an zusätzlichen Stützstellen
\end{onlyenv}
\begin{onlyenv}<3->
\item
Ausfallkorrektur: trivial.\quad \texttt{;-)}
\smallskip
\item
Fehlererkennung: Polynom hat zu hohen Grad\\
Beispiel: 4 Punkte liegen nicht auf Parabel
\smallskip
\item
Fehlerkorrektur (theoretisch):\\
alle Kombinationen durchprobieren, Mehrheitsentscheid
\smallskip
\item
Fehlerkorrektur (praktisch): spezielle Algorithmen
\end{onlyenv}
\end{itemize}
\end{frame}
\nosectionnonumber{\inserttitle}
\begin{frame}
\shownosectionnonumber
\begin{itemize}
\item[\textbf{1}] \textbf{Einführung}
\underconstruction
\hfill\makebox(0,0)[br]{\raisebox{2.25ex}{\url{https://gitlab.cvh-server.de/pgerwinski/ad.git}}}
\item[\textbf{2}] \textbf{Einführung in C++}
\item[\textbf{3}] \textbf{Datenorganisation}
\item[\textbf{4}] \textbf{Datenkodierung}
\begin{itemize}
\color{medgreen}
\item[4.0] Parität
\color{black}
\item[\hbox to 1.39em{4.\boldmath$(x^2-1)$\hss}]\hspace*{3.14em} Mathematische Grundlagen
\item[4.1] Fehlererkennung durch CRC
\color{medgreen}
\item[4.2] Ausfall- und Fehlerkorrektur\\
durch Reed-Solomon-Code
\color{red}
\item[4.3] Verschlüsselung
\end{itemize}
\item[\textbf{5}] \textbf{Hardwarenahe Algorithmen}
% \begin{itemize}
% \item FFT, CORDIC, \dots
% \end{itemize}
\item[\textbf{6}] \textbf{Optimierung}
% \begin{itemize}
% \item Wegfindung, \dots
% \end{itemize}
\color{gray}
\item[\textbf{7}] \textbf{Numerik}
\end{itemize}
\end{frame}
\end{document}
../common/logo-hochschule-bochum-cvh-text.pdf
\ No newline at end of file
../common/logo-hochschule-bochum.pdf
\ No newline at end of file
../common/pgslides.sty
\ No newline at end of file
20180517/photo-20180517-150752.jpg

155 KiB

20180517/photo-20180517-150826.jpg

150 KiB

../common/Zeichen_123.pdf
\ No newline at end of file
File added
% ad-20180524.pdf - Lecture Slides on Algorithms and Data Structures in C/C++
% Copyright (C) 2018 Peter Gerwinski
%
% This document is free software: you can redistribute it and/or
% modify it either under the terms of the Creative Commons
% Attribution-ShareAlike 3.0 License, or under the terms of the
% GNU General Public License as published by the Free Software
% Foundation, either version 3 of the License, or (at your option)
% any later version.
%
% This document is distributed in the hope that it will be useful,
% but WITHOUT ANY WARRANTY; without even the implied warranty of
% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
% GNU General Public License for more details.
%
% You should have received a copy of the GNU General Public License
% along with this document. If not, see <http://www.gnu.org/licenses/>.
%
% You should have received a copy of the Creative Commons
% Attribution-ShareAlike 3.0 Unported License along with this
% document. If not, see <http://creativecommons.org/licenses/>.
% README: Datenorganisation: balancierte Bäume
\documentclass[10pt,t]{beamer}
\usepackage{pgslides}
\usepackage{tikz}
\usepackage{soul}
\newcommand{\underconstruction}{%
\begin{picture}(0,0)(0,3)
\color{black}
\put(7,-2.2){\makebox(0,0)[b]{\includegraphics[width=1.5cm]{Zeichen_123.pdf}}}
\put(7,-2.5){\makebox(0,0)[t]{\shortstack{Änderungen\\vorbehalten}}}
\end{picture}}
\lstdefinestyle{math}{basicstyle=\footnotesize\color{structure},
language={},
columns=fixed,
moredelim=**[is][\color{darkred}]{¡}{¿},
moredelim=**[is][\color{darkgreen}]{°}{¿}}
\title{Algorithmen und Datenstrukturen in C/C++}
\author{Prof.\ Dr.\ rer.\ nat.\ Peter Gerwinski}
\date{24.\ Mai 2018}
\begin{document}
\maketitleframe
\nosectionnonumber{\inserttitle}
\begin{frame}
\shownosectionnonumber
\begin{itemize}
\item[\textbf{1}] \textbf{Einführung}
\underconstruction
\hfill\makebox(0,0)[br]{\raisebox{2.25ex}{\url{https://gitlab.cvh-server.de/pgerwinski/ad.git}}}
\item[\textbf{2}] \textbf{Einführung in C++}
\item[\textbf{3}] \textbf{Datenorganisation}
\item[\textbf{4}] \textbf{Datenkodierung}
\begin{itemize}
\color{medgreen}
\item[4.0] Parität
\color{black}
\item[\hbox to 1.39em{4.\boldmath$(x^2-1)$\hss}]\hspace*{3.14em} Der Herr der Ringe: Manchmal ist $1 + 1 = 0$.
\item[4.1] Fehlererkennung durch CRC
\color{medgreen}
\item[4.2] Ausfall- und Fehlerkorrektur durch Reed-Solomon-Code
\color{orange}
\item[4.3] Verschlüsselung
\end{itemize}
\item[\textbf{5}] \textbf{Hardwarenahe Algorithmen}
% \begin{itemize}
% \item FFT, CORDIC, \dots
% \end{itemize}
\item[\textbf{6}] \textbf{Optimierung}
% \begin{itemize}
% \item Wegfindung, \dots
% \end{itemize}
\color{gray}
\item[\textbf{7}] \textbf{Numerik}
\end{itemize}
\end{frame}
\setcounter{section}{3}
\section{Datenkodierung}
\setcounter{subsection}{-1}
\subsection{Parität}
\subsubsection{Fehlererkennung durch Parität}
\begin{frame}
\showsection
\vspace{-\smallskipamount}
\showsubsection
\vspace{-\smallskipamount}
\showsubsubsection
Zusätzlich zu den Daten: Paritäts-Bit
\medskip
Quersumme einschließlich Paritäts-Bit muß gerade/ungerade sein\\
\textarrow\ \newterm{gerade/ungerade Parität}\\
Wenn nicht: Fehler erkannt
\bigskip
\begin{minipage}[t]{6cm}
Beispiel:
\smallskip
\begin{tabular}{ll}
Nachricht: & \lstinline|11010110|\\[\medskipamount]
gerade Parität: & Paritäts-Bit: \lstinline|1|\\
kodierte Nachricht: & \lstinline|110101101|\\[\medskipamount]
ungerade Parität: & Paritäts-Bit: \lstinline|0|\\
kodierte Nachricht: & \lstinline|110101100|
\end{tabular}
\end{minipage}\hfill
\begin{minipage}[t]{5.5cm}
1 falsches Bit wird erkannt.\\
2 falsche Bits werden nicht erkannt.\\
3 falsche Bits werden erkannt.\\
\dots\\
Eine ungerade Anzahl falscher Bits wird erkannt.
\end{minipage}
\end{frame}
\subsubsection{Ausfallsicherheit durch Parität: RAID}
\begin{frame}[fragile]
\showsection
\vspace{-\smallskipamount}
\showsubsection
\vspace{-\smallskipamount}
\showsubsubsection
Daten mit Parität\\
1 Bit fehlt, ansonsten korrekt\\
\textarrow\ fehlendes Bit rekonstruierbar
\bigskip
Anwendung: RAID
zusätzliche Platte speichert (gerade) Parität
\smallskip
\begingroup
\renewcommand{\arraystretch}{1.2}
\begin{tabular}{|c|c|c|}\hline
Platte 1 & Platte 2 & Platte 3 \\\hline
\lstinline|A1| & \lstinline|A2| &
\lstinline|A3 = A1 xor A2|\\\hline
\end{tabular}
\endgroup
\bigskip
\begin{minipage}{3.5cm}
Parität berechnen:
\smallskip
\begin{tabular}{lll}
& \lstinline|0101| & \lstinline|A1|\\
\lstinline|xor| & \lstinline|0011| & \lstinline|A2|\\\cline{2-2}\\[-1.5\medskipamount]
& \lstinline|0110| & \lstinline|A3|
\end{tabular}
\end{minipage}\hfill
\begin{minipage}{8.5cm}
Verlorene Bits rekonstruieren:
\smallskip
\begin{tabular}{lll}
& \lstinline|0101| & \lstinline|A1|\\
\lstinline|xor| & \lstinline|0110| & \lstinline|A3|\\\cline{2-2}\\[-1.5\medskipamount]
& \lstinline|0011| & \lstinline|A2|
\end{tabular}
\end{minipage}
\end{frame}
\begin{frame}[fragile]
\showsection
\vspace{-\smallskipamount}
\showsubsection
\vspace{-\smallskipamount}
\showsubsubsection
\begin{tabular}{ll}
\newterm{RAID 3} & Speicherung bitweise \\
\newterm{RAID 4} & Speicherung blockweise \\
\newterm{RAID 5} & Speicherung blockweise, Parität wandert
\end{tabular}
\bigskip
\begingroup
\renewcommand{\arraystretch}{1.2}
\begin{tabular}{|c|c|c|} \hline
Platte 1 & Platte 2 & Platte 3 \\\hline
\lstinline|A1| & \lstinline|A2| & \lstinline|A3 = A1 xor A2|\\\hline
\lstinline|B1 = B2 xor B3| & \lstinline|B2| & \lstinline|B3|\\\hline
\lstinline|C1| & \lstinline|C2 = C1 xor C3| & \lstinline|C3|\\\hline
\lstinline|D1| & \lstinline|D2| & \lstinline|D3 = D1 xor D2|\\\hline
\dots & \dots & \dots
\end{tabular}
\endgroup
\begin{picture}(0,0)
\put(5.6,4.45){\makebox(0,0)[l]{$\left.\rule{0pt}{1.3em}\right\}$
Paritätsplatte ist "`Flaschenhals"'}}
\end{picture}
\end{frame}
\subsubsection{Fehlerkorrektur durch Hamming-Code}
\begin{frame}[fragile]
\showsection
\vspace{-\smallskipamount}
\showsubsection
\vspace{-\smallskipamount}
\showsubsubsection
\begin{tabular}{lll}
Nachricht: & \lstinline|11010110| \\
defekte Nachricht: & \lstinline|11000110| & \newterm{Hamming-Abstand} 1
\end{tabular}
\medskip
\begin{itemize}
\item
"`zu viele"' Symbole senden
\smallskip
Beispiel: 7 Bit senden \textarrow\ 128 Symbole,\\
davon nur 16 Symbole gültig \textarrow\ 4 Bit
\medskip
\item
gültige Symbole so anordnen,\\
daß Hamming-1-Nachbarn zugerechnet werden können
\medskip
\arrowitem
1 fehlerhaft übertragenes Bit kann korrigiert werden.
\end{itemize}
\end{frame}
\begin{frame}[fragile]
\showsection
\vspace{-\smallskipamount}
\showsubsection
\vspace{-\smallskipamount}
\showsubsubsection
\textbf{\boldmath$(3,1)$-Hamming-Code}
\medskip
\begin{tabular}{ll}
Nachricht: & \lstinline[style=math]|1 1 0 1 0 1 1 0 | \\
kodierte Nachricht: & \lstinline[style=math]|111111000111000111111000| \\
defekte Nachricht: & \lstinline[style=math]|111111010111000110111010| \\
Rekonstruktion: & \lstinline[style=math]|1 1 0 1 0 1 1 0 |
\end{tabular}
\bigskip
Analog: \textbf{\boldmath$(5,1)$-Hamming-Code}
\end{frame}
\begin{frame}[fragile]
\showsection
\vspace{-\smallskipamount}
\showsubsection
\vspace{-\smallskipamount}
\showsubsubsection
\textbf{(7,\,4)-Hamming-Code}
\medskip
\lstinline[style=math]{ p p d p d d d}
\begin{itemize}
\item
1.\ Paritäts-Bit: Parität über jedes zweite Bit
\item
2.\ Paritäts-Bit: Parität über jedes dritte und vierte von 4 Bit
\item
3.\ Paritäts-Bit: Parität über jedes fünfte bis achte von 8 Bit
\end{itemize}
\end{frame}
\setcounter{subsection}{1}
\subsection{Ausfall- und Fehlerkorrektur durch Reed-Solomon-Code}
\begin{frame}
\showsection
\showsubsection
\begin{itemize}
\item Polynome über endlichen Körpern
\item $n$ Zahlen {\boldmath$\longleftrightarrow$} Polynom vom Grad $n - 1$\\
Beispiel: 3 Stützstellen \textarrow\ Parabel
\smallskip
\item mehr als $n$ Zahlen \textarrow\ Polynom überbestimmt
\smallskip
\alt<1>{\arrowitem Ausfall- und Fehlerkorrektur möglich \textarrow\ \newterm{Reed-Solomon-Code}}{\medskip}
\smallskip
\begin{onlyenv}<2>
\item Variante 1 (BCH):\\
Nachricht = Koeffizienten des Polynoms\\
Übertragung = Funktionswerte an Stützstellen
\smallskip
\item Variante 2 (systematische Kodierung):\\
Übertragung enthält Nachricht = Funktionswerte an Stützstellen\\
Koeffizienten berechnen \textarrow\ Funktionswerte an zusätzlichen Stützstellen
\end{onlyenv}
\begin{onlyenv}<3->
\item
Ausfallkorrektur: trivial.\quad \texttt{;-)}
\smallskip
\item
Fehlererkennung: Polynom hat zu hohen Grad\\
Beispiel: 4 Punkte liegen nicht auf Parabel
\smallskip
\item
Fehlerkorrektur (theoretisch):\\
alle Kombinationen durchprobieren, Mehrheitsentscheid
\smallskip
\item
Fehlerkorrektur (praktisch): spezielle Algorithmen
\end{onlyenv}
\end{itemize}
\end{frame}
\subsection{Verschlüsselung}
\subsubsection{OpenPGP in der Praxis}
\begin{frame}
\showsection
\showsubsection
\showsubsubsection
\begin{itemize}
\item
\dots
\end{itemize}
\end{frame}
\end{document}
../common/logo-hochschule-bochum-cvh-text.pdf
\ No newline at end of file
../common/logo-hochschule-bochum.pdf
\ No newline at end of file
../common/pgslides.sty
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment