\documentclass[main.tex]{subfiles}
\begin{document}

\section{Free Dirac field theory}

\subsection{The Dirac Lagrangian}

\marginpar{Sunday\\ 2020-6-7, \\ compiled \\ \today}

Our ansatz for the Lagrangian of a theory whose EOM is the Dirac equation is:
%
\begin{align}
\mathscr{L} = \frac{i}{2} \qty[\overline{\psi} \gamma^{\mu } \qty(\partial_{\mu } \psi )
- \qty(\partial_{\mu } \overline{\psi}) \gamma^{\mu } \psi ]
- m \overline{\psi} \psi
\,,
\end{align}
%
since the Dirac equation is linear in the derivatives.

\begin{claim}
This Lagrangian is \begin{enumerate}
    \item real;
    \item invariant under Lorentz transformation (which act on \(\psi \) as \(\psi \to S(\Lambda ) \psi \));
    \item equivalent to the Lagrangian density \(\mathscr{L} = \overline{\psi} \qty(i \slashed{\partial} - m) \psi \).
\end{enumerate}
\end{claim}

\begin{proof}
To see that the Lagrangian is real, we need to show that \(\mathscr{L} = \mathscr{L} ^\dag\). For the mass term we have:
%
\begin{align}
\qty(m \overline{\psi} \psi ) ^\dag &= m \psi ^\dag \qty(\gamma^{0} )^\dag \psi = m \overline{\psi} \psi
\,,
\end{align}
%
since \(\gamma^{0}\) is self-adjoint. Now, the kinetic terms are mapped into each other --- because of the \(i\) in front, this means that the Lagrangian is conserved. Let us show it for one of them:
%
\begin{subequations}
\begin{align}
\qty(\overline{\psi} \gamma^{\mu } \partial_{\mu } \psi )^\dag &=
\qty(\partial_{\mu } \psi ) ^\dag \qty(\gamma^{\mu })^\dag \qty(\gamma^{0})^\dag \psi  \\
&= \partial_{\mu } \psi ^\dag \gamma^{0} \gamma^{0} \qty(\gamma^{\mu }) ^\dag \gamma^{0} \psi  \\
&= \partial_{\mu } \psi ^\dag \gamma^{0} \gamma^{\mu } \psi  \marginnote{Used \eqref{eq:gamma-matrices-identity}}\\
&= \qty(\partial_{\mu } \overline{\psi}) \gamma^{\mu } \psi
\,.
\end{align}
\end{subequations}

The fact that the Lagrangian is invariant under Lorentz transformations follows directly from the fact that, while \(\psi \to S \psi \), the conjugate spinor transforms as \(\overline{\psi} \to \overline{\psi} S^{-1}\) (see \eqref{eq:dirac-conjugate-spinor-transformation}).

As for the equivalence: certain terms in the two Lagrangians are equal, the difference lies in the fact that one of them has a term
%
\begin{align}
\frac{i}{2} \overline{\psi} \gamma^{\mu } \partial_{\mu } \psi
\,,
\end{align}
%
while the other has a term
%
\begin{align}
- \frac{i}{2} \qty(\partial_{\mu } \overline{\psi}) \gamma^{\mu } \psi
\,.
\end{align}

To see that they are equivalent, we can show that their difference is a 4-divergence:
%
\begin{align}
\frac{i}{2} \overline{\psi} \gamma^{\mu } \partial_{\mu } \psi + (-)^2 \frac{i}{2} \qty(\partial_{\mu } \overline{\psi} )\gamma^{\mu } \psi
= \frac{i}{2} \gamma^{\mu } \partial_{\mu } \qty(\overline{\psi} \psi )
\,.
\end{align}

Basically, the difference lies in an integration by parts.
\end{proof}

The dimension of the Lagrangian density must be that of a length to the fourth, so the wavefunction's is \([\psi ] \sim M^{3/2}\).

\subsection{The Euler-Lagrange equations}

In order to get the equations for \(\psi \) we differentiate with respect to \(\overline{\psi}\), and vice versa. We can write the Lagrangian as
%
\begin{align}
\mathscr{L} = \frac{i}{2} \qty[ \overline{\psi} \overset{\rightarrow}{\slashed{\partial}} \psi - \overline{\psi} \overset{\leftarrow}{\slashed{\partial}} \psi  ] - m \overline{\psi} \psi
\,,
\end{align}
%
so that it is easier to compute the derivatives: let us compute the EOM for \(\psi \), using
%
\begin{align}
\pdv{\mathscr{L}}{\overline{\psi}} = \frac{i}{2} \overset{\rightarrow}{\slashed{\partial}} \psi - m \psi
\,
\end{align}
%
and
%
\begin{align}
\pdv{\mathscr{L}}{\partial_{\mu } \overline{\psi}}
= \frac{i}{2} \gamma^{\mu } \psi
\,,
\end{align}
%
so the EL equations read
%
\begin{align}
(i \overset{\rightarrow}{\slashed{\partial}} - m) \psi = 0
\,.
\end{align}

The equations for the conjugate spinor are derived similarly; they read
%
\begin{align}
- \overline{\psi} \qty(i \overset{\leftarrow}{\slashed{\partial}} + m) = 0
\,.
\end{align}

\begin{claim}
These can also be derived from the alternate formulation of the Lagrangian; \(\mathscr{L} = \overline{\psi} (i \slashed{\partial} - m) \psi \).
\end{claim}

\subsection{General solution}

The general solution reads
%
\begin{subequations}
\begin{align} \label{eq:dirac-general-solution}
\psi (x) &= \frac{1}{(2 \pi )^{3/2}}
\int \frac{ \dd[3]{k}}{\sqrt{2 \omega_{k}}}
\qty(c_r (k) u_r (k) e^{-ikx} + d^{*}_{r} (k) v_r (k) e^{ikx})_{k_0 = \omega_{k}}  \\
\psi ^\dag (x) &= \frac{1}{(2 \pi )^{3/2}}
\int \frac{ \dd[3]{k}}{\sqrt{2 \omega_{k}}}
\qty(d_r (k) v_r ^\dag (k) e^{-ikx} + c ^\dag_{r} (k) u_r ^\dag (k) e^{ikx})_{k_0 = \omega_{k}}
\,,
\end{align}
\end{subequations}
%
where a sum over \(r\) is implied: we account for both of the polarization states.
\(c\) and \(d\) are coefficients, \(u\) and \(v\) are unit vectors in spinor space.

\subsection{Nöther currents}

The current associated with translation invariance is given by
%
\begin{align}
\widetilde{T}^{\mu }_{\nu } =
\pdv{\mathscr{L}}{\partial_{\mu } \psi } \partial_{\nu } \psi
+
\partial_{\nu } \overline{\psi}
\pdv{\mathscr{L}}{\partial_{\mu } \overline{\psi}}
- \delta^{\mu }_{\nu } \mathscr{L}
\,,
\end{align}
%
but if we impose the equations of motion we find \(\mathscr{L} = 0\); so we can neglect that term.
Notice the order of operations in the contractions: \(\psi \) is a spinor, \(\overline{\psi}\) is a dual spinor, the derivative of the Lagrangian with respect to an object is of dual type to that object (so, \(\pdv*{\mathscr{L}}{\partial_{\mu } \psi }\) is a dual spinor), and the conserved quantity must be a scalar in spinor space.

Explicitly, this current reads
%
\begin{align}
\widetilde{T}^{\mu }_{\nu }
= i \overline{\psi} \gamma^{\mu }\partial_{\nu } \psi
\sim
\frac{i}{2} \qty(\overline{\psi} \gamma^{\mu }\partial_{\nu } \psi - \qty(\partial_{\nu } \overline{\psi}) \gamma^{\mu } \psi )
\,;
\end{align}
%
the two ways of writing it are equivalent (which one we get depends on which formulation of the Lagrangian we choose), they differ by a divergence.

Let us check that this is indeed conserved:
%
\begin{subequations}
\begin{align}
\partial_{\mu } \widetilde{T}^{\mu \nu } &= i\partial_{\mu }
\qty(\overline{\psi} \gamma^{\mu } \partial^{\nu } \psi )  \\
&= i \overline{\psi} \overset{\leftarrow}{\slashed{\partial}} \partial^{\nu } \psi
+ i \overline{\psi} \overset{\rightarrow}{\slashed{\partial}}\partial^{\nu} \psi  \\
&= -m \overline{\psi} \partial^{\nu } \psi + \overline{\psi} \partial^{\nu } (m \psi ) = 0 \marginnote{Used the EOM for both \(\psi \) and \(\overline{\psi}\).}
\,.
\end{align}
\end{subequations}

Now, it is the case that we also have the conservation law \(\partial_{\nu } \widetilde{T}^{\mu \nu } = 0\) --- it can be proven if we choose the other formulation of the stress-energy tensor:
%
\begin{subequations}
\begin{align}
\partial_{\nu } \qty[\frac{i}{2} \qty(\overline{\psi} \gamma^{\mu }\partial{\nu } \psi - \qty(\partial^{\nu } \overline{\psi}) \gamma^{\mu } \psi )]
&= \frac{i}{2} \qty[\qty(\partial_{\nu } \overline{\psi}) \gamma^{\mu } \partial^{\nu } \psi
+ \overline{\psi} \gamma^{\mu } \partial_{\nu } \partial^{\nu } \psi
- \qty(\partial_{\nu } \overline{\psi}) \gamma^{\mu } \partial^{\nu } \psi
- \qty(\partial^{\nu } \partial_{\nu } \overline{\psi}) \gamma^{\mu } \psi  ]  \\
&= \frac{i}{2}
\qty[ \overline{\psi} \gamma^{\mu }\square \psi - \square \overline{\psi} \gamma^{\mu } \psi ] = 0
\,.
\end{align}
\end{subequations}

The result follows from the fact that a spinor satisfying the Dirac equation must also satisfy the Klein-Gordon one, \(\square \psi  +m^2 \psi = 0\), and so must its conjugate.

So, the symmetrized stress-energy tensor \(T^{\mu \nu } = \widetilde{T}^{(\mu \nu )}\) is conserved.

The conserved charge --- the total 4-momentum --- is given by
%
\begin{align}
P_{\mu } = \int \dd[3]{x} \widetilde{T}^{0}_{\mu } = \frac{i}{2}
\int \dd[3]{x} \psi ^\dag \overset{\leftrightarrow}{\partial}_{\mu }\psi
\,.
\end{align}

Notice the dagger instead of the bar: when we set the first index to zero we get a \(\gamma^{0}\) matrix, which simplifies the one in the definition of \(\overline{\psi}\).

\subsection{Lorentz invariance}

