Newer
Older
KNWS1516 / ex08 / kn08.tex
@Jan-Peter Hohloch Jan-Peter Hohloch on 6 Dec 2015 5 KB ex 8.2.1 and 8.2.2
\documentclass[a4paper,12pt]{scrartcl}
\usepackage[ngerman]{babel}
\usepackage{graphicx} %BIlder einbinden
\usepackage{amsmath} %erweiterte Mathe-Zeichen
\usepackage{amsfonts} %weitere fonts
\usepackage[utf8]{inputenc} %Umlaute & Co
\usepackage{hyperref} %Links
\usepackage{ifthen} %ifthenelse
\usepackage{enumerate}
\usepackage{stmaryrd}

\usepackage{color}
\usepackage{algpseudocode} %Pseudocode
\usepackage{dsfont} % schöne Zahlenräumezeichen
\usepackage{amssymb, amsthm} %noch stärker erweiterte Mathe-Zeichen
\usepackage{tikz} %TikZ ist kein Zeichenprogramm
\usetikzlibrary{trees,automata,arrows,shapes}
\usepackage{pgfplots}

\pagestyle{empty}


\topmargin-50pt


\newcounter{aufgabe}
\def\tand{&}

\newcommand{\makeTableLine}[2][0]{%
  \setcounter{aufgabe}{1}%
  \whiledo{\value{aufgabe} < #1}%
  {%
    #2\tand\stepcounter{aufgabe}%
  }
}

\newcommand{\aufgTable}[1]{
  \def\spalten{\numexpr #1 + 1 \relax}
  \begin{tabular}{|*{\spalten}{p{1cm}|}}
    \makeTableLine[\spalten]{E\theaufgabe}$\Sigma$~~\\ \hline
    \rule{0pt}{15pt}\makeTableLine[\spalten]{}\\
  \end{tabular}
}

\def\header#1#2#3#4#5#6#7{\pagestyle{empty}
\begin{minipage}[t]{0.47\textwidth}
\begin{flushleft}
{\bf #4}\\
#5
\end{flushleft}
\end{minipage}
\begin{minipage}[t]{0.5\textwidth}
\begin{flushright}
#6 \vspace{0.5cm}\\
%                 Number of Columns    Definition of Columns      second empty line
% \begin{tabular}{|*{5}{C{1cm}|}}\hline A1&A2&A3&A4&$\Sigma$\\\hline&&&&\\\hline\end{tabular}\\\vspace*{0.1cm}
\aufgTable{#7}
\end{flushright}
\end{minipage}
\vspace{1cm}
\begin{center}
{\Large\bf Sheet #1}

{(Hand in #3)}
\end{center}
}



%counts the exercisenumber
\newcounter{n}

%Kommando für Aufgaben
%\Aufgabe{AufgTitel}{Punktezahl}
\newcommand{\Aufgabe}[2]{\stepcounter{n}
    \textbf{Exercise \arabic{n}: #1} (#2 Points)}

\newcommand{\textcorr}[1]{\textcolor{red}{#1}}
\newenvironment{corr}{\color{red}}{\color{black}\newline}
\newcommand{\ok}{\begin{corr}
            $\checkmark$
        \end{corr}}

\newcommand{\enot}[2]{#1 \cdot 10^{#2}}

\begin{document}
%\header{BlattNr}{Tutor}{Abgabedatum}{Vorlesungsname}{Namen}{Semester}{Anzahl Aufgaben}
\header{8}{}{2015-12-06}{Kommunikationsnetze}{\textit{Jonas Jaszkowic, 3592719}\\\textit{Jan-Peter Hohloch, 3908712}}{WS 15/16}{4}
\vspace{1cm}
\Aufgabe{ALOHA, CSMA and CSMA/CD}{5+5+5+5}
\begin{enumerate}
	\item ALOHA with timeout $2 \cdot t_0$
	\item nonpersistent CSMA with timeout $2 \cdot t_0$
	\item nonpersistent CSMA/CD with minimum waiting time $t_0$
	\item $0.5$-persistent CSMA/CD with slot length $2 \cdot t_0$
\end{enumerate}
\Aufgabe{Code Division Multiple Access(CDMA)}{10+10+10}
\begin{enumerate}
	\item Generate Walsh-Tables for $n=8$:\\
        \begin{math}
            W_1=\begin{pmatrix}
                -1
            \end{pmatrix},\ W_2=\begin{pmatrix}
                -1 & -1\\
                -1 & 1
            \end{pmatrix},\ W_4=\begin{pmatrix}
                -1 & -1 & -1 & -1\\
                -1 & 1 & -1 & 1\\
                -1 & -1 & 1 & 1\\
                -1 & 1 & 1 & -1\\
            \end{pmatrix}\\
            W_8=\begin{pmatrix}
                -1 & -1 & -1 & -1&-1 & -1 & -1 & -1\\
                -1 & 1 & -1 & 1&-1 & 1 & -1 & 1\\
                -1 & -1 & 1 & 1&-1 & -1 & 1 & 1\\
                -1 & 1 & 1 & -1&-1 & 1 & 1 & -1\\
                -1 & -1 & -1 &-1&1 & 1 & 1 & 1\\
                -1 & 1 & -1 & 1&1 & -1 & 1 & -1\\
                -1 & -1 & 1 & 1&1 & 1 & -1 & -1\\
                -1 & 1 & 1 & -1&1 & -1 & -1 & 1\\
            \end{pmatrix}=\begin{pmatrix}
                c_0&c_1&c_2&c_3&c_4&c_5&c_6&c_7
            \end{pmatrix}
        \end{math}
	\item $c_2$ is orthogonal to all other chips:\\
        \begin{math}
            c_0\cdot c_2=\begin{pmatrix}
                -1\\-1\\-1\\-1\\-1\\-1\\-1\\-1
            \end{pmatrix}\cdot\begin{pmatrix}
                -1\\-1\\1\\1\\-1\\-1\\1\\1
            \end{pmatrix}=1+1-1-1+1+1-1-1=0\\
            c_1\cdot c_2=\begin{pmatrix}
                -1\\1\\-1\\1\\-1\\1\\-1\\1
            \end{pmatrix}\cdot \begin{pmatrix}
                -1\\-1\\1\\1\\-1\\-1\\1\\1
            \end{pmatrix}=1-1-1+1+1-1-1+1=0\\
            c_3\cdot c_2=\begin{pmatrix}
                -1\\1\\1\\-1\\-1\\1\\1\\-1
            \end{pmatrix}\cdot \begin{pmatrix}
                -1\\-1\\1\\1\\-1\\-1\\1\\1
            \end{pmatrix}=1-1+1-1+1-1+1-1=0\\
            c_4\cdot c_2=\begin{pmatrix}
                -1\\-1\\-1\\-1\\1\\1\\1\\1
            \end{pmatrix}\cdot\begin{pmatrix}
                -1\\-1\\1\\1\\-1\\-1\\1\\1
            \end{pmatrix}=1+1-1-1-1-1+1+1=0\\
            c_5\cdot c_2=\begin{pmatrix}
                -1\\1\\-1\\1\\1\\-1\\1\\-1
            \end{pmatrix}\cdot \begin{pmatrix}
                -1\\-1\\1\\1\\-1\\-1\\1\\1
            \end{pmatrix}=1-1-1+1-1+1+1-1=0\\
            c_6\cdot c_2=\begin{pmatrix}
                -1\\-1\\1\\1\\1\\1\\-1\\-1
            \end{pmatrix}\cdot\begin{pmatrix}
                -1\\-1\\1\\1\\-1\\-1\\1\\1
            \end{pmatrix}=1+1+1+1-1-1-1-1=0\\
            c_7\cdot c_2=\begin{pmatrix}
                -1\\1\\1\\-1\\1\\-1\\-1\\1
            \end{pmatrix}\cdot\begin{pmatrix}
                -1\\-1\\1\\1\\-1\\-1\\1\\1
            \end{pmatrix}=1-1+1-1-1+1-1+1=0\\
            \Rightarrow c_2
        \end{math} is orthogonal to all other chips.
	\item
\end{enumerate}
\Aufgabe{Token Ring}{10+10}
\begin{enumerate}
	\item
	\item
\end{enumerate}
\Aufgabe{Ethernet}{5+5+5+5+5+5}
\begin{enumerate}
	\item
	\item
	\item
	\item
	\item
	\item
\end{enumerate}
\end{document}