\documentstyle[eclepsf]{article}
\textheight 250mm
\topmargin -10mm
\textwidth 180mm
\oddsidemargin -7mm

\pagestyle{myheadings}
\markright{(Practice --- Evolutionary Computations)}
\thispagestyle{empty}

\title{{\large (Brest State Technical University 2006 Fall Semester: Course Practice)}\\
Contemporary Intelligent Information Technology}
\author{Akira Imada\\
(e-mail akira@bstu.by)\\
\hspace{1in}\\
This document is still under construction and was lastly modified on}

\begin{document}
\maketitle

\clearpage
\section{The Simplest Test Function --- Sphere Model}
\noindent
The first task of this practice is to obtain the minimul value of a multi-dimensional function.\\

\noindent
To be more specific, we now assume that 
we have the following function defined in a 20-dimensional space:
\begin{large}
\begin{equation}
y = x_1^2 + x_2^2 + x_3^2 + \cdots + x_{20}^2.
\end{equation}
\end{large}
Then obtain which point of $(x_1, x_2, x_3, \cdots, x_{20})$ gives a minimum value of $y$
and how much is the value of minimum $y$.\\

\noindent
Try the following algorithm.

\newtheorem{algorithm}{Algorithm}
\begin{algorithm}[The simplest example]\hspace{1in}\\
\begin{itemize}
\item[1.] Create 100 chromosomes at random.
   \begin{itemize}
   \item[$cdot$] The number of gene is 20. Thus our chromosomes here have the form 
                 $(x_1, x_2, x_3, \cdots, x_{20})$.
   \item[$cdot$] Assume here each of $x_i$ takes the continuous value from $-1$ to 1, that is
                 $-1<x_i<1$.
   \end{itemize}
\item[2.] Calculate {\it fitness} value by $y = x_1^2 + x_2^2 + x_3^2 + \cdots + x_{20}^2.$
          Note that the smalle the better.
\item[3.] Select 2 chromosomes at random from the better half of the population of 100 chromosomes.
\item[4.] Create a child chromosome by a {\it crossover}.
\item[5.] Give the child a {\it mutation} 
\item[6.] Repeat from 2. to 5. above 100 times and create the next {\it generation}.
\item[7.] Repeat 6. until the fitness value reaches 0.
\end{itemize}
\end{algorithm}


\noindent
The the question is as follows.

\newtheorem{excersize}{Excersize}
\begin{excersize}[Obtaining the global minimum]\hspace{1in}\\
(1) Plot the average fitness value of all the 100 chromosomes versus generation.
(2) Also plot the minimum fitness value of each generation.
\end{excersize}


\clearpage
\section{A little more tricky function} 
Let's try a little more tricky function. for example, the one called Rastrigin's Function.


\begin{Large}
\begin{displaymath}
y = nA + \sum_{i=1}^n {(x_i^2 - A \cos(2\pi x_i))},  \hspace{.2in}
x_i \in [-5.12-5.12].
\end{displaymath}
\end{Large}


Dimensionality $n$ is arbitorary, but to see how its graph look like, see the Figure when
$n=1$.

         
\begin{figure}[h]
\begin{center}
\epsfile{file=rastrigin.eps,width=16cm,height=4cm}
\caption{A 2-D version of Rastrigin function}
\end{center}         
\end{figure}


\clearpage
\section{2-D Functioon}

\begin{large}
\begin{displaymath}
y = x^4 - 5x^3 - 6x^2 + 8x + 15
\end{displaymath}
\end{large}

when difined on $ x \in [-2,5]$


\begin{figure}[hbtp]
 \begin{center}
\epsfile{file=f-4th-order.eps,width=16cm,height=6cm}
   \caption{Yet another test function: $y = x^4 - 5x^3 - 6x^2 + 8x + 15$ with $x \in [-2,5]$. Try to make evolutionary algorithm search for minimum $y$.} 
 \end{center}
\end{figure}