For an infinitesimal Lorentz transformation defined by the antisymmtric tensor \(\omega_{\mu \nu }\) the position and spinor change with:
%
\begin{align}
x^{\prime \mu } = x^{\mu } + \omega^{\mu }_{\nu } x^{\nu }
\qquad \text{and} \qquad
\psi^{\prime }( x')
= \qty(1 - \frac{i}{2} \omega^{\rho \sigma } \Sigma_{\rho \sigma }) \psi (x)
\,,
\end{align}
%
so the generators of their variations are \(X\) and \(Y\), defined by
%
\begin{align}
\delta x^{\mu } = \frac{1}{2} \omega^{\rho \sigma } Y^{\mu }_{\rho \sigma }
\qquad \text{and} \qquad
\delta \psi = \frac{1}{2} \omega^{\rho \sigma } X_{\mu \nu }
\,.
\end{align}

Explicitly, they can be expressed as
%
\begin{align}
Y^{\mu }_{\rho \sigma } = 2 \delta^{\mu }_{[\rho \sigma ]}
\qquad \text{and} \qquad
X_{\rho \sigma } = -i \Sigma_{\rho \sigma } \psi
\,;
\end{align}
%
besides, we can conjugate \(X\) to get an expression for the generators of the variation of the conjugate spinor:
%
\begin{align}
\overline{X}_{\rho \sigma } = i \overline{\psi} \Sigma_{\rho \sigma }
\,.
\end{align}

The conserved currents read (see section \ref{sec:poincare-invariance-noether}):
%
\begin{align}
J^{\mu }_{\rho \sigma } = 2 x_{[\rho }\widetilde{T}^{\mu }_{\sigma ]}
+ \overline{\psi} \gamma^{\mu } \Sigma_{\rho \sigma } \psi
\,,
\end{align}
%
with the corresponding charges:
%
\begin{align}
Q_{ \rho \sigma }
= \int \dd[3]{x} \qty(x_{[\rho } p_{\sigma ]}
+ \psi ^\dag \Sigma_{\rho \sigma } \psi )
= L_{ \rho \sigma } + S_{ \rho \sigma }
\,.
\end{align}

The fact that we can distinguish a regular angular momentum part as well as a spin part means that we have a spin 1/2 field.

\subsection{Global \(U(1)\) invariance}

Another symmetry of the Dirac field is an internal one, which leaves the position unchanged and acts on the field as
%
\begin{align}
\psi'(x) = e^{i \alpha } \psi (x)
\,,
\end{align}
%
so its generator is \(X = i \alpha \psi \). The corresponding current is
%
\begin{subequations}
\begin{align}
J^{\mu } &= \pdv{\mathscr{L}}{\partial_{\mu }\psi } X + \overline{X} \pdv{\mathscr{L}}{\partial_{\mu } \overline{\psi}} = i \overline{\psi} \gamma^{\mu } i \alpha \psi   \\
&= - \alpha \overline{\psi} \gamma^{\mu } \psi \propto \overline{\psi} \gamma^{\mu } \psi
\,.
\end{align}
\end{subequations}

The corresponding conserved charge is
%
\begin{align}
Q = \int \dd[3]{x} J^{0} = \int \dd[3]{x} \psi ^\dag \gamma^{0} \gamma^{0} \psi = \int \dd[3]{x} \psi ^\dag \psi
\,.
\end{align}

\subsection{Hamiltonian description}

The conjugate fields are:
%
\begin{align}
\pi = \pdv{\mathscr{L}}{\partial_0 \psi } = \pdv{}{\partial_0 \psi} \qty(\psi ^\dag \gamma^{0} \frac{i}{2} \gamma^{\mu } \partial_{\mu } \psi )=
\frac{i}{2} \psi ^\dag
\qquad \text{and} \qquad
\pi ^\dag = \pdv{\mathscr{L}}{\partial_0 \psi ^\dag} = - \frac{i}{2} \psi
\,,
\end{align}
%
and with these we can write the Hamiltonian density:
%
\begin{subequations}
\begin{align}
\mathscr{H} &= \pi \partial_0 \psi + \qty(\partial_0 \psi ^\dag) \pi ^\dag - \mathscr{L}  \\
&= \frac{i}{2} \qty[ \psi ^\dag \partial_0 \psi - \partial_0 \psi ^\dag \psi - \overline{\psi} \gamma^{\mu } \partial_{\mu } \psi + \qty(\partial_{\mu } \overline{\psi})\gamma^{\mu } \psi ]
+m \overline{\psi} \psi   \\
&= \frac{i}{2} \qty[
\psi ^\dag \overset{\leftrightarrow}{\partial_0 } -
\psi ^\dag \qty(\gamma^{0})^2 \overset{\leftrightarrow}{\partial_0 }
\psi
- \overline{\psi}  \gamma^{i}\overset{\leftrightarrow}{\partial_i }
\psi
]
+m \overline{\psi} \psi   \\
&= -\frac{i}{2} \overline{\psi}  \gamma^{i}\overset{\leftrightarrow}{\partial_i }
\psi
+ m \overline{\psi} \psi  \\
&= \frac{i}{2} \psi ^\dag \overset{\leftrightarrow}{\partial_0 } \psi
\,,
\end{align}
\end{subequations}
%
the last step uses the Dirac equation, \(\qty(i \slashed{\partial} -m) \psi =0\).

The Hamiltonian is given by
%
\begin{align}
H = \int \dd[3]{x} \mathscr{H} = i \int \dd[3]{x} \psi ^\dag \partial_0 \psi
\,,
\end{align}
%
up to global constants like \(\int \psi ^\dag \psi \dd[3]{x}\).

It is not manifestly positive definite.

\subsection{Hamilton equations}

Hamilton's equations in terms of the fields and conjugate fields read:
%
\begin{subequations}
\begin{align}
\dot{\psi}_{\alpha } (\vec{x}) &= \fdv{H}{\pi_{\alpha }(\vec{x})} = \qty{\psi_{\alpha }, H} = \partial_0 \psi_{\alpha } (\vec{x}, t)\\
\dot{\pi }_{\alpha } (\vec{x}) &= - \fdv{H}{\psi _{\alpha }(\vec{x})} = \qty{\pi_{\alpha }, H}
\,,
\end{align}
\end{subequations}
%
where \(\alpha \) is a spinorial index.
The equal-time Poisson brackets between the fields are
%
\begin{subequations}
\begin{align}
\qty{\psi_{\alpha } (\vec{x}), \pi_{\beta } (\vec{y})} &= \delta_{\alpha \beta } \delta^{(3)} (\vec{x}-\vec{y})  \\
\qty{\psi_{\alpha }(\vec{x}), \psi_{\beta }(\vec{y})}
&= 0 =
\qty{\pi_{\alpha }(\vec{x}), \pi_{\beta }(\vec{y})}
\,.
\end{align}
\end{subequations}

Do note that the Hamiltonian description is redundant: between the fields \(\psi \), \(\psi ^\dag\), \(\pi \) and \(\pi ^\dag\) there are actually only two degrees of freedom.

We now show the EOM for the conjugate field: it reads
%
\begin{subequations}
\begin{align}
\dot{\pi}_{\alpha } (\vec{x}, t)
&= - \fdv{}{\psi_{\alpha }(\vec{x}, t)}
\qty(\int \dd[3]{y} \psi ^\dag(\vec{y}, t) \partial_0 \psi (\vec{y}, t))  \\
&= - \fdv{}{\psi_{\alpha }(\vec{x}, t)}
\qty(\dv{}{t} \int \dd[3]{y} \psi ^\dag(\vec{y}, t) \psi (\vec{y}, t)
- \int \dd[3]{y} \qty(\partial_0 \psi ^\dag (\vec{y},t) ) \psi (\vec{y}, t)
)  \\
&= \partial_0 \psi ^\dag_{\alpha } (\vec{x}, t)
\,.
\end{align}
\end{subequations}

The total derivative term vanishes because of the global \(U(1)\) symmetry.

\section{Quantization of the Dirac field}

We start from the general solution of the Dirac equation \eqref{eq:dirac-general-solution}. We can invert it to get the expressions for the coefficients \(c_r\) and \(d_r\) in momentum space:
%
\begin{subequations}
\begin{align}
c_r (k) &= \frac{1}{(2\pi )^{3/2}} \int \eval{\frac{ \dd[3]{x}}{\sqrt{2 \omega_{k}}}
u_{r} ^\dag (k) \psi (\vec{x}, t) e^{ikx}}_{k_0 = \omega_{k}}  \\
d_r (k) &= \frac{1}{(2\pi )^{3/2}} \int \eval{\frac{ \dd[3]{x}}{\sqrt{2 \omega_{k}}}
\psi ^\dag (\vec{x}, t) v_{r} ^\dag (k)  e^{ikx}}_{k_0 = \omega_{k}}
\,.
\end{align}
\end{subequations}

\begin{claim}
The Hamiltonian \(H\) and the \(U(1)\) charge \(Q\) are given by:
%
\begin{subequations}
\begin{align}
    H &= \int \dd[3]{x} \psi ^\dag \partial_0 \psi  = \int \dd[3]{k} \omega_{k} \qty(c_r ^\dag c_r - d_r  d_r ^\dag)  \\
    Q &= \int \dd[3]{x} \psi ^\dag \psi = \int \dd[3]{k} \qty(c_r ^\dag c_r  + d_r d_r ^\dag)
    \,.
\end{align}
\end{subequations}
\end{claim}

\begin{proof}
\todo[inline]{Still to do. Probably direct substitution works.}
\end{proof}

\subsection{Canonical quantization with commutators}

We try to quantize our theory of a Dirac field substituting commutators (divided by \(i \hbar\)) for Poisson brackets. So, the time evolution will become (in  the Heisenberg picture):
%
\begin{subequations}
\begin{align}
\dot{\psi}_{\alpha } (\vec{x}, t) =- i \qty[ \psi_{\alpha } (\vec{x}, t), H] \\
\dot{\pi}_{\alpha } (\vec{x}, t) =- i \qty[ \pi_{\alpha } (\vec{x}, t), H]
\,,
\end{align}
\end{subequations}
%
and the commutators between the fields will be
%
\begin{align}
\qty[\psi_{\alpha }(\vec{x}, t), \pi_{\beta } (\vec{y}, t)] = i \delta^{(3)} (\vec{x} - \vec{y}) \delta_{\alpha \beta }
\,,
\end{align}
%
while those of \(\psi \) and \(\pi \) with themselves vanish.
Since \(\pi  = i \psi ^\dag\), we also have
%
\begin{align}
\qty[ \psi_{\alpha } (\vec{x}, t), \psi ^\dag_{\beta} (\vec{y}, t)] = \delta^{(3)} (\vec{x}- \vec{y}) \delta_{\alpha \beta }
\,.
\end{align}

We have similar relations in momentum space:
%
\begin{align}
\qty[c_r (k), c_s ^\dag (p)] = \delta^{(3)} (\vec{k} - \vec{p}) \delta_{rs} = - \qty[d_r (k), d_r ^\dag (p)]
\,,
\end{align}
%
and the others vanish. Notice the minus sign!
Because of it, we define the \(d\) number operator in the opposite order:
%
\begin{align}
N_c^{r} (k) = c_r ^\dag (k) c_r (k)
\qquad \text{and} \qquad
N_d^{r} (k) = d_r (k) d_r  ^\dag (k)
\,,
\end{align}
%
as usual the total number operators are their integrals over momentum space.
The commutation relations read:
%
\begin{subequations}
\begin{align}
\qty[N_c^{r}, c_s ^{(\dag)} (k)] &= \pm c_s ^{(\dag)} (k) \delta_{rs} \\
\qty[N_d^{r}, d_s ^{(\dag)} (k)] &= \mp d_s ^{(\dag)} (k) \delta_{rs}
\,,
\end{align}
\end{subequations}
%
where the dagger in parentheses means that the relations hold both with it and without it.

So, we have an opposite sign in the \(d\) operator relations. This may bee fixed with some redefinitions of the wavefunction, but is an indication of a larger problem: this type of quantization of Dirac theory is inconsistent.

This can be seen in two ways. First of all, \textbf{the Hamiltonian is not positive definite}: it depends on an integral of \(N_c - N_d\); on the other hand the charge \(Q\) is positive!

Secondly, the Fock space can be constructed much like we did for the scalar field, and therefore it will \textbf{contain identical particle states}. But we know that fermions' wavefunction is antisymmetric under exchange of particles, so this is wrong.

The way to solve this issue is to quantize the theory using \textbf{anticommutators}.

\subsection{Anticommutator quantization}

We do everything as we did before, except for the fact that we substitute Poisson brackets for \textbf{anticommutators} divided by \(i \hbar\).

The anticommutators of the fields will then read
%
\begin{subequations}
\begin{align}
\qty{\psi_{\alpha } (\vec{x}), \pi_{\beta } (\vec{y})} &= i \delta_{\alpha \beta } \delta^{(3)} (\vec{x}-\vec{y})  \\
\qty{\psi_{\alpha }(\vec{x}), \psi_{\beta }(\vec{y})}
&= 0 =
\qty{\pi_{\alpha }(\vec{x}), \pi_{\beta }(\vec{y})}
\,,
\end{align}
\end{subequations}
%
as before the first line is equivalent to \(\qty{\psi, \psi ^\dag} = \delta^{(3)} \delta_{\alpha \beta }\).
In momentum space, this corresponds to
%
\begin{align}
\qty{c_r (k), c_s ^\dag (p)} = \delta^{(3)} (k-p) \delta_{rs} = \qty{d_r (k), d_s ^\dag (p)}
\,,
\end{align}
%
whereas the other anticommutators vanish.

\todo[inline]{``So we have obtained the anticommutator algebra for the harmonic oscillator'' --- ok, but we never described the HO with anticommutators, right? Are we just saying that it's the same thing with anticommutators instad of commutators?}

Now, we can define all of our objects of interest. The number density operators are given by
%
\begin{align}
\mathscr{N}^{r}_{c} (k) = c ^\dag_{r} (k) c_r (k) \qquad \text{and} \qquad
\mathscr{N}^{r}_{d} (k) = d ^\dag_{r} (k) d_r (k)
\,,
\end{align}
%
and as usual the total number is given by their integral over momentum space.

The rules that these need to follow in order to be proper number operators are still written in terms of commutators: in order to verify them, we can write them in terms of the anticommutators, which we know.

We start with
%
\begin{subequations}
\begin{align}
\qty[N_c^{r} (k), c_s (p)] &= c_r ^\dag (k) c_r (k) c_s (p) -  c_s (p) c_r ^\dag (k) c_r (k)  \\
&= c_r ^\dag (k) c_r (k) c_s (p) + c_r ^\dag (k) c_s (p) c_r (k)
- c_r ^\dag (k) c_s (p) c_r (k) -  c_s (p) c_r ^\dag (k) c_r (k)  \\
&= c_r ^\dag (k) \qty{c_r (k), c_s (p)} - \qty{c_r ^\dag (k), c_s (p)} c_r (k)  \\
&= - c_r (k) \delta_{rk} \delta^{(3)} (\vec{k} - \vec{p})
\,.
\end{align}
\end{subequations}

Similarly we get
%
\begin{subequations}
\begin{align}
\qty[N_c^{r} (k), c_s ^\dag (p)] &= c_r ^\dag (k) \delta_{rs} \delta^{(3)} (\vec{k} - \vec{p})  \\
\qty[N_c^{r} (k), d_s (p)] &= - d_r (k) \delta_{rk} \delta^{(3)} (\vec{k} - \vec{p}) \\
\qty[N_c^{r} (k), d_s ^\dag (p)] &= d_r ^\dag (k) \delta_{rs} \delta^{(3)} (\vec{k} - \vec{p})
\,,
\end{align}
\end{subequations}
%
so all the harmonic oscillator properties we have found still hold.

The Hamiltonian density operator can now be normal-ordered as usual: the density is \(\mathscr{H} = \frac{i}{2} \overline{\psi} \overset{\leftrightarrow}{\partial_0 } \psi \), so we find
%
\begin{subequations}
\begin{align}
H &= \int \dd[3]{k} \omega_{k} \qty(c_r ^\dag c_r - d_r d_r ^\dag)  \\
&= \int \dd[3]{k} \omega_{k} \sum _{r} \qty(N_c^{r} + N_d^{r}) + \int \dd[3]{k} \omega_{k} \sum_{r} \delta^{(3)} (0)
\,.
\end{align}
\end{subequations}

The conserved charge reads
%
\begin{subequations}
\begin{align}
Q &= \int \dd[3]{k}  \qty(c_r ^\dag c_r + d_r d_r ^\dag)  \\
&= \int \dd[3]{k}  \sum _{r} \qty(N_c^{r} - N_d^{r}) + \int \dd[3]{k} \omega_{k} \sum_{r} \delta^{(3)} (0)
\,,
\end{align}
\end{subequations}
%
so we have recovered the physically meaningful conditions \(H \geq 0\), \(Q \lessgtr 0\).
As before, we ignore the infinite energy of the vacuum.

\subsection{Normal ordering for fermions}

As opposed to the bosonic case, for fermions normal ordering does not just mean putting the operators in the right order (annihilation first, creation later). Since we are dealing with anticommutation, we have to insert an additional \textbf{sign}, which is \((-1)^{n}\), where \(n\) is the number of pair swaps needed to reach the final configuration.

So, inside the normal ordering sign, operators anticommute.

\subsection{Fock space for fermions}

As before, we define the vacuum by \(c_r \ket{0} = d_r \ket{0} = 0\) for any \(k\) and add particles with \(c_r ^\dag\) and \(d_r ^\dag\).

The one-particle states have exactly the properties we'd expect for number, Hamiltonian and charge \eqref{eq:fock-one-particle-state-properties}: the proof follows the same steps, the only difference is that instead of a commutator we insert an anticommutator.

So, we can indeed interpret \(c_r ^\dag\) as creating a particle, while \(d_r ^\dag\) creates its antiparticle.

The algebra we have does not modify the properties of one-particle states, but it very much affects two-particle states: specifically, the anticommutation rules enforce \textbf{Fermi-Dirac statistics}. If we try to create a state with two identical particles, we get
%
\begin{align}
\ket{2(p)} \propto \qty(c_r ^\dag)^2 \ket{0} = \frac{1}{2} \qty{c_r ^\dag, c_r ^\dag} \ket{0} = 0
\,.
\end{align}

In general, it can be stated that there is only one consistent way to quantize a relativistic field theory:
\begin{enumerate}
    \item with commutators for bosonic (iteger-spin) fields;
    \item with anticommutators for fermionic (half-integer spin) fields.
\end{enumerate}

For our scalar (spin-0) theory, if we had tried to use anticommutators we would have gotten an inconsistency: when we normal-order the operators in the Hamiltonian we would have gotten \(N_a - N_b\), making it non-positive definite.

\subsection{Covariant anticommutators}

\begin{claim}
Just like the complex scalar field, same-field anticommutators vanish:
%
\begin{align}
\qty{\psi_{\alpha }(\vec{x}), \psi_{\beta }(\vec{y})} = 0 = \qty{\overline{\psi}_{\alpha }(\vec{x}), \overline{\psi}_{\beta }(\vec{y})}
\,.
\end{align}
\end{claim}

\begin{proof}
The only nonvanishing anticommutators are \(\qty{c_r , c_r ^\dag}\) and \(\qty{d_r, d_r ^\dag}\). In the expression for the anticommutator between \(\psi \), \(\psi \) or any same-field anticommutator we cannot get these, so the whole thing vanishes.
\end{proof}

So, we consider
%
\begin{subequations}
\begin{align}
S_{\alpha \beta } (x-y) &= \qty{ \psi_{\alpha }(x), \overline{\psi}_{\beta }(y)}  \\
&= \qty{\psi_{+}(x), \overline{\psi}_{-}(y)}_{\alpha \beta } +
\qty{\psi_{-}(x), \overline{\psi}_{+}(y)}_{\alpha \beta }  \\
&= S_{\alpha \beta }^{+}(x-y) + S_{\alpha \beta }^{-} (x-y)
\,.
\end{align}
\end{subequations}

With the anticommutation relations we can write
%
\begin{subequations}
\begin{align}
S^{+}_{\alpha \beta }(x-y) &= \frac{1}{(2 \pi )^3}
\int \frac{ \dd[3]{k}}{2 \omega_{k}}
\qty(\slashed{k} + m)_{\alpha \beta } \eval{e^{-ik(x-y)} }_{k_0 = \omega_{k}} = \qty(i \slashed{\partial} + m) D_+ (x-y)\\
S^{-}_{\alpha \beta }(x-y) &= \frac{1}{(2 \pi )^3}
\int \frac{ \dd[3]{k}}{2 \omega_{k}}
\qty(\slashed{k} - m)_{\alpha \beta } \eval{e^{ik(x-y)} }_{k_0 = \omega_{k}}
=\qty(i \slashed{\partial} + m) D_- (x-y)
\,,
\end{align}
\end{subequations}
%
so \(S(x-y) = \qty(i \slashed{\partial} + m )D(x-y) \); everything we proved for \(D(x-y)\) in section \ref{sec:covariance-microcausality} will still hold --- specifically, we still have Lorentz \textbf{covariance} and \textbf{microcausality}.

Note that \(\slashed{\partial}\) is implicitly \(\slashed{\partial_{(x)}}\).

\end{document}


\section{First Class Module}

First class mdoule  means module could be passed as a parameter.

Here is a simple example

\inputminted[fontsize=\scriptsize, ]{ocaml}{lang/code/module/intro.ml}

Here the argument \verb|m| is a module. This is already possible with
objects and records, but now modules are also allowed.  We introduce
three syntaxes

\begin{ocamlcode}
  (module module_expr: package_type)
  (*packing:  mdoule -> expression *)
  (val expr: package_type)
  (*unpacking: expression -> module  *)
  (module package_type)
  (*a new syntax to type-expr*)
\end{ocamlcode}

Parametric algorithms
\inputminted[fontsize=\scriptsize, fontsize=\scriptsize, ]{ocaml}{code/lang/param.ml}

Notice \verb|with type t = int| is necessary here.

The next is a fancy example to illustrate lebiniz equivalence, readers
should try to digest it. Something to reminder, now the simple type
may be a very complex module type.
\begin{ocamlcode}
type ('a, 'b) eq = (module EqTC with type a = 'a and type b = 'b)))
\end{ocamlcode}

