\documentclass[a4paper]{article}
% To compile PDF run: latexmk -pdf {filename}.tex

\usepackage{graphicx}				% Used to insert images into the paper
\graphicspath{ {} }
\usepackage{float}
\usepackage[justification=centering]{caption}	% Used for captions
\captionsetup[figure]{font=small}	% Makes captions small
\newcommand\tab[1][0.5cm]{\hspace*{#1}}		% Defines a new command to use 'tab' in text
% Math package
\usepackage{amsmath}
%enable \cref{...} and \Cref{...} instead of \ref: Type of reference included in the link
\usepackage[capitalise,nameinlink]{cleveref}
% Enable that parameters of \cref{}, \ref{}, \cite{}, ... are linked so that a reader can click on the number an jump to the target in the document
\usepackage{hyperref}
% UTF-8 encoding
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc} %support umlauts in the input
% Easier compilation
\usepackage{bookmark}
\usepackage{natbib}
% \usepackage{graphicx}

\begin{document}
	\title{Week 10 - Comparing Algorithms}
	\author{Kelvin Davis \and Jip J. Dekker\and Anthony Silvestere}
	\maketitle

\section{Simulating Time}\label{simulating-time}

In this section we use Cellular Automata to show how different updating
methods can drastically affect the execution of a program.

The cellular automata model takes a vector
\(\mathbf{x}_t = (x_{t,1} \dots x_{t,n})\) where \(x_{t,i} \in \{0,1\}\)
as the current state and returns another vector \(\mathbf{x}_{t+1}\).
The next state of a cell \(x_{t+1, i}\) is dependent on its current
state \(x_{t, i}\) and the state of the cells adjacent to it
\(x_{t, i-1}\) and \(x_{t, i+1}\) based on a set of rules for the form
\(f : \{0,1\}^3 \to \{0,1\}\).

We are using the rule set

\begin{eqnarray*}
f(1,1,1) & = & 1\\
f(1,0,0) & = & 1\\
\text{otherwise }f(\_,\_,\_) & = & 0
\end{eqnarray*}

\subsection{Why do different patterns appear with different update
rules?}\label{why-do-different-patterns-appear-with-different-update-rules}

There are 6 updating schemes:

\begin{enumerate}
\def\labelenumi{\arabic{enumi}.}
\tightlist
\item
  Synchronous - updates cells all at once for each time step
\item
  Random Independent - picks a cell at random to update
\item
  Random Order - creates a random order to update cells for each time
  step
\item
  Clocked - the cells update at a fixed interval but the intervals vary
  from cell to cell
\item
  Cyclic - updates the cells one at a time from left to right
\item
  Self-synchronising - initially updated at random, but by interacting
  with their neighbours, they gradually become synchronised
\end{enumerate}

The synchronous method updates all the cells at once for each time-step.
As shown this results in a plot that is consistent. The Random
Independent method allows any cell to be updated at any time

\subsection{A common mistake in writing programs to run simulation
models is to scan through an array updating each cell in turn, based on
the current values of its neighbours. Which of the update schemes
demonstrated corresponds to
this?}\label{a-common-mistake-in-writing-programs-to-run-simulation-models-is-to-scan-through-an-array-updating-each-cell-in-turn-based-on-the-current-values-of-its-neighbours.-which-of-the-update-schemes-demonstrated-corresponds-to-this}

The cycle option corresponds to updating each cell based on the current
state of its neighbours. This can be verified by looking at the pattern
produced be the bottom-middle plot in the figure. When the updating is
done synchronously, the plot results in consistent parallel, diagonal
lines, however when the cycle method is used, it can be seen that the
updating is not dependent on \(x_{t, i-1}\) but rather \(x_{t+1, i-1}\).
That and all of the other options incorporate an aspect of randomness
which then results in sparse plots due to only two out of the eight
possible rules being active i.e.
\[\dfrac{\sum_{x\in\{0,1\}^3}{f(x)}}{|\{0,1\}^3|} = \dfrac{2}{8}\]

\subsection{Suggest cases where the clock scheme or random asynchronous
updating might bean appropriate way to model a system in the real
world?}\label{suggest-cases-where-the-clock-scheme-or-random-asynchronous-updating-might-bean-appropriate-way-to-model-a-system-in-the-real-world}

In cases where we are modelling systems over continuous time, then the
clock scheme or random asynchronous updating would be appropriate to
use. These might be systems like

\section{Sensitivity analysis - critical mass in a
nuclear}\label{sensitivity-analysis---critical-mass-in-a-nuclear}

In this experiment, we model a chain reaction by nuclear fission and aim
to see how the density of atoms affects the systems ability to create a
runaway chain reaction. Specifically we are interested in find the
critical mass as measured in density that leads to chain reactions. We
simulate the system at varying densities between 0\% and 20\% and use
the graphs showing the energy released from the system over time to
gauge how where the runaway reaction occurs.

We take measurements of the energy released at densities of 0\%, 5\%,
8\%, 10\%, 11\%, 12\%, 13\%, 15\%, 17\% and 20\%, sampling at shorter
intervals of density closer to the density at which the maximum reading
of the energy released exceeds 10 .

This breakout first happens at 12, and so we deem this to be the
critical density of the system.
\\
\end{document}