\clearpage
\section{Neural Networks for XOR}
Assuming McCulloch-Pitts neurons which take the state 1 or 0,
the output $Y$ of the neuron which receives weighted-sum of the signals $X_i$ from other $N$ neurons is usually specified as:
\begin{large}
\begin{displaymath}
Y = \mbox{sgn} (\sum_{i=1}^N w_{i}X_i - \theta),
\end{displaymath}
where $\mbox{sgn}(x) = 1$ if $x \ge 0$ and 0 otherwise, and $w_{i}$ and $\theta$ are called {\it weight} and {\it threshold}, respectively. Here, we assume neurons take binary state but -1 or 1, instead of 0 or 1. Hence the equation is modified as
\end{large}

\begin{large}
\begin{displaymath}
Y = 2 \cdot \mbox{sgn} (\sum_{i=1}^N w_{i}X_i - \theta) -1.
\end{displaymath}
\end{large}

\begin{figure}[hbtp]
 \begin{center}
\epsfile{file=xor.eps,width=12cm,height=4cm}
 \end{center}
\end{figure}


\clearpage
\section{Neural Network for Even-n-Parity}
Even-$n$-Parity is a boolean function to check whether number of 1 of $n$-bit binary is even or not. \\


\noindent
We now assume $n=4$ for the sake of simplisity.
Again our binary made up of  $-1$ and 1 instead of 0 and 1 for a convenience.
Hence, as in previous section, transfer function is
\begin{large}
\begin{displaymath}
y_i = 2 \cdot \mbox{sgn} (\sum_{j=1}^N w_{ij}x_j - \theta_j) -1,
\end{displaymath}
\end{large}
where $y_i$ is output of neuron-$i$, $w_{ij}$ is weight of the synapse from 
neuron-$j$ to neuron-$i$, $x_j$ is state of neuron-$j$, $\theta$ is threashold of 
neuron-$j$, and $N$ is the number of neurons connected to neuron-$i$. We assmue here
$\theta_j = 0.5$ for all $j$. 



\begin{table}[h]
\begin{center}
\begin{tabular}{c c c c c}
\hline \hline
$x_1$  &  $x_2$  &  $x_3$  &  $x_4$  &  y  \\ \hline
$-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$   & $+1$\\
$+1$   &  $+1$   &  $-1$   &  $+1$   & $-1$\\
$+1$   &  $+1$   &  $+1$   &  $-1$   & $-1$\\
$+1$   &  $+1$   &  $+1$   &  $+1$   & $+1$\\ \hline \hline
\end{tabular} 
\end{center}
\end{table}

\noindent
We now exploit a feedfoward Neural Network with 4 input neurons, 4 hidden neurons, and one output neurons.
So, we have 20 synapsis and as such our chromosome has 20 genes. Create 100 chromosomes with random
weight from $-1$ to 1. 
Fitness evaluation is by counting the correct answer after giving all the possible 16 cases of 4 inputs, one by one.
Then evolve the population.



\begin{excersize}[Neural Network for Even-4-Parity]\hspace{1in}\\
(1) Plot the average fitness in the population as a function of generation.
(2) Plot the maximum fitness in the population as a function of generation.
(3) Demonstrate the finally obtained neural network by giving 4 inputs from keybord.
\end{excersize}


\clearpage
\section{Navigoation in gridworld}

\begin{figure}[hbtp] \label{fig:tsp}
 \begin{center}
\epsfile{file=grid-world.eps,width=6cm,height=6cm}
 \end{center}
\caption{An example of 4 cities and a possible tour therein.}
\end{figure}



\begin{figure}[hbtp] \label{fig:tsp}
 \begin{center}
\epsfile{file=grid-world-obstacle.eps,width=6cm,height=6cm}
 \end{center}
\caption{An example of 4 cities and a possible tour therein.}
\end{figure}



\clearpage
\section{Traveling Salesperson Promblem (TSP)}
Assuming $N$ cities all of whose cordinate are given, Traveling Salse-person Problem (TSP) is a problem in which a sales-person should visit all of these cities once but only once with its goal being to look for the shortest tour.\\