\inputminted[fontsize=\scriptsize, fontsize=\scriptsize, ]{ocaml}{lang/code/module/leibniz.ml}

%%% Local Variables:
%%% mode: latex
%%% TeX-master: "../master"
%%% End:


\subsection{tempPerDay()}

The third graph we created was the second example graph proposed in the instructions file. It shows the mean temperature for each day of the year. It is produced by the member function of tempTrender called "tempPerDay(). Conceptually, it is similar to stacking 365 of the "tempOnDay()" histograms vertically. It was created by using the ROOT histogram class "TProfile".
Data parsing was identical to the parsing done for graphs 1 and 2.

\begin{figure}[h]
\centering
\includegraphics[scale=0.3]{graph3.png}
\caption{Histogram showing the mean temperature on each day of the year. Produced by "tempPerDay()". }
\end{figure}


%!TEX root = ../Thesis.tex
\chapter{Time and Node Distributions}\label{cha:dists}
%

The distribution of solution times and number of nodes is central to the evaluation of the variable selection algorithms. In this thesis, the mean and standard deviation are calculated under the assumption of both of these variables having a distribution that can be approximated as a Gaussian (normal) distribution. This is in contrast with the main sources of this thesis (Gasse et al. (2019) \cite{gasse2019exact}, Gupta et al. (2020) \cite{gupta2020hybrid}), which use shifted geometric means. The choice of distribution in this thesis is based on uncertainty in the distribution parameters and configurations in the previous works. An example of a time and node distribution with a superimposed normal distribution approximation is shown in \Cref{fig:histogram_time} and \Cref{fig:histogram_nodes}. Some discrepancy is found for the time distribution, and more considerably for the number of nodes. The discrepancy is considered of little importance in the comparison of the models, particularly as the node number comparison is devoted little attention in this thesis. Further researchers are encourage to standardize the statistical side of branching comparison in larger detail.

