diff options
author | Ayexor <9105454+Ayexor@users.noreply.github.com> | 2021-08-27 18:09:54 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-08-27 18:09:54 +0200 |
commit | 2b2c5daa139aec08d091b658ad6191d6e57024ef (patch) | |
tree | 2c8f3fc7017394746d8e4f92a358e2a11015e072 /buch/papers/multiplikation/images | |
parent | Anpassungen nach Mail (diff) | |
parent | new image: tetraeder (diff) | |
download | SeminarMatrizen-2b2c5daa139aec08d091b658ad6191d6e57024ef.tar.gz SeminarMatrizen-2b2c5daa139aec08d091b658ad6191d6e57024ef.zip |
Merge branch 'master' into master
Diffstat (limited to 'buch/papers/multiplikation/images')
-rw-r--r-- | buch/papers/multiplikation/images/algo_tab.pdf | bin | 0 -> 34251 bytes | |||
-rw-r--r-- | buch/papers/multiplikation/images/algo_tab.tex | 122 | ||||
-rw-r--r-- | buch/papers/multiplikation/images/bigo.pdf | bin | 0 -> 28312 bytes | |||
-rw-r--r-- | buch/papers/multiplikation/images/bigo.tex | 112 | ||||
-rw-r--r-- | buch/papers/multiplikation/images/c_meas_4096.pdf | bin | 0 -> 17400 bytes | |||
-rw-r--r-- | buch/papers/multiplikation/images/meas_1024.pdf | bin | 0 -> 18813 bytes | |||
-rw-r--r-- | buch/papers/multiplikation/images/meas_c.pdf | bin | 0 -> 23887 bytes | |||
-rw-r--r-- | buch/papers/multiplikation/images/meas_c.tex | 150 | ||||
-rw-r--r-- | buch/papers/multiplikation/images/meas_python.pdf | bin | 0 -> 22337 bytes | |||
-rw-r--r-- | buch/papers/multiplikation/images/meas_python.tex | 145 | ||||
-rw-r--r-- | buch/papers/multiplikation/images/mm_visualisation.pdf | bin | 0 -> 21665 bytes | |||
-rw-r--r-- | buch/papers/multiplikation/images/mm_visualisation.tex | 45 | ||||
-rw-r--r-- | buch/papers/multiplikation/images/strassen.pdf | bin | 0 -> 22262 bytes | |||
-rw-r--r-- | buch/papers/multiplikation/images/strassen.tex | 231 |
14 files changed, 805 insertions, 0 deletions
diff --git a/buch/papers/multiplikation/images/algo_tab.pdf b/buch/papers/multiplikation/images/algo_tab.pdf Binary files differnew file mode 100644 index 0000000..7f2bb4f --- /dev/null +++ b/buch/papers/multiplikation/images/algo_tab.pdf diff --git a/buch/papers/multiplikation/images/algo_tab.tex b/buch/papers/multiplikation/images/algo_tab.tex new file mode 100644 index 0000000..50ce392 --- /dev/null +++ b/buch/papers/multiplikation/images/algo_tab.tex @@ -0,0 +1,122 @@ +\documentclass{article} +\usepackage[left=25mm,right=25mm,top=25mm,bottom=25mm]{geometry} +\usepackage[utf8]{inputenc} +\usepackage[T1]{fontenc} +\usepackage{times} +\usepackage{geometry} +\usepackage{amsmath} +\usepackage{amssymb} +\usepackage{algorithm} +\usepackage{algpseudocode} +\usepackage{mathrsfs} +\usepackage{amsfonts} +\usepackage{amsthm} +\usepackage{lipsum} +\usepackage{amscd} +\usepackage{graphicx} +\usepackage{fancyhdr} +\usepackage{textcomp} +\usepackage{pgfplots} +\usepackage{txfonts} +\usepackage[all]{xy} +\usepackage{paralist} +\usepackage[colorlinks=true]{hyperref} +\usepackage{array} +\usepackage{tikz} +\usepackage{slashed} +\usepackage{pdfpages} +\usepackage{multicol} +\usepackage{cite} +\usepackage{url} +\usepackage{amsmath,amsfonts,amssymb} +\usepackage{tikz} +\usetikzlibrary{arrows,matrix,positioning} +\usetikzlibrary{overlay-beamer-styles} +\usetikzlibrary{matrix.skeleton} +\usetikzlibrary{automata,positioning} +\usetikzlibrary{decorations.text} +\usepackage{listings} +\usepackage{multirow} +\usepackage{color} + +\begin{document} + + + +\begin{table}[t] + \begin{tabular}{ll} + \begin{minipage}{0.4\textwidth} + \begin{algorithm}[H]\footnotesize\caption{} + \label{multiplikation:alg:b1} + \setlength{\lineskip}{7pt} + \begin{algorithmic} + \Function{B1}{$a, b$} + \State \textbf{return} $a+b$ + \EndFunction + \State + \State + \end{algorithmic} + \end{algorithm} + \end{minipage} + & + \begin{minipage}{0.4\textwidth} + \begin{algorithm}[H]\footnotesize\caption{} + \label{multiplikation:alg:b2} + \setlength{\lineskip}{7pt} + \begin{algorithmic} + \Function{B2}{$a, b$} + \State $ x \gets a+b $ + \State $ y \gets a \cdot b $ + \State \textbf{return} $x+y$ + \EndFunction + \end{algorithmic} +\end{algorithm} + + \end{minipage} + \end{tabular} +\end{table} + +\begin{table} + \begin{tabular}[t]{ll} + \begin{minipage}{0.4\textwidth} + \begin{algorithm}[H]\footnotesize\caption{} + \setlength{\lineskip}{7pt} + \begin{algorithmic} + \label{multiplikation:alg:linear} + \Function{L}{$\mathbf{a}, \mathbf{b}$,n} + \State $ sum \gets 0$ + \For{$i = 0,1,2 \dots,n$} + \State $ sum \gets sum + A[i] \cdot B[i] $ + \EndFor + + \State \textbf{return} $sum$ + + \EndFunction + \State + \State + \end{algorithmic} + \end{algorithm} + \end{minipage} + & + \begin{minipage}{0.4\textwidth} + \begin{algorithm}[H]\footnotesize\caption{} + \label{multiplikation:alg:q1} + \setlength{\lineskip}{7pt} + \begin{algorithmic} + \Function{Q}{$\mathbf{A}, \mathbf{B}$,n} + \State $ sum \gets 0$ + \For{$i = 0,1,2 \dots,n$} + \For{$j = 0,1,2 \dots,n$} + \State $ sum \gets sum + A[i] \cdot B[j] $ + \EndFor + \EndFor + \State \textbf{return} $sum$ + \EndFunction + \end{algorithmic} + \end{algorithm} + \end{minipage} + \end{tabular} +\end{table} + +dhdfh +\end{document} diff --git a/buch/papers/multiplikation/images/bigo.pdf b/buch/papers/multiplikation/images/bigo.pdf Binary files differnew file mode 100644 index 0000000..2519553 --- /dev/null +++ b/buch/papers/multiplikation/images/bigo.pdf diff --git a/buch/papers/multiplikation/images/bigo.tex b/buch/papers/multiplikation/images/bigo.tex new file mode 100644 index 0000000..63fd0fd --- /dev/null +++ b/buch/papers/multiplikation/images/bigo.tex @@ -0,0 +1,112 @@ +\documentclass[border=10pt,varwidth]{standalone} +\usepackage[left=25mm,right=25mm,top=25mm,bottom=25mm]{geometry} +\usepackage[utf8]{inputenc} +\usepackage[T1]{fontenc} +\usepackage{times} +\usepackage{geometry} +\usepackage{amsmath} +\usepackage{amssymb} +\usepackage{mathrsfs} +\usepackage{amsfonts} +\usepackage{amsthm} +\usepackage{lipsum} +\usepackage{amscd} +\usepackage{graphicx} +\usepackage{fancyhdr} +\usepackage{textcomp} +\usepackage{pgfplots} +\usepackage{txfonts} +\usepackage[all]{xy} +\usepackage{paralist} +\usepackage[colorlinks=true]{hyperref} +\usepackage{array} +\usepackage{tikz} +\usepackage{slashed} +\usepackage{pdfpages} +\usepackage{cite} +\usepackage{url} +\usepackage{amsmath,amsfonts,amssymb} +\usepackage{tikz} +\usetikzlibrary{arrows,matrix,positioning} +\usetikzlibrary{overlay-beamer-styles} +\usetikzlibrary{matrix.skeleton} +\usetikzlibrary{automata,positioning} +\usetikzlibrary{decorations.text} +\usepackage{listings} +\usepackage{multirow} +\usepackage{color} + +\begin{document} + +\begin{tikzpicture} + +\begin{axis}[ + xmode=log, ymode=log, + xmin=1e-0, xmax=5000, + ymin=10e-1, ymax=1e7, + grid=both, + major grid style={black!50}, + xlabel = data input size, + ylabel = {time}, + legend pos=north west, + very thick, + yticklabels=\empty, + xticklabels=\empty, + scale only axis=true, + width=12cm, height=8cm, + legend cell align={left} + ] +\addplot [ + domain= 1:5000, + samples=100, + color=red, +] +{1}; +\addlegendentry{$\mathcal{O}(1)$} +\addplot [ + domain= 1:5000, + samples=100, + color=green, +] +{x}; +\addlegendentry{$\mathcal{O}(n)$} +\addplot [ + domain= 1:50000, + samples=100, + color=blue, +] +{x^2}; +\addlegendentry{$\mathcal{O}\left(n^2\right)$} +\addplot [ + domain= 1:500, + samples=100, + color=purple, +] +{x^3}; +\addlegendentry{$\mathcal{O}\left(n^3\right)$} +\addplot [ + domain= 1:500, + samples=100, + color=black, +] +{exp(x) - 1.7}; +\addlegendentry{$\mathcal{O}\left(e^n\right)$} +\addplot [ + domain= 1:5000, + samples=100, + color=orange, +] +{log2(x)+1}; +\addlegendentry{$\mathcal{O}(\log n)$} + +\addplot [ + domain= 1:5000, + samples=100, + color=gray, +] +{x*log2(x)+1}; +\addlegendentry{$\mathcal{O}(n \log n)$} +\end{axis} +\end{tikzpicture} + +\end{document} diff --git a/buch/papers/multiplikation/images/c_meas_4096.pdf b/buch/papers/multiplikation/images/c_meas_4096.pdf Binary files differnew file mode 100644 index 0000000..304015a --- /dev/null +++ b/buch/papers/multiplikation/images/c_meas_4096.pdf diff --git a/buch/papers/multiplikation/images/meas_1024.pdf b/buch/papers/multiplikation/images/meas_1024.pdf Binary files differnew file mode 100644 index 0000000..70c7ec1 --- /dev/null +++ b/buch/papers/multiplikation/images/meas_1024.pdf diff --git a/buch/papers/multiplikation/images/meas_c.pdf b/buch/papers/multiplikation/images/meas_c.pdf Binary files differnew file mode 100644 index 0000000..521151e --- /dev/null +++ b/buch/papers/multiplikation/images/meas_c.pdf diff --git a/buch/papers/multiplikation/images/meas_c.tex b/buch/papers/multiplikation/images/meas_c.tex new file mode 100644 index 0000000..12d3527 --- /dev/null +++ b/buch/papers/multiplikation/images/meas_c.tex @@ -0,0 +1,150 @@ + +\documentclass[border=10pt,varwidth]{standalone} +\usepackage[left=25mm,right=25mm,top=25mm,bottom=25mm]{geometry} +\usepackage[utf8]{inputenc} +\usepackage[T1]{fontenc} +\usepackage{times} +\usepackage{geometry} +\usepackage{amsmath} +\usepackage{amssymb} +\usepackage{mathrsfs} +\usepackage{amsfonts} +\usepackage{amsthm} +\usepackage{lipsum} +\usepackage{amscd} +\usepackage{graphicx} +\usepackage{fancyhdr} +\usepackage{textcomp} +\usepackage{pgfplots} +\usepackage{txfonts} +\usepackage[all]{xy} +\usepackage{paralist} +\usepackage[colorlinks=true]{hyperref} +\usepackage{array} +\usepackage{tikz} +\usepackage{slashed} +\usepackage{pdfpages} +\usepackage{cite} +\usepackage{url} +\usepackage{amsmath,amsfonts,amssymb} +\usepackage{tikz} +\usepackage{pgfplotstable} +\usetikzlibrary{arrows,matrix,positioning} +\usetikzlibrary{overlay-beamer-styles} +\usetikzlibrary{matrix.skeleton} +\usetikzlibrary{automata,positioning} +\usetikzlibrary{decorations.text} +\usepackage{listings} +\usepackage{multirow} +\usepackage{color} + +\begin{document} + +\begin{tikzpicture} +\begin{axis}[ +xmode=log, ymode=log, +xmin=30, xmax=10000, +ymin=1e-5, ymax=2e4, +grid=both, +major grid style={black!50}, +xlabel = data input ($n$), +ylabel = {time ($s$)}, +legend pos=north west, +very thick, +scale only axis=true, +width=12cm, height=8cm, + log basis x={10}, + legend cell align={left} +] +\addlegendentry{Winograd} +\addplot[ color=blue, + error bars/.cd, y dir=both, y explicit, +] coordinates { +%(2,1e-07) +%(4,5e-07) +%(8,2.0000000000000003e-06) +%(16,1.1999999999999999e-05) +(32,8.329999999999999e-05) +(64,0.0006479) +(128,0.0052873) +(256,0.052674599999999995) +(512,0.5249752000000001) +(1024,4.671161) +(2048,136.6769777) +(4096,1179.261048) +(8192,10071.512655) +}; +\addlegendentry{Strassen} +\addplot [ color=black, +]coordinates { +%(2,1e-07) +%(4,2.1e-06) +%(8,1.13e-05) +%(16,7.07e-05) +(32,0.0005041) +(64,0.003596) +(128,0.0254481) +(256,0.1781817) +(512,1.2555) +(1024,8.8302371) +(2048,61.9018691) +(4096,414.648901) +(8192,3014.235467) +}; + +\addlegendentry{MM div and conq} +\addplot[ color=green, +] coordinates { +%(2,3e-07) +%(4,1.1e-06) +%(8,8.6e-06) +%(16,7.819999999999999e-05) +(32,0.0005940000000000001) +(64,0.0044339) +(128,0.0348443) +(256,0.29484730000000003) +(512,2.2228507) +(1024,17.659234500000004) +(2048,141.6103936) +(4096,1147.106865) +(8192,9606.402522) +}; + +\addlegendentry{MM} +\addplot [ color=red, +]coordinates { +%(2,0.0) +%(4,3e-07) +%(8,1.8000000000000001e-06) +%(16,1.1999999999999999e-05) +(32,8.93e-05) +(64,0.0006923) +(128,0.0056842) +(256,0.051771500000000005) +(512,0.5062468000000001) +(1024,4.5048086) +(2048,129.2894619) +(4096,1111.312696) +(8192,9376.173434) +}; +\addlegendentry{BLAS} +\addplot[ color=purple, +] coordinates { +%(2,1e-07) +%(4,0.0) +%(8,1e-07) +%(16,3.9e-06) +(32,2.1000000000000002e-05) +(64,0.00018580000000000002) +(128,0.0012649) +(256,0.0096489) +(512,0.0773765) +(1024,0.7643868) +(2048,7.6320993999999995) +(4096,55.845038) +(8192,478.429957) +}; +\end{axis} +\end{tikzpicture} + +\end{document} diff --git a/buch/papers/multiplikation/images/meas_python.pdf b/buch/papers/multiplikation/images/meas_python.pdf Binary files differnew file mode 100644 index 0000000..fe89773 --- /dev/null +++ b/buch/papers/multiplikation/images/meas_python.pdf diff --git a/buch/papers/multiplikation/images/meas_python.tex b/buch/papers/multiplikation/images/meas_python.tex new file mode 100644 index 0000000..ad43cf6 --- /dev/null +++ b/buch/papers/multiplikation/images/meas_python.tex @@ -0,0 +1,145 @@ + +\documentclass[border=10pt,varwidth]{standalone} +\usepackage[left=25mm,right=25mm,top=25mm,bottom=25mm]{geometry} +\usepackage[utf8]{inputenc} +\usepackage[T1]{fontenc} +\usepackage{times} +\usepackage{geometry} +\usepackage{amsmath} +\usepackage{amssymb} +\usepackage{mathrsfs} +\usepackage{amsfonts} +\usepackage{amsthm} +\usepackage{lipsum} +\usepackage{amscd} +\usepackage{graphicx} +\usepackage{fancyhdr} +\usepackage{textcomp} +\usepackage{pgfplots} +\usepackage{txfonts} +\usepackage[all]{xy} +\usepackage{paralist} +\usepackage[colorlinks=true]{hyperref} +\usepackage{array} +\usepackage{tikz} +\usepackage{slashed} +\usepackage{pdfpages} +\usepackage{cite} +\usepackage{url} +\usepackage{amsmath,amsfonts,amssymb} +\usepackage{tikz} +\usepackage{pgfplotstable} +\usetikzlibrary{arrows,matrix,positioning} +\usetikzlibrary{overlay-beamer-styles} +\usetikzlibrary{matrix.skeleton} +\usetikzlibrary{automata,positioning} +\usetikzlibrary{decorations.text} +\usepackage{listings} +\usepackage{multirow} +\usepackage{color} + +\begin{document} + +\begin{tikzpicture} +\begin{axis}[ +xmode=log, ymode=log, +xmin=30, xmax=4200, +ymin=0.01, ymax=70000, +grid=both, +major grid style={black!50}, +xlabel = data input ($n$), +ylabel = {time ($s$)}, +legend pos=north west, +very thick, +scale only axis=true, +width=12cm, height=8cm, + log basis x={10}, + legend cell align={left} +] +\addlegendentry{Winograd} +\addplot[ color=blue, +] coordinates { +% (2, 2.7895e-05 ) +% (4, 0.000104904) +% (8, 0.000552893) +% (16, 0.0045557 ) +(32, 0.0187144 ) +(64, 0.153069 ) +(128, 1.19476 ) +(256, 8.29899 ) +(512, 68.3699 ) +(1024,537.374 ) +(2046,4884.61) +(4096,43597.1) +}; +\addlegendentry{Strassen} +\addplot [ color=black, +]coordinates { + % (2,2.09808e-05 ) + % (4,0.000174284 ) + % (8,0.000943899 ) + % (16,0.00475407 ) + (32,0.0485256 ) + (64,0.220414 ) + (128,1.44718 ) + (256,9.93866 ) + (512,63.961 ) +(1024,461.494 ) +(2046,3860.57) +(4096,22904.3) +}; + +\addlegendentry{MM div and conq} +\addplot[ color=green, +] coordinates { + % (2,8.10623e-06 ) + % (4,9.01222e-05 ) + % (8,0.000729084 ) + % (16,0.00497079 ) + (32,0.02719 ) + (64,0.26528 ) + (128,1.77787 ) + (256,13.27 ) + (512,105.397 ) +(1024,847.321 ) +(2046,7375.93) +(4096,58466) +}; + +\addlegendentry{MM} +\addplot [ color=red, +]coordinates { + % (2,1.85966e-05) + % (4,8.29697e-05 ) + % (8,0.000547171) + % (16,0.00305367 ) + (32, 0.0240743 ) + (64, 0.186895 ) + (128, 1.56369 ) + (256, 11.0062 ) + (512, 85.4768) +(1024,750.757 ) +(2046,6154.18) +(4096,46813.3) +}; +% \addlegendentry{NumPy} +% \addplot[ color=blue, +% ] coordinates { +% % (2,1.83582e-05 ) +% % (4,7.86781e-06) +% % (8,1.00136e-05) +% % (16,5.4121e-05 ) +% (32,4.26769e-05) +% (64,0.000118494) +% (128,0.000244141 ) +% (256,0.000695705 ) +% (512,0.00221705 ) +% (1024,0.0188088 ) +% (2046,0.215739) +% (4096,1.49159) +% }; + +\end{axis} +\end{tikzpicture} + +\end{document} diff --git a/buch/papers/multiplikation/images/mm_visualisation.pdf b/buch/papers/multiplikation/images/mm_visualisation.pdf Binary files differnew file mode 100644 index 0000000..9309df1 --- /dev/null +++ b/buch/papers/multiplikation/images/mm_visualisation.pdf diff --git a/buch/papers/multiplikation/images/mm_visualisation.tex b/buch/papers/multiplikation/images/mm_visualisation.tex new file mode 100644 index 0000000..6e8f789 --- /dev/null +++ b/buch/papers/multiplikation/images/mm_visualisation.tex @@ -0,0 +1,45 @@ + + \begin{tikzpicture}[ampersand replacement=\&] + + \matrix (A)[matrix of math nodes, label skeleton, left delimiter=[,right delimiter={]}] at (0,0) + { + A_{1,1} \& \cdots \& A_{1,k} \& \cdots \& A_{1,n} \\ + \vdots \& \& \vdots \& \& \vdots \\ + A_{i,1} \& \cdots \& A_{i,k} \& \cdots \& A_{i,n} \\ + \vdots \& \& \vdots \& \& \vdots \\ + A_{m,1} \& \cdots \& A_{m,k} \& \cdots \& A_{m,n} \\ + }; + + \node [right=0.1 of A] (mul) {$\cdot$}; + + + \matrix (B)[right=0.1 of mul, matrix of math nodes, label skeleton, left delimiter=[,right delimiter={]}] + { + B_{1,1} \& \cdots \& B_{1,j} \& \cdots \& B_{1,p} \\ + \vdots \& \& \vdots \& \& \vdots \\ + B_{k,1} \& \cdots \& B_{k,j} \& \cdots \& B_{k,p} \\ + \vdots \& \& \vdots \& \& \vdots \\ + B_{n,1} \& \cdots \& B_{n,j} \& \cdots \& B_{n,p} \\ + }; + + \node [right=0.1 of B] (eq) {$=$}; + + \matrix (C)[right=0.1 of eq, matrix of math nodes, label skeleton, left delimiter=[,right delimiter={]}] + { + C_{1,1} \& \cdots \& C_{1,j} \& \cdots \& C_{1,p} \\ + \vdots \& \& \vdots \& \& \vdots \\ + C_{i,1} \& \cdots \& C_{i,j} \& \cdots \& C_{i,p} \\ + \vdots \& \& \vdots \& \& \vdots \\ + C_{m,1} \& \cdots \& C_{m,j} \& \cdots \& C_{m,p} \\ + }; + + + \node[opacity=0.5, rounded corners=2pt, inner sep=-1pt, fill=green, fit=(A-3-1)(A-3-5)] {}; + \node[opacity=0.5, rounded corners=2pt, inner sep=-1pt, fill=blue, fit=(B-1-3)(B-5-3)] {}; + \node[opacity=0.5, rounded corners=2pt, inner sep=-1pt, fill=red, fit=(C-3-3)] {}; + + + \end{tikzpicture} + +\end{document} + diff --git a/buch/papers/multiplikation/images/strassen.pdf b/buch/papers/multiplikation/images/strassen.pdf Binary files differnew file mode 100644 index 0000000..d150125 --- /dev/null +++ b/buch/papers/multiplikation/images/strassen.pdf diff --git a/buch/papers/multiplikation/images/strassen.tex b/buch/papers/multiplikation/images/strassen.tex new file mode 100644 index 0000000..b51a9d5 --- /dev/null +++ b/buch/papers/multiplikation/images/strassen.tex @@ -0,0 +1,231 @@ +\documentclass[border=10pt]{standalone} +\usepackage[left=25mm,right=25mm,top=25mm,bottom=25mm]{geometry} +\usepackage[utf8]{inputenc} +\usepackage[T1]{fontenc} +\usepackage{times} +\usepackage{geometry} +\usepackage{amsmath} +\usepackage{amssymb} +\usepackage{mathrsfs} +\usepackage{amsfonts} +\usepackage{amsthm} +\usepackage{lipsum} +\usepackage{amscd} +\usepackage{graphicx} +\usepackage{fancyhdr} +\usepackage{textcomp} +\usepackage{pgfplots} +\usepackage{txfonts} +\usepackage[all]{xy} +\usepackage{paralist} +\usepackage[colorlinks=true]{hyperref} +\usepackage{array} +\usepackage{tikz} +\usepackage{slashed} +\usepackage{pdfpages} +\usepackage{cite} +\usepackage{url} +\usepackage{amsmath,amsfonts,amssymb} +\usepackage{tikz} +\usetikzlibrary{arrows,matrix,positioning} +\usetikzlibrary{overlay-beamer-styles} +\usetikzlibrary{matrix.skeleton} +\usetikzlibrary{automata,positioning} +\usetikzlibrary{decorations.text} +\usepackage{listings} +\usepackage{multirow} +\usepackage{color} + +\begin{document} + +\begin{tikzpicture}[ampersand replacement=\&] + +\foreach \i in {1,...,4} +{ + \small{ + \matrix (X\i)[matrix of math nodes,nodes in empty cells, + nodes = {draw, minimum size=10mm, + anchor=center, + inner sep=0pt, outer sep=0pt}, + column sep=-\pgflinewidth, + row sep=-\pgflinewidth, + ] at (0,-\i*5) + { + A_{11}B_{11} \& A_{12}B_{11} \& A_{21}B_{11} \& A_{22}B_{11} \\ + A_{11}B_{21} \& A_{12}B_{21} \& A_{21}B_{21} \& A_{22}B_{21} \\ + A_{11}B_{11} \& A_{12}B_{12} \& A_{21}B_{12} \& A_{22}B_{12} \\ + A_{11}B_{22} \& A_{12}B_{22} \& A_{21}B_{22} \& A_{22}B_{22} \\ + };} + + \foreach \j in {1,...,7} + { + \matrix(M\i\j)[matrix of math nodes,nodes in empty cells, + nodes = {draw, minimum size=10mm, + anchor=center, + inner sep=0pt, outer sep=0pt}, + column sep=-\pgflinewidth, + row sep=-\pgflinewidth, + ] at (\j*5,-\i*5) + { + \& \& \& \\ + \& \& \& \\ + \& \& \& \\ + \& \& \& \\ + }; + } +} + +\huge{ + \node at (-3,-20) {$\mathbf{C}_{22}=$}; + \node at (-3,-15) {$\mathbf{C}_{21}=$} ; + \node at (-3,-10) {$\mathbf{C}_{12}=$} ; + \node at (-3,-5) {$\mathbf{C}_{11}=$} ; + + \node at (5,-2) {$\mathbf{P}$}; + \node at (10,-2) {$\mathbf{Q}$}; + \node at (15,-2) {$\mathbf{R}$}; + \node at (20,-2) {$\mathbf{S}$}; + \node at (25,-2) {$\mathbf{T}$}; + \node at (30,-2) {$\mathbf{U}$}; + \node at (35,-2) {$\mathbf{V}$}; +} + + +\node[opacity=0.5, rounded corners=0pt, inner sep=-1pt, fill=green, fit=(X1-1-1)] {}; +\node[opacity=0.5, rounded corners=0pt, inner sep=-1pt, fill=green, fit=(X1-2-2)] {}; +\node[opacity=0.5, rounded corners=0pt, inner sep=-1pt, fill=green, fit=(X2-3-1)] {}; +\node[opacity=0.5, rounded corners=0pt, inner sep=-1pt, fill=green, fit=(X2-4-2)] {}; +\node[opacity=0.5, rounded corners=0pt, inner sep=-1pt, fill=green, fit=(X3-1-3)] {}; +\node[opacity=0.5, rounded corners=0pt, inner sep=-1pt, fill=green, fit=(X3-2-4)] {}; +\node[opacity=0.5, rounded corners=0pt, inner sep=-1pt, fill=green, fit=(X4-3-3)] {}; +\node[opacity=0.5, rounded corners=0pt, inner sep=-1pt, fill=green, fit=(X4-4-4)] {}; + +% P +\node[opacity=0.5, rounded corners=0pt, inner sep=-1pt, fill=green, fit=(M11-4-1)] {}; +\node[opacity=0.5, rounded corners=0pt, inner sep=-1pt, fill=green, fit=(M11-1-4)] {}; +\node[opacity=0.5, rounded corners=0pt, inner sep=-1pt, fill=green, fit=(M11-4-4)] {}; +\node[opacity=0.5, rounded corners=0pt, inner sep=-1pt, fill=green, fit=(M11-1-1)] {}; + +\node[opacity=0.5, rounded corners=0pt, inner sep=-1pt, fill=gray, fit=(M21-4-1)] {}; +\node[opacity=0.5, rounded corners=0pt, inner sep=-1pt, fill=gray, fit=(M21-1-4)] {}; +\node[opacity=0.5, rounded corners=0pt, inner sep=-1pt, fill=gray, fit=(M21-4-4)] {}; +\node[opacity=0.5, rounded corners=0pt, inner sep=-1pt, fill=gray, fit=(M21-1-1)] {}; + +\node[opacity=0.5, rounded corners=0pt, inner sep=-1pt, fill=gray, fit=(M31-4-1)] {}; +\node[opacity=0.5, rounded corners=0pt, inner sep=-1pt, fill=gray, fit=(M31-1-4)] {}; +\node[opacity=0.5, rounded corners=0pt, inner sep=-1pt, fill=gray, fit=(M31-4-4)] {}; +\node[opacity=0.5, rounded corners=0pt, inner sep=-1pt, fill=gray, fit=(M31-1-1)] {}; + +\node[opacity=0.5, rounded corners=0pt, inner sep=-1pt, fill=green, fit=(M41-4-1)] {}; +\node[opacity=0.5, rounded corners=0pt, inner sep=-1pt, fill=green, fit=(M41-1-4)] {}; +\node[opacity=0.5, rounded corners=0pt, inner sep=-1pt, fill=green, fit=(M41-4-4)] {}; +\node[opacity=0.5, rounded corners=0pt, inner sep=-1pt, fill=green, fit=(M41-1-1)] {}; + +% Q +\node[opacity=0.5, rounded corners=0pt, inner sep=-1pt, fill=gray, fit=(M12-1-4)] {}; +\node[opacity=0.5, rounded corners=0pt, inner sep=-1pt, fill=gray, fit=(M12-1-3)] {}; + +\node[opacity=0.5, rounded corners=0pt, inner sep=-1pt, fill=gray, fit=(M22-1-4)] {}; +\node[opacity=0.5, rounded corners=0pt, inner sep=-1pt, fill=gray, fit=(M22-1-3)] {}; + +\node[opacity=0.5, rounded corners=0pt, inner sep=-1pt, fill=green, fit=(M32-1-4)] {}; +\node[opacity=0.5, rounded corners=0pt, inner sep=-1pt, fill=green, fit=(M32-1-3)] {}; + +\node[opacity=0.5, rounded corners=0pt, inner sep=-1pt, fill=red, fit=(M42-1-4)] {}; +\node[opacity=0.5, rounded corners=0pt, inner sep=-1pt, fill=red, fit=(M42-1-3)] {}; + +% R + +\node[opacity=0.5, rounded corners=0pt, inner sep=-1pt, fill=gray, fit=(M13-3-1)] {}; +\node[opacity=0.5, rounded corners=0pt, inner sep=-1pt, fill=gray, fit=(M13-4-1)] {}; + +\node[opacity=0.5, rounded corners=0pt, inner sep=-1pt, fill=green, fit=(M23-3-1)] {}; +\node[opacity=0.5, rounded corners=0pt, inner sep=-1pt, fill=red, fit=(M23-4-1)] {}; + +\node[opacity=0.5, rounded corners=0pt, inner sep=-1pt, fill=gray, fit=(M33-3-1)] {}; +\node[opacity=0.5, rounded corners=0pt, inner sep=-1pt, fill=gray, fit=(M33-4-1)] {}; + +\node[opacity=0.5, rounded corners=0pt, inner sep=-1pt, fill=green, fit=(M43-3-1)] {}; +\node[opacity=0.5, rounded corners=0pt, inner sep=-1pt, fill=red, fit=(M43-4-1)] {}; + +% S + +\node[opacity=0.5, rounded corners=0pt, inner sep=-1pt, fill=red, fit=(M14-1-4)] {}; +\node[opacity=0.5, rounded corners=0pt, inner sep=-1pt, fill=green, fit=(M14-2-4)] {}; + + +\node[opacity=0.5, rounded corners=0pt, inner sep=-1pt, fill=gray, fit=(M24-1-4)] {}; +\node[opacity=0.5, rounded corners=0pt, inner sep=-1pt, fill=gray, fit=(M24-2-4)] {}; + +\node[opacity=0.5, rounded corners=0pt, inner sep=-1pt, fill=red, fit=(M34-1-4)] {}; +\node[opacity=0.5, rounded corners=0pt, inner sep=-1pt, fill=green, fit=(M34-2-4)] {}; + +\node[opacity=0.5, rounded corners=0pt, inner sep=-1pt, fill=gray, fit=(M44-1-4)] {}; +\node[opacity=0.5, rounded corners=0pt, inner sep=-1pt, fill=gray, fit=(M44-2-4)] {}; + +%T + +\node[opacity=0.5, rounded corners=0pt, inner sep=-1pt, fill=red, fit=(M15-4-1)] {}; +\node[opacity=0.5, rounded corners=0pt, inner sep=-1pt, fill=red, fit=(M15-4-2)] {}; + +\node[opacity=0.5, rounded corners=0pt, inner sep=-1pt, fill=green, fit=(M25-4-1)] {}; +\node[opacity=0.5, rounded corners=0pt, inner sep=-1pt, fill=green, fit=(M25-4-2)] {}; + +\node[opacity=0.5, rounded corners=0pt, inner sep=-1pt, fill=gray, fit=(M35-4-1)] {}; +\node[opacity=0.5, rounded corners=0pt, inner sep=-1pt, fill=gray, fit=(M35-4-2)] {}; + +\node[opacity=0.5, rounded corners=0pt, inner sep=-1pt, fill=gray, fit=(M45-4-1)] {}; +\node[opacity=0.5, rounded corners=0pt, inner sep=-1pt, fill=gray, fit=(M45-4-2)] {}; + +% U + +\node[opacity=0.5, rounded corners=0pt, inner sep=-1pt, fill=gray, fit=(M16-1-3)] {}; +\node[opacity=0.5, rounded corners=0pt, inner sep=-1pt, fill=gray, fit=(M16-1-1)] {}; +\node[opacity=0.5, rounded corners=0pt, inner sep=-1pt, fill=gray, fit=(M16-3-3)] {}; +\node[opacity=0.5, rounded corners=0pt, inner sep=-1pt, fill=gray, fit=(M16-3-1)] {}; + +\node[opacity=0.5, rounded corners=0pt, inner sep=-1pt, fill=gray, fit=(M26-1-3)] {}; +\node[opacity=0.5, rounded corners=0pt, inner sep=-1pt, fill=gray, fit=(M26-1-1)] {}; +\node[opacity=0.5, rounded corners=0pt, inner sep=-1pt, fill=gray, fit=(M26-3-3)] {}; +\node[opacity=0.5, rounded corners=0pt, inner sep=-1pt, fill=gray, fit=(M26-3-1)] {}; + +\node[opacity=0.5, rounded corners=0pt, inner sep=-1pt, fill=gray, fit=(M36-1-3)] {}; +\node[opacity=0.5, rounded corners=0pt, inner sep=-1pt, fill=gray, fit=(M36-1-1)] {}; +\node[opacity=0.5, rounded corners=0pt, inner sep=-1pt, fill=gray, fit=(M36-3-3)] {}; +\node[opacity=0.5, rounded corners=0pt, inner sep=-1pt, fill=gray, fit=(M36-3-1)] {}; + +\node[opacity=0.5, rounded corners=0pt, inner sep=-1pt, fill=green, fit=(M46-1-3)] {}; +\node[opacity=0.5, rounded corners=0pt, inner sep=-1pt, fill=red, fit=(M46-1-1)] {}; +\node[opacity=0.5, rounded corners=0pt, inner sep=-1pt, fill=green, fit=(M46-3-3)] {}; +\node[opacity=0.5, rounded corners=0pt, inner sep=-1pt, fill=red, fit=(M46-3-1)] {}; + +%V + +\node[opacity=0.5, rounded corners=0pt, inner sep=-1pt, fill=red, fit=(M17-2-4)] {}; +\node[opacity=0.5, rounded corners=0pt, inner sep=-1pt, fill=red, fit=(M17-4-4)] {}; +\node[opacity=0.5, rounded corners=0pt, inner sep=-1pt, fill=green, fit=(M17-2-2)] {}; +\node[opacity=0.5, rounded corners=0pt, inner sep=-1pt, fill=green, fit=(M17-4-2)] {}; + + +\node[opacity=0.5, rounded corners=0pt, inner sep=-1pt, fill=gray, fit=(M27-2-4)] {}; +\node[opacity=0.5, rounded corners=0pt, inner sep=-1pt, fill=gray, fit=(M27-4-4)] {}; +\node[opacity=0.5, rounded corners=0pt, inner sep=-1pt, fill=gray, fit=(M27-2-2)] {}; +\node[opacity=0.5, rounded corners=0pt, inner sep=-1pt, fill=gray, fit=(M27-4-2)] {}; + +\node[opacity=0.5, rounded corners=0pt, inner sep=-1pt, fill=gray, fit=(M37-2-4)] {}; +\node[opacity=0.5, rounded corners=0pt, inner sep=-1pt, fill=gray, fit=(M37-4-4)] {}; +\node[opacity=0.5, rounded corners=0pt, inner sep=-1pt, fill=gray, fit=(M37-2-2)] {}; +\node[opacity=0.5, rounded corners=0pt, inner sep=-1pt, fill=gray, fit=(M37-4-2)] {}; + +\node[opacity=0.5, rounded corners=0pt, inner sep=-1pt, fill=gray, fit=(M47-2-4)] {}; +\node[opacity=0.5, rounded corners=0pt, inner sep=-1pt, fill=gray, fit=(M47-4-4)] {}; +\node[opacity=0.5, rounded corners=0pt, inner sep=-1pt, fill=gray, fit=(M47-2-2)] {}; +\node[opacity=0.5, rounded corners=0pt, inner sep=-1pt, fill=gray, fit=(M47-4-2)] {}; + + + + + +\end{tikzpicture} + +\end{document} |