\noindent
We not take a look at 4 cities as a simplest example. Assume, for example, the cities location are given as follows. 

\begin{table}[h]
\begin{center}
%% \caption{The location of 4 cities by $(x,y)$ coordinate as an example.}
%% \bigskip
\begin{tabular}{c c}  
\hspace*{.1pt} & $(x,y)$         
\vspace{.05in}                    \\ 
A              &  $(0.83, 7.79)$  \\
B              &  $(3.28, 8.32)$  \\
C              &  $(1.52, 4.48)$  \\
D              &  $(7.65, 3.46)$  \\
\end{tabular} 
\end{center}
\end{table}

\noindent
Then the Eucledean distances between all possible pair of cities are calculated using a formula
\begin{equation}
r_{ij} = \sqrt{(x_i - x_j)^2 + (y_i - y_j)^2}
\end{equation}
where $r_{ij}$ is the distance between city $i$ and city $j$ and $(x_i, y_i)$ and $(x_j, y_j)$ are coordinate of city $i$ and city $j$, respectively.

\begin{table}[h]
\begin{center}
%% \caption{Distance from one city to another for an above example.}
%% \bigskip
\begin{tabular}{c c c c c}
\hspace*{.1pt} &   A   &   B   &   C   &   D   \vspace{.05in} \\ 
A              & 0.000 & 2.505 & 3.382 & 8.074 \\
B              & 2.505 & 0.000 & 4.232 & 6.539 \\
C              & 3.382 & 4.232 & 0.000 & 6.214 \\
D              & 8.074 & 6.539 & 6.214 & 0.000 \\
\end{tabular} 
\end{center}
\end{table}


All possible routes in this 4 cities case are
\begin{center}
(A-B-C-D-A), (A-B-D-C-A), (A-C-B-D-A), (A-C-D-B-A), (A-D-B-C-A), and (A-D-C-B-A).
\end{center}

\noindent
Notice that a pair of tours is identical like (A-B-C-D-A) and (A-D-C-B-A)
That is, we have $3!/2 = 3$ routes in total in this example. 
Let's see now one root A-C-B-D-A out of them, 
in the map shown in Figure \ref{fig:tsp}.

\begin{figure}[hbtp] \label{fig:tsp}
 \begin{center}
\epsfile{file=city-4.eps,width=9cm,height=3.5cm}
 \end{center}
\caption{An example of 4 cities and a possible tour therein.}
\end{figure}




 
\noindent
The length of this route is 

\begin{displaymath}
r_{A-C-B-D-A} = 3.382 + 4.232 + 6.539 + 8.074 = 
\end{displaymath}

\noindent
In the same way we can calculate the other two route. That is,

\begin{displaymath}
r_{A-B-D-C-A} = 3.382 + 4.232 + 6.539 + 8.074 = 
\end{displaymath}

\begin{displaymath}
r_{A-B-D-C-A} = 3.382 + 4.232 + 6.539 + 8.074 = 
\end{displaymath}

\noindent
So the tour of minimum length is ---.\\

\noindent
But what if we have larger number of cities? Even in case of 10 cities, we have
$9!/2 = 181,440$ possible differnt route. Then what about 1000 cities, for example?
Do you want calculate those distances of all the possible tour? Of course not!
Then let's apply our evolutionary algorithm.

\noindent
Note that chromosomes like
\begin{center}
(A, F, C, B, J, L, H, K, N, D, G, D, I, E, M)
\end{center}
for tour A-F-C-B-J-L-H-K-N-D-G-D-I-E-M) and 
\begin{center}
(A, M, B, L, E, N, H, I, N, D, F, G, J, K, C)
\end{center}
for tour A-M-B-L-E-N-H-I-N-D-F-G-J-K-C) would not work, because possible child
after one-point chromosom 
\begin{center}
(A, F, C, B, J, L, H, K, N, D, F, G, J, K, C)
\end{center}
would not be feasible Then a possible design of chromosome is as follows.