% https://tex.stackexchange.com/questions/237085/histogram-with-overlaying-gauss-curve-pgfplots
\newcommand\gauss[2]{1/(#2*sqrt(2*pi))*exp(-((x-#1)^2)/(2*#2^2))}

\begin{figure}[ht]
\centering
    \begin{tikzpicture}
        \begin{axis}[
            height=7cm,
            width=12cm,
            xmin=0.0,
            xmax=4.5,
            xlabel = {Solution time [s]},
            ylabel = Frequency
    ]

        \addplot[
            black,
            fill=lightgray,
            hist,
            hist/bins=40,
        ] table[
            y=time,
        ] {dat/soltime_gnn1_cauctions.dat};

        \addplot[domain={0.0:4.5},yscale=28,samples=250] {\gauss{1.68}{0.48}}; %23.2

        \end{axis}
    \end{tikzpicture}
    \caption{Solution time for GNN1 on combinatorial auctions problems with a normal distribution approximation.}
    \label{fig:histogram_time}
\end{figure}

\begin{figure}[ht]
\centering
    \begin{tikzpicture}
        \begin{axis}[
            height=7cm,
            width=12cm,
            xmin=0.0,
            xmax=500,
            xlabel = {Solution time [s]},
            ylabel = Frequency
    ]

        \addplot[
            black,
            fill=lightgray,
            hist,
            hist/bins=40,
        ] table[
            y=nodes,
        ] {dat/nodes_gnn1_cauctions.dat};

        \addplot[domain={0.0:500},yscale=3400,samples=250] {\gauss{95}{78}}; %2800

        \end{axis}
    \end{tikzpicture}
    \caption{Number of nodes after solving for GNN1 on combinatorial auctions problems with a normal distribution approximation.}
    \label{fig:histogram_nodes}
\end{figure}


\section{MNIST Results}
First we will see results related to different database and parameters configurations.

\begin{figure}[H]
	\hspace{-1cm}
			\begin{tikzpicture} %
			\begin{axis}[smooth,
			legend pos = north east,
			mark repeat=10,%
			] %
			\addplot3 [surf,z buffer=sort, mesh/rows=5, shader=interp]
			table[y={batch}, x={index} , z={val_loss}, col sep=comma] {ResultsNormal/data.csv};
			\end{axis} %
			\end{tikzpicture}
	\end{figure}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%START: BATCH DEPENDENCIES RESULTS%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{figure}[H]
	\hspace{-1cm}
	\begin{tabular}{C{.48\textwidth}C{.48\textwidth}}
		%%%%%%%%%%%%%%%%%%%%%% 1 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
		\subfigure [Five layer, adagrad, hessian uniform] {
			\begin{tikzpicture} %
			\begin{axis}[smooth,
			legend pos = north east,
			mark repeat=10,%
			] %
			\addplot3 [surf,draw=red,z buffer=sort, mesh/rows=5]
			table[y={batch}, x={index} , z={val_loss}, col sep=comma] {ResultsNormal/data.csv};
			%\addplot3 [surf]
			%table[y expr=4, x expr=\coordindex , z={val_loss}, col sep=comma] {ResultsNormal/mnist_FiveLayer_40B_0E_adagrad_he_u.csv};
			%\addlegendentry{40};%
		    %\addplot3 [surf] table[y expr=6, x expr=\coordindex , z={val_loss}, col sep=comma] {ResultsNormal/mnist_FiveLayer_60B_0E_adagrad_he_u.csv};
			%\addlegendentry{20};%
			%\addplot3 table[y expr=4, x expr=\coordindex , z={val_loss}, col sep=comma] {ResultsNormal/mnist_FiveLayer_40B_0E_adagrad_he_u.csv};
			%\addlegendentry{40};%
			%\addplot3 table[y expr=6, x expr=\coordindex , z={val_loss}, col sep=comma] {ResultsNormal/mnist_FiveLayer_60B_0E_adagrad_he_u.csv};
			%\addlegendentry{60};%
			%\addplot3 table[y expr=8, x expr=\coordindex , z={val_loss}, col sep=comma] {ResultsNormal/mnist_FiveLayer_80B_0E_adagrad_he_u.csv};
			%\addlegendentry{80};%
			%\addplot3 table[y expr=10, x expr=\coordindex , z={val_loss}, col sep=comma] {ResultsNormal/mnist_FiveLayer_100B_0E_adagrad_he_u.csv};
			%\addlegendentry{100};%
			%\addplot3 table[y expr=12, x expr=\coordindex , z={val_loss}, col sep=comma] {ResultsNormal/mnist_FiveLayer_120B_0E_adagrad_he_u.csv};
			%\addlegendentry{120};%
			%\addplot3 table[y expr=14, x expr=\coordindex , z={val_loss}, col sep=comma] {ResultsNormal/mnist_FiveLayer_140B_0E_adagrad_he_u.csv};
			%\addlegendentry{140};%
			%\addplot3 table[y expr=16, x expr=\coordindex , z={val_loss}, col sep=comma] {ResultsNormal/mnist_FiveLayer_160B_0E_adagrad_he_u.csv};
			%\addlegendentry{160};%
			%\addplot3 table[y expr=18, x expr=\coordindex , z={val_loss}, col sep=comma] {ResultsNormal/mnist_FiveLayer_180B_0E_adagrad_he_u.csv};
			%\addlegendentry{180};%
			%\legend{}
			\end{axis} %
			\end{tikzpicture}
		}&
		\subfigure [Three layer, adagrad, hessian uniform] {
			\begin{tikzpicture} %
			\begin{axis}[smooth,
			legend pos = north east,
			xlabel={$epochs$}, %
			zlabel={$error$}, %
			mark repeat=10,%
			% load a color `cycle list' from the `colorbrewer' library
			cycle list/Dark2,
			% define fill color for the marker
			% create new `cycle list` from existing `cycle list's and an
			cycle multiindex* list={
				Dark2
				\nextlist
				my marks
				\nextlist
				[3 of]linestyles
				\nextlist
				solid
				\nextlist
			},
			mark list fill={.!75!white},
			xticklabel style={/pgf/number format/.cd,fixed,precision=2},%
			%width=0.25
			] %
			\addplot3 [fill=orange,fill opacity=0.75,draw=orange!80!black,thick,mark=none] table[y expr=2, x expr=\coordindex , z={val_loss}, col sep=comma] {ResultsNormal/mnist_ThreeLayer_20B_0E_adagrad_he_u.csv};
			\addlegendentry{20};%
			\addplot3 [fill=yellow,fill opacity=0.55,draw=yellow!80!black,thick,mark=none] table[y expr=4, x expr=\coordindex , z={val_loss}, col sep=comma] {ResultsNormal/mnist_ThreeLayer_40B_0E_adagrad_he_u.csv};
			\addlegendentry{40};%
			\addplot3 [fill=green,fill opacity=0.55,draw=yellow!80!black,thick,mark=none] table[y expr=6, x expr=\coordindex , z={val_loss}, col sep=comma] {ResultsNormal/mnist_ThreeLayer_60B_0E_adagrad_he_u.csv};
			\addlegendentry{60};%
			\addplot3 [fill=red,fill opacity=0.55,draw=yellow!80!black,thick,mark=none] table[y expr=8, x expr=\coordindex , z={val_loss}, col sep=comma] {ResultsNormal/mnist_ThreeLayer_80B_0E_adagrad_he_u.csv};
			\addlegendentry{80};%
			\addplot3 [fill=violet,fill opacity=0.55,draw=yellow!80!black,thick,mark=none] table[y expr=10, x expr=\coordindex , z={val_loss}, col sep=comma] {ResultsNormal/mnist_ThreeLayer_100B_0E_adagrad_he_u.csv};
			\addlegendentry{100};%
			\addplot3 [fill=pink,fill opacity=0.55,draw=yellow!80!black,thick,mark=none] table[y expr=12, x expr=\coordindex , z={val_loss}, col sep=comma] {ResultsNormal/mnist_ThreeLayer_120B_0E_adagrad_he_u.csv};
			\addlegendentry{120};%
			\addplot3 [fill=orange,fill opacity=0.55,draw=yellow!80!black,thick,mark=none] table[y expr=14, x expr=\coordindex , z={val_loss}, col sep=comma] {ResultsNormal/mnist_ThreeLayer_140B_0E_adagrad_he_u.csv};
			\addlegendentry{140};%
			\addplot3 [fill=blue,fill opacity=0.55,draw=yellow!80!black,thick,mark=none] table[y expr=16, x expr=\coordindex , z={val_loss}, col sep=comma] {ResultsNormal/mnist_ThreeLayer_160B_0E_adagrad_he_u.csv};
			\addlegendentry{160};%
			\addplot3 [fill=black,fill opacity=0.55,draw=yellow!80!black,thick,mark=none] table[y expr=18, x expr=\coordindex , z={val_loss}, col sep=comma] {ResultsNormal/mnist_ThreeLayer_180B_0E_adagrad_he_u.csv};
			\addlegendentry{180};%
			\legend{}
			\end{axis} %
			\end{tikzpicture}
		} \\
		\subfigure [Two layer, adagrad, hessian uniform] {
			\begin{tikzpicture} %
			\begin{axis}[smooth,
			legend pos = north east,
			xlabel={$epochs$}, %
			zlabel={$error$}, %
			mark repeat=10,%
			% load a color `cycle list' from the `colorbrewer' library
			cycle list/Dark2,
			% define fill color for the marker
			% create new `cycle list` from existing `cycle list's and an
			cycle multiindex* list={
				Dark2
				\nextlist
				my marks
				\nextlist
				[3 of]linestyles
				\nextlist
				solid
				\nextlist
			},
			mark list fill={.!75!white},
			xticklabel style={/pgf/number format/.cd,fixed,precision=2},%
			%width=0.25
			] %
			\addplot3 [fill=orange,fill opacity=0.75,draw=orange!80!black,thick,mark=none] table[y expr=2, x expr=\coordindex , z={val_loss}, col sep=comma] {ResultsNormal/mnist_TwoLayer_20B_0E_adagrad_he_u.csv};
			\addlegendentry{20};%
			\addplot3 [fill=yellow,fill opacity=0.55,draw=yellow!80!black,thick,mark=none] table[y expr=4, x expr=\coordindex , z={val_loss}, col sep=comma] {ResultsNormal/mnist_TwoLayer_40B_0E_adagrad_he_u.csv};
			\addlegendentry{40};%
			\addplot3 [fill=green,fill opacity=0.55,draw=yellow!80!black,thick,mark=none] table[y expr=6, x expr=\coordindex , z={val_loss}, col sep=comma] {ResultsNormal/mnist_TwoLayer_60B_0E_adagrad_he_u.csv};
			\addlegendentry{60};%
			\addplot3 [fill=red,fill opacity=0.55,draw=yellow!80!black,thick,mark=none] table[y expr=8, x expr=\coordindex , z={val_loss}, col sep=comma] {ResultsNormal/mnist_TwoLayer_80B_0E_adagrad_he_u.csv};
			\addlegendentry{80};%
			\addplot3 [fill=violet,fill opacity=0.55,draw=yellow!80!black,thick,mark=none] table[y expr=10, x expr=\coordindex , z={val_loss}, col sep=comma] {ResultsNormal/mnist_TwoLayer_100B_0E_adagrad_he_u.csv};
			\addlegendentry{100};%
			\addplot3 [fill=pink,fill opacity=0.55,draw=yellow!80!black,thick,mark=none] table[y expr=12, x expr=\coordindex , z={val_loss}, col sep=comma] {ResultsNormal/mnist_TwoLayer_120B_0E_adagrad_he_u.csv};
			\addlegendentry{120};%
			\addplot3 [fill=orange,fill opacity=0.55,draw=yellow!80!black,thick,mark=none] table[y expr=14, x expr=\coordindex , z={val_loss}, col sep=comma] {ResultsNormal/mnist_TwoLayer_140B_0E_adagrad_he_u.csv};
			\addlegendentry{140};%
			\addplot3 [fill=blue,fill opacity=0.55,draw=yellow!80!black,thick,mark=none] table[y expr=16, x expr=\coordindex , z={val_loss}, col sep=comma] {ResultsNormal/mnist_TwoLayer_160B_0E_adagrad_he_u.csv};
			\addlegendentry{160};%
			\addplot3 [fill=black,fill opacity=0.55,draw=yellow!80!black,thick,mark=none] table[y expr=18, x expr=\coordindex , z={val_loss}, col sep=comma] {ResultsNormal/mnist_TwoLayer_180B_0E_adagrad_he_u.csv};
			\addlegendentry{180};%
			\legend{}
			\end{axis} %
			\end{tikzpicture}
		}&
		\subfigure [Two layer, SGD, hessian uniform] {
			\begin{tikzpicture} %
			\begin{axis}[smooth,
			legend pos = north east,
			xlabel={$epochs$}, %
			zlabel={$error$}, %
			mark repeat=10,%
			% load a color `cycle list' from the `colorbrewer' library
			cycle list/Dark2,
			% define fill color for the marker
			% create new `cycle list` from existing `cycle list's and an
			cycle multiindex* list={
				Dark2
				\nextlist
				my marks
				\nextlist
				[3 of]linestyles
				\nextlist
				solid
				\nextlist
			},
			mark list fill={.!75!white},
			xticklabel style={/pgf/number format/.cd,fixed,precision=2},%
			%width=0.25
			] %
			\addplot3  table[y expr=1, x expr=\coordindex , z={val_loss}, col sep=comma] {ResultsNormal/mnist_TwoLayer_10B_0E_SGD_he_u.csv};
			\addlegendentry{10};%
			\addplot3  table[y expr=2, x expr=\coordindex , z={val_loss}, col sep=comma] {ResultsNormal/mnist_TwoLayer_20B_0E_SGD_he_u.csv};
			\addlegendentry{20};%
			\addplot3  table[y expr=4, x expr=\coordindex , z={val_loss}, col sep=comma] {ResultsNormal/mnist_TwoLayer_40B_0E_SGD_he_u.csv};
			\addlegendentry{40};%
			\addplot3  table[y expr=6, x expr=\coordindex , z={val_loss}, col sep=comma] {ResultsNormal/mnist_TwoLayer_60B_0E_SGD_he_u.csv};
			\addlegendentry{60};%
			\addplot3  table[y expr=8, x expr=\coordindex , z={val_loss}, col sep=comma] {ResultsNormal/mnist_TwoLayer_80B_0E_SGD_he_u.csv};
			\addlegendentry{80};%
			\addplot3  table[y expr=10, x expr=\coordindex , z={val_loss}, col sep=comma] {ResultsNormal/mnist_TwoLayer_100B_0E_SGD_he_u.csv};
			\addlegendentry{100};%
			\addplot3  table[y expr=12, x expr=\coordindex , z={val_loss}, col sep=comma] {ResultsNormal/mnist_TwoLayer_120B_0E_SGD_he_u.csv};
			\addlegendentry{120};%
			\addplot3  table[y expr=14, x expr=\coordindex , z={val_loss}, col sep=comma] {ResultsNormal/mnist_TwoLayer_140B_0E_SGD_he_u.csv};
			\addlegendentry{140};%
			\addplot3  table[y expr=16, x expr=\coordindex , z={val_loss}, col sep=comma] {ResultsNormal/mnist_TwoLayer_160B_0E_SGD_he_u.csv};
			\addlegendentry{160};%
			\addplot3  table[y expr=18, x expr=\coordindex , z={val_loss}, col sep=comma] {ResultsNormal/mnist_TwoLayer_180B_0E_SGD_he_u.csv};
			\addlegendentry{180};%
			\legend{}
			\end{axis} %
			\end{tikzpicture}
		}
	\end{tabular}
	\caption {\textit{hessian uniform,batch size=10,three layer}}
\end{figure}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%END: BATCH DEPENDENCIES RESULTS%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%START VARIOUS STRATEGIES RESULTS%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{figure}[H]
	\hspace{-1cm}
	\begin{tabular}{C{.48\textwidth}C{.48\textwidth}}
		%%%%%%%%%%%%%%%%%%%%%% 1 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
		\subfigure [Two Layer] {
			\begin{tikzpicture} %
			\begin{axis}[smooth,
			legend pos = north east,
			xlabel={$epochs$}, %
			zlabel={$error$}, %
			mark repeat=10,%
			ymin=1,%
			ymax=3,%
		%	ytick={1,...,3},
		%	yticklabel={outliers,care,minibatch},
			%xmin=100,
			% load a color `cycle list' from the `colorbrewer' library
			cycle list/Dark2,
			% define fill color for the marker
			% create new `cycle list` from existing `cycle list's and an
			cycle multiindex* list={
				Dark2
				\nextlist
				my marks
				\nextlist
				[3 of]linestyles
				\nextlist
				solid
				\nextlist
			},
			mark list fill={.!75!white},
			xticklabel style={/pgf/number format/.cd,fixed,precision=2},%
			%width=0.25
			] %
			\addplot3 [fill=orange,fill opacity=0.75,draw=orange!80!black,thick,mark=none] table[y expr=3, x expr=\coordindex , z={val_loss}, col sep=comma] {Results/mnist_TwoLayer_10B_0E_adamax_he_u.csv};
			\addlegendentry{minibatch};%
			\addplot3 [fill=yellow,fill opacity=0.55,draw=yellow!80!black,thick,mark=none] table[y expr=2, x expr=\coordindex , z={val_loss}, col sep=comma] {Results/mnist_carebatch_TwoLayer_10B_0E_adamax_gl_u.csv};
			\addlegendentry{care};%
			\addplot3 [fill=violet,fill opacity=0.50,draw=violet!80!black,thick,mark=none] table[y expr=1, x expr=\coordindex , z={val_loss}, col sep=comma] {Results/outliers_2_1_100_10_1/mnist_iqr_outliers_npass_TwoLayer_10B_0E_adamax_gl_u.csv};
			\addlegendentry{outliers+npass};
			\end{axis} %
			\end{tikzpicture}
		}&
		\subfigure [Three Layer] {
			\begin{tikzpicture} %
			\begin{axis}[smooth,
			legend pos = north east,
			xlabel={$epochs$}, %
			%zlabel={$error$}, %
			mark repeat=10,%
			%xmax=100,%
			% load a color `cycle list' from the `colorbrewer' library
			cycle list/Dark2,
			% define fill color for the marker
			mark list fill={.!75!white},
			% create new `cycle list` from existing `cycle list's and an
			cycle multiindex* list={
				Dark2
				\nextlist
				my marks
				\nextlist
				[3 of]linestyles
				\nextlist
				solid
				\nextlist
			},
			xticklabel style={/pgf/number format/.cd,fixed,precision=2},%
			%width=0.25
			] %
			\addplot3 [fill=orange,fill opacity=0.75,draw=orange!80!black,thick,mark=none]  table[y expr=3, x expr=\coordindex  , z={val_loss}, col sep=comma] {Results/mnist_ThreeLayer_10B_0E_adamax_he_u.csv};
			\addlegendentry{minibatch};%
			\addplot3 [fill=yellow,fill opacity=0.55,draw=yellow!80!black,thick,mark=none] table[y expr=2, x expr=\coordindex  , z={val_loss}, col sep=comma] {Results/mnist_carebatch_ThreeLayer_10B_0E_adamax_he_u.csv};
			\addlegendentry{care};%
			\addplot3 [fill=violet,fill opacity=0.50,draw=violet!80!black,thick,mark=none] table[y expr=1, x expr=\coordindex  , z={val_loss}, col sep=comma] {Results/outliers_2_1_100_10_1/mnist_iqr_outliers_npass_ThreeLayer_10B_0E_adamax_he_u.csv};
			\addlegendentry{outliers+npass};
			\end{axis} %
			\end{tikzpicture}
		} \\
		\subfigure [Five Layer] {
			\begin{tikzpicture} %
			\begin{axis}[smooth,
			legend pos = north east,
			xlabel={$epochs$}, %
			zlabel={$error$}, %
			mark repeat=10,%
			% load a color `cycle list' from the `colorbrewer' library
			cycle list/Dark2,
			% define fill color for the marker
			mark list fill={.!75!white},
			xticklabel style={/pgf/number format/.cd,fixed,precision=2},%
			%width=0.25
			] %
			\addplot3 [fill=orange,fill opacity=0.75,draw=orange!80!black,thick,mark=none] table[y expr=3, x expr=\coordindex  , z={val_loss}, col sep=comma] {Results/mnist_FiveLayer_10B_0E_adamax_he_u.csv};
			\addlegendentry{minibatch};%
			\addplot3 [fill=yellow,fill opacity=0.55,draw=yellow!80!black,thick,mark=none] table[y expr=2, x expr=\coordindex  , z={val_loss}, col sep=comma] {Results/mnist_carebatch_FiveLayer_10B_0E_adamax_he_u.csv};
			\addlegendentry{care};%
			\addplot3 [fill=violet,fill opacity=0.50,draw=violet!80!black,thick,mark=none] table[y expr=1, x expr=\coordindex  , z={val_loss}, col sep=comma] {Results/outliers_2_1_100_10_1/mnist_iqr_outliers_npass_FiveLayer_10B_0E_adamax_he_u.csv};
			\addlegendentry{outliers+npass};
			\end{axis} %
			\end{tikzpicture}
		}&
		\subfigure [Validation loss] {
			\begin{tikzpicture} %
			\begin{axis}[smooth,
			xlabel={$epochs$}, %
			ylabel={$error$}, %
			mark repeat=10,%
			% load a color `cycle list' from the `colorbrewer' library
			cycle list/RdGy-6,
			% define fill color for the marker
			mark list fill={.!75!white},
			xticklabel style={/pgf/number format/.cd,fixed,precision=2},
			] %
			\addplot table[x expr=\coordindex , y={val_loss}, col sep=comma] {Results/mnist_TwoLayer_10B_0E_adamax_he_u.csv};
			\addlegendentry{minibatch};%
			\addplot table[x expr=\coordindex , y={val_loss}, col sep=comma] {Results/outliers_2_1_100_10_1/mnist_iqr_outliers_npass_TwoLayer_10B_0E_adamax_gl_u.csv};
			\addlegendentry{minibatch+outliers+npass};
			\end{axis} %
			\end{tikzpicture}
		}
	\end{tabular}
	\caption {\textit{hessian uniform,batch size=10,three layer}}
\end{figure}

\begin{figure}[H]
	\hspace{-1cm}
	\begin{tabular}{C{.48\textwidth}C{.48\textwidth}}
		%%%%%%%%%%%%%%%%%%%%%% 1 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
		\subfigure [Training accuracy] {
			\begin{tikzpicture} %
			\begin{axis}[smooth,
			legend pos = south east,
			xlabel={$epochs$}, %
			ylabel={$accuracy$}, %
			mark repeat=10,%
			 % load a color `cycle list' from the `colorbrewer' library
			cycle list/RdGy-6,
			% define fill color for the marker
			mark list fill={.!75!white},
			xticklabel style={/pgf/number format/.cd,fixed,precision=2},%
			%width=0.25
			] %
			\addplot3 [fill=orange,fill opacity=0.75,draw=orange!80!black,thick,mark=none] table[y expr=2, x expr=\coordindex , z={acc}, col sep=comma] {Results/mnist_TwoLayer_10B_0E_adamax_he_u.csv};
			\addlegendentry{minibatch};%
			\addplot3 [fill=violet,fill opacity=0.50,draw=violet!80!black,thick,mark=none] table[y expr=1, x expr=\coordindex , z={acc}, col sep=comma] {Results/outliers_2_1_100_10_1/mnist_iqr_outliers_npass_TwoLayer_10B_0E_adamax_he_u.csv};
			\addlegendentry{outliers+npass};
			\end{axis} %
			\end{tikzpicture}
		}&
		\subfigure [Validation Accuracy] {
			\begin{tikzpicture} %
			\begin{axis}[smooth,
			legend pos = south east,
			xlabel={$epochs$}, %
			ylabel={$accuracy$}, %
			mark repeat=10,%
			 % load a color `cycle list' from the `colorbrewer' library
			cycle list/RdGy-6,
			% define fill color for the marker
			mark list fill={.!75!white},
			xticklabel style={/pgf/number format/.cd,fixed,precision=2},%
			%width=0.25
			] %
			\addplot3 [fill=orange,fill opacity=0.75,draw=orange!80!black,thick,mark=none] table[y expr=2, x expr=\coordindex , z={val_acc}, col sep=comma] {Results/mnist_TwoLayer_10B_0E_adamax_he_u.csv};
			\addlegendentry{minibatch};%
			\addplot3 [fill=violet,fill opacity=0.50,draw=violet!80!black,thick,mark=none] table[y expr=1, x expr=\coordindex , z={val_acc}, col sep=comma] {Results/outliers_2_1_100_10_1/mnist_iqr_outliers_npass_TwoLayer_10B_0E_adamax_he_u.csv};
			\addlegendentry{minibatch+outliers+npass};
			\end{axis} %
			\end{tikzpicture}
		} \\
		\subfigure [Training loss] {
			\begin{tikzpicture} %
			\begin{axis}[smooth,
			xlabel={$epochs$}, %
			ylabel={$error$}, %
			mark repeat=10,%
			 % load a color `cycle list' from the `colorbrewer' library
			cycle list/RdGy-6,
			% define fill color for the marker
			mark list fill={.!75!white},
			xticklabel style={/pgf/number format/.cd,fixed,precision=2},
			] %
			\addplot3 [fill=orange,fill opacity=0.75,draw=orange!80!black,thick,mark=none] table[y expr=2, x expr=\coordindex , z={loss}, col sep=comma] {Results/mnist_TwoLayer_10B_0E_adamax_he_u.csv};
			\addlegendentry{minibatch};%
			\addplot3 [fill=violet,fill opacity=0.50,draw=violet!80!black,thick,mark=none] table[y expr=1, x expr=\coordindex , z={loss}, col sep=comma] {Results/outliers_2_1_100_10_1/mnist_iqr_outliers_npass_TwoLayer_10B_0E_adamax_he_u.csv};
			\addlegendentry{minibatch+outliers+npass};
			\end{axis} %
			\end{tikzpicture}
		}&
		\subfigure [Validation loss] {
			\begin{tikzpicture} %
			\begin{axis}[smooth,
			xlabel={$epochs$}, %
			ylabel={$error$}, %
			mark repeat=10,%
			 % load a color `cycle list' from the `colorbrewer' library
			cycle list/RdGy-6,
			% define fill color for the marker
			mark list fill={.!75!white},
			xticklabel style={/pgf/number format/.cd,fixed,precision=2},
			] %
			\addplot3 [fill=orange,fill opacity=0.75,draw=orange!80!black,thick,mark=none] table[y expr=2, x expr=\coordindex , z={val_loss}, col sep=comma] {Results/mnist_TwoLayer_10B_0E_adamax_he_u.csv};
			\addlegendentry{minibatch};%
			\addplot3 [fill=violet,fill opacity=0.50,draw=violet!80!black,thick,mark=none] table[y expr=1, x expr=\coordindex , z={val_loss}, col sep=comma] {Results/outliers_2_1_100_10_1/mnist_iqr_outliers_npass_TwoLayer_10B_0E_adamax_gl_u.csv};
			\addlegendentry{minibatch+outliers+npass};
			\end{axis} %
			\end{tikzpicture}
		}
	\end{tabular}
	\caption {\textit{hessian uniform,batch size=10,three layer}}
\end{figure}

\begin{figure}[H]

	\hspace{-1cm}
	\begin{tabular}{C{.48\textwidth}C{.48\textwidth}}
		%%%%%%%%%%%%%%%%%%%%%% 1 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
		\subfigure [Training accuracy] {
			\begin{tikzpicture} %
			\begin{axis}[smooth,
			legend pos = south east,
			xlabel={$epochs$}, %
			ylabel={$accuracy$}, %
			mark repeat=10,%
			 % load a color `cycle list' from the `colorbrewer' library
			cycle list/RdGy-6,
			% define fill color for the marker
			mark list fill={.!75!white},
			xticklabel style={/pgf/number format/.cd,fixed,precision=2},%
			%width=0.25
			] %
			\addplot table[x expr=\coordindex , y={acc}, col sep=comma] {Results/mnist_ThreeLayer_10B_0E_adamax_he_u.csv};
			\addlegendentry{minibatch};%
			\addplot table[x expr=\coordindex , y={acc}, col sep=comma] {Results/outliers_2_1_100_10_1/mnist_iqr_outliers_npass_ThreeLayer_10B_0E_adamax_he_u.csv};
			\addlegendentry{outliers+npass};
			\end{axis} %
			\end{tikzpicture}
		}&
		\subfigure [Validation Accuracy] {
			\begin{tikzpicture} %
			\begin{axis}[smooth,
			legend pos = south east,
			xlabel={$epochs$}, %
			ylabel={$accuracy$}, %
			mark repeat=10,%
			 % load a color `cycle list' from the `colorbrewer' library
			cycle list/RdGy-6,
			% define fill color for the marker
			mark list fill={.!75!white},
			xticklabel style={/pgf/number format/.cd,fixed,precision=2},%
			%width=0.25
			] %
			\addplot table[x expr=\coordindex , y={val_acc}, col sep=comma] {Results/mnist_ThreeLayer_10B_0E_adamax_he_u.csv};
			\addlegendentry{minibatch};%
			\addplot table[x expr=\coordindex , y={val_acc}, col sep=comma] {Results/outliers_2_1_100_10_1/mnist_iqr_outliers_npass_ThreeLayer_10B_0E_adamax_he_u.csv};
			\addlegendentry{outliers+npass};
			\end{axis} %
			\end{tikzpicture}
		} \\
		\subfigure [Training loss] {
			\begin{tikzpicture} %
			\begin{axis}[smooth,
			 % load a color `cycle list' from the `colorbrewer' library
			cycle list/RdGy-6,
			% define fill color for the marker
			mark list fill={.!75!white},
			% create new `cycle list` from existing `cycle list's and an
			cycle multiindex* list={
				RdGy-6
				\nextlist
				my marks
				\nextlist
				[3 of]linestyles
				\nextlist
				dashed
				\nextlist
			},
			xlabel={$epochs$}, %
			ylabel={$error$}, %
			mark repeat=10,%
			%cycle list name=my black white,%
			xticklabel style={/pgf/number format/.cd,fixed,precision=2},
			] %
			\addplot table[x expr=\coordindex , y={loss}, col sep=comma] {Results/mnist_ThreeLayer_10B_0E_adamax_he_u.csv};
			\addlegendentry{minibatch};%
			\addplot table[x expr=\coordindex , y={loss}, col sep=comma] {Results/outliers_2_1_100_10_1/mnist_iqr_outliers_npass_ThreeLayer_10B_0E_adamax_he_u.csv};
			\addlegendentry{outliers+npass};
			\end{axis} %
			\end{tikzpicture}
		}&
		\subfigure [Validation loss] {
			\begin{tikzpicture} %
			\begin{axis}[smooth,
			 % load a color `cycle list' from the `colorbrewer' library
			cycle list/RdGy-6,
			% define fill color for the marker
			mark list fill={.!75!white},
			mark repeat=10,
			% create new `cycle list` from existing `cycle list's and an
			cycle multiindex* list={
				RdGy-6
				\nextlist
				my marks
				\nextlist
				[3 of]linestyles
				\nextlist
				dashed
				\nextlist
			},
			xlabel={$epochs$}, %
			ylabel={$error$}, %
			mark repeat=10,%
			%cycle list name=my black white,%
			xticklabel style={/pgf/number format/.cd,fixed,precision=2},
			] %
			\addplot table[x expr=\coordindex , y={val_loss}, col sep=comma] {Results/mnist_ThreeLayer_10B_0E_adamax_he_u.csv};
			\addlegendentry{minibatch};%
			\addplot table[x expr=\coordindex , y={val_loss}, col sep=comma] {Results/outliers_2_1_100_10_1/mnist_iqr_outliers_npass_ThreeLayer_10B_0E_adamax_he_u.csv};
			\addlegendentry{outliers+npass};
			\end{axis} %
			\end{tikzpicture}
		}
	\end{tabular}
	\caption {\textit{glorot uniform,batch size=10,three layer}}
\end{figure}

\begin{figure}[H]
	\hspace{-1cm}
	\begin{tabular}{C{.48\textwidth}C{.48\textwidth}}
		%%%%%%%%%%%%%%%%%%%%%% 1 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
		\subfigure [Training accuracy] {
			\begin{tikzpicture} %
			\begin{axis}[smooth,
			legend pos = south east,
			xlabel={$epochs$}, %
			ylabel={$accuracy$}, %
			mark repeat=10,%
			 % load a color `cycle list' from the `colorbrewer' library
			cycle list/RdGy-6,
			% define fill color for the marker
			mark list fill={.!75!white},
			xticklabel style={/pgf/number format/.cd,fixed,precision=2},%
			%width=0.25
			] %
			\addplot table[x expr=\coordindex , y={acc}, col sep=comma] {Results/mnist_TwoLayer_10B_0E_adamax_he_u.csv};
			\addlegendentry{minibatch};%
			\addplot table[x expr=\coordindex , y={acc}, col sep=comma] {Results/mnist_carebatch_TwoLayer_10B_0E_adamax_gl_u.csv};
			\addlegendentry{care};
			\addplot table[x expr=\coordindex , y={acc}, col sep=comma] {Results/mnist_careup_init_TwoLayer_10B_0E_adamax_he_u.csv};
			\addlegendentry{careinit};
			\addplot table[x expr=\coordindex , y={acc}, col sep=comma] {Results/outliers_2_1_100_10_1/mnist_iqr_outliers_npass_TwoLayer_10B_0E_adamax_he_u.csv};
			\addlegendentry{outliers+npass};
			\end{axis} %
			\end{tikzpicture}
		}&
		\subfigure [Validation Accuracy] {
			\begin{tikzpicture} %
			\begin{axis}[smooth,
			legend pos = south east,
			xlabel={$epochs$}, %
			ylabel={$accuracy$}, %
			mark repeat=10,%
			 % load a color `cycle list' from the `colorbrewer' library
			cycle list/RdGy-6,
			% define fill color for the marker
			mark list fill={.!75!white},
			xticklabel style={/pgf/number format/.cd,fixed,precision=2},%
			%width=0.25
			] %
			\addplot table[x expr=\coordindex , y={val_acc}, col sep=comma] {Results/mnist_TwoLayer_10B_0E_adamax_he_u.csv};
			\addlegendentry{minibatch};%
			\addplot table[x expr=\coordindex , y={val_acc}, col sep=comma] {Results/mnist_carebatch_TwoLayer_10B_0E_adamax_gl_u.csv};
			\addlegendentry{minibatch+care};
			\addplot table[x expr=\coordindex , y={val_acc}, col sep=comma]
			{Results/mnist_careup_init_TwoLayer_10B_0E_adamax_he_u.csv};
			\addlegendentry{minibatch+careinit};
			\addplot table[x expr=\coordindex , y={val_acc}, col sep=comma] {Results/outliers_2_1_100_10_1/mnist_iqr_outliers_npass_TwoLayer_10B_0E_adamax_gl_u.csv};
		    \addlegendentry{minibatch+outliers+npass};
			\end{axis} %
			\end{tikzpicture}
		} \\
		\subfigure [Training loss] {
			\begin{tikzpicture} %
			\begin{axis}[smooth,
			xlabel={$epochs$}, %
			ylabel={$error$}, %
			mark repeat=10,%
			 % load a color `cycle list' from the `colorbrewer' library
			cycle list/RdGy-6,
			% define fill color for the marker
			mark list fill={.!75!white},
			xticklabel style={/pgf/number format/.cd,fixed,precision=2},
			] %
			\addplot table[x expr=\coordindex , y={loss}, col sep=comma] {Results/mnist_TwoLayer_10B_0E_adamax_he_u.csv};
			\addlegendentry{minibatch};%
			\addplot table[x expr=\coordindex , y={loss}, col sep=comma] {Results/mnist_carebatch_TwoLayer_10B_0E_adamax_gl_u.csv};
			\addlegendentry{minibatch+care};
			\addplot table[x expr=\coordindex , y={loss}, col sep=comma]
			{Results/mnist_careup_init_TwoLayer_10B_0E_adamax_he_u.csv};
			\addlegendentry{minibatch+careinit};
			\addplot table[x expr=\coordindex , y={loss}, col sep=comma] {Results/outliers_2_1_100_10_1/mnist_iqr_outliers_npass_TwoLayer_10B_0E_adamax_gl_u.csv};
			\addlegendentry{minibatch+outliers+npass};
			\end{axis} %
			\end{tikzpicture}
		}&
		\subfigure [Validation loss] {
			\begin{tikzpicture} %
			\begin{axis}[smooth,
			xlabel={$epochs$}, %
			ylabel={$error$}, %
			mark repeat=10,%
			 % load a color `cycle list' from the `colorbrewer' library
			cycle list/RdGy-6,
			% define fill color for the marker
			mark list fill={.!75!white},
			xticklabel style={/pgf/number format/.cd,fixed,precision=2},
			] %
			\addplot table[x expr=\coordindex , y={val_loss}, col sep=comma] {Results/mnist_TwoLayer_10B_0E_adamax_he_u.csv};
			\addlegendentry{minibatch};%
			\addplot table[x expr=\coordindex , y={val_loss}, col sep=comma] {Results/mnist_carebatch_TwoLayer_10B_0E_adamax_gl_u.csv};
			\addlegendentry{minibatch+care};
			\addplot table[x expr=\coordindex , y={val_loss}, col sep=comma]
			{Results/mnist_careup_init_TwoLayer_10B_0E_adamax_he_u.csv};
			\addlegendentry{minibatch+careinit};
			\addplot table[x expr=\coordindex , y={val_loss}, col sep=comma] {Results/outliers_2_1_100_10_1/mnist_iqr_outliers_npass_TwoLayer_10B_0E_adamax_gl_u.csv};
			\addlegendentry{minibatch+outliers+npass};
			\end{axis} %
			\end{tikzpicture}
		}
	\end{tabular}
	\caption {\textit{hessian uniform,batch size=10,three layer}}
\end{figure}

\begin{figure}[H]

	\hspace{-1cm}
	\begin{tabular}{C{.48\textwidth}C{.48\textwidth}}
		%%%%%%%%%%%%%%%%%%%%%% 1 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
		\subfigure [Training accuracy] {
			\begin{tikzpicture} %
			\begin{axis}[smooth,
			legend pos = south east,
			xlabel={$epochs$}, %
			ylabel={$accuracy$}, %
			mark repeat=10,%
			 % load a color `cycle list' from the `colorbrewer' library
			cycle list/RdGy-6,
			% define fill color for the marker
			mark list fill={.!75!white},
			xticklabel style={/pgf/number format/.cd,fixed,precision=2},%
			%width=0.25
			] %
			\addplot table[x expr=\coordindex , y={acc}, col sep=comma] {Results/mnist_ThreeLayer_10B_0E_adamax_he_u.csv};
			\addlegendentry{minibatch};%
			\addplot table[x expr=\coordindex , y={acc}, col sep=comma] {Results/mnist_carebatch_ThreeLayer_10B_0E_adamax_gl_u.csv};
			\addlegendentry{minibatch+care};
			\addplot table[x expr=\coordindex , y={acc}, col sep=comma] {Results/mnist_careup_init_ThreeLayer_10B_0E_adamax_he_u.csv};
			\addlegendentry{minibatch+careinit};
			\addplot table[x expr=\coordindex , y={acc}, col sep=comma] {Results/outliers_2_1_100_10_1/mnist_iqr_outliers_npass_ThreeLayer_10B_0E_adamax_he_u.csv};
			\addlegendentry{outliers+npass};
			\end{axis} %
			\end{tikzpicture}
		}&
		\subfigure [Validation Accuracy] {
			\begin{tikzpicture} %
			\begin{axis}[smooth,
			legend pos = south east,
			xlabel={$epochs$}, %
			ylabel={$accuracy$}, %
			mark repeat=10,%
			 % load a color `cycle list' from the `colorbrewer' library
			cycle list/RdGy-6,
			% define fill color for the marker
			mark list fill={.!75!white},
			xticklabel style={/pgf/number format/.cd,fixed,precision=2},%
			%width=0.25
			] %
			\addplot table[x expr=\coordindex , y={val_acc}, col sep=comma] {Results/mnist_ThreeLayer_10B_0E_adamax_he_u.csv};
			\addlegendentry{minibatch};%
			\addplot table[x expr=\coordindex , y={val_acc}, col sep=comma] {Results/mnist_carebatch_ThreeLayer_10B_0E_adamax_gl_u.csv};
			\addlegendentry{minibatch+care};
			\addplot table[x expr=\coordindex , y={val_acc}, col sep=comma] {Results/mnist_careup_init_ThreeLayer_10B_0E_adamax_he_u.csv};
			\addlegendentry{minibatch+careinit};
			\addplot table[x expr=\coordindex , y={val_acc}, col sep=comma] {Results/outliers_2_1_100_10_1/mnist_iqr_outliers_npass_ThreeLayer_10B_0E_adamax_he_u.csv};
			\addlegendentry{outliers+npass};
			\end{axis} %
			\end{tikzpicture}
		} \\
		\subfigure [Training loss] {
			\begin{tikzpicture} %
			\begin{axis}[smooth,
			xlabel={$epochs$}, %
			ylabel={$error$}, %
			mark repeat=10,%
			 % load a color `cycle list' from the `colorbrewer' library
			cycle list/RdGy-6,
			% define fill color for the marker
			mark list fill={.!75!white},
			xticklabel style={/pgf/number format/.cd,fixed,precision=2},
			] %
			\addplot table[x expr=\coordindex , y={loss}, col sep=comma] {Results/mnist_ThreeLayer_10B_0E_adamax_he_u.csv};
			\addlegendentry{minibatch};%
			\addplot table[x expr=\coordindex , y={loss}, col sep=comma] {Results/mnist_carebatch_ThreeLayer_10B_0E_adamax_gl_u.csv};
			\addlegendentry{minibatch+care};
			\addplot table[x expr=\coordindex , y={loss}, col sep=comma] {Results/mnist_careup_init_ThreeLayer_10B_0E_adamax_he_u.csv};
			\addlegendentry{minibatch+careinit};
			\addplot table[x expr=\coordindex , y={loss}, col sep=comma] {Results/outliers_2_1_100_10_1/mnist_iqr_outliers_npass_ThreeLayer_10B_0E_adamax_he_u.csv};
			\addlegendentry{outliers+npass};
			\end{axis} %
			\end{tikzpicture}
		}&
		\subfigure [Validation loss] {
			\begin{tikzpicture} %
			\begin{axis}[smooth,
			xlabel={$epochs$}, %
			ylabel={$error$}, %
			mark repeat=10,%
			 % load a color `cycle list' from the `colorbrewer' library
			cycle list/RdGy-6,
			% define fill color for the marker
			mark list fill={.!75!white},
			xticklabel style={/pgf/number format/.cd,fixed,precision=2},
			] %
			\addplot table[x expr=\coordindex , y={val_loss}, col sep=comma] {Results/mnist_ThreeLayer_10B_0E_adamax_he_u.csv};
			\addlegendentry{minibatch};%
			\addplot table[x expr=\coordindex , y={val_loss}, col sep=comma] {Results/mnist_carebatch_ThreeLayer_10B_0E_adamax_gl_u.csv};
			\addlegendentry{minibatch+care};
			\addplot table[x expr=\coordindex , y={val_loss}, col sep=comma] {Results/mnist_careup_init_ThreeLayer_10B_0E_adamax_he_u.csv};
			\addlegendentry{minibatch+careinit};
			\addplot table[x expr=\coordindex , y={val_loss}, col sep=comma] {Results/outliers_2_1_100_10_1/mnist_iqr_outliers_npass_ThreeLayer_10B_0E_adamax_he_u.csv};
			\addlegendentry{outliers+npass};
			\end{axis} %
			\end{tikzpicture}
		}
	\end{tabular}
	\caption {\textit{glorot uniform,batch size=10,three layer}}
\end{figure}

\begin{figure}[H]
	\hspace{-1cm}
	\begin{tabular}{C{.48\textwidth}C{.48\textwidth}}
		%%%%%%%%%%%%%%%%%%%%%% 1 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
		\subfigure [Training accuracy] {
			\begin{tikzpicture} %
			\begin{axis}[smooth,
			legend pos = south east,
			xlabel={$epochs$}, %
			ylabel={$accuracy$}, %
			mark repeat=10,%
			 % load a color `cycle list' from the `colorbrewer' library
			cycle list/RdGy-6,
			% define fill color for the marker
			mark list fill={.!75!white},
			xticklabel style={/pgf/number format/.cd,fixed,precision=2},%
			%width=0.25
			] %
			\addplot table[x expr=\coordindex , y={acc}, col sep=comma] {Results/mnist_FiveLayer_10B_0E_adamax_he_u.csv};
			\addlegendentry{minibatch};%
			\addplot table[x expr=\coordindex , y={acc}, col sep=comma] {Results/mnist_carebatch_FiveLayer_10B_0E_adamax_gl_u.csv};
			\addlegendentry{minibatch+care};
			\addplot table[x expr=\coordindex , y={acc}, col sep=comma] {Results/mnist_careup_init_FiveLayer_10B_0E_adamax_he_u.csv};
			\addlegendentry{minibatch+careinit};
			\addplot table[x expr=\coordindex , y={acc}, col sep=comma] {Results/outliers_2_1_100_10_1/mnist_iqr_outliers_npass_FiveLayer_10B_0E_adamax_he_u.csv};
			\addlegendentry{outliers+npass};
			\end{axis} %
			\end{tikzpicture}
		}&
		\subfigure [Validation Accuracy] {
			\begin{tikzpicture} %
			\begin{axis}[smooth,
			legend pos = south east,
			xlabel={$epochs$}, %
			ylabel={$accuracy$}, %
			mark repeat=10,%
			 % load a color `cycle list' from the `colorbrewer' library
			cycle list/RdGy-6,
			% define fill color for the marker
			mark list fill={.!75!white},
			xticklabel style={/pgf/number format/.cd,fixed,precision=2},%
			%width=0.25
			] %
			\addplot table[x expr=\coordindex , y={val_acc}, col sep=comma] {Results/mnist_FiveLayer_10B_0E_adamax_he_u.csv};
			\addlegendentry{minibatch};%
			\addplot table[x expr=\coordindex , y={val_acc}, col sep=comma] {Results/mnist_carebatch_FiveLayer_10B_0E_adamax_gl_u.csv};
			\addlegendentry{minibatch+care};
			\addplot table[x expr=\coordindex , y={val_acc}, col sep=comma] {Results/mnist_careup_init_FiveLayer_10B_0E_adamax_he_u.csv};
			\addlegendentry{minibatch+careinit};
			\addplot table[x expr=\coordindex , y={val_acc}, col sep=comma] {Results/outliers_2_1_100_10_1/mnist_iqr_outliers_npass_FiveLayer_10B_0E_adamax_he_u.csv};
			\addlegendentry{outliers+npass};
			\end{axis} %
			\end{tikzpicture}
		} \\
		\subfigure [Training loss] {
			\begin{tikzpicture} %
			\begin{axis}[smooth,
			xlabel={$epochs$}, %
			ylabel={$error$}, %
			mark repeat=10,%
			 % load a color `cycle list' from the `colorbrewer' library
			cycle list/RdGy-6,
			% define fill color for the marker
			mark list fill={.!75!white},
			xticklabel style={/pgf/number format/.cd,fixed,precision=2},
			] %
			\addplot table[x expr=\coordindex , y={loss}, col sep=comma] {Results/mnist_FiveLayer_10B_0E_adamax_he_u.csv};
			\addlegendentry{minibatch};%
			\addplot table[x expr=\coordindex , y={loss}, col sep=comma] {Results/mnist_carebatch_FiveLayer_10B_0E_adamax_gl_u.csv};
			\addlegendentry{minibatch+care};
			\addplot table[x expr=\coordindex , y={loss}, col sep=comma] {Results/mnist_careup_init_FiveLayer_10B_0E_adamax_he_u.csv};
			\addlegendentry{minibatch+careinit};
			\addplot table[x expr=\coordindex , y={loss}, col sep=comma] {Results/outliers_2_1_100_10_1/mnist_iqr_outliers_npass_FiveLayer_10B_0E_adamax_he_u.csv};
			\addlegendentry{outliers+npass};
			\end{axis} %
			\end{tikzpicture}
		}&
		\subfigure [Validation loss] {
			\begin{tikzpicture} %
			\begin{axis}[smooth,
			xlabel={$epochs$}, %
			ylabel={$error$}, %
			mark repeat=10,%
			 % load a color `cycle list' from the `colorbrewer' library
			cycle list/RdGy-6,
			% define fill color for the marker
			mark list fill={.!75!white},
			xticklabel style={/pgf/number format/.cd,fixed,precision=2},
			] %
			\addplot table[x expr=\coordindex , y={val_loss}, col sep=comma] {Results/mnist_FiveLayer_10B_0E_adamax_he_u.csv};
			\addlegendentry{minibatch};%
			\addplot table[x expr=\coordindex , y={val_loss}, col sep=comma] {Results/mnist_carebatch_FiveLayer_10B_0E_adamax_gl_u.csv};
			\addlegendentry{minibatch+care};
			\addplot table[x expr=\coordindex , y={val_loss}, col sep=comma] {Results/mnist_careup_init_FiveLayer_10B_0E_adamax_he_u.csv};
			\addlegendentry{minibatch+careinit};
			\addplot table[x expr=\coordindex , y={val_loss}, col sep=comma] {Results/outliers_2_1_100_10_1/mnist_iqr_outliers_npass_FiveLayer_10B_0E_adamax_he_u.csv};
			\addlegendentry{outliers+npass};
			\end{axis} %
			\end{tikzpicture}
		}
	\end{tabular}
	\caption {\textit{hessian uniform,batch size=10,five layer}}
\end{figure}

	\begin{figure}[H]
		\hspace{-1cm}
		\begin{tabular}{C{.48\textwidth}C{.48\textwidth}}
			%%%%%%%%%%%%%%%%%%%%%% 1 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
			\subfigure [Training accuracy] {
				\begin{tikzpicture} %
				\begin{axis}[smooth,
				legend pos = south east,
				xlabel={$epochs$}, %
				ylabel={$accuracy$}, %
				mark repeat=10,%
				 % load a color `cycle list' from the `colorbrewer' library
				cycle list/RdGy-6,
				% define fill color for the marker
				mark list fill={.!75!white},
				xticklabel style={/pgf/number format/.cd,fixed,precision=2},
				] %
				\addplot table[x expr=\coordindex , y={acc}, col sep=comma] {Results/mnist_ThreeLayer_10B_0E_adamax_gl_u.csv};
				\addlegendentry{Three Layer};%
				\addplot table[x expr=\coordindex , y={acc}, col sep=comma] {Results/mnist_FiveLayer_10B_0E_adamax_gl_u.csv};
				\addlegendentry{Five Layer};
				\end{axis} %
				\end{tikzpicture}
			}&
			\subfigure [Validation accuracy] {
				\begin{tikzpicture} %
				\begin{axis}[smooth,
				legend pos = south east,
				xlabel={$epochs$}, %
				mark repeat=10,%
				 % load a color `cycle list' from the `colorbrewer' library
				cycle list/RdGy-6,
				% define fill color for the marker
				mark list fill={.!75!white},
				xticklabel style={/pgf/number format/.cd,fixed,precision=2},
				] %
				\addplot table[x expr=\coordindex , y={val_acc}, col sep=comma] {Results/mnist_ThreeLayer_10B_0E_adamax_gl_u.csv};
				\addlegendentry{Three Layer};%
				\addplot table[x expr=\coordindex , y={val_acc}, col sep=comma] {Results/mnist_FiveLayer_10B_0E_adamax_gl_u.csv};
				\addlegendentry{Five Layer};
				\end{axis} %
				\end{tikzpicture}
			} \\
			\subfigure [Training loss] {
				\begin{tikzpicture} %
				\begin{axis}[smooth,
				xlabel={$epochs$}, %
				ylabel={$error$}, %
				mark repeat=10,%
				 % load a color `cycle list' from the `colorbrewer' library
				cycle list/RdGy-6,
				% define fill color for the marker
				mark list fill={.!75!white},
				xticklabel style={/pgf/number format/.cd,fixed,precision=2},
				] %
				\addplot table[x expr=\coordindex , y={loss}, col sep=comma] {Results/mnist_ThreeLayer_10B_0E_adamax_gl_u.csv};
				\addlegendentry{Three Layer};%
				\addplot table[x expr=\coordindex , y={loss}, col sep=comma] {Results/mnist_FiveLayer_10B_0E_adamax_gl_u.csv};
				\addlegendentry{Five Layer};
				\end{axis} %
				\end{tikzpicture}
			}&
			\subfigure [Validation loss] {
				\begin{tikzpicture} %
				\begin{axis}[smooth,
				xlabel={$epochs$}, %
				mark repeat=10,%
				 % load a color `cycle list' from the `colorbrewer' library
				cycle list/RdGy-6,
				% define fill color for the marker
				mark list fill={.!75!white},
				xticklabel style={/pgf/number format/.cd,fixed,precision=2},
				] %
				\addplot table[x expr=\coordindex , y={val_loss}, col sep=comma] {Results/mnist_ThreeLayer_10B_0E_adamax_gl_u.csv};
				\addlegendentry{Three Layer};%
				\addplot table[x expr=\coordindex , y={val_loss}, col sep=comma] {Results/mnist_FiveLayer_10B_0E_adamax_gl_u.csv};
				\addlegendentry{Five Layer};
				\end{axis} %
				\end{tikzpicture}
			}
		\end{tabular}
		\caption {\textit{optimizer=adamax, initializer=glorot uniform and batch size=10}}
	\end{figure}

	\begin{figure}[H]
		\hspace{-1cm}
		\begin{tabular}{C{.48\textwidth}C{.48\textwidth}}
			%%%%%%%%%%%%%%%%%%%%%% 1 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
			\subfigure [Training accuracy] {
				\begin{tikzpicture} %
				\begin{axis}[smooth,
				legend pos = south east,
				xlabel={$epochs$}, %
				ylabel={$accuracy$}, %
				mark repeat=10,%
				 % load a color `cycle list' from the `colorbrewer' library
				cycle list/RdGy-6,
				% define fill color for the marker
				mark list fill={.!75!white},
				xticklabel style={/pgf/number format/.cd,fixed,precision=2},
				] %
				\addplot table[x expr=\coordindex , y={acc}, col sep=comma] {Results/mnist_ThreeLayer_10B_0E_adamax_he_u.csv};
				\addlegendentry{Three Layer};%
				\addplot table[x expr=\coordindex , y={acc}, col sep=comma] {Results/mnist_FiveLayer_10B_0E_adamax_he_u.csv};
				\addlegendentry{Five Layer};
				\end{axis} %
				\end{tikzpicture}
			}&
			\subfigure [Validation accuracy] {
				\begin{tikzpicture} %
				\begin{axis}[smooth,
				legend pos = south east,
				xlabel={$epochs$}, %
				mark repeat=10,%
				 % load a color `cycle list' from the `colorbrewer' library
				cycle list/RdGy-6,
				% define fill color for the marker
				mark list fill={.!75!white},
				xticklabel style={/pgf/number format/.cd,fixed,precision=2},
				] %
				\addplot table[x expr=\coordindex , y={val_acc}, col sep=comma] {Results/mnist_ThreeLayer_10B_0E_adamax_he_u.csv};
				\addlegendentry{Three Layer};%
				\addplot table[x expr=\coordindex , y={val_acc}, col sep=comma] {Results/mnist_FiveLayer_10B_0E_adamax_he_u.csv};
				\addlegendentry{Five Layer};
				\end{axis} %
				\end{tikzpicture}
			} \\
			\subfigure [Training loss] {
				\begin{tikzpicture} %
				\begin{axis}[smooth,
				xlabel={$epochs$}, %
				ylabel={$error$}, %
				%mark repeat=10,%
				 % load a color `cycle list' from the `colorbrewer' library
				cycle list/RdGy-6,
				% define fill color for the marker
				mark list fill={.!75!white},
				xticklabel style={/pgf/number format/.cd,fixed,precision=2},
				] %
				\addplot table[x expr=\coordindex , y={loss}, col sep=comma] {Results/mnist_ThreeLayer_10B_0E_adamax_gl_u.csv};
				\addlegendentry{Three Layer};%
				\addplot table[x expr=\coordindex , y={loss}, col sep=comma] {Results/mnist_FiveLayer_10B_0E_adamax_gl_u.csv};
				\addlegendentry{Five Layer};
				\end{axis} %
				\end{tikzpicture}
			}&
			\subfigure [Validation loss] {
				\begin{tikzpicture} %
				\begin{axis}[smooth,
				xlabel={$epochs$}, %
				mark repeat=10,%
				 % load a color `cycle list' from the `colorbrewer' library
				cycle list/RdGy-6,
				% define fill color for the marker
				mark list fill={.!75!white},
				xticklabel style={/pgf/number format/.cd,fixed,precision=2},
				] %
				\addplot table[x expr=\coordindex , y={val_loss}, col sep=comma] {Results/mnist_ThreeLayer_10B_0E_adamax_gl_u.csv};
				\addlegendentry{Three Layer};%
				\addplot table[x expr=\coordindex , y={val_loss}, col sep=comma] {Results/mnist_FiveLayer_10B_0E_adamax_gl_u.csv};
				\addlegendentry{Five Layer};
				\end{axis} %
				\end{tikzpicture}
			}
		\end{tabular}
		\caption {\textit{optimizer=adamax, initializer=hessian uniform and batch size=10}}
	\end{figure}


\documentclass{article}
\usepackage{tocloft}
\include{common_symbols_and_format}
\renewcommand{\cfttoctitlefont}{\Large\bfseries}

\begin{document}
\logo
\rulename{Double Weighted Moving Averages (Integers)} %Argument is name of rule
\tblofcontents

\ruledescription{
This trading rules is a linear combination of four moving averages: short price average, long price average, short research average, long research average. The parameters accepted are the length of each average and coefficients for each average's weighting contribution. The total sum is divided by the current price to calculate a (dimensionless) position size. \\

\noindent Due to the linear summation this rule is only valid for research series of the same dimensionality as the price series (e.g. a research series representing a price target).\\

\noindent The last available value is included. As such if the short average is ``1" and the long average is ``1" then the short average is today's price and the long average is the average of today and yesterday's prices.}

\ruleparameters
{Short price average length}{2}{Number of days in the short price average.}{$\averagelengthshort^{\price}$}
{Long price average length}{5}{Number of additional days in the longer price average (added to the number in the short price average).}{$\averagelengthlong^{\price}$}
{Short research average length}{2}{Number of days in the short research average.}{$\averagelengthshort^{\research}$}
{Long research average length}{5}{Number of additional days in the longer research average (added to the number in the short price average).}{$\averagelengthlong^{\research}$}
{Amplitude of short price average}{1.0}{Weighting coefficient for the short term average of price.}{$\amplitudecoefficientone^{\price}$}
{Amplitude of long price average}{1.0}{Weighting coefficient for the long term average of price.}{$\amplitudecoefficienttwo^{\price}$}
{Amplitude of short research average}{1.0}{Weighting coefficient for the short term average of research.}{$\amplitudecoefficientone^{\research}$}
{Amplitude of long research average}{1.0}{Weighting coefficient for the long term average of research.}{$\amplitudecoefficienttwo^{\research}$}
\stoptable

\section{Equation}

\begin{equation}
\bigcontribution(\currenttime, \averagelength, \amplitudecoefficient, \genericfunction) = \frac{\amplitudecoefficient}{\averagelength} \sum_{\dummyiterator=0}^{\averagelength-1} \genericfunction(\currenttime - \dummyiterator)
\end{equation}

\begin{equation}
\position(\currenttime) = \frac{\bigcontribution(\currenttime, \averagelengthshort^{\price}, \amplitudecoefficientone^{\price}, \price)+\bigcontribution(\currenttime, (\averagelengthshort^{\price} + \averagelengthlong^{\price}), \amplitudecoefficienttwo^{\price},\price)+\bigcontribution(\currenttime, \averagelengthshort^{\research}, \amplitudecoefficientone^{\research}, \research)+\bigcontribution(\currenttime, (\averagelengthshort^{\research} + \averagelengthlong^{\research}), \amplitudecoefficienttwo^{\research}, \research)}{\price(\currenttime)}
\end{equation}\\

\noindent where $\position_\currenttime$ is the portfolio allocation at time $\currenttime$, $\price = \price(\currenttime)$ is the value of the price series and $\research = \research(\currenttime)$ is the value of the research series.

\hspace{200mm}
\hspace{200mm}

\keyterms
\furtherlinks

\end{document}


\documentclass{pset_template}

\title{Bit-String Flicking}
\date{January 17, 2019}
\editorOne{Alexander Sun}
\editorTwo{Sanjit Bhat}
\lectureNum{2}
\contestMonth{January}

\begin{document}
\maketitle

\section{Introduction/Lecture}
Bit String Flicking is a general term to denote operations that can be done to bit strings/ binary strings. They can involve multiple strings or just a single string. There are 3 general types of operations, your basic truth operators, shifts, and circulates.
\subsection{Truth Operations}
Bit String flicking only involves 4 main operations(they should seem familiar), AND, OR, NOT, EXOR, and all the inverses of them. In contest AND $\rightarrow$ $\&$, OR $\rightarrow$ $\mid$, NOT $\rightarrow$ $\sim$,  EXOR $\rightarrow$ $\oplus$.

E.X. 101 | 010 = 111
\subsection{Shift}
Shifting is very straight forward involving 2 operations. You can shift right or left. A shift, literally shifts the digits the specified amount in the specified direction, while maintaining the same amount of digits, filling in 0's fordigits shifted out of the number.
\\
\\
E.X. LSHIFT-3 100010 =  010000, RSHIFT-3 100010 = 000100
\\
\\
The trick to solving these problems, is to cover up the amount of digits specified on the right or left side, then just fill in 0's for the rest of the digits.
\subsection{Circulate}
Circulating is extremely similar to shifting, except no digits will be deleted by getting shifted out of the number. Instead they are added back (or circulated) on to the other end of the number, either in the right or left direction, a specified amount.
\\
\\
E.X. RCIRC-3    10111 = 11110         LCIRC-3   10111 = 11101
\\
\\
The method to solving these problems, are to take the number of digits on the specified side and shifting them directly behind the remaining digits on the other side.
\subsection{Miscellaneous/General Tips}
Order of Operations: NOT, SHIFT / CIRC, AND, XOR, OR
\\
Solving problems with variables often have more then one solution. Some questions will ask you to list out all values, and others will ask for the amount of possible values. Generally just work from the outside in, and if necessary assign values abced. for each digit the expression is equivalent to, and use that to help you.
\section{Exercises}
Some borrowed from \href{http://minich.com/education/wyo/acsl/bitstringflicking/bitstringwksht1.htm}{here}.
\begin{enumerate}
\item 10010 OR 11101
\item 10001 AND 11011 OR 11001
\item 11100 OR 10101 AND 10111
\item NOT 101 AND 100
\item 101011 XOR 110101
\item 101011 OR 100111 XOR 100010
\item NOT (11101 XNOR 10100)
\item 1011 OR 1101 XOR 1000 AND 1010 OR 1110 AND NOT 1000
\item Find all possible values of x: (RCIRC-2(LSHIFT-1 (NOT X)))=00101
\item List all possible unique values of x that solve the following equation: \\
(LSHIFT-1 (10110 XOR (RCIRC-3 x) AND 11011)) = 01100
\item (RSHIFT-1 (LCIRC-4 (RCIRC-2 01101)))
\item ((RCIRC-14 (LCIRC-23 01101)) $\mid$ (LSHIFT-1 10011) $\&$ (RSHIFT-2 10111)) \\
Hint: Order of operations, generally parenthesis dictate order
\end{enumerate}
\end{document}


%*******************************************************************************
%********************************* Appendix A **********************************
%*******************************************************************************
\chapter{Appendix A}
\chaptermark{Appendix A}
\label{AppendixA}

\section{Introduction}

Number theory is a field of mathematics that studies integers, it subsumes the branch of combinatorics concerned with counting the number of combinations and permutations of finite sets \citep{Laplace1820}. The Stirling numbers of first, second and third kind play an important role in combinatorial mathematics, they find applications for different analytic and combinatorial problems and they can all be used to express the coefficient of sequences of polynomials. All these numbers are linked by the fact that they can express the number of partitions of a set with $n$ elements into $k$ non-empty non-overlapping subsets. This appendix aims at introducing the Stirling numbers as well as how they can be computed. Also, a presentation of some of their properties as well as the link between them is also provided.

\section{Stirling Numbers of the First Kind}

The Stirling numbers of the first kind are linked to the number of cycles within a finite discrete set. These numbers can be unsigned or signed and are defined by the coefficients of the rising and falling factorials as follows,

\begin{equation} \label{eqnA.1}
x^{(n)} = \prod_{k=0}^{n-1} (x+k) = \sum_{k=0}^{n} \genfrac{[}{]}{0pt}{0}{n}{k} x^{k}.
\end{equation}

The equation \eqref{eqnA.1} defines the rising factorial and its relation with the unsigned Stirling numbers of the first kind, whereas the equation \eqref{eqnA.2} defines the falling factorial along with its relation with the unsigned Stirling numbers of the first kind. The signed Stirling numbers of the first kind are obtained by combining the sign in the sum of \eqref{eqnA.2} with the unsigned Stirling numbers of the first kind.

\begin{equation} \label{eqnA.2}
(x)_{n} = \prod_{k=0}^{n-1} (x-k) = \sum_{k=0}^{n} (-1)^{n-k} \genfrac{[}{]}{0pt}{0}{n}{k} x^{k}
\end{equation}

The unsigned Stirling numbers of the first kind correspond to the number of permutations of a set of $n$ elements with $k$ disjoint cycles. These numbers can also be computed using the following recurrence relation,

\begin{subequations} \label{eqnA.3}
\begin{align}
\forall (n,k) \in \mathbb{N}^{*} \times \mathbb{N}^{*} ,\, & \genfrac{[}{]}{0pt}{0}{0}{0} = 1 ,\, \genfrac{[}{]}{0pt}{0}{n}{0} = \genfrac{[}{]}{0pt}{0}{0}{n} = 0, \label{eqnA.3a} \\
& \genfrac{[}{]}{0pt}{0}{n+1}{k} = \genfrac{[}{]}{0pt}{0}{n}{k-1} + n \genfrac{[}{]}{0pt}{0}{n}{k}. \label{eqnA.3b}
\end{align}
\end{subequations}

It is possible to show this recurrence relation using either the definition of the Stirling numbers of first kind based on the rising or falling factorials or by using their combinatorial definition based on permutations. The first few Stirling numbers of the first kind are presented within Table \ref{tabA.1}.

\begin{table}[!htbp]
\centering
\caption{Stirling numbers of the first kind.}
\label{tabA.1}
\begin{tabular}{ccccccc}
\toprule
$n \backslash k$ & 0 & 1 & 2 & 3 & 4 & 5 \\
\cmidrule(lr){1-7}
0 & 1 & & & & & \\
1 & 0 & 1 & & & & \\
2 & 0 & 1 & 1 & & & \\
3 & 0 & 2 & 3 & 1 & & \\
4 & 0 & 6 & 11 & 6 & 1 & \\
5 & 0 & 24 & 50 & 35 & 10 & 1 \\
\bottomrule
\end{tabular}
\end{table}

For a fixed value of $n$, the sum of all the Stirling numbers of the first kind over $k$ from $0$ to $n$ yields factorial $n$, which can be computed from the rising factorial with $x$ equal $1$.

\begin{equation} \label{eqnA.4}
\forall n \in \mathbb{N} ,\, \sum_{k=0}^{n} \genfrac{[}{]}{0pt}{0}{n}{k} = n! = \genfrac{[}{]}{0pt}{0}{n+1}{1}
\end{equation}

Using the recursive relation \eqref{eqnA.3}, it is trivial to show that the right side equality of \eqref{eqnA.4} holds.

\begin{figure}[!htbp]
\centering
\begin{tikzpicture}
% Set left
\draw (-4,+0) node(n11)[circle,draw=black,inner sep=1pt] {$1$} +(1,0) node(n12)[circle,draw=black,inner sep=1pt] {$2$} +(0.5,1) node(n13)[circle,draw=black,inner sep=1pt] {$3$};
% Set middle
\draw (+0,+0) node(n21)[circle,draw=black,inner sep=1pt] {$1$} +(1,0) node(n22)[circle,draw=black,inner sep=1pt] {$2$} +(0.5,1) node(n23)[circle,draw=black,inner sep=1pt] {$3$};
% Set right
\draw (+4,+0) node(n31)[circle,draw=black,inner sep=1pt] {$1$} +(1,0) node(n32)[circle,draw=black,inner sep=1pt] {$2$} +(0.5,1) node(n33)[circle,draw=black,inner sep=1pt] {$3$};
% Arrows set 1
\draw[->] (n11) edge [bend left] (n12);
\draw[->] (n12) edge [bend left] (n11);
\draw[->] (n13) edge [loop,out=105,in=75,looseness=11] (n13);
% Arrows set 2
\draw[->] (n22) edge [bend left] (n23);
\draw[->] (n23) edge [bend left] (n22);
\draw[->] (n21) edge [loop,out=105,in=75,looseness=11] (n21);
% Arrows set 3
\draw[->] (n33) edge [bend left] (n31);
\draw[->] (n31) edge [bend left] (n33);
\draw[->] (n32) edge [loop,out=105,in=75,looseness=11] (n32);
\end{tikzpicture}
\caption{Cycle representations of the Stirling number of the first kind with $n=3$ and $k=2$.}
\label{figA.1}
\end{figure}

Figure \ref{figA.1} represents the different cycles linked to the Stirling number of the first kind with a set of $n=3$ elements and $k=2$ cycles. The total number of ways to partition the set is $3$. In this case, all three partitions have a cycle composed of $2$ elements and a cycle of a single element.

\section{Stirling Numbers of the Second Kind}

The Stirling numbers of the second kind represent the number of ways to partition a set of $n$ elements into $k$ non-empty non-overlapping subsets. These numbers are the inverse to the Stirling numbers of the first kind. Similarly to the Stirling number of the first kind, they can be computed based on the generating function consisting of the rising and falling factorials \eqref{eqnA.5}, such that,

\begin{equation} \label{eqnA.5}
\forall n \in \mathbb{N} ,\, x^{n} = \sum_{k=0}^{n} \genfrac{\{}{\}}{0pt}{0}{n}{k} (x)_{k} = \sum_{k=0}^{n} (-1)^{n-k}\genfrac{\{}{\}}{0pt}{0}{n}{k} x^{(k)}
\end{equation}

It can be proved that there exists a recurrence relation between the Stirling number of the second kind based on their definition from the falling factorial. The recurrence relation is as follows,

\begin{subequations} \label{eqnA.6}
\begin{align}
\forall (n,k) \in \mathbb{N}^{*} \times \mathbb{N}^{*} ,\, & \genfrac{\{}{\}}{0pt}{0}{0}{0} = 1 ,\, \genfrac{\{}{\}}{0pt}{0}{n}{0} = \genfrac{\{}{\}}{0pt}{0}{0}{n} = 0, \label{eqnA.6a} \\
& \genfrac{\{}{\}}{0pt}{0}{n+1}{k} = k \genfrac{\{}{\}}{0pt}{0}{n}{k} + \genfrac{\{}{\}}{0pt}{0}{n}{k-1}. \label{eqnA.6b}
\end{align}
\end{subequations}

Table \ref{tabA.2} presents the first few Stirling numbers of the second kind which highlights the recurrence relation presented previously.

\begin{table}[!htbp]
\centering
\caption{Stirling numbers of the second kind.}
\label{tabA.2}
\begin{tabular}{ccccccc}
\toprule
$n \backslash k$ & 0 & 1 & 2 & 3 & 4 & 5 \\
\cmidrule(lr){1-7}
0 & 1 & & & & & \\
1 & 0 & 1 & & & & \\
2 & 0 & 1 & 1 & & & \\
3 & 0 & 1 & 3 & 1 & & \\
4 & 0 & 1 & 7 & 6 & 1 & \\
5 & 0 & 1 & 15 & 25 & 10 & 1 \\
\bottomrule
\end{tabular}
\end{table}

There is an explicit formula used to compute the Stirling numbers of the second kind relying on factorials, this formula is as follows,

\begin{equation} \label{eqnA.7}
\genfrac{\{}{\}}{0pt}{0}{n}{k} = \frac{1}{k!} \sum_{i=0}^{k} (-1)^{k-i} \genfrac{(}{)}{0pt}{0}{k}{i} i^{n}.
\end{equation}

The total number of ways to partition a set with $n$ elements into non-empty non-overlapping subsets is defined by the Bell number. Consequently, the $n$-th Bell number $B_{n}$ is equal to the sum of the Stirling numbers of the second kind such that,

\begin{equation} \label{eqnA.8}
\forall n \in \mathbb{N} ,\, \sum_{k=0}^{n} \genfrac{\{}{\}}{0pt}{0}{n}{k} = B_{n}.
\end{equation}

In order to have an idea of the distinct ways to partition a set of $n$ elements into $k$ non-empty non-overlapping subsets, the Figure \ref{figA.2} illustrates all the different partitioning ways with $n=4$ and $k=2$. In this case, there are $6$ possible ways the partition the set of four elements, each one is composed of a subset composed of two elements as well as two subsets with a single element.

\begin{figure}[!htbp]
\centering
\begin{tikzpicture}[every node/.style={outer sep=8pt}]
% Set top left
\draw (-4,+2.5) node(n11)[circle,draw=black,inner sep=1pt] {$1$} +(1,0) node(n12)[circle,draw=black,inner sep=1pt] {$2$} +(1,1) node(n13)[circle,draw=black,inner sep=1pt] {$3$} +(0,1) node(n14)[circle,draw=black,inner sep=1pt] {$4$};
% Set top middle
\draw (+0,+2.5) node(n21)[circle,draw=black,inner sep=1pt] {$1$} +(1,0) node(n22)[circle,draw=black,inner sep=1pt] {$2$} +(1,1) node(n23)[circle,draw=black,inner sep=1pt] {$3$} +(0,1) node(n24)[circle,draw=black,inner sep=1pt] {$4$};
% Set top right
\draw (+4,+2.5) node(n31)[circle,draw=black,inner sep=1pt] {$1$} +(1,0) node(n32)[circle,draw=black,inner sep=1pt] {$2$} +(1,1) node(n33)[circle,draw=black,inner sep=1pt] {$3$} +(0,1) node(n34)[circle,draw=black,inner sep=1pt] {$4$};
% Set bottom left
\draw (-4,+0) node(n41)[circle,draw=black,inner sep=1pt] {$1$} +(1,0) node(n42)[circle,draw=black,inner sep=1pt] {$2$} +(1,1) node(n43)[circle,draw=black,inner sep=1pt] {$3$} +(0,1) node(n44)[circle,draw=black,inner sep=1pt] {$4$};
% Set bottom middle
\draw (+0,+0) node(n51)[circle,draw=black,inner sep=1pt] {$1$} +(1,0) node(n52)[circle,draw=black,inner sep=1pt] {$2$} +(1,1) node(n53)[circle,draw=black,inner sep=1pt] {$3$} +(0,1) node(n54)[circle,draw=black,inner sep=1pt] {$4$};
% Set bottom right
\draw (+4,+0) node(n61)[circle,draw=black,inner sep=1pt] {$1$} +(1,0) node(n62)[circle,draw=black,inner sep=1pt] {$2$} +(1,1) node(n63)[circle,draw=black,inner sep=1pt] {$3$} +(0,1) node(n64)[circle,draw=black,inner sep=1pt] {$4$};
% Subsets
\path[draw=black,rounded corners=10pt] (n11.south east) -- (n14.north east) -- (n14.north west) -- (n11.south west) -- cycle;
\path[draw=black,rounded corners=10pt] (n21.south) -- (n23.east) -- (n23.north) -- (n21.west) -- cycle;
\path[draw=black,rounded corners=10pt] (n31.south west) -- (n32.south east) -- (n32.north east) -- (n31.north west) -- cycle;
\path[draw=black,rounded corners=10pt] (n42.south east) -- (n43.north east) -- (n43.north west) -- (n42.south west) -- cycle;
\path[draw=black,rounded corners=10pt] (n52.east) -- (n54.north) -- (n54.west) -- (n52.south) -- cycle;
\path[draw=black,rounded corners=10pt] (n64.south west) -- (n63.south east) -- (n63.north east) -- (n64.north west) -- cycle;
\end{tikzpicture}
\caption{Set partitions representing the Stirling number of the second kind with $n=4$ and $k=3$.}
\label{figA.2}
\end{figure}

\section{Lah Numbers}

The Lah numbers, also sometimes called the Stirling numbers of the third kind, represent the number of ways to partition a set of $n$ elements into $k$ non-empty non-overlapping ordered subsets. Similarly to the Stirling number of the first and second kinds, the Lah numbers can be generated using the rising factorial as follows,

\begin{equation} \label{eqnA.9}
x^{(n)} = \sum_{k=1}^{n} \genfrac{\lfloor}{\rfloor}{0pt}{0}{n}{k} (x)_{k}.
\end{equation}

In the same fashion as for the Stirling numbers of the first and second kinds, the Lah numbers are linked to the falling factorial, the relation is as follows,

\begin{equation} \label{eqnA.10}
(x)_{n} = \sum_{k=1}^{n} (-1)^{n-k} \genfrac{\lfloor}{\rfloor}{0pt}{0}{n}{k} x^{(k)}.
\end{equation}

The Lah numbers can be calculated by using the following recurrence relation,

\begin{subequations} \label{eqnA.11}
\begin{align}
\forall (n,k) \in \mathbb{N}^{*} \times \mathbb{N}^{*} ,\, & \genfrac{\lfloor}{\rfloor}{0pt}{0}{0}{0} = 1 ,\, \genfrac{\lfloor}{\rfloor}{0pt}{0}{n}{0} = \genfrac{\lfloor}{\rfloor}{0pt}{0}{0}{n} = 0, \label{eqnA.11a} \\
& \genfrac{\lfloor}{\rfloor}{0pt}{0}{n+1}{k} = (n+k)\genfrac{\lfloor}{\rfloor}{0pt}{0}{n}{k} + \genfrac{\lfloor}{\rfloor}{0pt}{0}{n}{k-1}. \label{eqnA.11b}
\end{align}
\end{subequations}

However, in this case, an explicit formula to compute these numbers exists based on binomial coefficients and factorials exists and is given by,

\begin{equation} \label{eqnA.12}
\genfrac{\lfloor}{\rfloor}{0pt}{0}{n}{k} = \genfrac{(}{)}{0pt}{0}{n-1}{k-1} \frac{n!}{k!}.
\end{equation}

Some properties of the Lah numbers can be proved by recurrence, for example,

\begin{subequations} \label{eqnA.13}
\begin{align}
\forall n \in \mathbb{N}^{*} ,\, & \genfrac{\lfloor}{\rfloor}{0pt}{0}{n}{1} = n!, \label{eqnA.13a} \\
& \genfrac{\lfloor}{\rfloor}{0pt}{0}{n}{n} = 1, \label{eqnA.13b} \\
& \genfrac{\lfloor}{\rfloor}{0pt}{0}{n}{n-1} = n(n-1). \label{eqnA.13c}
\end{align}
\end{subequations}

Finally, Table \ref{tabA.3} presents the first Lah numbers for $n$ less or equal to $5$. The distinct ways to partition a set of $n=3$ elements into $k=2$ non-empty non-overlapping ordered subsets is represented Figure \ref{figA.3}. In this case, there are $6$ different partitions possible, every partition is composed of an ordered subset including two elements and a subset composed of a single element.

\begin{table}[!htbp]
\centering
\caption{Lah numbers.}
\label{tabA.3}
\begin{tabular}{ccccccc}
\toprule
$n \backslash k$ & 0 & 1 & 2 & 3 & 4 & 5 \\
\cmidrule(lr){1-7}
0 & 1 & & & & & \\
1 & 0 & 1 & & & & \\
2 & 0 & 2 & 1 & & & \\
3 & 0 & 6 & 6 & 1 & & \\
4 & 0 & 24 & 36 & 12 & 1 & \\
5 & 0 & 120 & 240 & 120 & 20 & 1 \\
\bottomrule
\end{tabular}
\end{table}

\begin{figure}[!htbp]
\centering
\begin{tikzpicture}
% Set top left
\draw (-4,+2.25) node(n11)[circle,draw=black,inner sep=1pt] {$1$} +(1,0) node(n12)[circle,draw=black,inner sep=1pt] {$2$} +(0.5,1) node(n13)[circle,draw=black,inner sep=1pt] {$3$};
% Set top middle
\draw (+0,+2.25) node(n21)[circle,draw=black,inner sep=1pt] {$1$} +(1,0) node(n22)[circle,draw=black,inner sep=1pt] {$2$} +(0.5,1) node(n23)[circle,draw=black,inner sep=1pt] {$3$};
% Set top right
\draw (+4,+2.25) node(n31)[circle,draw=black,inner sep=1pt] {$1$} +(1,0) node(n32)[circle,draw=black,inner sep=1pt] {$2$} +(0.5,1) node(n33)[circle,draw=black,inner sep=1pt] {$3$};
% Set bottom left
\draw (-4,+0) node(n41)[circle,draw=black,inner sep=1pt] {$1$} +(1,0) node(n42)[circle,draw=black,inner sep=1pt] {$2$} +(0.5,1) node(n43)[circle,draw=black,inner sep=1pt] {$3$};
% Set bottom middle
\draw (+0,+0) node(n51)[circle,draw=black,inner sep=1pt] {$1$} +(1,0) node(n52)[circle,draw=black,inner sep=1pt] {$2$} +(0.5,1) node(n53)[circle,draw=black,inner sep=1pt] {$3$};
% Set bottom right
\draw (+4,+0) node(n61)[circle,draw=black,inner sep=1pt] {$1$} +(1,0) node(n62)[circle,draw=black,inner sep=1pt] {$2$} +(0.5,1) node(n63)[circle,draw=black,inner sep=1pt] {$3$};
% Arrows set 1
\draw[->] (n11) -- (n12);
% Arrows set 2
\draw[->] (n22) -- (n23);
% Arrows set 3
\draw[->] (n33) -- (n31);
% Arrows set 4
\draw[->] (n42) -- (n41);
% Arrows set 5
\draw[->] (n53) -- (n52);
% Arrows set 6
\draw[->] (n61) -- (n63);
\end{tikzpicture}
\caption{Ordered subsets representing the Lah number with $n=3$ and $k=2$.}
\label{figA.3}
\end{figure}

\section{Relations Between the Stirling and Lah Numbers}

The three different combinatorial numbers presented within the previous sections of this appendix are related. It can be seen that they represent a change in basis for polynomial functions as it is pictured by Figure \ref{figA.4}. A Polynomial function can be expressed uniquely with the canonical polynomial basis or with the polynomial basis generated from the rising and the falling factorials. The Figure \ref{figA.4} presents how these numbers connect the three polynomial basis mentioned previously. Therefore, it means that the Stirling number of the first and second kind can be considered as inverses when they form lower triangular matrices whose entries are the Stirling numbers with corresponding row and column indexes. Similarly, as it can be seen Figure \ref{figA.4}, the Lah numbers and the Lah numbers multiplied by $(-1)^{n-k}$ can be seen as inverses when they compose the entries of lower triangular matrices. Finally, since these three combinatorial numbers represent different ways to partition a set of $n$ elements into $k$ subsets being respectively unordered, cyclically ordered and linearly ordered, the following inequalities naturally arise,

\begin{equation} \label{eqnA.14}
\forall (n,k) \in \mathbb{N} \times \mathbb{N} ,\, \genfrac{\{}{\}}{0pt}{0}{n}{k} \leq \genfrac{[}{]}{0pt}{0}{n}{k} \leq \genfrac{\lfloor}{\rfloor}{0pt}{0}{n}{k}
\end{equation}

\begin{figure}[!htbp]
\centering
\begin{tikzpicture}
% Nodes basis
\node (n1) at (0,5) {$x^{n}$};
\node (n2) at (-3,0) {$x^{(n)}$};
\node (n3) at (3,0) {$(x)_{n}$};
% Arrows
\draw[->] (n1) -- node[anchor=north east]{$\genfrac{\{}{\}}{0pt}{0}{n}{k}$} (n3);
\draw (n3) edge[bend right,->] node[anchor=south west]{$(-1)^{n-k}\genfrac{[}{]}{0pt}{0}{n}{k}$} (n1);
\draw[->] (n3) -- node[anchor=south]{$\genfrac{\lfloor}{\rfloor}{0pt}{0}{n}{k}$} (n2);
\draw (n2) edge[bend right,->] node[anchor=north]{$(-1)^{n-k}\genfrac{\lfloor}{\rfloor}{0pt}{0}{n}{k}$} (n3);
\draw[->] (n2) -- node[anchor=north west]{$\genfrac{[}{]}{0pt}{0}{n}{k}$} (n1);
\draw (n1) edge[bend right,->] node[anchor=south east]{$(-1)^{n-k}\genfrac{\{}{\}}{0pt}{0}{n}{k}$} (n2);
\end{tikzpicture}
\caption{Relations between the Stirling and Lah numbers.}
\label{figA.4}
\end{figure}