\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 Christoph Doell \hfill from 2018.05.15

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

\vskip3ex
\centerline{\bf Exercise Sheet 3}

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

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

\hangafter-8\hangindent-60mm\noindent
\hbox to0pt{\vbox to1.5ex{\noindent\hbox to\textwidth{\hss
\includegraphics{nnex-01}}\vss}\hss}\noindent
Determine the parameters $w_{ji}$ and $\theta_j$ of the neural network
of threshold logic units that is shown in the sketch on the right
in such a way that it computes the Exclusive Or of the Boolean
variables $x_1$ and $x_2$ (that is, $y = x_1 ~\dot{\vee}~ x_2$ or
$y = x_1 \oplus x_2$)! \\[1ex]
(Hint: Start from a geometric interpretation of the computation in
the input space of the neuron on the right and consider how you may
use the output of the left neuron to arrange the points~$(x_1,x_2)$,
for which 1 or 0 should be produced, in such a way that they become
separable by a plane.)

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

\subsubsection*{Exercise 12 \quad\rm Threshold Logic Units:
                Representation of Boolean Functions}

In the lecture we studied an algorithm with which, given an arbitrary
Boolean function $y = f(x_1,\ldots,x_n)$, a network of threshold logic
units could be constructed that computed this function. This algorithm
was based on representing the Boolean function in disjunctive normal
form. Describe a dual algorithm that relies on representing the Boolean
function in {\em conjunctive\/} normal form!

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

\subsubsection*{Exercise 13 \quad\rm
                Training Threshold Logic Units}

Show how a theshold logic unit is trained (with the delta rule)
to compute the Boolean function $x_1 \to x_2$!
(Preferably with the help of a table that has columns for the values
of $x_1$, $x_2$, $o = x_1 \to x_2$, $\vec{x}\cdot\vec{w}$, $y$, $e$,
$\Delta\theta$, $\Delta w_1$, $\Delta w_2$, $\theta$, $w_1$ and
$w_2$.) Start from the initial state $\vec{w} = (0,0,0)$ of the
(extended) weight vector and use~1 as the learning rate. Interpret
the learning result geometrically!

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

\subsubsection*{Exercise 14 \quad\rm Update Order}

Consider the following network of threshold logic units:
\begin{center}
\iftrue
\includegraphics{nnex-02}
\else
\unitlength1.2mm
\begin{picture}(54,28)
%\multiput(0,0)(54,0){2}{\line(0,1){28}}
%\multiput(0,0)(0,28){2}{\line(1,0){54}}
\put( 3,22){\makebox(0,0){$x_1$}\arwto{e}}
\put( 3, 6){\makebox(0,0){$x_2$}\arwto{e}}
\put(19,22){\neuron{1}\arwto{s}\bowto{ne}}
\put(19, 6){\neuron{1}\bowto{ne}}
\put(35,22){\neuron{1}\bowto{sw}\arwto{e}}
\put(35, 6){\neuron{1}\bowto{sw}\arwto{e}\arwto{nw}}
\put(51,22){\makebox(0,0){$y_1$}}
\put(51, 6){\makebox(0,0){$y_2$}}
\put(27,25.5){\makebox(0,0)[b]{\footnotesize 1}}
\put(30,19.5){\makebox(0,0)[t]{\footnotesize $-1$}}
\put(18,14){\makebox(0,0)[r]{\footnotesize 1}}
\put(24, 9){\makebox(0,0)[b]{\footnotesize 1}}
\put(27, 2.5){\makebox(0,0)[t]{\footnotesize $-1$}}
\put(30,14){\makebox(0,0)[t]{\footnotesize 1}}
\put(19,26){\makebox(0,0)[b]{$u_1$}}
\put(19, 2){\makebox(0,0)[t]{$u_2$}}
\put(35,26){\makebox(0,0)[b]{$u_3$}}
\put(35, 2){\makebox(0,0)[t]{$u_4$}}
\end{picture}
\fi
\end{center}
Show that it depends on the update order of the threshold logic units
whether the network reaches a stable state if the the inputs
$x_1 = 0$ and $x_2 = 1$ are presented!

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

\end{document}
