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

\def\net{\mathop{\rm net}\nolimits}
\def\act{\mathop{\rm act}\nolimits}

\begin{document}

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

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

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

\vskip3ex
\centerline{\bf Exercise Sheet 11}

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

\subsubsection*{Exercise 43 \quad\rm Hopfield Networks: State Graph}

\hangindent-36mm\hangafter-6\noindent
\hbox to0pt{\vbox to1.5ex{\noindent\hbox to\textwidth{\hss
\includegraphics{nnex-11}}\vss}\hss}%
The diagram on the right shows a simple Hopfield network. For this
network, determine the final state(s) that are reached starting from
the initial state $(\act_{u_1}, \act_{u_2}, \act_{u_3}) = (-1,-1,-1)$! \\
(Hint: Use a state transition graph. In this graph, mark the initial
state and the final state(s). Notice that there is no explicit start
neuron and that therefore you have to consider all possible subsequent
states.)

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

\subsubsection*{Exercise 44 \quad\rm Hopfield-Netze: Energy Function}

Determine the energy function of the Hopfield network of Exercise~43!
With the help of this energy function, compute the energies of the
individual states of the network. Then arrange the states according
to their energy, that is, draw a new state transition graph, in which
the location of the states indicates their energy!

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

\subsubsection*{Exercise 45 \quad\rm Hopfield Networks:
                Pattern Recognition}

We want to store the two patterns $(-1, +1, -1, +1)$ and
$(+1, -1, -1, +1)$ in a Hopfield network with four neurons, that is,
these two patterns are supposed to be the stable states of the network,
which cannot be left, regardless of which neuron is updated.
\begin{enumerate}\itemsep0pt
\item[a)] Compute the connection weights and the threshold values
     of the neurons of a Hopfield network that stores the abovementioned
     patterns!
\item[b)] How many other patterns can be stored in this network?
\item[c)] Find two more patterns that could be stored in the network
     constructed in part~a) without ``forgetting'' the old patterns!
     (Of course, in order to actually store these patterns, the
     connection weights may have to be modified.)
     Can these two patterns be stored at the same time?
\end{enumerate}

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

\subsubsection*{Exercise 46 \quad\rm Hopfield Networks:
                                     Solving Optimization Problems}

We are given a sequence $F = (a_1, a_2, \ldots, a_n)$ of integer
numbers. For simplicity, we assume that at least one of these numbers
is non-negative. We desire to know the maximum partial sum of this
sequence, that is, the maximum of sums of partial sequences of the
sequence~$F$, where by a partial sequence of the sequence~$F$ we
mean a sequence $F_{ij} = (a_i, a_{i+1}, \ldots, a_j)$ with
$1 \le i \le j \le n$. That is, we desire to know
\[ \mbox{\rm mts}(F) = \max_{1 \le i \le j \le n} \sum_{k=i}^j a_k. \]
Construct a Hopfield network to solve this optimization problem! \\
(Hint: You have to find a suitable energy function.)

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

\end{document}
