Index: liacs/nc/low-correlation/latex.mk
===================================================================
--- liacs/nc/low-correlation/latex.mk	(revision 45)
+++ liacs/nc/low-correlation/latex.mk	(revision 45)
@@ -0,0 +1,57 @@
+# Rick van der Zwet <rick@wzoeterwoude.net>
+# Licence: BSD
+# Descrip: LaTex file parser
+# $Id: latex.mk 571 2008-04-20 17:31:04Z rick $
+
+TARGET = report
+LATEX = latex
+XDVI = xdvi
+TEX = latex -halt-on-error
+DVIPDF = dvipdf
+ASPELL = aspell
+ASPELL_ARGS = -c --mode=tex -x
+
+#XXX: Make me dynamic
+VIEWPDF = evince
+.SUFFIXES: .pdf
+
+help:
+	@echo "Usage Makefile <option>"
+
+doc-all: doc-distclean buildpdf
+
+view: viewpdf
+
+viewdvi: builddvi
+	$(XDVI) $(TARGET)
+
+builddvi: $(SOURCE) $(TARGET).dvi
+
+doc-clean:
+	rm -vf *.aux *.log *toc *.out *.bak *.m.tex
+
+doc-distclean: doc-clean
+	rm -vf $(TARGET).dvi $(TARGET).pdf $(PROGRAM)
+
+buildpdf: $(SOURCE) $(TARGET).pdf
+
+viewpdf: buildpdf
+	$(VIEWPDF) $(TARGET).pdf
+
+spell: spell-en
+
+spell-nl: $(TARGET).tex
+	$(ASPELL) -l nl -p ~/aspell-n.dic $(ASPELL_ARGS) $<
+
+spell-en: $(TARGET).tex
+	$(ASPELL) -l en -p ~/aspell-en.dic $(ASPELL_ARGS) $<
+
+.dvi.pdf:
+	$(DVIPDF) $? $@
+
+.tex.dvi:
+	$(TEX) $? $@
+	$(TEX) $? $@
+
+.gs.png:
+	$(GNUPLOT) $?
Index: liacs/nc/low-correlation/report.tex
===================================================================
--- liacs/nc/low-correlation/report.tex	(revision 45)
+++ liacs/nc/low-correlation/report.tex	(revision 45)
@@ -0,0 +1,133 @@
+%
+% $Id: report.tex 571 2008-04-20 17:31:04Z rick $
+%
+
+\documentclass[12pt,a4paper]{article}
+
+\usepackage{listings}
+
+\frenchspacing
+\usepackage[english,dutch]{babel}
+\selectlanguage{dutch}
+\usepackage{graphicx}
+\usepackage{url}
+\usepackage{multicol}
+\usepackage{fancybox}
+\usepackage{amssymb,amsmath}
+\usepackage{float}
+\usepackage{color}
+\floatstyle{ruled}
+\newfloat{result}{thp}{lop}
+\floatname{result}{Result}
+
+\input{highlight.sty}
+
+\title{The low-autocorrelation problem\\
+\large{Practical Assignments Natural Computing, 2009}}
+\author{Rick van der Zwet\\
+  \texttt{<hvdzwet@liacs.nl>}}
+\date{\today}
+
+
+\begin{document}
+\newcommand{\wekacmd}[1]{\begin{quote}\small{\texttt{#1}}\end{quote}}
+\newcommand{\unixcmd}[1]{\begin{quote}\small{\texttt{#1}}\end{quote}}
+
+
+\maketitle
+
+\section{Introduction}
+The report is focused on the so-called \emph{low-autocorrelation problem of
+binary sequences}, is subject to actual research and is of big interest for
+industrial applications, e.g. communications and electrical engineering. Its
+description goes as follows.
+
+\textbf{Feasible Solutions:} Binary Sequences $\vec{y} \in \{-1,+1\}^n$
+
+\textbf{Objective Function:}
+\begin{equation}
+f(\vec{y}) = \frac{n^2}{2 \cdot E(\vec{y})} \longrightarrow maximization
+\end{equation}
+
+\begin{equation}
+E(\vec{y}) = \displaystyle\sum_{k=1}^{n-1} (\sum_{i=1}^{n-k} y_i \cdot y_{i+k})^2
+\end{equation}
+
+\section{Problem description}
+Due to the huge 'exploding' posibilities it is not possible to walk trough the
+whole list of posibities, so we need alternative approches to tackle this
+problem. First we will try the \emph{Monte Carlo Search algoritm [MCS]} and next try
+\emph{Simulated Annealing [SA]}.
+
+\emph{MCS} is all about random sequence generation and trying to find a good
+solution, do a small ajustment on the solution and compare the new solution
+again.
+
+\emph{SA} takes a more and less the same aproch, but it also accept small
+'losses' from time-to-time. But as time passes it get less likely to accept
+'bad solutions'.
+
+\section{Statistics}
+Of course many people have run numerous computer hours on finding the best
+possible fitness as shown in table~\ref{tab:best}. The algoritms used to find
+those numbers are not found.
+
+\begin{center}
+\begin{table}
+  \caption{Best known values of low-autocorrelation problem}
+  \begin{tabular}{| l | c | r | }
+    \hline
+    $n$ & Best known $f$ \\
+    \hline \hline          
+    20  & 7.6923 \\ \hline 
+    50  & 8.1699 \\ \hline
+    100 & 8.6505 \\ \hline
+    200 & 7.4738 \\ \hline
+    222 & 7.0426 \\ \hline
+  \end{tabular}
+  \label{tab:best}
+\end{table}
+\end{center}
+
+\section{Approach}
+The \emph{MCS} is implemented streight-forward from the wikipedia
+page\footnote{http://en.wikipedia.org/wiki/Monte\_Carlo\_method}. The mutation
+choosing is flipping one bit in the array.
+
+For the \emph{SA} implemented also comes streight from 'the book'
+\footnote{http://en.wikipedia.org/wiki/Simulated\_annealing}, the process
+choosing for the cooling-down sequence is taken from the dutch wikipedia page
+'Simulated annealing', which is nice indicator when to choose something when
+the solution is worse (logically, beter solutions will always be accepted).
+\footnote{http://nl.wikipedia.org/wiki/Simulated\_annealing}:
+\begin{math}
+p = e^{\frac{f(i)-f(j)}{c}}
+\end{math}
+
+\section{Implementation}
+The code is written in
+\emph{Octave}\footnote{http://www.gnu.org/software/octave/} which is the
+open-source 'variant' of \emph{MATLAB}\copyright 
+\footnote{http://www.mathworks.com/products/matlab/}. There are small minor
+differences between them, but all code is made compatible to to run on both
+systems.
+
+As work is done remotely, the following commands are used:
+\unixcmd{matlab-bin -nojvm -nodesktop -nosplash -nodisplay < \%\%PROGRAM\%\%}
+\unixcmd{octave -q \%\%PROGRAM\%\%
+
+\section{Results}
+All experiments are run 20 times the best solution is choosen
+
+\section{Conclusions}
+\newpage
+\section{Appendix 1}
+\include{autocorrelation.m}
+\include{initseq.m}
+\include{mcs-call.m}
+\include{mcs.m}
+\include{mutation.m}
+\include{randint.m}
+\include{sa-call.m}
+\include{sa.m}
+\end{document}
Index: liacs/nc/low-correlation/sa-call.m
===================================================================
--- liacs/nc/low-correlation/sa-call.m	(revision 44)
+++ liacs/nc/low-correlation/sa-call.m	(revision 45)
@@ -5,5 +5,5 @@
 
 %% Basic variables
-iterations = 100000;
+iterations = 10000;
 length = 20;
 
