From 2db90bfe4b174570424c408f04000902411d8755 Mon Sep 17 00:00:00 2001 From: Joshua Baer Date: Mon, 12 Apr 2021 21:51:55 +0200 Subject: update to current state of book --- buch/chapters/90-crypto/images/multiplikation.tex | 928 +++++++++++----------- 1 file changed, 464 insertions(+), 464 deletions(-) (limited to 'buch/chapters/90-crypto/images/multiplikation.tex') diff --git a/buch/chapters/90-crypto/images/multiplikation.tex b/buch/chapters/90-crypto/images/multiplikation.tex index 27c4329..dd59097 100644 --- a/buch/chapters/90-crypto/images/multiplikation.tex +++ b/buch/chapters/90-crypto/images/multiplikation.tex @@ -1,464 +1,464 @@ -% -% multiplikation.tex -- -% -% (c) 2021 Prof Dr Andreas Müller, OST Ostschweizer Fachhochschule -% -\documentclass[tikz]{standalone} -\usepackage{amsmath} -\usepackage{times} -\usepackage{txfonts} -\usepackage{pgfplots} -\usepackage{csvsimple} -\usetikzlibrary{arrows,intersections,math} -\begin{document} -\def\skala{1} -\begin{tikzpicture}[>=latex,thick,scale=\skala] - -\definecolor{darkgreen}{rgb}{0,0.6,0} - -\def\s{0.45} - -\def\punkt#1#2{({#1*\s},{#2*\s})} - -\def\pfeile{ - \foreach \x in {0.5,1.5,...,7.5}{ - \draw[->,color=blue] \punkt{\x}{-2.1} -- \punkt{(\x-1)}{-3.3}; - } -} - -\begin{scope}[yshift=0.1cm] - \node at \punkt{0}{0.5} [left] {$p(X)=\mathstrut$}; - \draw \punkt{0}{0} rectangle \punkt{8}{1}; - \foreach \x in {1,...,7}{ - \draw \punkt{\x}{0} -- \punkt{\x}{1}; - } - \node at \punkt{0.5}{0.5} {\texttt{1}}; - \node at \punkt{1.5}{0.5} {\texttt{0}}; - \node at \punkt{2.5}{0.5} {\texttt{0}}; - \node at \punkt{3.5}{0.5} {\texttt{1}}; - \node at \punkt{4.5}{0.5} {\texttt{0}}; - \node at \punkt{5.5}{0.5} {\texttt{1}}; - \node at \punkt{6.5}{0.5} {\texttt{0}}; - \node at \punkt{7.5}{0.5} {\texttt{1}}; - \foreach \x in {0.5,1.5,...,7.5}{ - \draw[->,color=blue] \punkt{\x}{-0.1} -- \punkt{(\x-1)}{-1.3}; - } -\end{scope} - -\begin{scope}[yshift=-1cm] - \draw[<-] \punkt{8.2}{-1.3} arc (-30:30:1.8); - \node at \punkt{9.3}{0.6} {$\mathstrut\cdot X$}; - \fill[color=blue!20] \punkt{-1}{0} rectangle \punkt{0}{1}; - \draw \punkt{0}{0} rectangle \punkt{8}{1}; - \foreach \x in {1,...,7}{ - \draw \punkt{\x}{0} -- \punkt{\x}{1}; - } - \node[color=darkgreen] at \punkt{-0.5}{0.5} {\texttt{1}}; - \node at \punkt{0.5}{0.5} {\texttt{0}}; - \node at \punkt{1.5}{0.5} {\texttt{0}}; - \node at \punkt{2.5}{0.5} {\texttt{1}}; - \node at \punkt{3.5}{0.5} {\texttt{0}}; - \node at \punkt{4.5}{0.5} {\texttt{1}}; - \node at \punkt{5.5}{0.5} {\texttt{0}}; - \node at \punkt{6.5}{0.5} {\texttt{1}}; - \node at \punkt{7.5}{0.5} {\texttt{0}}; - - \draw[->,color=darkgreen] - \punkt{-0.5}{0.1} -- \punkt{-0.5}{-0.5} -- \punkt{3.1}{-0.5}; - \node[color=darkgreen] at \punkt{3.5}{-0.5} {\texttt{1}}; - \node[color=darkgreen] at \punkt{4.5}{-0.5} {\texttt{1}}; - \node[color=darkgreen] at \punkt{6.5}{-0.5} {\texttt{1}}; - \node[color=darkgreen] at \punkt{7.5}{-0.5} {\texttt{1}}; - - \draw \punkt{0}{-2} rectangle \punkt{8}{-1}; - \foreach \x in {1,...,7}{ - \draw \punkt{\x}{-2} -- \punkt{\x}{-1}; - } - \node at \punkt{0.5}{-1.5} {\texttt{0}}; - \node at \punkt{1.5}{-1.5} {\texttt{0}}; - \node at \punkt{2.5}{-1.5} {\texttt{1}}; - \node at \punkt{3.5}{-1.5} {\texttt{1}}; - \node at \punkt{4.5}{-1.5} {\texttt{0}}; - \node at \punkt{5.5}{-1.5} {\texttt{0}}; - \node at \punkt{6.5}{-1.5} {\texttt{0}}; - \node at \punkt{7.5}{-1.5} {\texttt{1}}; - - \pfeile -\end{scope} - -\begin{scope}[yshift=-3cm] - \draw[<-] \punkt{8.2}{-1.3} arc (-30:30:1.8); - \node at \punkt{9.3}{0.6} {$\mathstrut\cdot X$}; - \fill[color=blue!20] \punkt{-1}{0} rectangle \punkt{0}{1}; - \draw \punkt{0}{0} rectangle \punkt{8}{1}; - \foreach \x in {1,...,7}{ - \draw \punkt{\x}{0} -- \punkt{\x}{1}; - } - \node[color=darkgreen] at \punkt{-0.5}{0.5} {\texttt{0}}; - \node at \punkt{0.5}{0.5} {\texttt{0}}; - \node at \punkt{1.5}{0.5} {\texttt{1}}; - \node at \punkt{2.5}{0.5} {\texttt{1}}; - \node at \punkt{3.5}{0.5} {\texttt{0}}; - \node at \punkt{4.5}{0.5} {\texttt{0}}; - \node at \punkt{5.5}{0.5} {\texttt{0}}; - \node at \punkt{6.5}{0.5} {\texttt{1}}; - \node at \punkt{7.5}{0.5} {\texttt{0}}; - -% \draw[->,color=darkgreen] -% \punkt{-0.5}{0.1} -- \punkt{-0.5}{-0.5} -- \punkt{3.1}{-0.5}; -% \node[color=darkgreen] at \punkt{3.5}{-0.5} {\texttt{1}}; -% \node[color=darkgreen] at \punkt{4.5}{-0.5} {\texttt{1}}; -% \node[color=darkgreen] at \punkt{6.5}{-0.5} {\texttt{1}}; -% \node[color=darkgreen] at \punkt{7.5}{-0.5} {\texttt{1}}; - \node[color=darkgreen] at \punkt{4}{-0.5} {$\|$}; - - \draw \punkt{0}{-2} rectangle \punkt{8}{-1}; - \foreach \x in {1,...,7}{ - \draw \punkt{\x}{-2} -- \punkt{\x}{-1}; - } - \node at \punkt{0.5}{-1.5} {\texttt{0}}; - \node at \punkt{1.5}{-1.5} {\texttt{1}}; - \node at \punkt{2.5}{-1.5} {\texttt{1}}; - \node at \punkt{3.5}{-1.5} {\texttt{0}}; - \node at \punkt{4.5}{-1.5} {\texttt{0}}; - \node at \punkt{5.5}{-1.5} {\texttt{0}}; - \node at \punkt{6.5}{-1.5} {\texttt{1}}; - \node at \punkt{7.5}{-1.5} {\texttt{0}}; - - \pfeile -\end{scope} - -\begin{scope}[yshift=-5cm] - \draw[<-] \punkt{8.2}{-1.3} arc (-30:30:1.8); - \node at \punkt{9.3}{0.6} {$\mathstrut\cdot X$}; - \fill[color=blue!20] \punkt{-1}{0} rectangle \punkt{0}{1}; - \draw \punkt{0}{0} rectangle \punkt{8}{1}; - \foreach \x in {1,...,7}{ - \draw \punkt{\x}{0} -- \punkt{\x}{1}; - } - \node[color=darkgreen] at \punkt{-0.5}{0.5} {\texttt{0}}; - \node at \punkt{0.5}{0.5} {\texttt{1}}; - \node at \punkt{1.5}{0.5} {\texttt{1}}; - \node at \punkt{2.5}{0.5} {\texttt{0}}; - \node at \punkt{3.5}{0.5} {\texttt{0}}; - \node at \punkt{4.5}{0.5} {\texttt{0}}; - \node at \punkt{5.5}{0.5} {\texttt{1}}; - \node at \punkt{6.5}{0.5} {\texttt{0}}; - \node at \punkt{7.5}{0.5} {\texttt{0}}; - -% \draw[->,color=darkgreen] -% \punkt{-0.5}{0.1} -- \punkt{-0.5}{-0.5} -- \punkt{3.1}{-0.5}; -% \node[color=darkgreen] at \punkt{3.5}{-0.5} {\texttt{1}}; -% \node[color=darkgreen] at \punkt{4.5}{-0.5} {\texttt{1}}; -% \node[color=darkgreen] at \punkt{6.5}{-0.5} {\texttt{1}}; -% \node[color=darkgreen] at \punkt{7.5}{-0.5} {\texttt{1}}; - \node[color=darkgreen] at \punkt{4}{-0.5} {$\|$}; - - \draw \punkt{0}{-2} rectangle \punkt{8}{-1}; - \foreach \x in {1,...,7}{ - \draw \punkt{\x}{-2} -- \punkt{\x}{-1}; - } - \node at \punkt{0.5}{-1.5} {\texttt{1}}; - \node at \punkt{1.5}{-1.5} {\texttt{1}}; - \node at \punkt{2.5}{-1.5} {\texttt{0}}; - \node at \punkt{3.5}{-1.5} {\texttt{0}}; - \node at \punkt{4.5}{-1.5} {\texttt{0}}; - \node at \punkt{5.5}{-1.5} {\texttt{1}}; - \node at \punkt{6.5}{-1.5} {\texttt{0}}; - \node at \punkt{7.5}{-1.5} {\texttt{0}}; - - \pfeile -\end{scope} - -\begin{scope}[yshift=-7cm] - \draw[<-] \punkt{8.2}{-1.3} arc (-30:30:1.8); - \node at \punkt{9.3}{0.6} {$\mathstrut\cdot X$}; - \fill[color=blue!20] \punkt{-1}{0} rectangle \punkt{0}{1}; - \draw \punkt{0}{0} rectangle \punkt{8}{1}; - \foreach \x in {1,...,7}{ - \draw \punkt{\x}{0} -- \punkt{\x}{1}; - } - \node[color=darkgreen] at \punkt{-0.5}{0.5} {\texttt{1}}; - \node at \punkt{0.5}{0.5} {\texttt{1}}; - \node at \punkt{1.5}{0.5} {\texttt{0}}; - \node at \punkt{2.5}{0.5} {\texttt{0}}; - \node at \punkt{3.5}{0.5} {\texttt{0}}; - \node at \punkt{4.5}{0.5} {\texttt{1}}; - \node at \punkt{5.5}{0.5} {\texttt{0}}; - \node at \punkt{6.5}{0.5} {\texttt{0}}; - \node at \punkt{7.5}{0.5} {\texttt{0}}; - - \draw[->,color=darkgreen] - \punkt{-0.5}{0.1} -- \punkt{-0.5}{-0.5} -- \punkt{3.1}{-0.5}; - \node[color=darkgreen] at \punkt{3.5}{-0.5} {\texttt{1}}; - \node[color=darkgreen] at \punkt{4.5}{-0.5} {\texttt{1}}; - \node[color=darkgreen] at \punkt{6.5}{-0.5} {\texttt{1}}; - \node[color=darkgreen] at \punkt{7.5}{-0.5} {\texttt{1}}; -% \node[color=darkgreen] at \punkt{4}{-0.5} {$\|$}; - - \draw \punkt{0}{-2} rectangle \punkt{8}{-1}; - \foreach \x in {1,...,7}{ - \draw \punkt{\x}{-2} -- \punkt{\x}{-1}; - } - \node at \punkt{0.5}{-1.5} {\texttt{1}}; - \node at \punkt{1.5}{-1.5} {\texttt{0}}; - \node at \punkt{2.5}{-1.5} {\texttt{0}}; - \node at \punkt{3.5}{-1.5} {\texttt{1}}; - \node at \punkt{4.5}{-1.5} {\texttt{0}}; - \node at \punkt{5.5}{-1.5} {\texttt{0}}; - \node at \punkt{6.5}{-1.5} {\texttt{1}}; - \node at \punkt{7.5}{-1.5} {\texttt{1}}; - - \pfeile -\end{scope} - -\begin{scope}[yshift=-9cm] - \draw[<-] \punkt{8.2}{-1.3} arc (-30:30:1.8); - \node at \punkt{9.3}{0.6} {$\mathstrut\cdot X$}; - \fill[color=blue!20] \punkt{-1}{0} rectangle \punkt{0}{1}; - \draw \punkt{0}{0} rectangle \punkt{8}{1}; - \foreach \x in {1,...,7}{ - \draw \punkt{\x}{0} -- \punkt{\x}{1}; - } - \node[color=darkgreen] at \punkt{-0.5}{0.5} {\texttt{1}}; - \node at \punkt{0.5}{0.5} {\texttt{0}}; - \node at \punkt{1.5}{0.5} {\texttt{0}}; - \node at \punkt{2.5}{0.5} {\texttt{1}}; - \node at \punkt{3.5}{0.5} {\texttt{0}}; - \node at \punkt{4.5}{0.5} {\texttt{0}}; - \node at \punkt{5.5}{0.5} {\texttt{1}}; - \node at \punkt{6.5}{0.5} {\texttt{1}}; - \node at \punkt{7.5}{0.5} {\texttt{0}}; - - \draw[->,color=darkgreen] - \punkt{-0.5}{0.1} -- \punkt{-0.5}{-0.5} -- \punkt{3.1}{-0.5}; - \node[color=darkgreen] at \punkt{3.5}{-0.5} {\texttt{1}}; - \node[color=darkgreen] at \punkt{4.5}{-0.5} {\texttt{1}}; - \node[color=darkgreen] at \punkt{6.5}{-0.5} {\texttt{1}}; - \node[color=darkgreen] at \punkt{7.5}{-0.5} {\texttt{1}}; -% \node[color=darkgreen] at \punkt{4}{-0.5} {$\|$}; - - \draw \punkt{0}{-2} rectangle \punkt{8}{-1}; - \foreach \x in {1,...,7}{ - \draw \punkt{\x}{-2} -- \punkt{\x}{-1}; - } - \node at \punkt{0.5}{-1.5} {\texttt{0}}; - \node at \punkt{1.5}{-1.5} {\texttt{0}}; - \node at \punkt{2.5}{-1.5} {\texttt{1}}; - \node at \punkt{3.5}{-1.5} {\texttt{1}}; - \node at \punkt{4.5}{-1.5} {\texttt{1}}; - \node at \punkt{5.5}{-1.5} {\texttt{1}}; - \node at \punkt{6.5}{-1.5} {\texttt{0}}; - \node at \punkt{7.5}{-1.5} {\texttt{1}}; - - \pfeile -\end{scope} - -\begin{scope}[yshift=-11cm] - \draw[<-] \punkt{8.2}{-1.3} arc (-30:30:1.8); - \node at \punkt{9.3}{0.6} {$\mathstrut\cdot X$}; - \fill[color=blue!20] \punkt{-1}{0} rectangle \punkt{0}{1}; - \draw \punkt{0}{0} rectangle \punkt{8}{1}; - \foreach \x in {1,...,7}{ - \draw \punkt{\x}{0} -- \punkt{\x}{1}; - } - \node[color=darkgreen] at \punkt{-0.5}{0.5} {\texttt{0}}; - \node at \punkt{0.5}{0.5} {\texttt{0}}; - \node at \punkt{1.5}{0.5} {\texttt{0}}; - \node at \punkt{2.5}{0.5} {\texttt{1}}; - \node at \punkt{3.5}{0.5} {\texttt{1}}; - \node at \punkt{4.5}{0.5} {\texttt{1}}; - \node at \punkt{5.5}{0.5} {\texttt{0}}; - \node at \punkt{6.5}{0.5} {\texttt{1}}; - \node at \punkt{7.5}{0.5} {\texttt{0}}; - -% \draw[->,color=darkgreen] -% \punkt{-0.5}{0.1} -- \punkt{-0.5}{-0.5} -- \punkt{3.1}{-0.5}; -% \node[color=darkgreen] at \punkt{3.5}{-0.5} {\texttt{1}}; -% \node[color=darkgreen] at \punkt{4.5}{-0.5} {\texttt{1}}; -% \node[color=darkgreen] at \punkt{6.5}{-0.5} {\texttt{1}}; -% \node[color=darkgreen] at \punkt{7.5}{-0.5} {\texttt{1}}; - \node[color=darkgreen] at \punkt{4}{-0.5} {$\|$}; - - \draw \punkt{0}{-2} rectangle \punkt{8}{-1}; - \foreach \x in {1,...,7}{ - \draw \punkt{\x}{-2} -- \punkt{\x}{-1}; - } - \node at \punkt{0.5}{-1.5} {\texttt{0}}; - \node at \punkt{1.5}{-1.5} {\texttt{0}}; - \node at \punkt{2.5}{-1.5} {\texttt{1}}; - \node at \punkt{3.5}{-1.5} {\texttt{1}}; - \node at \punkt{4.5}{-1.5} {\texttt{1}}; - \node at \punkt{5.5}{-1.5} {\texttt{0}}; - \node at \punkt{6.5}{-1.5} {\texttt{1}}; - \node at \punkt{7.5}{-1.5} {\texttt{0}}; - - \pfeile -\end{scope} - -\begin{scope}[yshift=-13cm] - \draw[<-] \punkt{8.2}{-1.3} arc (-30:30:1.8); - \node at \punkt{9.3}{0.6} {$\mathstrut\cdot X$}; - \fill[color=blue!20] \punkt{-1}{0} rectangle \punkt{0}{1}; - \draw \punkt{0}{0} rectangle \punkt{8}{1}; - \foreach \x in {1,...,7}{ - \draw \punkt{\x}{0} -- \punkt{\x}{1}; - } - \node[color=darkgreen] at \punkt{-0.5}{0.5} {\texttt{0}}; - \node at \punkt{0.5}{0.5} {\texttt{0}}; - \node at \punkt{1.5}{0.5} {\texttt{1}}; - \node at \punkt{2.5}{0.5} {\texttt{1}}; - \node at \punkt{3.5}{0.5} {\texttt{1}}; - \node at \punkt{4.5}{0.5} {\texttt{0}}; - \node at \punkt{5.5}{0.5} {\texttt{1}}; - \node at \punkt{6.5}{0.5} {\texttt{0}}; - \node at \punkt{7.5}{0.5} {\texttt{0}}; - -% \draw[->,color=darkgreen] -% \punkt{-0.5}{0.1} -- \punkt{-0.5}{-0.5} -- \punkt{3.1}{-0.5}; -% \node[color=darkgreen] at \punkt{3.5}{-0.5} {\texttt{1}}; -% \node[color=darkgreen] at \punkt{4.5}{-0.5} {\texttt{1}}; -% \node[color=darkgreen] at \punkt{6.5}{-0.5} {\texttt{1}}; -% \node[color=darkgreen] at \punkt{7.5}{-0.5} {\texttt{1}}; - \node[color=darkgreen] at \punkt{4}{-0.5} {$\|$}; - - \draw \punkt{0}{-2} rectangle \punkt{8}{-1}; - \foreach \x in {1,...,7}{ - \draw \punkt{\x}{-2} -- \punkt{\x}{-1}; - } - \node at \punkt{0.5}{-1.5} {\texttt{0}}; - \node at \punkt{1.5}{-1.5} {\texttt{1}}; - \node at \punkt{2.5}{-1.5} {\texttt{1}}; - \node at \punkt{3.5}{-1.5} {\texttt{0}}; - \node at \punkt{4.5}{-1.5} {\texttt{1}}; - \node at \punkt{5.5}{-1.5} {\texttt{1}}; - \node at \punkt{6.5}{-1.5} {\texttt{1}}; - \node at \punkt{7.5}{-1.5} {\texttt{1}}; - -% \pfeile -\end{scope} - -\begin{scope}[xshift=9cm] - -\begin{scope}[yshift=0.1cm] - \draw[->] \punkt{-11.8}{0.5} -- \punkt{-0.1}{0.5}; - \draw \punkt{0}{0} rectangle \punkt{8}{1}; - \foreach \x in {1,...,7}{ - \draw \punkt{\x}{0} -- \punkt{\x}{1}; - } - \draw \punkt{4}{-0.1} -- \punkt{4}{-3}; - \node at \punkt{0.5}{0.5} {\texttt{1}}; - \node at \punkt{1.5}{0.5} {\texttt{0}}; - \node at \punkt{2.5}{0.5} {\texttt{0}}; - \node at \punkt{3.5}{0.5} {\texttt{1}}; - \node at \punkt{4.5}{0.5} {\texttt{0}}; - \node at \punkt{5.5}{0.5} {\texttt{1}}; - \node at \punkt{6.5}{0.5} {\texttt{0}}; - \node at \punkt{7.5}{0.5} {\texttt{1}}; -\end{scope} - -\def\summation#1#2#3#4#5#6#7#8{ - \draw[->] \punkt{4}{2.3} -- \punkt{4}{1}; - - \draw[->] \punkt{-11.8}{0.5} -- \punkt{3.5}{0.5}; - - \draw \punkt{4}{0.5} circle[radius=0.2]; - \draw \punkt{4}{0.20} -- \punkt{4}{0.80}; - \draw \punkt{3.7}{0.5} -- \punkt{4.3}{0.5}; - - \draw[->] \punkt{4}{-0.05} -- \punkt{4}{-0.95}; - \draw \punkt{0}{-2} rectangle \punkt{8}{-1}; - \foreach \x in {1,...,7}{ - \draw \punkt{\x}{-2} -- \punkt{\x}{-1}; - } - - \node at \punkt{0.5}{-1.5} {\texttt{#1}}; - \node at \punkt{1.5}{-1.5} {\texttt{#2}}; - \node at \punkt{2.5}{-1.5} {\texttt{#3}}; - \node at \punkt{3.5}{-1.5} {\texttt{#4}}; - \node at \punkt{4.5}{-1.5} {\texttt{#5}}; - \node at \punkt{5.5}{-1.5} {\texttt{#6}}; - \node at \punkt{6.5}{-1.5} {\texttt{#7}}; - \node at \punkt{7.5}{-1.5} {\texttt{#8}}; -} - -\begin{scope}[yshift=-1.9cm] - \summation{1}{0}{0}{1}{0}{1}{0}{1} -\end{scope} - -\begin{scope}[yshift=-3.9cm] - \summation{1}{1}{1}{1}{0}{1}{1}{1} -\end{scope} - -\begin{scope}[yshift=-5.9cm] - \summation{1}{1}{1}{1}{0}{1}{1}{1} -\end{scope} - -\begin{scope}[yshift=-7.9cm] - \summation{0}{1}{1}{0}{0}{1}{0}{0} -\end{scope} - -\begin{scope}[yshift=-9.9cm] - \summation{0}{1}{0}{1}{1}{0}{0}{1} -\end{scope} - -\begin{scope}[yshift=-11.9cm] - \summation{0}{1}{0}{1}{1}{0}{0}{1} -\end{scope} - -\begin{scope}[yshift=-13.9cm] - \summation{0}{0}{1}{1}{0}{1}{1}{0} - \node at \punkt{0}{-1.5} [left] {$p(X)\cdot q(X)=\mathstrut$}; -\end{scope} - -\end{scope} - -\begin{scope}[xshift=5cm] - -\begin{scope}[yshift=2cm] - \node at \punkt{0}{0.5} [left] {$q(X)=\mathstrut$}; - \draw \punkt{0}{0} rectangle \punkt{8}{1}; - \foreach \x in {1,...,7}{ - \draw \punkt{\x}{0} -- \punkt{\x}{1}; - } - \node at \punkt{0.5}{0.5} {\texttt{1}}; - \node at \punkt{1.5}{0.5} {\texttt{0}}; - \node at \punkt{2.5}{0.5} {\texttt{1}}; - \node at \punkt{3.5}{0.5} {\texttt{1}}; - \node at \punkt{4.5}{0.5} {\texttt{0}}; - \node at \punkt{5.5}{0.5} {\texttt{1}}; - \node at \punkt{6.5}{0.5} {\texttt{0}}; - \node at \punkt{7.5}{0.5} {\texttt{1}}; - - \draw[->] \punkt{7.5}{-0.1} -- ({7.5*\s},{-1.3}); - \node at ({7.5*\s},{-1.2}) [below] {$\mathstrut\cdot\texttt{1}$}; - - \def\y{1.2} - - \draw[->] \punkt{6.5}{-0.1} -- ({6.5*\s},{-1*2-\y-0.1}); - \node at ({6.5*\s},{-1*2-\y}) [below] {$\mathstrut\cdot\texttt{0}$}; - - \draw[->] \punkt{5.5}{-0.1} -- ({5.5*\s},{-2*2-\y-0.1}); - \node at ({5.5*\s},{-2*2-\y}) [below] {$\mathstrut\cdot\texttt{1}$}; - - \draw[->] \punkt{4.5}{-0.1} -- ({4.5*\s},{-3*2-\y-0.1}); - \node at ({4.5*\s},{-3*2-\y}) [below] {$\mathstrut\cdot\texttt{0}$}; - - \draw[->] \punkt{3.5}{-0.1} -- ({3.5*\s},{-4*2-\y-0.1}); - \node at ({3.5*\s},{-4*2-\y}) [below] {$\mathstrut\cdot\texttt{1}$}; - - \draw[->] \punkt{2.5}{-0.1} -- ({2.5*\s},{-5*2-\y-0.1}); - \node at ({2.5*\s},{-5*2-\y}) [below] {$\mathstrut\cdot\texttt{1}$}; - - \draw[->] \punkt{1.5}{-0.1} -- ({1.5*\s},{-6*2-\y-0.1}); - \node at ({1.5*\s},{-6*2-\y}) [below] {$\mathstrut\cdot\texttt{0}$}; - - \draw[->] \punkt{0.5}{-0.1} -- ({0.5*\s},{-7*2-\y-0.1}); - \node at ({0.5*\s},{-7*2-\y}) [below] {$\mathstrut\cdot\texttt{1}$}; -\end{scope} - -\end{scope} - -\end{tikzpicture} -\end{document} - +% +% multiplikation.tex -- +% +% (c) 2021 Prof Dr Andreas Müller, OST Ostschweizer Fachhochschule +% +\documentclass[tikz]{standalone} +\usepackage{amsmath} +\usepackage{times} +\usepackage{txfonts} +\usepackage{pgfplots} +\usepackage{csvsimple} +\usetikzlibrary{arrows,intersections,math} +\begin{document} +\def\skala{1} +\begin{tikzpicture}[>=latex,thick,scale=\skala] + +\definecolor{darkgreen}{rgb}{0,0.6,0} + +\def\s{0.45} + +\def\punkt#1#2{({#1*\s},{#2*\s})} + +\def\pfeile{ + \foreach \x in {0.5,1.5,...,7.5}{ + \draw[->,color=blue] \punkt{\x}{-2.1} -- \punkt{(\x-1)}{-3.3}; + } +} + +\begin{scope}[yshift=0.1cm] + \node at \punkt{0}{0.5} [left] {$p(X)=\mathstrut$}; + \draw \punkt{0}{0} rectangle \punkt{8}{1}; + \foreach \x in {1,...,7}{ + \draw \punkt{\x}{0} -- \punkt{\x}{1}; + } + \node at \punkt{0.5}{0.5} {\texttt{1}}; + \node at \punkt{1.5}{0.5} {\texttt{0}}; + \node at \punkt{2.5}{0.5} {\texttt{0}}; + \node at \punkt{3.5}{0.5} {\texttt{1}}; + \node at \punkt{4.5}{0.5} {\texttt{0}}; + \node at \punkt{5.5}{0.5} {\texttt{1}}; + \node at \punkt{6.5}{0.5} {\texttt{0}}; + \node at \punkt{7.5}{0.5} {\texttt{1}}; + \foreach \x in {0.5,1.5,...,7.5}{ + \draw[->,color=blue] \punkt{\x}{-0.1} -- \punkt{(\x-1)}{-1.3}; + } +\end{scope} + +\begin{scope}[yshift=-1cm] + \draw[<-] \punkt{8.2}{-1.3} arc (-30:30:1.8); + \node at \punkt{9.3}{0.6} {$\mathstrut\cdot X$}; + \fill[color=blue!20] \punkt{-1}{0} rectangle \punkt{0}{1}; + \draw \punkt{0}{0} rectangle \punkt{8}{1}; + \foreach \x in {1,...,7}{ + \draw \punkt{\x}{0} -- \punkt{\x}{1}; + } + \node[color=darkgreen] at \punkt{-0.5}{0.5} {\texttt{1}}; + \node at \punkt{0.5}{0.5} {\texttt{0}}; + \node at \punkt{1.5}{0.5} {\texttt{0}}; + \node at \punkt{2.5}{0.5} {\texttt{1}}; + \node at \punkt{3.5}{0.5} {\texttt{0}}; + \node at \punkt{4.5}{0.5} {\texttt{1}}; + \node at \punkt{5.5}{0.5} {\texttt{0}}; + \node at \punkt{6.5}{0.5} {\texttt{1}}; + \node at \punkt{7.5}{0.5} {\texttt{0}}; + + \draw[->,color=darkgreen] + \punkt{-0.5}{0.1} -- \punkt{-0.5}{-0.5} -- \punkt{3.1}{-0.5}; + \node[color=darkgreen] at \punkt{3.5}{-0.5} {\texttt{1}}; + \node[color=darkgreen] at \punkt{4.5}{-0.5} {\texttt{1}}; + \node[color=darkgreen] at \punkt{6.5}{-0.5} {\texttt{1}}; + \node[color=darkgreen] at \punkt{7.5}{-0.5} {\texttt{1}}; + + \draw \punkt{0}{-2} rectangle \punkt{8}{-1}; + \foreach \x in {1,...,7}{ + \draw \punkt{\x}{-2} -- \punkt{\x}{-1}; + } + \node at \punkt{0.5}{-1.5} {\texttt{0}}; + \node at \punkt{1.5}{-1.5} {\texttt{0}}; + \node at \punkt{2.5}{-1.5} {\texttt{1}}; + \node at \punkt{3.5}{-1.5} {\texttt{1}}; + \node at \punkt{4.5}{-1.5} {\texttt{0}}; + \node at \punkt{5.5}{-1.5} {\texttt{0}}; + \node at \punkt{6.5}{-1.5} {\texttt{0}}; + \node at \punkt{7.5}{-1.5} {\texttt{1}}; + + \pfeile +\end{scope} + +\begin{scope}[yshift=-3cm] + \draw[<-] \punkt{8.2}{-1.3} arc (-30:30:1.8); + \node at \punkt{9.3}{0.6} {$\mathstrut\cdot X$}; + \fill[color=blue!20] \punkt{-1}{0} rectangle \punkt{0}{1}; + \draw \punkt{0}{0} rectangle \punkt{8}{1}; + \foreach \x in {1,...,7}{ + \draw \punkt{\x}{0} -- \punkt{\x}{1}; + } + \node[color=darkgreen] at \punkt{-0.5}{0.5} {\texttt{0}}; + \node at \punkt{0.5}{0.5} {\texttt{0}}; + \node at \punkt{1.5}{0.5} {\texttt{1}}; + \node at \punkt{2.5}{0.5} {\texttt{1}}; + \node at \punkt{3.5}{0.5} {\texttt{0}}; + \node at \punkt{4.5}{0.5} {\texttt{0}}; + \node at \punkt{5.5}{0.5} {\texttt{0}}; + \node at \punkt{6.5}{0.5} {\texttt{1}}; + \node at \punkt{7.5}{0.5} {\texttt{0}}; + +% \draw[->,color=darkgreen] +% \punkt{-0.5}{0.1} -- \punkt{-0.5}{-0.5} -- \punkt{3.1}{-0.5}; +% \node[color=darkgreen] at \punkt{3.5}{-0.5} {\texttt{1}}; +% \node[color=darkgreen] at \punkt{4.5}{-0.5} {\texttt{1}}; +% \node[color=darkgreen] at \punkt{6.5}{-0.5} {\texttt{1}}; +% \node[color=darkgreen] at \punkt{7.5}{-0.5} {\texttt{1}}; + \node[color=darkgreen] at \punkt{4}{-0.5} {$\|$}; + + \draw \punkt{0}{-2} rectangle \punkt{8}{-1}; + \foreach \x in {1,...,7}{ + \draw \punkt{\x}{-2} -- \punkt{\x}{-1}; + } + \node at \punkt{0.5}{-1.5} {\texttt{0}}; + \node at \punkt{1.5}{-1.5} {\texttt{1}}; + \node at \punkt{2.5}{-1.5} {\texttt{1}}; + \node at \punkt{3.5}{-1.5} {\texttt{0}}; + \node at \punkt{4.5}{-1.5} {\texttt{0}}; + \node at \punkt{5.5}{-1.5} {\texttt{0}}; + \node at \punkt{6.5}{-1.5} {\texttt{1}}; + \node at \punkt{7.5}{-1.5} {\texttt{0}}; + + \pfeile +\end{scope} + +\begin{scope}[yshift=-5cm] + \draw[<-] \punkt{8.2}{-1.3} arc (-30:30:1.8); + \node at \punkt{9.3}{0.6} {$\mathstrut\cdot X$}; + \fill[color=blue!20] \punkt{-1}{0} rectangle \punkt{0}{1}; + \draw \punkt{0}{0} rectangle \punkt{8}{1}; + \foreach \x in {1,...,7}{ + \draw \punkt{\x}{0} -- \punkt{\x}{1}; + } + \node[color=darkgreen] at \punkt{-0.5}{0.5} {\texttt{0}}; + \node at \punkt{0.5}{0.5} {\texttt{1}}; + \node at \punkt{1.5}{0.5} {\texttt{1}}; + \node at \punkt{2.5}{0.5} {\texttt{0}}; + \node at \punkt{3.5}{0.5} {\texttt{0}}; + \node at \punkt{4.5}{0.5} {\texttt{0}}; + \node at \punkt{5.5}{0.5} {\texttt{1}}; + \node at \punkt{6.5}{0.5} {\texttt{0}}; + \node at \punkt{7.5}{0.5} {\texttt{0}}; + +% \draw[->,color=darkgreen] +% \punkt{-0.5}{0.1} -- \punkt{-0.5}{-0.5} -- \punkt{3.1}{-0.5}; +% \node[color=darkgreen] at \punkt{3.5}{-0.5} {\texttt{1}}; +% \node[color=darkgreen] at \punkt{4.5}{-0.5} {\texttt{1}}; +% \node[color=darkgreen] at \punkt{6.5}{-0.5} {\texttt{1}}; +% \node[color=darkgreen] at \punkt{7.5}{-0.5} {\texttt{1}}; + \node[color=darkgreen] at \punkt{4}{-0.5} {$\|$}; + + \draw \punkt{0}{-2} rectangle \punkt{8}{-1}; + \foreach \x in {1,...,7}{ + \draw \punkt{\x}{-2} -- \punkt{\x}{-1}; + } + \node at \punkt{0.5}{-1.5} {\texttt{1}}; + \node at \punkt{1.5}{-1.5} {\texttt{1}}; + \node at \punkt{2.5}{-1.5} {\texttt{0}}; + \node at \punkt{3.5}{-1.5} {\texttt{0}}; + \node at \punkt{4.5}{-1.5} {\texttt{0}}; + \node at \punkt{5.5}{-1.5} {\texttt{1}}; + \node at \punkt{6.5}{-1.5} {\texttt{0}}; + \node at \punkt{7.5}{-1.5} {\texttt{0}}; + + \pfeile +\end{scope} + +\begin{scope}[yshift=-7cm] + \draw[<-] \punkt{8.2}{-1.3} arc (-30:30:1.8); + \node at \punkt{9.3}{0.6} {$\mathstrut\cdot X$}; + \fill[color=blue!20] \punkt{-1}{0} rectangle \punkt{0}{1}; + \draw \punkt{0}{0} rectangle \punkt{8}{1}; + \foreach \x in {1,...,7}{ + \draw \punkt{\x}{0} -- \punkt{\x}{1}; + } + \node[color=darkgreen] at \punkt{-0.5}{0.5} {\texttt{1}}; + \node at \punkt{0.5}{0.5} {\texttt{1}}; + \node at \punkt{1.5}{0.5} {\texttt{0}}; + \node at \punkt{2.5}{0.5} {\texttt{0}}; + \node at \punkt{3.5}{0.5} {\texttt{0}}; + \node at \punkt{4.5}{0.5} {\texttt{1}}; + \node at \punkt{5.5}{0.5} {\texttt{0}}; + \node at \punkt{6.5}{0.5} {\texttt{0}}; + \node at \punkt{7.5}{0.5} {\texttt{0}}; + + \draw[->,color=darkgreen] + \punkt{-0.5}{0.1} -- \punkt{-0.5}{-0.5} -- \punkt{3.1}{-0.5}; + \node[color=darkgreen] at \punkt{3.5}{-0.5} {\texttt{1}}; + \node[color=darkgreen] at \punkt{4.5}{-0.5} {\texttt{1}}; + \node[color=darkgreen] at \punkt{6.5}{-0.5} {\texttt{1}}; + \node[color=darkgreen] at \punkt{7.5}{-0.5} {\texttt{1}}; +% \node[color=darkgreen] at \punkt{4}{-0.5} {$\|$}; + + \draw \punkt{0}{-2} rectangle \punkt{8}{-1}; + \foreach \x in {1,...,7}{ + \draw \punkt{\x}{-2} -- \punkt{\x}{-1}; + } + \node at \punkt{0.5}{-1.5} {\texttt{1}}; + \node at \punkt{1.5}{-1.5} {\texttt{0}}; + \node at \punkt{2.5}{-1.5} {\texttt{0}}; + \node at \punkt{3.5}{-1.5} {\texttt{1}}; + \node at \punkt{4.5}{-1.5} {\texttt{0}}; + \node at \punkt{5.5}{-1.5} {\texttt{0}}; + \node at \punkt{6.5}{-1.5} {\texttt{1}}; + \node at \punkt{7.5}{-1.5} {\texttt{1}}; + + \pfeile +\end{scope} + +\begin{scope}[yshift=-9cm] + \draw[<-] \punkt{8.2}{-1.3} arc (-30:30:1.8); + \node at \punkt{9.3}{0.6} {$\mathstrut\cdot X$}; + \fill[color=blue!20] \punkt{-1}{0} rectangle \punkt{0}{1}; + \draw \punkt{0}{0} rectangle \punkt{8}{1}; + \foreach \x in {1,...,7}{ + \draw \punkt{\x}{0} -- \punkt{\x}{1}; + } + \node[color=darkgreen] at \punkt{-0.5}{0.5} {\texttt{1}}; + \node at \punkt{0.5}{0.5} {\texttt{0}}; + \node at \punkt{1.5}{0.5} {\texttt{0}}; + \node at \punkt{2.5}{0.5} {\texttt{1}}; + \node at \punkt{3.5}{0.5} {\texttt{0}}; + \node at \punkt{4.5}{0.5} {\texttt{0}}; + \node at \punkt{5.5}{0.5} {\texttt{1}}; + \node at \punkt{6.5}{0.5} {\texttt{1}}; + \node at \punkt{7.5}{0.5} {\texttt{0}}; + + \draw[->,color=darkgreen] + \punkt{-0.5}{0.1} -- \punkt{-0.5}{-0.5} -- \punkt{3.1}{-0.5}; + \node[color=darkgreen] at \punkt{3.5}{-0.5} {\texttt{1}}; + \node[color=darkgreen] at \punkt{4.5}{-0.5} {\texttt{1}}; + \node[color=darkgreen] at \punkt{6.5}{-0.5} {\texttt{1}}; + \node[color=darkgreen] at \punkt{7.5}{-0.5} {\texttt{1}}; +% \node[color=darkgreen] at \punkt{4}{-0.5} {$\|$}; + + \draw \punkt{0}{-2} rectangle \punkt{8}{-1}; + \foreach \x in {1,...,7}{ + \draw \punkt{\x}{-2} -- \punkt{\x}{-1}; + } + \node at \punkt{0.5}{-1.5} {\texttt{0}}; + \node at \punkt{1.5}{-1.5} {\texttt{0}}; + \node at \punkt{2.5}{-1.5} {\texttt{1}}; + \node at \punkt{3.5}{-1.5} {\texttt{1}}; + \node at \punkt{4.5}{-1.5} {\texttt{1}}; + \node at \punkt{5.5}{-1.5} {\texttt{1}}; + \node at \punkt{6.5}{-1.5} {\texttt{0}}; + \node at \punkt{7.5}{-1.5} {\texttt{1}}; + + \pfeile +\end{scope} + +\begin{scope}[yshift=-11cm] + \draw[<-] \punkt{8.2}{-1.3} arc (-30:30:1.8); + \node at \punkt{9.3}{0.6} {$\mathstrut\cdot X$}; + \fill[color=blue!20] \punkt{-1}{0} rectangle \punkt{0}{1}; + \draw \punkt{0}{0} rectangle \punkt{8}{1}; + \foreach \x in {1,...,7}{ + \draw \punkt{\x}{0} -- \punkt{\x}{1}; + } + \node[color=darkgreen] at \punkt{-0.5}{0.5} {\texttt{0}}; + \node at \punkt{0.5}{0.5} {\texttt{0}}; + \node at \punkt{1.5}{0.5} {\texttt{0}}; + \node at \punkt{2.5}{0.5} {\texttt{1}}; + \node at \punkt{3.5}{0.5} {\texttt{1}}; + \node at \punkt{4.5}{0.5} {\texttt{1}}; + \node at \punkt{5.5}{0.5} {\texttt{0}}; + \node at \punkt{6.5}{0.5} {\texttt{1}}; + \node at \punkt{7.5}{0.5} {\texttt{0}}; + +% \draw[->,color=darkgreen] +% \punkt{-0.5}{0.1} -- \punkt{-0.5}{-0.5} -- \punkt{3.1}{-0.5}; +% \node[color=darkgreen] at \punkt{3.5}{-0.5} {\texttt{1}}; +% \node[color=darkgreen] at \punkt{4.5}{-0.5} {\texttt{1}}; +% \node[color=darkgreen] at \punkt{6.5}{-0.5} {\texttt{1}}; +% \node[color=darkgreen] at \punkt{7.5}{-0.5} {\texttt{1}}; + \node[color=darkgreen] at \punkt{4}{-0.5} {$\|$}; + + \draw \punkt{0}{-2} rectangle \punkt{8}{-1}; + \foreach \x in {1,...,7}{ + \draw \punkt{\x}{-2} -- \punkt{\x}{-1}; + } + \node at \punkt{0.5}{-1.5} {\texttt{0}}; + \node at \punkt{1.5}{-1.5} {\texttt{0}}; + \node at \punkt{2.5}{-1.5} {\texttt{1}}; + \node at \punkt{3.5}{-1.5} {\texttt{1}}; + \node at \punkt{4.5}{-1.5} {\texttt{1}}; + \node at \punkt{5.5}{-1.5} {\texttt{0}}; + \node at \punkt{6.5}{-1.5} {\texttt{1}}; + \node at \punkt{7.5}{-1.5} {\texttt{0}}; + + \pfeile +\end{scope} + +\begin{scope}[yshift=-13cm] + \draw[<-] \punkt{8.2}{-1.3} arc (-30:30:1.8); + \node at \punkt{9.3}{0.6} {$\mathstrut\cdot X$}; + \fill[color=blue!20] \punkt{-1}{0} rectangle \punkt{0}{1}; + \draw \punkt{0}{0} rectangle \punkt{8}{1}; + \foreach \x in {1,...,7}{ + \draw \punkt{\x}{0} -- \punkt{\x}{1}; + } + \node[color=darkgreen] at \punkt{-0.5}{0.5} {\texttt{0}}; + \node at \punkt{0.5}{0.5} {\texttt{0}}; + \node at \punkt{1.5}{0.5} {\texttt{1}}; + \node at \punkt{2.5}{0.5} {\texttt{1}}; + \node at \punkt{3.5}{0.5} {\texttt{1}}; + \node at \punkt{4.5}{0.5} {\texttt{0}}; + \node at \punkt{5.5}{0.5} {\texttt{1}}; + \node at \punkt{6.5}{0.5} {\texttt{0}}; + \node at \punkt{7.5}{0.5} {\texttt{0}}; + +% \draw[->,color=darkgreen] +% \punkt{-0.5}{0.1} -- \punkt{-0.5}{-0.5} -- \punkt{3.1}{-0.5}; +% \node[color=darkgreen] at \punkt{3.5}{-0.5} {\texttt{1}}; +% \node[color=darkgreen] at \punkt{4.5}{-0.5} {\texttt{1}}; +% \node[color=darkgreen] at \punkt{6.5}{-0.5} {\texttt{1}}; +% \node[color=darkgreen] at \punkt{7.5}{-0.5} {\texttt{1}}; + \node[color=darkgreen] at \punkt{4}{-0.5} {$\|$}; + + \draw \punkt{0}{-2} rectangle \punkt{8}{-1}; + \foreach \x in {1,...,7}{ + \draw \punkt{\x}{-2} -- \punkt{\x}{-1}; + } + \node at \punkt{0.5}{-1.5} {\texttt{0}}; + \node at \punkt{1.5}{-1.5} {\texttt{1}}; + \node at \punkt{2.5}{-1.5} {\texttt{1}}; + \node at \punkt{3.5}{-1.5} {\texttt{0}}; + \node at \punkt{4.5}{-1.5} {\texttt{1}}; + \node at \punkt{5.5}{-1.5} {\texttt{1}}; + \node at \punkt{6.5}{-1.5} {\texttt{1}}; + \node at \punkt{7.5}{-1.5} {\texttt{1}}; + +% \pfeile +\end{scope} + +\begin{scope}[xshift=9cm] + +\begin{scope}[yshift=0.1cm] + \draw[->] \punkt{-11.8}{0.5} -- \punkt{-0.1}{0.5}; + \draw \punkt{0}{0} rectangle \punkt{8}{1}; + \foreach \x in {1,...,7}{ + \draw \punkt{\x}{0} -- \punkt{\x}{1}; + } + \draw \punkt{4}{-0.1} -- \punkt{4}{-3}; + \node at \punkt{0.5}{0.5} {\texttt{1}}; + \node at \punkt{1.5}{0.5} {\texttt{0}}; + \node at \punkt{2.5}{0.5} {\texttt{0}}; + \node at \punkt{3.5}{0.5} {\texttt{1}}; + \node at \punkt{4.5}{0.5} {\texttt{0}}; + \node at \punkt{5.5}{0.5} {\texttt{1}}; + \node at \punkt{6.5}{0.5} {\texttt{0}}; + \node at \punkt{7.5}{0.5} {\texttt{1}}; +\end{scope} + +\def\summation#1#2#3#4#5#6#7#8{ + \draw[->] \punkt{4}{2.3} -- \punkt{4}{1}; + + \draw[->] \punkt{-11.8}{0.5} -- \punkt{3.5}{0.5}; + + \draw \punkt{4}{0.5} circle[radius=0.2]; + \draw \punkt{4}{0.20} -- \punkt{4}{0.80}; + \draw \punkt{3.7}{0.5} -- \punkt{4.3}{0.5}; + + \draw[->] \punkt{4}{-0.05} -- \punkt{4}{-0.95}; + \draw \punkt{0}{-2} rectangle \punkt{8}{-1}; + \foreach \x in {1,...,7}{ + \draw \punkt{\x}{-2} -- \punkt{\x}{-1}; + } + + \node at \punkt{0.5}{-1.5} {\texttt{#1}}; + \node at \punkt{1.5}{-1.5} {\texttt{#2}}; + \node at \punkt{2.5}{-1.5} {\texttt{#3}}; + \node at \punkt{3.5}{-1.5} {\texttt{#4}}; + \node at \punkt{4.5}{-1.5} {\texttt{#5}}; + \node at \punkt{5.5}{-1.5} {\texttt{#6}}; + \node at \punkt{6.5}{-1.5} {\texttt{#7}}; + \node at \punkt{7.5}{-1.5} {\texttt{#8}}; +} + +\begin{scope}[yshift=-1.9cm] + \summation{1}{0}{0}{1}{0}{1}{0}{1} +\end{scope} + +\begin{scope}[yshift=-3.9cm] + \summation{1}{1}{1}{1}{0}{1}{1}{1} +\end{scope} + +\begin{scope}[yshift=-5.9cm] + \summation{1}{1}{1}{1}{0}{1}{1}{1} +\end{scope} + +\begin{scope}[yshift=-7.9cm] + \summation{0}{1}{1}{0}{0}{1}{0}{0} +\end{scope} + +\begin{scope}[yshift=-9.9cm] + \summation{0}{1}{0}{1}{1}{0}{0}{1} +\end{scope} + +\begin{scope}[yshift=-11.9cm] + \summation{0}{1}{0}{1}{1}{0}{0}{1} +\end{scope} + +\begin{scope}[yshift=-13.9cm] + \summation{0}{0}{1}{1}{0}{1}{1}{0} + \node at \punkt{0}{-1.5} [left] {$p(X)\cdot q(X)=\mathstrut$}; +\end{scope} + +\end{scope} + +\begin{scope}[xshift=5cm] + +\begin{scope}[yshift=2cm] + \node at \punkt{0}{0.5} [left] {$q(X)=\mathstrut$}; + \draw \punkt{0}{0} rectangle \punkt{8}{1}; + \foreach \x in {1,...,7}{ + \draw \punkt{\x}{0} -- \punkt{\x}{1}; + } + \node at \punkt{0.5}{0.5} {\texttt{1}}; + \node at \punkt{1.5}{0.5} {\texttt{0}}; + \node at \punkt{2.5}{0.5} {\texttt{1}}; + \node at \punkt{3.5}{0.5} {\texttt{1}}; + \node at \punkt{4.5}{0.5} {\texttt{0}}; + \node at \punkt{5.5}{0.5} {\texttt{1}}; + \node at \punkt{6.5}{0.5} {\texttt{0}}; + \node at \punkt{7.5}{0.5} {\texttt{1}}; + + \draw[->] \punkt{7.5}{-0.1} -- ({7.5*\s},{-1.3}); + \node at ({7.5*\s},{-1.2}) [below] {$\mathstrut\cdot\texttt{1}$}; + + \def\y{1.2} + + \draw[->] \punkt{6.5}{-0.1} -- ({6.5*\s},{-1*2-\y-0.1}); + \node at ({6.5*\s},{-1*2-\y}) [below] {$\mathstrut\cdot\texttt{0}$}; + + \draw[->] \punkt{5.5}{-0.1} -- ({5.5*\s},{-2*2-\y-0.1}); + \node at ({5.5*\s},{-2*2-\y}) [below] {$\mathstrut\cdot\texttt{1}$}; + + \draw[->] \punkt{4.5}{-0.1} -- ({4.5*\s},{-3*2-\y-0.1}); + \node at ({4.5*\s},{-3*2-\y}) [below] {$\mathstrut\cdot\texttt{0}$}; + + \draw[->] \punkt{3.5}{-0.1} -- ({3.5*\s},{-4*2-\y-0.1}); + \node at ({3.5*\s},{-4*2-\y}) [below] {$\mathstrut\cdot\texttt{1}$}; + + \draw[->] \punkt{2.5}{-0.1} -- ({2.5*\s},{-5*2-\y-0.1}); + \node at ({2.5*\s},{-5*2-\y}) [below] {$\mathstrut\cdot\texttt{1}$}; + + \draw[->] \punkt{1.5}{-0.1} -- ({1.5*\s},{-6*2-\y-0.1}); + \node at ({1.5*\s},{-6*2-\y}) [below] {$\mathstrut\cdot\texttt{0}$}; + + \draw[->] \punkt{0.5}{-0.1} -- ({0.5*\s},{-7*2-\y-0.1}); + \node at ({0.5*\s},{-7*2-\y}) [below] {$\mathstrut\cdot\texttt{1}$}; +\end{scope} + +\end{scope} + +\end{tikzpicture} +\end{document} + -- cgit v1.2.1