\bigskip
{\it
\begin{itemize}
\item[]
   \begin{itemize}
   \item[]
      \begin{itemize}
      \item[Step-1.] Set $i=1$.
      \item[Step-2.] If $i$-th gene is $n$ then $n$-th city in the list is the city 
                     to be currently visited.
      \item[Step-3.] Remove the city from the list.
      \item[Step-4.] Set $i=i+1$ and repeat Step-2 to Step-4 while $i \le n$.
      \end{itemize}
   \end{itemize}
\end{itemize} 
}

\bigskip
\noindent
For example, when the list of cities is
\begin{center} \{A, B, C, D, E, F, G, H, I \} \end{center} 
\noindent
chromosome: $(1 1 2 1 4 1 3 1 1)$ is the tour:
\begin{center} A-B-D-C-H-E-I-F-G. \end{center}

\bigskip
\begin{excersize}[Neural Network for Even-4-Parity]\hspace{1in}\\
(1) Create 14 cities by assign random coordinate $(x_i, y_i)$ \\
(2) Calculate the distance between all the possible two cities.\\
(3) Then evolve them until the total distance of tour converges one value.
\end{excersize}




\clearpage
\section{Knapsack Problem}





\clearpage
\section{Multi Modal Genetic Algorithms\\
-- What if we have multipul different meaningful solution?}

\subsection{Target Functions}
Assuming our goal is maximization, that is, we want to know when $y$ takes the maximum
value and for which $x$, we try two test functions.

\begin{large}\begin{equation}
y = \sin ^6 (5 \pi x)
\end{equation}\end{large}

\noindent
and

\begin{large}\begin{equation}
y = -2((x-0.2)/0.8)^2 \sin ^6 (5 \pi x)
\end{equation}\end{large}

\noindent
Now take a look what do these two function look like.

\begin{figure}[h]
 \begin{center}
   \epsfile{file=test-for-share.eps,width=7.5cm,height=6cm}
   \epsfile{file=test-for-share-2.eps,width=7.5cm,height=6cm}
\caption{A multi-peak 2-D function and its variation}
 \end{center}
\end{figure}


\subsection{Two Algorithms}
Here, we have two algorithms for the current purpose of finding multiple solutions at a run.
\subsubsection{Fitness Sharing} 
Fitness of each individual is derated by an amount related to 
the number of similar individuals in the population.
That is, shared fitness $F_s(i)$ of the individual $i$ is 

\begin{displaymath}
F_s (i) = \frac{F(i)}{\displaystyle \sum_{j=1}^\mu s(d_{ij})}
\end{displaymath}

\noindent
where
$F(i)$ is fitness of individual $i$;
$d_{ij}$ is distance between individual $i$ and $j$;
Typically $d_{ij}$ is {\it Hamming distance} if in {\it genotypic space} 
{\it Euclidean distance} if in {\it phenotypic space} and 
$s(\cdot)$ is called {\it sharing function} and defined as:

