\documentclass[12pt,a4paper]{article}
\usepackage{graphicx}
\graphicspath{{eps/}{pdf/}}
\pagestyle{empty}
\oddsidemargin 2.1mm
\textwidth     155mm
\topmargin     -15mm
\textheight    240mm

\def\IR{\mbox{I\kern-0.2em R}}
\def\IQ{\mbox{$\;$\raise0.1ex\hbox{\rule{0.5pt}{1.4ex}}\kern-0.26em Q}}

\begin{document}

%-----------------------------------------------------------------------

\noindent
{\bf Artificial Neural Networks and Deep Learning}
\hfill Summer 2018 \\
Christian Borgelt and Christop Doell\hfill from 2018.05.03

%-----------------------------------------------------------------------

\vskip3ex
\centerline{\bf Exercise Sheet 2}

%-----------------------------------------------------------------------

\subsubsection*{Exercise 7 \quad\rm Threshold Logic Units}

Determine the parameters of {\em single\/} threshold logic units
in such a way that these units compute the following Boolean
functions: \\[1ex]
\begin{tabular}{ll}
a) & $y = \phantom{\neg}x_1 \vee x_2$ \\
b) & $y = \neg x_1 \wedge x_2$
\end{tabular} \\[1ex]
(Hint: A threshold logic unit computes on which side of a
(hyper-)plane a given input vector lies. Start from a geometric
representation.)

%-----------------------------------------------------------------------

\subsubsection*{Exercise 8 \quad\rm Threshold Logic Units}

Determine the parameters of {\em single\/} threshold logic units
in such a way that they compute the following Boolean functions: \\[1ex]
\begin{tabular}{lll}
a) & $y = x_1 \wedge \neg x_2 \wedge x_3$
   & (or short: $x_1\overline{x_2}x_3$) \\
b) & $y = (x_1 \wedge \neg x_2) \vee (x_1 \wedge x_3)$
   & (or short: $x_1\overline{x_2} \vee x_1x_3$) \\
c) & $y = (x_1 \wedge x_2) \vee (\neg x_2 \wedge x_3)$
   & (or short: $x_1x_2 \vee \overline{x_2}x_3$) \\
d) & $y = (x_1 \wedge x_2) \vee \neg x_3$
   & (or short: $x_1x_2 \vee \overline{x_3}$)
\end{tabular} \\[1ex]
(Hint: A threshold logic unit computes on which side of a
(hyper-)plane a given input vector lies. Start from a geometric
representation.)

%-----------------------------------------------------------------------

\subsubsection*{Exercise 9 \quad\rm Threshold Logic Units}

Try to find parameters of a threshold logic unit in such a way that
it computes the Exclusive Or (written $x_1 \dot{\vee} x_2$ or
$x_1 \oplus x_2$)! What problem does one run into?
How can one solve this problem?
(Hint: Recall the solution of the biimplication problem that was studied
in the lecture.)

%-----------------------------------------------------------------------

\subsubsection*{Exercise 10 \quad\rm Networks of Threshold Logic Units}

\parbox{110mm}{Construct a neural network of threshold logic units
that produces the output~1 for points~$(x_1,x_2)$ inside of the triangle
shown in the sketch and the output~0 for points outside! \\[1ex]
(Hint: Recall the neural network for the biimplication problem that
was studied in the lecture and interpret the computations of the
threshold logic units in the first layer as a coordinate
transformation.)}\hfill
\parbox{38mm}{\includegraphics{nnex-00}}

%-----------------------------------------------------------------------

\end{document}