\begin{displaymath}
s(d_{ij}) = \left\{
\begin{array}{ll}
1 - (d_{ij} / \sigma_{\mbox{\small share}})^{\alpha} & \hspace{.2in} 
                         \mbox{if} \hspace{.1in} d_{ij} < \sigma_{\mbox{\small share}} \\
0                                           & \hspace{.2in} 
                         \mbox{otherwise}
\end{array}
\right.
\end{displaymath}

\noindent
where
$\sigma_{\mbox{\small share}}$ is interpreted 
as size of niche, and 
$\alpha$ determines the shape of the function.
The denominator is called {\it niche count}.
You see shape dependency of $s(d_{ij})$ on $\alpha$
in Figure~\ref{fig:shareing}.

\begin{figure}[h] \label{fig:shareing}
 \begin{center}
   \epsfile{file=sharing.eps,width=9cm,height=6cm}
   \caption{A shape dependency of $s(d_{ij})$ on $\alpha$.}
 \end{center}
\end{figure}

\noindent
To be short (not so short though): Similar individual should share fitness.
The number of individuals that can stay around any one of peaks (niche)
         is limited. \\
The number of individuals stay near any peak will theoretically 
         be proportional to the {\it hight} of the peak\\


\subsubsection{Deterministic Crowding}
If the parents will be replaced or not with their childeren
will be determined under a criteria of the distance between parents and children.

\hspace*{1in}\\

\noindent
{\bf Algorithm} Assuming crossover, mutation and fitness function are already defiened
{\it
\begin{itemize}
\setlength{\itemsep}{0pt}
\item[1.] Choose two parents, $p_1$ and $p_2$, at random, 
with no parent being chosen more than once.
\item[2.] Produce two children, $c_1^{\prime}$ and $c_2^{\prime}$.
\item[3.] Mutate the children 
           yielding $c_1$ and $c_2$, with a crossover.
\item[4.] Replace parent  with child as follows: 
   \begin{itemize}
   \item[-] IF \hspace{.05in} $d(p_1, c_1) + d(p_2, c_2) > d(p_1, c_2) + d(p_2, c_1)$
      \begin{itemize}
      \item IF \hspace{.05in} $f(c_1) > f(p_1)$ THEN \hspace{.05in} replace $p_1$ with $c_1$
      \item IF \hspace{.05in} $f(c_2) > f(p_2)$ THEN \hspace{.05in} replace $p_2$ with $c_2$
      \end{itemize}
   \item[-] ELSE
      \begin{itemize}
      \item IF \hspace{.05in} $f(c_2) > f(p_1)$ THEN \hspace{.05in} replace $p_1$ with $c_2$
      \item IF \hspace{.05in} $f(c_1) > f(p_2)$ THEN \hspace{.05in} replace $p_2$ with $c_1$
      \end{itemize}
   \end{itemize}
\end{itemize}
\noindent
where $d(\zeta_1, \zeta_2)$ is the Hamming distance between 
two points $(\zeta_1, \zeta_2)$ 
in pattern configuration space.
The process of producing child is repeated until 
all the population have taken part in the process.
Then the cycle of reconstructing a new population 
and restarting the search is repeated until 
all the global optima are found or a set maximum number of generation has been reached.
}\\


\noindent
Hopefully the following two figures would help you understand why.

\begin{figure}[h] \label{fig:shareing}
 \begin{center}
   \epsfile{file=crowding-1.eps,width=7cm,height=1cm}
   \epsfile{file=crowding-1.eps,width=7cm,height=1cm}
   \caption{Two cases of parents-children's distance relation.}
 \end{center}
\end{figure}


\subsection{Results you should show.}
\noindent
Hopefully you apply two algorithms to each of two test functions. Besides fitness-generation
graph, as usual, you try visualize how your individual change their location as generation goes.\\

\noindent
That is to say, show all points of individuals in, say,  every 20 generations 
in order to see how theyconverge to the peaks.


\clearpage
\section{Multi Modal Genetic Algorithms}


\end{document}


create your own $p$ patterns 
each of which is made up of $N^2$ binary pixels.
Examples are shown in Figure 1.



\begin{figure}[hbtp]
\begin{center}
   \epsfile{file=patterns.eps,width=12cm,height=3cm}
   \caption{An example for $N=3$. White pixcel is represented by $-1$ and 
            white pixel is by $+1$. That is, patterns are represented 
            with 9-bit {\it bipolar} vectors.}
\end{center}
\end{figure}


\noindent
To be more formal, our $p$ patterns are expressed as

\begin{equation}
(\xi^1_1, \xi^1_2, \cdots, \xi^1_N),\hspace{.1in}
(\xi^2_1, \xi^2_2, \cdots, \xi^2_N),\hspace{.1in}
(\xi^3_1, \xi^3_2, \cdots, \xi^3_N),\hspace{.1in} \cdots, \hspace{.1in}
(\xi^p_1, \xi^p_2, \cdots, \xi^p_N).
\end{equation}

\noindent
where $\xi^{\mu}_{i} \in \{-1,1\}$, \hspace{.05in} 
$\mu = 1,2, \cdots, p$ \hspace{.05in} and \hspace{.05in} 
$i = 1,2, \cdots, N^2.$ \\

\hspace*{1in}\\
\noindent
For example, the first example in the Figure 1 is 

\begin{displaymath}
(-1, +1, -1, 
 +1, +1, +1, 
 -1, +1, -1)
\end{displaymath}



\newtheorem{excersize}{Excersize}
\begin{excersize}[10 Patterns to be Stored]
Create your own 10 patterns 
each of which is made up of $10 \times 10$ binary pixels.
\end{excersize}



\section{Construct a Hopfield Neural Network to store your patterns!}

\noindent
Now Let's create a Hopfield Neural Network with $N \times N$ neurons.
All neurons are connected with each other via synapse.\\

\noindent
Each of  neurons are influenced by other $(N \times N -1)$ neurons.
The strength of an influence from one neuron is according to the weight value
of the synapse.  
Thus, state of neuron $i$ at time $t+1$ $s_{i}\hspace{.02in} (t+1) $is given as

%%\begin{Large}
\begin{equation} \label{eq:1-1}
  s_{i}\hspace{.02in} (t+1) 
    = sgn \hspace{.02in} \left( \hspace{.04in} 
      \sum_{j \ne i}^N { w_{ij} \cdot s_{j}(t)} \hspace{.04in} \right).
\end{equation}
%%\end{Large}

\subsubsection{How we update state of neurons?
--- Sinchronous and Asynchronous update}
\noindent
Now a question arise, how are neurons updated? Simultaneously-at-a-time 
or one-by-one? The former is called {\it Sinchronous update} and the latter
is {\it Asynchronous update.} In this practice course we use the asynchronous
update.\\

\noindent
In other words, at time $t$, neuron-1 is firstly updated, and, 
this new state will be used to update other neurons here after; 
next, neuron-2, neuron-3, and so on, until all the neurons are updated.
Then this updated procedures are repeated at time $t+1$, 
and on and on. \footnote {We can update neurons in a random order
different order at every time $t$, but here we update from the 1st neuron
to the last neuron one by one.}

\subsection{An experiment with random weight values:}
Now we have $10^2$ synapses and each snyapse has 
a strength called {\it weight}.
The weight value from neuron-$j$ to neuron-$i$ is denoted here as $w_{ij}$
\hspace{0.05in} $i,j = 1,2, \cdots 100$. \\

\noindent
We must assign these 100 weight values appropriately to store
our patterns. However, we start with a set of 100 random values
each of which is in $[-1, 1]$, such as $-0.534$, are assigned.


\begin{excersize}[Observe the behaviours of your Hopfield Network.]
Give one of your patterns to your Hopfield Network 
with random weight values, and observe what will happen.
That is, set $S_i(0) = \xi_i^\mu$ for all $i = 1, 2, \cdots, N^2$
with a specific $\mu$ you like. Then observe the pattern 
for $t= 1, 2, \cdots$, namely, how the pattern changes as time proceeds. 
\end{excersize}

\section{Let's store your patterns!}

\subsection{Hebbian Learning}
Here we calculate the weight according to the following equation,
called Hebbian Learning.
\begin{Large}
\begin{equation} \label{eq:1-2}
w_{ij} = \frac{1}{N} \sum _{ \mu = 1}^{p} 
         {{ \xi }_{i}^{ \mu }{ \xi }_{j}^{ \mu }}
         \hspace{.1in}(i \ne j), \hspace{.1in} w_{ii} = 0.
\end{equation}
\end{Large}


\begin{excersize}[Observe the behaviours of your Hopfield Network Part II.]
Repeat the previous excersize with the weights calculated with the above
equation, instead of random values.
\end{excersize}

\section{Let's observe how it is clever (or fool)!}
Now if your work is successful
Network recognize your patterns in the following way.
\begin{itemize}
\item[(1)] If you give one of your patterne as it is, 
then the initial state never be changed. \footnote{In
this case the pattern is called {\it fixed point}.}
\item[(2)] If you give a noisy version of your pattern, then
initial state changes several  steps and converges to the 
original pattern. \footnote{We call it ``An initial state
in the vasin of attraction is attracted to its fixed point.}
\item[(3)] If you give a very different pattern from any of 
your patters, then network shows a {\it chaotic} behaviour,
e.g., repeat a same cycle of patterns or changes forever in
a random way.
\end{itemize}

\noindent
Then you may test your Hopfield Network to know how it is clever
or fool.by changing (i) the number of patterns stored and/or
(2) number of noisy bit.

\begin{excersize}[Observe the behaviours of your Hopfield Network Part III.]
Starting with 1 pattern, test the capability of the Network
by incrementing the number of noisy bits from zero, 
and observe when the Network become to be chaotic.
Plot this critical number as a function of number of noise with
a parameter of the number of patterns stored.  
\end{excersize}

\section{Fuzzy Logic}


\begin{figure}[hbtp]
\begin{center}
   \epsfile{file=membership-function.eps,width=7cm,height=4cm}
   \epsfile{file=membership-function-.eps,width=7cm,height=4cm}
   \caption{An example for $N=3$. White pixcel is represented by $-1$ and 
            white pixel is by $+1$. That is, patterns are represented 
            with 9-bit {\it bipolar} vectors.}
\end{center}
\end{figure}



\end{document}






\begin{table}[h]
\begin{center}
\begin{tabular}{c c c c c c c c c c c c c c c}%%\hline \hline 
\bigskip
\hspace*{.1pt} & A & B & C & D & E & F & G & H & I & J & K & L & M & N \\ 
A              & 0 & 3 & 1 & 4 & 4 & 4 & 4 & 4 & 4 & 4 & 4 & 4 & 4 & 4 \\
B              & - & 0 & 1 & 4 & 4 & 4 & 4 & 4 & 4 & 4 & 4 & 4 & 4 & 4 \\
C              & - & - & 0 & 4 & 4 & 4 & 4 & 4 & 4 & 4 & 4 & 4 & 4 & 4 \\
D              & - & - & - & 0 & 4 & 4 & 4 & 4 & 4 & 4 & 4 & 4 & 4 & 4 \\
E              & - & - & - & - & 0 & 4 & 4 & 4 & 4 & 4 & 4 & 4 & 4 & 4 \\
F              & - & - & - & - & - & 0 & 4 & 4 & 4 & 4 & 4 & 4 & 4 & 4 \\
G              & - & - & - & - & - & - & 0 & 4 & 4 & 4 & 4 & 4 & 4 & 4 \\
H              & - & - & - & - & - & - & - & 0 & 4 & 4 & 4 & 4 & 4 & 4 \\
I              & - & - & - & - & - & - & - & - & 0 & 4 & 4 & 4 & 4 & 4 \\
J              & - & - & - & - & - & - & - & - & - & 0 & 4 & 4 & 4 & 4 \\
K              & - & - & - & - & - & - & - & - & - & - & 0 & 4 & 4 & 4 \\
L              & - & - & - & - & - & - & - & - & - & - & - & 0 & 4 & 4 \\
M              & - & - & - & - & - & - & - & - & - & - & - & - & 0 & 4 \\
N              & - & - & - & - & - & - & - & - & - & - & - & - & - & 0 \\
%%\hline \hline
\end{tabular} 
\end{center}
\end{table}


\begin{figure}[hbtp]
 \begin{center}
\epsfile{file=tsp.eps,width=12cm,height=4cm}
 \end{center}
\caption{An example of 14 cities and a possible tour therein.}
\end{figure}