\documentclass[a4paper, 12pt]{article}

\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{graphicx}
\usepackage{xspace}
\usepackage{cleveref}
\usepackage{booktabs}
\usepackage[parfill]{parskip}

\newcommand{\pt}{\ensuremath{p_{\mathrm{T}}}\xspace}

\begin{document}

\section{Introduction}
Charged particles will bend in a magnetic field.
For the purposes of a tracking detector, such as the one used in ATLAS, it is important to know how much a particle's trajectory will change as it traverses a tracker.
Shown below is some of the mathematics used to calculate bending radii in certain cases, and some plots illustrating this.

\subsection{Coordinate system}
The coordinate system is shared with the ATLAS experiment.
The $z$ direction is along the beam pipe, the positive $y$ direction vertically upwards and the $x$ direction towards the centre of the LHC ring.

\section{Bending radius calculation}
We consider the Lorentz force law
\begin{equation}
  \mathbf{F} = q( \mathbf{E} + \mathbf{v} \times \mathbf{B})
\end{equation}
For the ATLAS detector, the barrel tracker is cylindrical around the beam-pipe.
The magnetic field is generated by a solenoid which surrounds the cylindrical tracker, and as a result points only in the $z$ direction, so
$\mathbf{B} = B \mathbf{\hat{z}}$.
There is no electric field.
The trajectory of a charged particle will therefore only be modified in the $x$--$y$ plane, and we can therefore collapse the problem to that plane.
To simplify further, we can assume that the initial velocity of the charged particle is along the $x$ direction, $\mathbf{v} = v \mathbf{\hat{x}}$
The Lorentz force law then collapses to
\begin{equation}
  F  = qvB
\end{equation}
With the force acting in the $y$-direction.
This equation holds for relativistic particles, however it is important to note that the force is
\begin{equation}
  F = \frac{dp}{dt} = \gamma m \frac{dv}{dt}.
\end{equation}
The force from the magnetic field will always be acting perpendicularly to the direction of motion of the charged particle (in the $x$--$y$ plane), and so this equation will hold as time evolves.
The motion of the particle will be a circle in the $x$--$y$ plane.

For a relativistic particle moving in a circle, the centripetal force will be
\begin{equation}
F = \frac{\gamma m v^2}{r}
\end{equation}
equating this with the Lorentz force law yields the bending radius
\begin{equation}
r = \frac{\gamma m v}{qB}.
\end{equation}
This is more conveniently expressed in terms of momentum (or rather, transverse momentum \pt, since we are only considering motion in the plane transverse to the beam pipe)
\begin{equation}
  \boxed{
  r = \frac{\pt}{eB}.
}
  \label{eq:bendingRadius}
\end{equation}

\subsection{Deviation}
We wish to calculate the perpendicular deviation travelled by a charged particle in a magnetic field.
The perpendicular deviation, $l$ is the perpendicular displacement to the particle's original direction of motion.
This is shown schematically in \cref{fig:deviation}.
In the figure, the particle does not start at the centre of the dashed circle, but instead at the `top' of the figure, and moves in the trajectory shown by the arrow.
The distance $d$ could be, for example, the distance between the particles origin and the first tracking layer.

\begin{figure}
  \centering
  \includegraphics[width=0.5\linewidth]{images/fig1.eps}
  \caption{The deviation of a charged particle track.
  In the absence of a magnetic field, the particle will have traversed a distance $d$.
  However, in the presence of a magnetic field, the trajectory will have deviated by a perpendicular distance $l$.
  }
  \label{fig:deviation}
\end{figure}

One can assume that the deviation $l$ is small compared to $d$ and $r$, and is given by
\begin{equation}
  \boxed{
  l =  r - \sqrt{r^2 - d^2}.
}
\end{equation}

\emph{Proof:} We want to find $l$ in terms of $d$ and $r$.
The following proof is done with respect to \cref{fig:geometry}.
From Pythagoras' theorem we have
\begin{equation}
  s^2 = l^2 + d^2.
\end{equation}
Considering the triangle within the circle, we find
$\cos \delta = (s/2)/r$
or,
\begin{align}
  s = &\, 2r \cos \delta \\
    = &\, 2r \cos (\pi/2 - \phi) \\
    = &\, 2r \sin \phi.
\end{align}
From the uppermost triangle we have $\sin \phi = l / s$, which, when combined with the above to eliminate $\sin \phi$ gives
\begin{equation}
  s^2 = 2rl.
\end{equation}
Finally, combining this with Pythagoras' theorem yields the quadratic
\begin{equation}
  l^2 - 2rl + d^2 = 0
\end{equation}
which can be solved to give
\begin{equation}
  l = r \pm \sqrt{r^2 - d^2}.
\end{equation}
We take the negative root as the correct solution as we are not interested in solutions where $l > r$ (which physically corresponds to cases where a charged particle has curled around in the magnetic
field and will miss the detector that is distance $d$ away).

\begin{figure}
  \centering
  \includegraphics[width=0.4\linewidth]{images/geometry.eps}
  \caption{Geometry and definition of symbols used in the derivation of the perpendicular deviation $l$ in terms of $r$ and $d$. }
  \label{fig:geometry}
\end{figure}

\section{Useful units}
The magnetic field of the FCC solenoid will be 4\,T.
We wish to consider the particle momenta in GeV/c, and lengths in meters.
Note in the following conversion from kg m s$^{-1}$ to GeV, we used the convention $[c] = c /(\mathrm{m s}^{-1})$, that is any bracketed symbol is equal to the physical constant divided by the SI
units, such that it becomes a dimensionless number
\begin{itemize}
  \item 1 kg $\times c^2 = 9 \times 10^{16}\,\mathrm{J} = [c^2]\,\mathrm{J}$ or 1 J $ = \mathrm{kg}.c^2 / [c^2]$
  \item 1 GeV/$c = 10^9 \times 1.6 \times 10^{-19}\,\mathrm{J}/c = 10^9 \times [e] \, \mathrm{J}/c$
  \item 1 GeV/$c = 10^9 \times [e] \times 1 \, \mathrm{kg} \times c / [c^2]$
  \item 1 GeV/$c = 10^9 \times [e/c] $ kg m s$^{-1}$
  \item 1 GeV/$c = 5.344 \times 10^{-19}$ kg m s$^{-1}$
\end{itemize}
In our equation for the bending radius, we will only consider particles with charge of $1e$, therefore
\cref{eq:bendingRadius} becomes
\begin{equation}
  r\{\mathrm{m}\} = \frac{ \pt\{\mathrm{GeV}/c\} \times 10^9 \times [e/c]}{B\{\mathrm{T}\} \cdot 1\{\mathrm{C}\}[e]}
\end{equation}
where the terms in the curly brackets are the implied units, and we have used $q = 1[e]$\,C.
Finally, we have
\begin{equation}
  r\{\mathrm{m}\} = \frac{ \pt\{\mathrm{GeV}/c\} }{ B\{\mathrm{T}\} \cdot 1\{C\}} \times 3.335641.
\end{equation}
Further substituting in the magnetic field $B=4.0$\,T we get the quick relation
\begin{equation}
  \boxed{
    r\{\mathrm{m}\} = 0.83391 \pt \{\mathrm{GeV}/c\}.
}
  \label{eq:bendingRadiusSimp}
\end{equation}
or equivalently
\begin{equation}
  \boxed{
    \pt\{\mathrm{GeV}/c\} = 1.19917 r \{\mathrm{m} \}
  }
\end{equation}
The next question is, at what \pt will a particle bend so much that it does not reach the innermost layer of the tracker?

\section{Results}
Some quick reference numbers calculated with \cref{eq:bendingRadiusSimp} are given in \cref{tab:brquick}.
The result of \cref{eq:bendingRadiusSimp} is also shown graphically in \cref{fig:bendingRvP}.

\begin{table}
  \centering
  \begin{tabular}{ccc}
    \toprule
    Momentum [GeV/c] & Bending radius [m] & Max deviation from origin [m] \\
    \midrule
    0.5 & 0.41 & 0.82 \\
    1 & 0.83   & 1.66 \\
    3 & 2.50   & 5.00 \\
    5 & 4.17   & 8.34 \\
    \bottomrule
  \end{tabular}
  \caption{Some quick reference numbers for bending radius for a given \pt.}
  \label{tab:brquick}
\end{table}

\begin{table}
  \centering
  \begin{tabular}{cc}
    \toprule
    Barrel layer radius [m] & Min \pt required to reach [GeV] \\
    \midrule
    0.632 & 0.378 \\
    0.622 & 0.372 \\
    0.612 & 0.367 \\
    0.602 & 0.361 \\
    0.592 & 0.355 \\
    0.582 & 0.350 \\
    0.572 & 0.343 \\
    0.562 & 0.337 \\
    0.552 & 0.331 \\
    0.542 & 0.325 \\
    0.532 & 0.319 \\
    \bottomrule
  \end{tabular}
  \caption{Minimum \pt required to reach a barrel layer of a given radius}
\end{table}

\begin{figure}
  \centering
\includegraphics[width=0.5\linewidth]{images/bendingRvP}
  \caption{The bending radius of a charged particle in a magnetic field, as a function of the particle's transverse momentum.
  The lines show approximately where different layers of the triplet would be placed. }
  \label{fig:bendingRvP}
\end{figure}

\end{document}


\setchapterpreamble{
    \lettrine{A}{fter}~having extracted the \CP-violation parameters in \cref{chp:BsDsK_TD}, it is now possible to determine the value of the CKM~angle~\CPgamma.
    This parameter is not fitted directly to allow using the individual results of the \CP-violation parameters in combined measurements with several decay channels.
    Additionally, a method using branching fractions is presented, which yields information on the magnitude of the CKM~element~\Vub.}
\chapter{Phase and magnitude of $\Vub/\Vcb$}
\label{chp:Vub}

\vspace*{\fill}
\minitoc

\section{Determination of~\CPgamma}
\label{sec:Vub_gamma}

From the values of the \CP-violation parameters obtained in \cref{sec:BsDsK_TD_Results}, the value of the CKM~angle~\CPgamma can be determined.
In the Wolfenstein~parameterisation, this is equivalent to a measurement of the phase of the CKM~element~\(\Vub\), \({\CPgamma \approx -\arg(\Vub)}\).

Using a likelihood scan, three observables,~\weak, \strongangle, and~\rdsk, are extracted from the five \CP-violation coefficients~\Cpar, \Spar, \Sbpar, \Dpar, and~\Dbpar, defined in \cref{sec:theory_CPV}.
The Cartesian representation, used also in other \CP-violation analyses and hence obtained to allow comparisons and combinations, is related to the polar one, from which \CPgamma~can be extracted, via
%
\begin{gather}
    \Cpar  = \dfrac{1 - \abs{\lf}^{2}}{1 + \abs{\lf}^{2}} \rlap{,} \nonumber \\
    \begin{aligned}
         \Spar  &= \n\dfrac{2 \Im\left(\lf\right)}{1 + \abs{\lf}^{2}} \rlap{,} \quad
        &\Sbpar &= \n\dfrac{2 \Im\left(\lf\right)}{1 + \abs{\lf}^{2}} \rlap{,} \label{eqn:Vub_CPParamsDsK} \\
         \Dpar  &=  -\dfrac{2 \Re\left(\lf\right)}{1 + \abs{\lf}^{2}} \rlap{,}
        &\Dbpar &=  -\dfrac{2 \Re\left(\lf\right)}{1 + \abs{\lf}^{2}} \rlap{,}
    \end{aligned}
\end{gather}
%
where
%
\begin{subequations} \label{eqn:Vub_lambdaf}
    \begin{align}
        \lf  &= \dfrac{q}{p} \dfrac{\Abf}{\Af}   = \abs{\lf}  e^{i\left(\strongangle - (\weak)\right)} \rlap{,} \\
        \lfb &= \dfrac{q}{p} \dfrac{\Abfb}{\Afb} = \abs{\lfb} e^{i\left(\strongangle + (\weak)\right)} \rlap{.}
    \end{align}
\end{subequations}
%
Note that the apparent inconsistency between~\f and~\fb in \cref{eqn:Vub_CPParamsDsK} is resolved through the signs on the right-hand sides of the equations.
Additionally,
%
\begin{equation*}
    \rdsk = \abs{\lf} = \dfrac{1}{\abs{\lfb}} \rlap{,}
\end{equation*}
%
where the last equality holds under the assumption that~\({\abs{p/q} = 1}\), and the \CP~symmetry of the individual decays~\BsDsmKp and~\BsDspKm, which holds since only one amplitude contributes to each at leading order.
The relation between the two representations is illustrated in \cref{fig:Vub_lambdaf}.

The likelihood~\(\mathcal{L}\) is defined as
%
\begin{equation}
    -2\log\left(\mathcal{L}(\vec{\alpha})\right) = \left(\vec{A}(\vec{\alpha}) - \vec{A}_{\text{obs}}\right)^{\text{T}} \mathbf{V}^{-1} \left(\vec{A}(\vec{\alpha}) - \vec{A}_{\text{obs}}\right) \rlap{,}
\end{equation}
%
where \({\vec{\alpha} = (\weak, \strongangle, \rdsk)}\), \({\vec{A}(\vec{\alpha})}\)~is the vector of the five observables as per \cref{eqn:Vub_CPParamsDsK}, \(\vec{A}_{\text{obs}}\)~is the vector of actually observed \CP-violation parameters, and \(\mathbf{V}\)~is the covariance matrix containing both statistical and systematic uncertainties.
The value of~\weak can be translated to~\CPgamma using external input for~\betas.
The value~\({\phis = \SI{-0.03 +- 0.033}{\radian} = \ang{-1.72 +- 1.89}}\) is used~\cite{HFLAV2016}, neglecting possible contributions of penguin loop diagrams by assuming~\({\phis = -2\betas}\).

The values maximising the likelihood are
%
\begin{subequations}
    \begin{align}
        \CPgamma     &= \ang[parse-numbers=false]{\left(128_{-22}^{+17}\right)} \rlap{,} \\
        \strongangle &= \ang[parse-numbers=false]{\left(358_{-14}^{+13}\right)} \rlap{,} \\
        \rdsk        &= 0.37_{-0.09}^{+0.10} \rlap{,}
    \end{align}
\end{subequations}
%
where the values of~\CPgamma and~\strongangle are presented modulo~\ang{360}.
A scan of the confidence levels of these values is shown in \cref{fig:Vub_gamma,fig:Vub_delta_rdsk}.
The value of~\CPgamma represents the first observation of \CP~violation in the process~\BsDsK, with a difference in \CP-violation and no~\CP-violation hypotheses of \num{3.8}~standard deviations.
The value of \rdsk~is as expected from the relative CKM~elements entering the two tree-level amplitudes.
Finally, the value of~\strongangle is close to \ang[parse-numbers=false]{\left(0\!\mod 180\right)}, as expected~\cite{Fleischer:2003yb}.

From \cref{eqn:Vub_CPParamsDsK,eqn:Vub_lambdaf}, it can be seen that the five \CP-violation observables constrain the value of~\lf in the complex plane.
The various constraints are visualised in \cref{fig:Vub_lambdaf}.
The average between the phases of~\({\left(\Dpar, \Spar\right)}\) and~\({\left(\Dbpar, \Sbpar\right)}\) constrains the phase of~\lf, and hence the value of~\weak, while the difference quantifies the strong phase~\strongangle.
Together with the constraint on the magnitude from~\Cpar, these yield the combined value of~\CPgamma shown in the figure.

The value is higher than expected by about \num{2.3}~standard deviations with respect to the combination of other \lhcb~measurements~\cite{LHCb-PAPER-2016-032} of~\({\CPgamma = \ang[parse-numbers=false]{\left(72.2_{-7.3}^{+6.8}\right)}}\).
The deviation is small enough to be attributed to statistical fluctuations.
Nevertheless, it could also be a hint for new physics, such as a difference in \CP~violation in \Bp~meson decays, used mainly for the combined result, and in \Bs~mesons, used in the analysis presented in this thesis.
%
\begin{figure}[hp] \centerfloat
    \hspace*{-.75cm}
    \fontsize{18}{21.6}\selectfont
    \begin{tikzpicture}
        \node[anchor=south west,inner sep=0] (image) at (0,0) {\includegraphics[width=0.9\textwidth]{Vub/Gamma/gammacombo_g}};
        \begin{scope}[x={(image.south east)},y={(image.north west)}]
            \foreach \x in {0, ..., 2}
            {
                \tikzmath{\xtext = (\x + 1) * 50; \xcoord = \x * .276 + .280;}
                \node at (\xcoord, -0.040) {\(\pgfmathprintnumber[fixed,precision=0,fixed zerofill=true]{\xtext}\)};
            }
            \node[anchor=east] at (0.005, 0.0) {\num{0}};
            \foreach \y in {1, ..., 4}
            {
                \tikzmath{\ytext = \y / 5; \ycoord = \y / 5;}
                \node[anchor=east] at (0.005, \ycoord) {\(\pgfmathprintnumber[fixed,precision=1,fixed zerofill=true]{\ytext}\)};
            }
            \node[anchor=east] at (0.005, 1.0) {\num{1}};
            \node[anchor=east] at (1.0, -0.10) {\CPgamma [\SIUnitSymbolDegree]};
            \node[rotate=90,anchor=east,inner xsep=0pt,outer xsep=0pt] at (-0.12, 1.0) {\omcl};
            \node[anchor=base west] at (0.270, 0.585) {\ang[parse-numbers=false]{\left(128_{-22}^{+17}\right)}};
            \node[anchor=base west] at (0.127, 0.338) {\SI{68.3}{\percent}};
            \node[anchor=base west] at (0.127, 0.066) {\SI{95.5}{\percent}};
            \node[anchor=base west] at (0.06, 0.823) {\lhcb};
        \end{scope}
    \end{tikzpicture}
    \caption{
        Confidence levels of the various values of~\CPgamma, with the apex at the maximum likelihood of~\ang{128}.
        The \num{1}~and \num{2}~standard deviations intervals are also indicated.}
    \label{fig:Vub_gamma}
\end{figure}
%
\begin{figure}[hp] \centerfloat
    \hspace*{-.75cm}
    \fontsize{8}{9.6}\selectfont
    \begin{subfigure}{.48\textwidth}
        \begin{tikzpicture}
            \node[anchor=south west,inner sep=0] (image) at (0,0) {\includegraphics[width=0.9\textwidth]{Vub/Gamma/gammacombo_d_dsk}};
            \begin{scope}[x={(image.south east)},y={(image.north west)}]
                \foreach \x in {0, ..., 6}
                {
                    \tikzmath{\xtext = \x * 20 + 280; \xcoord = \x * .151 + .078;}
                    \node at (\xcoord, -0.040) {\(\pgfmathprintnumber[fixed,precision=0,fixed zerofill=true]{\xtext}\)};
                }
                \node[anchor=east] at (0.005, 0.0) {\num{0}};
                \foreach \y in {1, ..., 4}
                {
                    \tikzmath{\ytext = \y / 5; \ycoord = \y / 5;}
                    \node[anchor=east] at (0.005, \ycoord) {\(\pgfmathprintnumber[fixed,precision=1,fixed zerofill=true]{\ytext}\)};
                }
                \node[anchor=east] at (0.005, 1.0) {\num{1}};
                \node[anchor=east] at (1.0, -0.12) {\strongangle [\SIUnitSymbolDegree]};
                \node[rotate=90,anchor=east,inner xsep=0pt,outer xsep=0pt] at (-0.12, 1.0) {\omcl};
                \node[anchor=base west] at (0.320, 0.585) {\ang[parse-numbers=false]{\left(358_{-14}^{+13}\right)}};
                \node[anchor=base west] at (0.127, 0.338) {\SI{68.3}{\percent}};
                \node[anchor=base west] at (0.127, 0.066) {\SI{95.5}{\percent}};
                \node[anchor=base west] at (0.06, 0.823) {\large\lhcb};
            \end{scope}
        \end{tikzpicture}
    \end{subfigure} \hfill%
    \begin{subfigure}{.48\textwidth}
        \begin{tikzpicture}
            \node[anchor=south west,inner sep=0] (image) at (0,0) {\includegraphics[width=0.9\textwidth]{Vub/Gamma/gammacombo_l_dsk}};
            \begin{scope}[x={(image.south east)},y={(image.north west)}]
                \foreach \x in {0, ..., 3}
                {
                    \tikzmath{\xtext = \x * 0.2; \xcoord = \x * .266;}
                    \node at (\xcoord, -0.040) {\(\pgfmathprintnumber[fixed,precision=1,fixed zerofill=true]{\xtext}\)};
                }
                \node[anchor=east] at (0.005, 0.0) {\num{0}};
                \foreach \y in {1, ..., 4}
                {
                    \tikzmath{\ytext = \y / 5; \ycoord = \y / 5;}
                    \node[anchor=east] at (0.005, \ycoord) {\(\pgfmathprintnumber[fixed,precision=1,fixed zerofill=true]{\ytext}\)};
                }
                \node[anchor=east] at (0.005, 1.0) {\num{1}};
                \node[anchor=east] at (1.0, -0.12) {\rdsk};
                \node[rotate=90,anchor=east,inner xsep=0pt,outer xsep=0pt] at (-0.12, 1.0) {\omcl};
                \node[anchor=base west] at (0.645, 0.585) {\(0.369_{-0.090}^{+0.095}\)};
                \node[anchor=base west] at (0.127, 0.338) {\SI{68.3}{\percent}};
                \node[anchor=base west] at (0.127, 0.066) {\SI{95.5}{\percent}};
                \node[anchor=base west] at (0.06, 0.823) {\large\lhcb};
            \end{scope}
        \end{tikzpicture}
    \end{subfigure}
    \caption{
        Confidence levels of the various values of~\strongangle and~\rdsk.
        The \num{1}~and \num{2}~standard deviations intervals are also indicated.}
    \label{fig:Vub_delta_rdsk}
\end{figure}
%
\begin{figure}[hp] \centerfloat
    \fontsize{18}{21.6}\selectfont
    \begin{tikzpicture}
        \node[anchor=south west,inner sep=0] (image) at (0,0) {\includegraphics[width=0.9\textwidth]{Vub/Gamma/Lambda_f}};
        \begin{scope}[x={(image.south east)},y={(image.north west)}]
            \node at (0.139 + 0 * 0.172 - 0.02, -0.040) {\num{-1.5}};
            \node at (0.139 + 1 * 0.172 - 0.02, -0.040) {\num{-1}};
            \node at (0.139 + 2 * 0.172 - 0.02, -0.040) {\num{-0.5}};
            \node at (0.139 + 3 * 0.172, -0.040) {\num{0}};
            \node at (0.139 + 4 * 0.172, -0.040) {\num{0.5}};
            \node at (1.0, -0.040) {\num{1}};
            \node[anchor=east] at (0.005, 0.00) {\num{-1}};
            \node[anchor=east] at (0.005, 0.25) {\num{-0.5}};
            \node[anchor=east] at (0.005, 0.50) {\num{ 0}};
            \node[anchor=east] at (0.005, 0.75) {\num{ 0.5}};
            \node[anchor=east] at (0.005, 1.00) {\num{ 1}};

            % Legend
            {
                \fontsize{12}{14.4}\selectfont
                \node[anchor=base west] at (0.130, 0.640) {\(\sqrt{1 - \Cpar^{2}}\)};
                \node[anchor=base west] at (0.130, 0.640 - 1 * 0.103) {\({(-\Dpar, \Spar)}\)};
                \node[anchor=base west] at (0.130, 0.640 - 2 * 0.103) {\({(-\Dbpar, \Sbpar)}\)};
                \node[anchor=base west] at (0.130, 0.640 - 3 * 0.103) {\({-\left(\weak\right)}\)};
                \node[anchor=base west] at (0.130, 0.640 - 4 * 0.103) {Combination};
            }

            \node[anchor=east] at (1.0, -0.155) {\({\Im\left[2\lf / (1 + \abs{\lf}^{2})\right]}\)};
            \node[rotate=90,anchor=east,inner xsep=0pt,outer xsep=0pt] at (-0.14, 1.0) {\({\Re\left[2\lf / (1 + \abs{\lf}^{2})\right]}\)};
            \node[anchor=base west] at (0.06, 0.823) {\lhcb};
        \end{scope}
    \end{tikzpicture}
    \caption{
        Real and imaginary parts of the parameter~\lf, given in \cref{eqn:Vub_lambdaf}.
        The constraints given by the \CP-violation parameters are indicated, as well as the combined result.}
    \label{fig:Vub_lambdaf}
\end{figure}

\clearpage
\subsection{Outlook}
\label{sec:Vub_Outlook}

The uncertainty on the value of~\CPgamma obtained in the previous \lcnamecref{sec:Vub_gamma} is limited by the amount of data available.
Therefore, it is interesting to study how this uncertainty will evolve as more data from the \lhcb~detector becomes available.

The current total uncertainty on~\CPgamma with this method is about~\ang{20}, including both statistical and systematic sources of uncertainty.
These can not be trivially separated, but from the separate uncertainties on the \CP-violation observables (see \cref{eqn:BsDsK_TD_Results}), it can be estimated that the statistical component dominates.
It is taken as the sole contribution of uncertainties in the following argument.

By the end of the second \lhc~run, in 2018, the total data is expected to have increased from~\SI{3}{\per\femto\barn} to~\SI{9}{\per\femto\barn}.
This yields an expected statistical uncertainty of~\ang{12} at that point in time, comparable to the current systematic uncertainty of~\ang{12}.
The challenge for the analysis using this data is thus to control the sources of systematic uncertainty.
The main contributions of systematic uncertainties arise from correlations between the decay-time and variables entering the multivariate fit, as well as the combination of decay-time resolution and flavour tagging.
The former could be controlled with a different method of selecting signal candidates, for example through the use of machine learning.
The latter will decrease as larger resolution calibration samples and more sophisticated flavour tagging algorithms become are developed.

In a realistically possible scenario, when the systematic uncertainty decreases to \eg~\ang{8}, this could lead to a total uncertainty of about~\ang{14}.
In that case, the channel~\BsDsK presents a significant contribution to the \CPgamma~combination, which is expected to decrease to about~\ang{4} by that time~\cite{LHCb-PAPER-2016-032}, driven by decays of \Bpm~mesons of the form \decay{\Bpm}{\Dz\Kpm}.
This accuracy is also sufficient to solve the current discrepancy between the values of~\CPgamma from \BsDsK~decays and other \bquark~meson decays.

Using even more data from the \lhcb~upgrade era and a significant reduction of the systematic uncertainty from a better understanding of the detector, a precision of about~\ang{1} is expected to be attained.
An effect that can start to play a role at that time is the pollution of penguin topologies in the calculation of~\betas, neglected in the assumption~\({\phis = -2\betas}\).
Within current experimental and theoretical limits, this effect can be of a magnitude up to~\({\abs{\upDelta\phis} = \ang{1}}\)~\cite{VSyropoulos:PhDThesis,DeBruyn:PhDThesis,DeBruyn:2014oga}.
Therefore, it is important to understand the contribution of penguin topologies.

\clearpage
\section{\abs{\Vub}~from \BdDsPi~and \LbDsP}
\label{sec:VubDsH}

Until now, the discussion in this thesis has focused on the phase of the CKM~element~\Vub.
In this \lcnamecref{sec:VubDsH}, measurements regarding the magnitude of~\Vub are discussed.

At tree level, the decay channels~\BdDsPi and~\LbDsP are dominated by a \bquark~hadron decaying to a light hadron (\pip~or \proton) while emitting a \Dsm~through the weak interaction, as depicted in \cref{fig:Vub_FeynmanDiagrams}.
These decays proceed through the CKM~element~\Vub, and are therefore suppressed compared to similar decays, such as~\BsDsPi.

The branching fractions of these decays are proportional to~\(\abs{\Vub}^{2} \abs{\aNF}^{2}\) (see \cref{sec:theory_WeakDecays}), and as such measuring them can yield information on both~\(\abs{\Vub}\) and the nonfactorisation factor~\(\abs{\aNF}\).
The current \lcnamecref{sec:VubDsH} describes such measurements, each done using data collected by the \lhcb~detector corresponding to an integrated luminosity of \SI{5}{\per\femto\barn}.
This includes the same~\SI{3}{\per\femto\barn} described in \cref{chp:DsK_BF,chp:BsDsK_TD}, and and additional~\SI{2}{\per\femto\barn} taken at \({\sqs = \SI{13}{\TeV}}\).
%
\begin{table}[htb] \centerfloat
    \caption{
        Total selection efficiencies for both signal channels and both control channels, split by centre-of-mass energy.}
    \label{tab:Vub_Efficiencies}
    \rowcolors{1}{tableshade}{}
    \begin{tabular}{l*{2}{S[table-format=1.4(4)]}}
        \hiderowcolors \toprule
        \multirow{2}{*}[-2pt]{Decay~channel} & \multicolumn{2}{c}{Total selection efficiency~(\si{\percent})} \tabularnewline
        \cmidrule(lr){2-3}
                & {\(\sqs = \SI[parse-numbers=false]{7, 8}{\TeV}\)} & {\(\sqs = \SI{13}{\TeV}\)} \tabularnewline
        \showrowcolors \midrule
        \BdDsPi & 0.1543 +- 0.0010 & 0.2014 +- 0.0012 \tabularnewline
        \BdDPi  & 0.3569 +- 0.0020 & 0.4368 +- 0.0010 \tabularnewline
        \midrule
        \LbDsP  & 0.1045 +- 0.0006 & 0.2215 +- 0.0009 \tabularnewline
        \LbLcPi & 0.1135 +- 0.0002 & 0.3755 +- 0.0007 \tabularnewline
        \bottomrule
    \end{tabular}
\end{table}
%
\begin{figure}[htb] \centerfloat
    \begin{subfigure}{\textwidth} \centerfloat
        \begin{tikzpicture}
            \setlength{\diagramsize}{3.5em}
            \setlength{\diagramheight}{\baselineskip}
            \begin{feynman}
                \vertex (a1);
                \vertex[right=2\diagramsize of a1] (a2);
                \vertex[right=2\diagramsize of a2] (a3) {\dquark};

                \vertex[below=\diagramheight of a1] (b1);
                \vertex[right=2\diagramsize of b1] (b2);
                \vertex[right=2\diagramsize of b2] (b3) {\dquark};

                \vertex[above right=4\diagramheight and \diagramsize of a2] (x1);
                \vertex[above right=1.25\diagramheight and \diagramsize of x1] (x2);
                \vertex[below right=1.25\diagramheight and \diagramsize of x1] (x3);

                \diagram* {
                    {[edges=fermion]
                    (a3) -- (a2) -- (a1),
                    (b1) -- (b3),
                    (x1) -- (x2),
                    (x3) -- (x1),
                    },
                    (a2) -- [boson, edge label={\Wp}] (x1),
                };

                \node[at=(b1), anchor=mid east] (q1) {\dquark};
                \node[at=(q1.mid |- a1), anchor=mid] (b) {\bquark};

                \node[at=(x2), anchor=mid west] (m1) {\cquark};
                \node[at=(x3), anchor=mid west] (m2) {\squark};

                \draw [decoration={brace}, decorate] (q1.south west) -- (q1.south west |- b.north west) node [midway, left, outer xsep=.05\diagramsize] {\Bd};
                \draw [decoration={brace}, decorate] (a3.north east -| b3.south east) -- (b3.south east) node [midway, right, outer xsep=.05\diagramsize] {\pim};
                \draw [decoration={brace}, decorate] (b3.south east |- m1.north east) -- (b3.south east |- m2.south east) node [midway, right, outer xsep=.05\diagramsize] {\Dsp};
            \end{feynman}
        \end{tikzpicture}
        \caption{Diagram of the decay~\BdDsPi.}
    \end{subfigure}
    \\[4ex]
    \begin{subfigure}{\textwidth} \centerfloat
        \begin{tikzpicture}
            \setlength{\diagramsize}{3.5em}
            \setlength{\diagramheight}{\baselineskip}
            \begin{feynman}
                \vertex (a1);
                \vertex[right=2\diagramsize of a1] (a2);
                \vertex[right=2\diagramsize of a2] (a3) {\uquark};

                \vertex[below=\diagramheight of a1] (b1);
                \vertex[right=2\diagramsize of b1] (b2);
                \vertex[right=2\diagramsize of b2] (b3) {\uquark};

                \vertex[below=\diagramheight of b1] (c1);
                \vertex[right=2\diagramsize of c1] (c2);
                \vertex[right=2\diagramsize of c2] (c3) {\dquark};

                \vertex[above right=4\diagramheight and \diagramsize of a2] (x1);
                \vertex[above right=1.25\diagramheight and \diagramsize of x1] (x2);
                \vertex[below right=1.25\diagramheight and \diagramsize of x1] (x3);

                \diagram* {
                    {[edges=fermion]
                    (a1) -- (a2) -- (a3),
                    (b1) -- (b3),
                    (c1) -- (c3),
                    (x1) -- (x2),
                    (x3) -- (x1),
                    },
                    (a2) -- [boson, edge label=\(\Wm\)] (x1),
                };

                \node[at=(c1), anchor=mid east] (q2) {\dquark};
                \node[at=(q2.mid |- b1), anchor=mid] (q1) {\uquark};
                \node[at=(q1.mid |- a1), anchor=mid] (b) {\bquark};

                \node[at=(x2), anchor=mid west] (m1) {\squark};
                \node[at=(x3), anchor=mid west] (m2) {\dquark};

                \draw [decoration={brace}, decorate] (q2.south west) -- (q2.south west |- b.north west) node [midway, left, outer xsep=.05\diagramsize] {\Lb};
                \draw [decoration={brace}, decorate] (a3.north east -| c3.south east) -- (c3.south east) node [midway, right, outer xsep=.05\diagramsize] {\proton};
                \draw [decoration={brace}, decorate] (c3.south east |- m1.north east) -- (c3.south east |- m2.south east) node [midway, right, outer xsep=.05\diagramsize] {\Dsm};
            \end{feynman}
        \end{tikzpicture}
        \caption{Diagram of the decay~\LbDsP.}
    \end{subfigure}
    \caption{
        Diagrams of the decays~\BdDsPi and~\LbDsP.}
    \label{fig:Vub_FeynmanDiagrams}
\end{figure}
%
\begin{figure}[p] \centerfloat
    \fontsize{6}{7.2}\selectfont
    \begin{subfigure}{.48\textwidth} \centerfloat
        \begin{tikzpicture}
            \node[anchor=south west,inner sep=0] (image) at (0,0) {\includegraphics[width=0.85\textwidth]{Vub/BFs/mass_Bs2DsPi_BeautyMass_both_phipi_run1_log_IpJo_final3}};
            \begin{scope}[x={(image.south east)},y={(image.north west)}]
                \foreach \x in {0, ..., 3}
                {
                    \tikzmath{\xpos = (\x / 3) * (1. - 0.079) + 0.079; \xtext = 5200 + 200 * \x;}
                    \node at (\xpos, -0.025) {\pgfmathprintnumber[fixed,precision=0,fixed zerofill=true,1000 sep={}]{\xtext}};
                }
                \node[anchor=base east] at (0.005, 0.297       ) {\num{10}};
                \node[anchor=base east] at (0.005, 0.297+1*.257) {\num{e2}};
                \node[anchor=base east] at (0.005, 0.297+2*.257) {\num{e3}};
                \foreach \p in {1, ..., 3}
                {
                    \tikzmath{\ypos = (\p / 4) * 0.230; \ptext = (\p - 2) * 2;}
                    \node[anchor=east] at (0.005, \ypos) {\(\scriptstyle\pgfmathprintnumber[fixed,precision=0,fixed zerofill=true]{\ptext}\)};
                }
                {
                    \fontsize{8}{9.6}\selectfont
                    \node[anchor=east] at (1.0, -0.11) {\({m(\DsmpPipm)}~[\si{\MeVcc}]\)};
                    \node[rotate=90,anchor=east,inner xsep=0pt,outer xsep=0pt] at (-0.11, 1.0) {\({\text{Candidates}/(\SI{2.6}{\MeVcc})}\)};
                }
                \node[anchor=west] at (0.06, 0.92) {\large\lhcb};
                % Legend
                {
                    \fontsize{5}{6}\selectfont
                    \node[anchor=base west] at (0.605, 0.943) {Data};
                    \node[anchor=base west] at (0.605, 0.943 - 1 * 0.0607) {\BdorBsDsPi~signal};
                    \node[anchor=base west] at (0.605, 0.943 - 2 * 0.0607) {\BdDsPi~signal};
                    \node[anchor=base west] at (0.605, 0.943 - 3 * 0.0607) {\BsDsK};
                    \node[anchor=base west] at (0.605, 0.943 - 4 * 0.0607) {\decay{\Bs}{\DsorDssm(\pip, \rhop)}};
                    \node[anchor=base west] at (0.605, 0.943 - 5 * 0.0607) {\LbLcPi};
                    \node[anchor=base west] at (0.605, 0.943 - 6 * 0.0607) {\BdDPi};
                    \node[anchor=base west] at (0.605, 0.943 - 7 * 0.0607) {Comb.~random~\Dsm};
                    \node[anchor=base west] at (0.605, 0.943 - 8 * 0.0607) {Comb.~true~\Dsm};
                }
            \end{scope}
        \end{tikzpicture}
        \caption{Fit to the \DspmPimp~invariant mass, \({\sqs = \SI[parse-numbers=false]{7, 8}{\TeV}}\).}
    \end{subfigure} \hfill%
    \begin{subfigure}{.48\textwidth} \centerfloat
        \begin{tikzpicture}
            \node[anchor=south west,inner sep=0] (image) at (0,0) {\includegraphics[width=0.85\textwidth]{Vub/BFs/mass_Bs2DsPi_BeautyMass_both_phipi_run2_log_IpJo_final3}};
            \begin{scope}[x={(image.south east)},y={(image.north west)}]
                \foreach \x in {0, ..., 3}
                {
                    \tikzmath{\xpos = (\x / 3) * (1. - 0.079) + 0.079; \xtext = 5200 + 200 * \x;}
                    \node at (\xpos, -0.025) {\pgfmathprintnumber[fixed,precision=0,fixed zerofill=true,1000 sep={}]{\xtext}};
                }
                \node[anchor=base east] at (0.005, 0.291       ) {\num{10}};
                \node[anchor=base east] at (0.005, 0.291+1*.247) {\num{e2}};
                \node[anchor=base east] at (0.005, 0.291+2*.247) {\num{e3}};
                \foreach \p in {1, ..., 3}
                {
                    \tikzmath{\ypos = (\p / 4) * 0.230; \ptext = (\p - 2) * 2;}
                    \node[anchor=east] at (0.005, \ypos) {\(\scriptstyle\pgfmathprintnumber[fixed,precision=0,fixed zerofill=true]{\ptext}\)};
                }
                {
                    \fontsize{8}{9.6}\selectfont
                    \node[anchor=east] at (1.0, -0.11) {\({m(\DsmpPipm)}~[\si{\MeVcc}]\)};
                    \node[rotate=90,anchor=east,inner xsep=0pt,outer xsep=0pt] at (-0.11, 1.0) {\({\text{Candidates}/(\SI{2.6}{\MeVcc})}\)};
                }
                \node[anchor=west] at (0.06, 0.92) {\large\lhcb};
                % Legend
                {
                    \fontsize{5}{6}\selectfont
                    \node[anchor=base west] at (0.605, 0.943) {Data};
                    \node[anchor=base west] at (0.605, 0.943 - 1 * 0.0607) {\BdorBsDsPi~signal};
                    \node[anchor=base west] at (0.605, 0.943 - 2 * 0.0607) {\BdDsPi~signal};
                    \node[anchor=base west] at (0.605, 0.943 - 3 * 0.0607) {\BsDsK};
                    \node[anchor=base west] at (0.605, 0.943 - 4 * 0.0607) {\decay{\Bs}{\DsorDssm(\pip, \rhop)}};
                    \node[anchor=base west] at (0.605, 0.943 - 5 * 0.0607) {\LbLcPi};
                    \node[anchor=base west] at (0.605, 0.943 - 6 * 0.0607) {\BdDPi};
                    \node[anchor=base west] at (0.605, 0.943 - 7 * 0.0607) {Comb.~random~\Dsm};
                    \node[anchor=base west] at (0.605, 0.943 - 8 * 0.0607) {Comb.~true~\Dsm};
                }
            \end{scope}
        \end{tikzpicture}
        \caption{Fit to the \DspmPimp~invariant mass, \({\sqs = \SI{13}{\TeV}}\).}
    \end{subfigure}
    \\[4ex]
    \begin{subfigure}{.48\textwidth} \centerfloat
        \begin{tikzpicture}
            \node[anchor=south west,inner sep=0] (image) at (0,0) {\includegraphics[width=0.85\textwidth]{Vub/BFs/mass_Lb2Dsp_BeautyMass_kkpi_both_run1}};
            \begin{scope}[x={(image.south east)},y={(image.north west)}]
                \foreach \x in {0, ..., 5}
                {
                    \tikzmath{\xpos = (\x / 5); \xtext = 5200 + 200 * \x;}
                    \node at (\xpos, -0.025) {\pgfmathprintnumber[fixed,precision=0,fixed zerofill=true,1000 sep={}]{\xtext}};
                }
                \foreach \y in {0, ..., 5}
                {
                    \tikzmath{\ypos = (\y / 5) * 0.573 + 0.318; \ytext = 10 * \y + 10;}
                    \node[anchor=base east] at (0.005, \ypos) {\(\pgfmathprintnumber[fixed,precision=0,fixed zerofill=true]{\ytext}\)};
                }
                \foreach \p in {1, ..., 3}
                {
                    \tikzmath{\ypos = (\p / 4) * 0.230; \ptext = (\p - 2) * 2;}
                    \node[anchor=east] at (0.005, \ypos) {\(\scriptstyle\pgfmathprintnumber[fixed,precision=0,fixed zerofill=true]{\ptext}\)};
                }
                {
                    \fontsize{8}{9.6}\selectfont
                    \node[anchor=east] at (1.0, -0.11) {\({m(\DsmpPpm)}~[\si{\MeVcc}]\)};
                    \node[rotate=90,anchor=east,inner xsep=0pt,outer xsep=0pt] at (-0.11, 1.0) {\({\text{Candidates}/(\SI{10}{\MeVcc})}\)};
                }
                \node[anchor=west] at (0.06, 0.92) {\large\lhcb};
                % Legend
                {
                    \fontsize{5}{6}\selectfont
                    \node[anchor=base west] at (0.591, 0.893) {Data};
                    \node[anchor=base west] at (0.591, 0.893 - 1 * 0.0977) {\LbDsP~signal};
                    \node[anchor=base west] at (0.591, 0.893 - 2 * 0.0977) {\BsDsOrDsstKorKst};
                    \node[anchor=base west] at (0.591, 0.893 - 3 * 0.0977) {\decay{\Bs}{\DsorDssm(\pip, \rhop)}};
                    \node[anchor=base west] at (0.591, 0.893 - 4 * 0.0977) {\LbDsstP};
                    \node[anchor=base west] at (0.591, 0.893 - 5 * 0.0977) {Combinatorial};
                }
            \end{scope}
        \end{tikzpicture}
        \caption{Fit to the \DsmpPpm~invariant mass, \({\sqs = \SI[parse-numbers=false]{7, 8}{\TeV}}\).}
    \end{subfigure} \hfill%
    \begin{subfigure}{.48\textwidth} \centerfloat
        \begin{tikzpicture}
            \node[anchor=south west,inner sep=0] (image) at (0,0) {\includegraphics[width=0.85\textwidth]{Vub/BFs/mass_Lb2Dsp_BeautyMass_kkpi_both_run2}};
            \begin{scope}[x={(image.south east)},y={(image.north west)}]
                \foreach \x in {0, ..., 5}
                {
                    \tikzmath{\xpos = (\x / 5); \xtext = 5200 + 200 * \x;}
                    \node at (\xpos, -0.025) {\pgfmathprintnumber[fixed,precision=0,fixed zerofill=true,1000 sep={}]{\xtext}};
                }
                \foreach \y in {0, ..., 5}
                {
                    \tikzmath{\ypos = (\y / 5) * 0.551 + 0.321; \ytext = 10 * \y + 10;}
                    \node[anchor=base east] at (0.005, \ypos) {\(\pgfmathprintnumber[fixed,precision=0,fixed zerofill=true]{\ytext}\)};
                }
                \foreach \p in {1, ..., 3}
                {
                    \tikzmath{\ypos = (\p / 4) * 0.230; \ptext = (\p - 2) * 2;}
                    \node[anchor=east] at (0.005, \ypos) {\(\scriptstyle\pgfmathprintnumber[fixed,precision=0,fixed zerofill=true]{\ptext}\)};
                }
                {
                    \fontsize{8}{9.6}\selectfont
                    \node[anchor=east] at (1.0, -0.11) {\({m(\DsmpPpm)}~[\si{\MeVcc}]\)};
                    \node[rotate=90,anchor=east,inner xsep=0pt,outer xsep=0pt] at (-0.11, 1.0) {\({\text{Candidates}/(\SI{10}{\MeVcc})}\)};
                }
                \node[anchor=west] at (0.06, 0.92) {\large\lhcb};
                % Legend
                {
                    \fontsize{5}{6}\selectfont
                    \node[anchor=base west] at (0.591, 0.893) {Data};
                    \node[anchor=base west] at (0.591, 0.893 - 1 * 0.0977) {\LbDsP~signal};
                    \node[anchor=base west] at (0.591, 0.893 - 2 * 0.0977) {\BsDsOrDsstKorKst};
                    \node[anchor=base west] at (0.591, 0.893 - 3 * 0.0977) {\decay{\Bs}{\DsorDssm(\pip, \rhop)}};
                    \node[anchor=base west] at (0.591, 0.893 - 4 * 0.0977) {\LbDsstP};
                    \node[anchor=base west] at (0.591, 0.893 - 5 * 0.0977) {Combinatorial};
                }
            \end{scope}
        \end{tikzpicture}
        \caption{Fit to the \DsmpPpm~invariant mass, \({\sqs = \SI{13}{\TeV}}\).}
    \end{subfigure}
    \caption{
        Mass fits to determine the yields of the decays~\BdDsPi and~\LbDsP.
        Note that in the fits to the \DspmPimp~invariant mass, the decay under study,~\BdDsPi, appears as the small purple-shaded peak on the left-hand side of the dominating \BsDsPi~mass peak.}
    \label{fig:Vub_MassFits}
\end{figure}

The decay channel~\BdDsPi is reconstructed using~\DsmKKPi and normalised to~\BdDPi (with~\DmKPiPi), while \LbDsP (with~\DsmKKPi) is normalised to \LbLcPi (with~\LcPKPi).
These normalisation channels are Cabibbo-allowed, and are chosen to allow a determination of the branching fractions without having to take into account differences in \bquark-hadron production.
The yields and efficiencies are mostly determined analogous to the procedures described in \cref{chp:DsK_BF}~\cite{JButter:MasterThesis,MTervoert:MasterThesis}.
The mass fits are shown in \cref{fig:Vub_MassFits}, their accompanying yields in \cref{tab:Vub_Yields}, and the efficiencies in \cref{tab:Vub_Efficiencies}.
Together, they result in the following branching fractions:
%
\begin{align}
    \BF(\BdDsPi) &=   \num{23.1 +- 2.3 e-6} \rlap{,} \\
    \BF(\LbDsP)  &= \0\num{ 7.5 +- 0.8 e-6} \rlap{,}
\end{align}
%
where the errors are a combination of statistical errors and errors on external inputs.
This is a first observation of the decay~\LbDsP, and the branching fraction of~\BdDsPi is of the same precision as the current world-average value~\cite{PDG}.
%
\begin{table}[htb] \centerfloat
    \caption{
        Signal yields from the mass fits shown in \cref{fig:Vub_MassFits}.}
    \label{tab:Vub_Yields}
    \rowcolors{1}{tableshade}{}
    \begin{tabular}{lS[table-format=6(4)]S[table-format=6(4)]S[table-format=7(4)]}
        \hiderowcolors \toprule
        \multirow{2}{*}[-2pt]{Decay~channel} & \multicolumn{3}{c}{Yield} \tabularnewline
        \cmidrule(lr){2-4}
                & {\(\sqs = \SI[parse-numbers=false]{7, 8}{\TeV}\)} & {\(\sqs = \SI{13}{\TeV}\)} & {Total} \tabularnewline
        \showrowcolors \midrule
        \BdDsPi &   1035 +-  118 &   1648 +-  157 &    2683 +- 196 \tabularnewline
        \BdDPi  & 500842 +- 1167 & 584929 +- 1619 & 1085771 +- 1996 \tabularnewline
        \midrule
        \LbDsP  &    158 +-   11 &    334 +-   18 &     492 +- 21 \tabularnewline
        \LbLcPi &  98591 +-  344 & 219033 +-  587 &  317624 +- 680 \tabularnewline
        \bottomrule
    \end{tabular}
\end{table}

The branching fraction of~\BdDsPi can be related to~\({\absx{\Vub} \absx{\aNF^{\BdDsPi}}}\) using \cref{eqn:theory_BF}, by using external input for the form factor~\cite{Ball:2004ye,Ball:2006jz},
%
\begin{equation}
    {F_{\decay{\Bd}{\pim}} |_{q^{2}=m_{\Dspm}^{2}} = \num{0.333 +- 0.026}} \rlap{,}
\end{equation}
%
as well as for the decay constant~\cite{Bazavov:2017lyh},
%
\begin{equation}
    {f_{\Dspm} = \SI{0.2498 +- 0.0003}{\GeV}} \rlap{,}
\end{equation}
%
resulting in
%
\begin{equation}
    {\absx{\Vub} \absx{\aNF^{\BdDsPi}} = \num{3.34 +- 0.32 e-3}} \rlap{.}
\end{equation}
%
This value allows extraction of~\(\absx{\aNF^{\BdDsPi}}\) by using the current world-average value of~\(\absx{\Vub}\)~\cite{PDG}, \({\absx{\Vub} = \num{3.94 +- 0.36 e-3}}\),
%
\begin{equation}
    \absx{\aNF^{\BdDsPi}} = \num{0.86 +- 0.11} \rlap{.}
\end{equation}
%
This result is compatible with naive factorisation, but also allows for a sizeable nonfactorisable effect.

In principle, the inverse is also possible: fixing~\(\absx{\aNF}\) in order to determine~\(\absx{\Vub}\).
However, current knowledge of~\(\aNF\) in the case of a light decay product in the form factor and a heavy one in the decay constant, as is the case here, is limited.
It is possible to assume naive factorisation,~\(\absx{\aNF^{\BdDsPi}}\), using an associated error of~\SI{20}{\percent}, resulting in
%
\begin{equation}
    \absx{\Vub} = \num{3.34 +- 0.74 e-3} \rlap{,}
\end{equation}
%
which is compatible with both the current exclusive and inclusive values for~\(\absx{\Vub}\), though the central value is closer to that of the exclusive determination.
While the uncertainties are too large for now, this may provide another handle for differentiating between the inclusive and exclusive~\(\absx{\Vub}\) values, especially if~\(\aNF\) can be externally constrained.

Both approaches, with external input for~\(\absx{\Vub}\) split between inclusive, exclusive, and average measurements, are shown in \cref{fig:Vub_aNFVub}.
%
\begin{figure}[htb] \centerfloat
    \begin{tikzpicture}
        \node[anchor=south west,inner sep=0] (image) at (0,0) {\includegraphics[width=0.86\textwidth]{Vub/BFs/Plot_result}};
        \begin{scope}[x={(image.south east)},y={(image.north west)}]
            \foreach \x in {0, ..., 6}
            {
                \tikzmath{\xpos = \x / 6.; \xtext = \x * 0.0005 + 0.0030;}
                \node at (\xpos, -0.027) {\(\pgfmathprintnumber[fixed,precision=4,fixed zerofill=true]{\xtext}\)};
            }
            \node[anchor=east] at (0.005, 0.008) {\(\pgfmathprintnumber[fixed,precision=1,fixed zerofill=true]{0.6}\)};
            \foreach \y in {1, ..., 7}
            {
                \tikzmath{\ypos = \y / 7.; \ytext = \y * 0.1 + 0.6;}
                \node[anchor=east] at (0.005, \ypos) {\(\pgfmathprintnumber[fixed,precision=1,fixed zerofill=true]{\ytext}\)};
            }
            % Legend
            {
                \node[anchor=base west] at (0.650, 0.935) {\({\abs{\aNF}\abs{\Vub}}\)~result};
                \node[anchor=base west] at (0.650, 0.935 - 1 * 0.065) {\abs{\Vub}~exclusive};
                \node[anchor=base west] at (0.650, 0.935 - 2 * 0.065) {\abs{\Vub}~inclusive};
                \node[anchor=base west] at (0.650, 0.935 - 3 * 0.065) {\abs{\Vub}~average};
                \node[anchor=base west] at (0.650, 0.935 - 4 * 0.065) {Naive factorisation};
            }
            \node[anchor=east] at (1.0, -0.10) {\abs{\Vub}};
            \node[rotate=90,anchor=east,inner xsep=0pt,outer xsep=0pt] at (-0.09, 1.0) {\abs{\aNF}};
        \end{scope}
    \end{tikzpicture}
    \caption{
        Allowed range of~\(\absx{\Vub} \absx{\aNF^{\BdDsPi}}\).
        The vertical lines represent the inclusive, exclusive, and average external measurements of~\(\absx{\Vub}\), and the horizontal lines indicate naive factorisation,~\({\absx{\aNF^{\BdDsPi}} = \num{1 +- .2}}\).
        The curved band is the current measurement of~\({\absx{\Vub} \absx{\aNF^{\BdDsPi}}}\).}
    \label{fig:Vub_aNFVub}
\end{figure}


\section{Evaluation based on clustering and random forest.}\label{app:clustering}

The final method to evaluate the features importance in a strategy's success
is a combination of a clustering task and a random forest algorithm.
Initially the performances are clustered into different clusters
based on them being successful or not. The performances are clustered into
successful and unsuccessful clusters based on 4 different approaches.
More specifically:

\begin{itemize}
    \item \textbf{Approach 1:} The performances are divided into two clusters based
    on whether their performance was in the top \(5\%\) of their respective tournaments.
    Thus, whether \(r\) was smaller or larger than 0.05.
    \item \textbf{Approach 2:} The performances are divided into two clusters based
    on whether their performance was in the top \(25\%\) of their respective tournaments.
    Thus, whether \(r\) was smaller or larger than 0.25.
    \item \textbf{Approach 3:} The performances are divided into two clusters based
    on whether their performance was in the top \(50\%\) of their respective tournaments.
    Thus, whether \(r\) was smaller or larger than 0.50.
    \item \textbf{Approach 4:} The performances are clustered based on their normalised rank and
    their median score by a \(k-\)means algorithm~\cite{Arthur2007}. The number of
    clusters is not deterministically chosen but it is based on the silhouette
    coefficients~\cite{Rousseeuw1987}.
\end{itemize}

Once the performances have been assigned to a cluster for each approach a
random forest algorithm~\cite{breiman2001} is applied. The problem is a supervised
problem where the random forest algorithm predicts the cluster to which a performance
has been assigned to using the features of Table~\ref{table:manual_features}.
The random
forest models are trained on a training set of 70\% of the tournaments results.
The accuracy of each model based on $R^2$ and the number of clusters for each
tournament type (because in the case of Approach 4 it is not
deterministically chosen) are given by Table~\ref{table:accuracy_random_forest}.
The out of the bag error (OOB)~\cite{hastie2005} has also been calculated. The
models fit well, and a high value of both the accuracy measures on the test data
and the OOB error indicate that the model is not over fitting.

\begin{table}[!htbp]
    \begin{center}
        \resizebox{.9\textwidth}{!}{
        \begin{tabular}{lccccc}
    \toprule
    Tournament type & Clustering Approach & Number of clusters & $R^2$ training data &  $R^2$ test data  & $R^2$ OOB score\\
    \midrule
    standard  & Approach 1  & 2 & 0.998831  & 0.987041    & 0.983708 \\
              & Approach 2  & 2 & 0.998643  & 0.978626    & 0.969202 \\
              & Approach 3  & 2 & 0.998417  & 0.985217    & 0.976538 \\
              & Approach 4  & 2 & 0.998794  & 0.990677    & 0.982959 \\
    \midrule
    noisy     & Approach 1  & 2 & 0.997786  & 0.972229    & 0.968332\\
              & Approach 2  & 2 & 0.997442  & 0.963254    & 0.955219\\
              & Approach 3  & 2 & 0.997152  & 0.953164    & 0.940528\\
              & Approach 4  & 3 & 0.996923  & 0.950728    & 0.935444\\
    \midrule
    probabilistic ending & Approach 1 & 2 & 0.997909   & 0.981490  & 0.978120 \\
                         & Approach 2 & 2 & 0.997883   & 0.973492  & 0.967150 \\
                         & Approach 3 & 2 & 0.990448   & 0.890068  & 0.875822 \\
                         & Approach 4 & 2 & 0.999636   & 0.995183  & 0.992809 \\
    \midrule
    noisy probabilistic ending & Approach 1  & 2 & 0.995347 & 0.957846   & 0.952353\\
                               & Approach 2  & 2 & 0.992813 & 0.909346   & 0.898613\\
                               & Approach 3  & 2 & 0.990579 & 0.824794   & 0.806540\\
                               & Approach 4  & 4 & 0.989465 & 0.841652   & 0.824052\\
    \midrule
    over \numberofalltournaments tournaments   & Approach 1 & 2 & 0.997271& 0.972914& 0.969198 \\
                                               & Approach 2 & 2 & 0.996323& 0.951194& 0.940563 \\
                                               & Approach 3 & 2 & 0.993707& 0.906941& 0.891532 \\
                                               & Approach 4 & 3 & 0.993556& 0.913335& 0.898453 \\
    \bottomrule
        \end{tabular}}
    \end{center}
    \caption{Accuracy metrics for random forest models.}
    \label{table:accuracy_random_forest}
\end{table}

The importance that the features of Table~\ref{table:manual_features} had on
each random forest model are given by Figures~\ref{fig:clustering_importance_standard},
\ref{fig:clustering_importance_noise},~\ref{fig:clustering_importance_probend},
\ref{fig:clustering_importance_probend_noise}
and~\ref{fig:clustering_importance_overall}. These show that the classifiers
stochastic, make use of game and make use of length have no significant effect,
and several of the features that are highlighted by the importance are inline with
the correlation results. Moreover, the smoothing parameter \(k\) appears to no
have a significant effect either. The most important features based on the
random forest analysis were $C_{r} / C_{median}$ and $C_r / C_{mean}$.

\begin{figure}[!htbp]
    \begin{subfigure}[t]{0.5\textwidth}
        \begin{center}
            \includegraphics[width=.75\linewidth]{../new_output/standard/_feature_importance_bar_plot_cluster_on_0_05.pdf}
        \end{center}
        \caption{Importance of features for clusters on 5\% performance.}
    \end{subfigure}\hfill
    \begin{subfigure}[t]{0.5\textwidth}
        \begin{center}
            \includegraphics[width=.75\linewidth]{../new_output/standard/_feature_importance_bar_plot_cluster_on_0_25.pdf}
        \end{center}
        \caption{Importance of features for clusters on 25\% performance.}
    \end{subfigure}
    \begin{subfigure}[t]{0.5\textwidth}
        \begin{center}
            \includegraphics[width=.75\linewidth]{../new_output/standard/_feature_importance_bar_plot_cluster_on_0_5.pdf}
        \end{center}
        \caption{Importance of features for clusters on 50\% performance.}
    \end{subfigure}\hfill
    \begin{subfigure}[t]{0.5\textwidth}
        \begin{center}
            \includegraphics[width=.75\linewidth]{../k_means_output/standard/_feature_importance_bar_plot.pdf}
        \end{center}
        \caption{Importance of features for clusters based on \(k\)means algorithm.}
    \end{subfigure}
    \caption{Importance of features in standard tournaments for different
    clustering methods.}\label{fig:clustering_importance_standard}
\end{figure}

\begin{figure}[!htbp]
    \begin{subfigure}{0.5\textwidth}
        \begin{center}
            \includegraphics[width=.75\linewidth]{../new_output/noise/_feature_importance_bar_plot_cluster_on_0_05.pdf}
        \end{center}
        \caption{Importance of features for clusters on 5\% performance.}
    \end{subfigure}\hfill
    \begin{subfigure}{0.5\textwidth}
        \begin{center}
            \includegraphics[width=.75\linewidth]{../new_output/noise/_feature_importance_bar_plot_cluster_on_0_25.pdf}
        \end{center}
        \caption{Importance of features for clusters on 25\% performance.}
    \end{subfigure}
    \begin{subfigure}{0.5\textwidth}
        \begin{center}
            \includegraphics[width=.75\linewidth]{../new_output/noise/_feature_importance_bar_plot_cluster_on_0_5.pdf}
        \end{center}
        \caption{Importance of features for clusters on 50\% performance.}
    \end{subfigure}\hfill
    \begin{subfigure}{0.5\textwidth}
        \begin{center}
            \includegraphics[width=.75\linewidth]{../k_means_output/noise/_feature_importance_bar_plot.pdf}
        \end{center}
        \caption{Importance of features for clusters based on \(k\)means algorithm.}
    \end{subfigure}
    \caption{Importance of features in noisy tournaments for different
    clustering methods.}\label{fig:clustering_importance_noise}
\end{figure}

\begin{figure}[!htbp]
    \begin{subfigure}[t]{0.5\textwidth}
        \begin{center}
            \includegraphics[width=.75\linewidth]{../new_output/probend/_feature_importance_bar_plot_cluster_on_0_05.pdf}
        \end{center}
        \caption{Importance of features for clusters on 5\% performance.}
    \end{subfigure}
    \begin{subfigure}[t]{0.5\textwidth}
        \begin{center}
            \includegraphics[width=.75\linewidth]{../new_output/probend/_feature_importance_bar_plot_cluster_on_0_25.pdf}
        \end{center}
        \caption{Importance of features for clusters on 25\% performance.}
    \end{subfigure}
    \begin{subfigure}[t]{0.5\textwidth}
        \begin{center}
            \includegraphics[width=.75\linewidth]{../new_output/probend/_feature_importance_bar_plot_cluster_on_0_5.pdf}
        \end{center}
        \caption{Importance of features for clusters on 50\% performance.}
    \end{subfigure}
    \begin{subfigure}[t]{0.5\textwidth}
        \begin{center}
            \includegraphics[width=.75\linewidth]{../k_means_output/probend/_feature_importance_bar_plot.pdf}
        \end{center}
        \caption{Importance of features for clusters based on \(k\)means algorithm.}
    \end{subfigure}
    \caption{Importance of features in probabilistic ending tournaments for different
    clustering methods.}\label{fig:clustering_importance_probend}
\end{figure}

\begin{figure}[!htbp]
    \begin{subfigure}[t]{0.5\textwidth}
        \begin{center}
            \includegraphics[width=.75\linewidth]{../new_output/probend_noise/_feature_importance_bar_plot_cluster_on_0_05.pdf}
        \end{center}
        \caption{Importance of features for clusters on 5\% performance.}
    \end{subfigure}
    \begin{subfigure}[t]{0.5\textwidth}
        \begin{center}
            \includegraphics[width=.75\linewidth]{../new_output/probend_noise/_feature_importance_bar_plot_cluster_on_0_25.pdf}
        \end{center}
        \caption{Importance of features for clusters on 25\% performance.}
    \end{subfigure}
    \begin{subfigure}[t]{0.5\textwidth}
        \begin{center}
            \includegraphics[width=.75\linewidth]{../new_output/probend_noise/_feature_importance_bar_plot_cluster_on_0_5.pdf}
        \end{center}
        \caption{Importance of features for clusters on 50\% performance.}
    \end{subfigure}
    \begin{subfigure}[t]{0.5\textwidth}
        \begin{center}
            \includegraphics[width=.75\linewidth]{../k_means_output/probend_noise/_feature_importance_bar_plot.pdf}
        \end{center}
        \caption{Importance of features for clusters based on \(k\)means algorithm.}
    \end{subfigure}
    \caption{Importance of features in noisy probabilistic ending tournaments for different
    clustering methods.}\label{fig:clustering_importance_probend_noise}
\end{figure}

\begin{figure}[!htbp]
    \begin{subfigure}[t]{0.5\textwidth}
        \begin{center}
            \includegraphics[width=.75\linewidth]{../new_output/merged/_feature_importance_bar_plot_cluster_on_0_05.pdf}
        \end{center}
        \caption{Importance of features for clusters on 5\% performance.}
    \end{subfigure}
    \begin{subfigure}[t]{0.5\textwidth}
        \begin{center}
            \includegraphics[width=.75\linewidth]{../new_output/merged/_feature_importance_bar_plot_cluster_on_0_25.pdf}
        \end{center}
        \caption{Importance of features for clusters on 25\% performance.}
    \end{subfigure}
    \begin{subfigure}[t]{0.5\textwidth}
        \begin{center}
            \includegraphics[width=.75\linewidth]{../new_output/merged/_feature_importance_bar_plot_cluster_on_0_5.pdf}
        \end{center}
        \caption{Importance of features for clusters on 50\% performance.}
    \end{subfigure}
    \begin{subfigure}[t]{0.5\textwidth}
        \begin{center}
            \includegraphics[width=.75\linewidth]{../k_means_output/merged/_feature_importance_bar_plot.pdf}
        \end{center}
        \caption{Importance of features for clusters based on \(k\)means algorithm.}
    \end{subfigure}
    \caption{Importance of features over all the tournaments for different
    clustering methods.}\label{fig:clustering_importance_overall}
\end{figure}


\section{Local Optimizations}

Local Optimizations are the simplest form of optimizations that can be performed by considering a single basic block in isolation. Some possible examples are:

\begin{itemize}
    \item \textbf{Elimination of No-ops:} Some statements can be deleted. \(x := x + 0\), \(x := x * 1\), \(x := x | 0\)
    \item \textbf{Algebraic Simplification:} Some statements can be simplified
    \[x := x * 0 \rightarrow x := 0\]
    \[y := x ** 2 \rightarrow y := x * x\]
    \[x := x * 8 \rightarrow x := x << 3\]
    \[x := x * 15 \rightarrow t := x << 4; x := t - x\]

    The above code replacements are meaningful optimizations only if the RHS code would perform better than LHS code which also depends on the underlying hardware.
    \item \textbf{Constant Propagation or Constant Folding:} For statement x := y op z where y and z are constants, this statement can be computed at compile time.
    \[x := 2 + 2 \rightarrow x := 4\]
    \[if\; 2 < 0\; jump\; L \rightarrow No-op\]
    \[if\;2>0\;jump\;L \rightarrow jump\;L\]

    More specifically, constant folding is about performing computations at compile time and constant propagation is about propagating constants throughout the program.
\end{itemize}

\subsection{Dead Code Elimination}

Dead code is the code that is unreachable from the initial block, for example, CFG node with no incoming edges. Removing unreachable code makes the program smaller (and sometimes faster due to fewer cache misses).
\\
\\
\textbf{Why would unreachable block occur?}
\\
\#define DEBUG 0
\\
...
\\
if (DEBUG) \{
\\
...
\\
\}
\\

In the above example, after performing constant propagation, DEBUG would be replaced with 0. Further constant folding would remove the jump statement to the 'if' block and it would be converted to dead code which can be eliminated.

Unreachable block may also occur when libraries are imported. Libraries might have a large number of functions but usually only a small fraction of functions are actually used. Then the code for other functions constitute dead code. Usually other optimizations may result in more dead code.

\subsection{Common Subexpression Elimination}

Consider the case of following code with the assumption that the value of x, y, and z remain unchanged after the first statement, then we can perform the following replacement to use the pre-computed value.

x := y + z;
...;
...;
w := y + z; $\;\;\; \rightarrow \;\;\;$ x := y + z; ...; ...; w := x;

In this case, SSA IR particularly helps in doing away with the initial assumption since SSA IR enforces the property that each variable can be assigned only once. In short, SSA IR makes more values available simultaneously.

\[x_1 := y + z; x_2 := x_1 + 3; w := y + z \;\;\; \rightarrow \;\;\; x_1 := y + z; x_2 := x_1 + 3; w := x_1\]

In the above example, the common subexpression being eliminated is y + z. The three address code also makes it easier to identify the uses of a subexpression in the code.

\subsection{Copy Propagation}

If we see w := x, replace subsequent uses of w with x (and eliminate this statement)\\
\\
Before: x := y + z; w := x + 3; v := x; u := v + 3;\\
After: x := y + z; w := x + 3; u := x + 3;\\
\\
This optimization leads to less number of copies leading to need of fewer registers. It also activates further optimizations like common subexpression elimination.

\subsection{Example 1}

\textbf{Original Code:} x := y + z; w := x + 3; v := y + z; u := v + 3;\\
\textbf{After CSE:} x := y + z; w := x + 3; v := x; u := v + 3;\\
\textbf{After CP:} x := y + z; w := x + 3; u := x + 3;\\
\textbf{After CSE:} x := y + z; w := x + 3; u := w;\\
\\
Further copy propagation is possible due to the third statement u := w.

\subsection{Example 2}

a := x ** 2
b := 3\\
c := x\\
d := c * c\\
e := b * 2\\
f := a + d\\
g := e + f\\

\textbf{Final form: }

a := x * x
f := a + a
g := 6 * f\\
\\
It is possible for the compiler to get stuck in a "local minima". In the above example, if f := 2 * a was not replaced with f := a + a, there could have been possibility to use the shift operator (f := a \(<<\) 1) or to use copy propagation followed by dead code elimination (a:= x * x; g := 12 * a)

\subsection{Summary}
\begin{itemize}
    \item Each local optimization does little by itself.
    \item Often optimizations interact: performing one optimization may enable of disable other optimizations.
    \item Optimizing compilers can be thought of as a big bag of tricks.
\end{itemize}

\subsection{Typical Structure of an Optimizing Compiler}
repeat \{apply an optimization rule\}\\
until \{no improvement is possible\}

\begin{itemize}
    \item \textbf{Convergence} can be guaranteed by defining a metric for performance and ensuring that each iteration improves that metric. This monotonic behaviour would prevent any kind of oscillations that might be possible.
    \item \textbf{Optimality} is not guaranteed. The compiler can get stuck in a local minima.
\end{itemize}


\paragraph{Nature} is exceptional at inventing new complex, resilient solutions through the evolution of organizations, from the molecular level to the ecosystems.
This project uses biologically inspired Evolutionary Algorithms (EAs) to develop algorithms to run on hardware.
See \vref{sect:eh} for more about Evolvable Hardware.
In biology, Deoxyribonucleic acid (DNA) governs the processes and structure of the cells of living cellular organisms ).
The minimal units of DNA are called \textbf{genes}, and they are structured in \textbf{chromosomes}. They determine the physical characteristics and development of the organism.
In EAs, the chromosomes may take the form of data structures like strings, arrays, or graphs where each segment of the data structure is a gene.
Another term is \textbf{allele}. Individuals inherit two alleles for each gene, one from each parent. Alleles represent alternative forms of a gene that arise by mutation and can, for example, result in different \textbf{phenotypic} traits, like different pigmentation.
The aggregation of the alleles for a specific gene is termed the \textbf{genotype} for the gene.
Although the genotype is the most influential factor for the phenotype, other factors also play an important role, like environmental factors.
\cite{trefzer_evolvable_2015}
In EAs, there is usually only one allele per gene, which results in genotypes normally being identical to the chromosome.
The phenotype is usually the final solution of the EA.

\paragraph{EAs in general} are population-based optimization algorithms, adopting a higher-level of abstraction of an evolutionary scheme found in nature.
The classical Simple Genetic Algorithm (SGA) involves individuals, phenotypes, genotypes, fitness function, selection, recombination, and mutation.
A \textbf{gentotype} in EAs is each candidate solution, with its genes being the parameters of the solution. A \textbf{phenotype} is the resulting characteristic of a particular solution when in contact with the environment.
The fitness function is those parts of an environment that are designed to assess how good a solution fits with the problem.
As in nature, individuals are stochastically selected to recombine or survive based on their more deterministic fitness levels.
If only the fittest individuals were to be selected, then the search would most likely end prematurely in the first available local optima.
After the first selection, individuals are recombined, and their offspring mutated.
In optimization algorithms like EAs, there needs to be a balance between how much the best solutions are \textbf{exploited}, and how much the solution space is \textbf{explored} for new solutions.
The evolution typically runs until certain criteria are met or until a set number of generations has been reached.
\cite{eiben_introduction_2015}
The SGA has inspired mind-boggling variations of algorithms under the relatively wide EA umbrella, and examples of these are the
Island Model \cite{schuman_parallel_2016} and Evolutionary Optimization \cite{schuman_evolutionary_2016}.


\section{Surface Area}\label{sec:surfacearea3D}

We next seek to compute the area of a surface above (or below) a
region in the $x$-$y$ plane. How might we approximate this? We start,
as usual, by dividing the region into a grid of small rectangles. We
want to approximate the area of the surface above one of these small
rectangles. The area is very close to the area of the tangent plane
above the small rectangle. If the tangent plane just happened to be
horizontal, of course the area would simply be the area of the
rectangle. For a typical plane, however, the area is the area of a
parallelogram, as indicated in Figure~\ref{fig:smallparallelogram}.
Note that the area of the parallelogram is obviously larger the more
``tilted'' the tangent plane.

\begin{figure}[H]
\centerline{
\vbox{\beginpicture
\normalgraphs
\setcoordinatesystem units <1.5truecm,1.5truecm>
\setplotarea x from 0 to 2.1, y from -1.1 to 1.1
\put {\hbox{\epsfxsize6cm\epsfbox{images/small_parallelograms.eps}}} at 0 0
\endpicture}}
\caption{Small parallelograms at points of tangency.}
\label{fig:smallparallelogram}
\end{figure}

Now recall a curious fact: the area of a
parallelogram can be computed as the cross
product of two vectors. % (page~\xrefn{page:parallelogram area}).
We simply need to acquire two vectors, parallel to the sides of the
parallelogram and with lengths to match. But this is easy: in the $x$
direction we use the tangent vector we already know, namely $\langle
1,0,f_x\rangle$ and multiply by $\Delta x$ to shrink it to the right
size: $\langle \Delta x,0,f_x\Delta x\rangle$. In the $y$ direction we
do the same thing and get $\langle 0,\Delta y,f_y\Delta y\rangle$. The
cross product of these vectors is $\langle f_x,f_y,-1\rangle\,\Delta
x\,\Delta y$ with length $\ds\sqrt{f_x^2+f_y^2+1}\,\Delta x\,\Delta
y$, the area of the parallelogram. Now we add these up and take the
limit, to produce the integral
\[\int_{x_0}^{x_1}\int_{y_0}^{y_1} \sqrt{f_x^2+f_y^2+1}\,dy\,dx.\]
As before, the limits need not be constant.

\begin{example}{Surface Area of a Hemisphere}{SurfaceAreaHemisphere}
Find the area of the hemisphere $\ds z=\sqrt{1-x^2-y^2}$.
\end{example}
\begin{solution}
We compute the derivatives
\[f_x={-x\over\sqrt{1-x^2-y^2}} \qquad
f_x={-y\over\sqrt{1-x^2-y^2}},\]
and then the area is
\[\int_{-1}^{1}\int_{-\sqrt{1-x^2}}^{\sqrt{1-x^2}}
\sqrt{ {x^2\over1-x^2-y^2}+{y^2\over1-x^2-y^2}+1}\,dy\,dx.\]
This is a bit on the messy side, but we can use polar coordinates:
\[\int_{0}^{2\pi}\int_{0}^{1}
\sqrt{ {1\over1-r^2}}\;r\,dr\,d\theta.\]
This integral is improper, since the function is undefined at the
limit $1$. We therefore compute
\[\lim_{a\to1^-}\int_{0}^{a}\sqrt{ {1\over1-r^2}}\;r\,dr=\lim_{a\to1^-}-\sqrt{1-a^2}+1=1,\]
using the substitution $u=1-r^2$. Then the area is
\[\int_{0}^{2\pi}1\;d\theta=2\pi.\]
You may recall that the area of a sphere of radius $r$ is $4\pi r^2$, so half
the area of a unit sphere is $(1/2)4\pi=2\pi$, in agreement with our
answer.
\end{solution}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\Opensolutionfile{solutions}[ex]
\section*{Exercises for \ref{sec:surfacearea3D}}

\begin{enumialphparenastyle}

\begin{ex}
Find the area of the surface of a right circular cone of
height $h$ and base radius $a$.
\begin{sol}
$\pi a\sqrt{h^2+a^2}$
\end{sol}
\end{ex}

\begin{ex}
Find the area of the portion of the plane $z=mx$ inside the
cylinder $x^2+y^2=a^2$.
\begin{sol}
$\pi a^2\sqrt{m^2+1}$
\end{sol}
\end{ex}

\begin{ex}
Find the area of the portion of the plane $x+y+z=1$ in the
first octant.
\begin{sol}
$\sqrt3/2$
\end{sol}
\end{ex}

\begin{ex}
Find the area of the upper half of the cone
$x^2+y^2=z^2$ inside the cylinder $x^2+y^2-2x = 0$.
\begin{sol}
$\pi\sqrt2$
\end{sol}
\end{ex}

\begin{ex}
Find the area of the upper half of the cone
$x^2+y^2=z^2$ above the interior of one loop of $r=\cos(2\theta)$.
\begin{sol}
$\pi\sqrt2/8$
\end{sol}
\end{ex}

\begin{ex}
Find the area of the upper hemisphere of
$x^2+y^2+z^2=1$ above the interior of one loop of $r=\cos(2\theta)$.
\begin{sol}
$\pi/2-1$
\end{sol}
\end{ex}

\begin{ex}
The plane $ax+by+cz=d$ cuts a triangle in the first octant
provided that $a, b, c$ and $d$ are all positive.  Find the area of
this triangle.
\begin{sol}
$\ds {d^2\sqrt{a^2+b^2+c^2}\over 2abc}$
\end{sol}
\end{ex}

\begin{ex}
Find the area of the portion of the cone $x^2+y^2 = 3z^2$ lying
above the $xy$ plane and inside the cylinder $x^2+y^2 = 4y$.
\begin{sol}
$8\sqrt{3}\pi/3$
\end{sol}
\end{ex}

\end{enumialphparenastyle}


\chapter{Detecting Zebra Crosswalks}

\section{Properties of Zebra Crosswalks}

Zebra crosswalks have many properties that could be used to help identify them, one example would be the lengths of the crosswalk's edges. The edges are well defined in most images of crosswalks, so they can be collected rather easily, and have a distinct shape. Other qualities include the fact that painted stripes are typically homogeneous in the center in terms of pixel intensity. Zebra crosswalk stripes are also spaced a consistent distance apart. The horizontal lines in the crosswalk are all exactly parallel, and the side edges of each side of a zebra crosswalk should be parallel as well and point towards the vanishing point. Some of these properties will be recognized and used in later sections to uniquely identify zebra stripe crosswalks.

\section{Coughlan Approach}
In Coughlan and Shen's 2006 paper \cite{Coughlan2006} about identifying zebra crosswalks, they propose a method for recognizing zebra stripe crosswalks using figure-ground segmentation.  Their method starts by converting the image to grayscale, shrinking it, and then blurring it slightly. Then, the derivative of image intensity is taken in the Y direction to find the pixels that look like top and bottom edges. The derivative assigns top lines a negative value, and bottom lines a positive value.  These edges are then greedily grouping together into larger line segments. The edges are then matched up with other edges that might fit together to be part of the same crosswalk stripe. They define a candidate stripe fragment feature as a 'stripelet.' A stripelet is defined as the combination of two line segments with the following properties:
\begin{enumerate}
  \item The upper and lower segments have polarities consistent with a crosswalk stripe (upper is above lower).
  \item The two segments are roughly parallel.
  \item The segments have sufficient overlap in the X coordinate range.
  \item The vertical width of the stripelet must be between 2 and 70 pixels (determined value from their test images).
\end{enumerate}

\begin{figure}[t]
\begin{center}
\includegraphics[width=10cm]{figures/CoughlanStriplets.png}
\captionfonts
\caption{Matched top and bottom pairs via the Coughlan Approach \cite{Coughlan2006}}
\label{fig:CoughlanStriplets}
\end{center}
\end{figure}

After matching up pairs of lines into stripelets, many stripelets are found, most of which are not part of the crosswalk (see figure \ref{fig:CoughlanStriplets}).

After extraction, unary and binary cues are used to determine if the stripelets are figure or ground. Their unary cue uses the fact that stripes lower in the image would be wider if they are part of a crosswalk. Coughlan and Shen found a relationship between the vertical width and vertical Y coordinate, as shown in the scatter plot in figure \ref{fig:CoughlanScatter}, a line drawn with a negative slope along a few points with low width and Y value follows the lines that represent stripelets from the crosswalk. They then use a line fitting procedure to try and find an envelope line that fits that model. Once that line is found, they can use it to evaluate other stripelets. They look for longer stripelets that are close to the envelope in order to classify them as potentially a crosswalk stripelet. Additionally, a binary cue is used when the cross ratio test is applied to pairs of stripelets to check that all four lines are approximately parallel. Finally, the cross ratio is also used to verify that adjacent stripelets are within an acceptable distance from each other.

\begin{figure}[t]
\begin{center}
\includegraphics[width=10cm]{figures/CoughlanScatter.png}
\captionfonts
\caption{Scatter plot of vertical Y location and vertical width of stripelets via Coughlan Approach \cite{Coughlan2006}}
\label{fig:CoughlanScatter}
\end{center}
\end{figure}

They ran this algorithm multiple times on each image with different envelope lines, and used the result that had the highest belief value of being correct. Their results are shown in figure \ref{fig:CoughlanResults}. These results were generated in few seconds per image.

\begin{figure}[t]
\begin{center}
\includegraphics[width=10cm]{figures/CoughlanResult.png}
\captionfonts
\caption{Coughlan Results \cite{Coughlan2006}}
\label{fig:CoughlanResults}
\end{center}
\end{figure}

In their next paper in 2008 \cite{ZebraPhone}, they implemented this algorithm in Symbian C++ on a Nokia  N95 cell phone and obtained a true positive rate of 72\% and a false positive rate of 0.5\% on detected lines being predicted correctly as part of a crosswalk or not over a test set of 30 crosswalk images and 60 non-crosswalk images. Running on their 332 MHz ARM 11 processor running on 320x240 resolution pictures, they were able to obtain a processing speed of three frames per second with optimizations, compared to their processing speed on a PC with unoptimized code, and they believed the code could be further optimized as well.


%%% lecture 4

%%% 8.9.2016
\minisec{Recall:}
converging squences $(x_n)_{n=1}^{\infty}$ in $(E,\norm{.})$. $\norm{x_n-x} \to 0$ for $n \to \infty$ for some $x \in E$. (Notation: $x_n \to x$ in $(E,\norm{.})$)
\begin{bemerkung}
	Assume $x_n \to x$ in $(E,\norm{.})$. Then
	\begin{enumerate}[1)]
		\item $\norm{x_n} \to \norm{x}$ in $(E,\norm{.})$.
		\item $\sup_{n} \norm{x_n} < \infty$.
	\end{enumerate}
	because
	\begin{enumerate}[1)]
		\item \[
			\norm{x_n} \leq \norm{x_n-x} + \norm{x},
		\]
		so
		\[
			\norm{x_n} - \norm{x} \leq \norm{x_n -x}.
		\]
		It follows
		\[
			-(\norm{x_n}-\norm{x}) \leq \norm{x_n -x}.
		\]
		So
		\[
			\abs{\norm{x_n}-\norm{x}} \leq \norm{x_n -x} \to 0, \qquad \text{for } n \to \infty.
		\]
		Cauchy sequence in $(x_n)_{n=1}^{\infty}$ in $(E,\norm{.})$ if $\norm{x_n-x_m} \to 0$ for $n,m \to \infty$. \\
		We obtain:
	 	$(x_n)_{n=1}^{\infty}$ converges in $(E,\norm{.})$  $\qquad \Rightarrow \qquad$  $(x_n)_{n=1}^{\infty}$ Cauchy sequence in $(E,\norm{.})$. ($\not \Leftarrow $ in general).
		If $\Leftarrow$ then we call $(E,\norm{.})$ a Banach space.
	\end{enumerate}
	$\sum_{n=1}^{\infty}x_m$ converges in $(E,\norm{.})$ if $\left( \sum_{n=1}^{k}x_n \right)_{k=1}^{\infty}$ converges in $(E,\norm{.})$. \\
	$\sum_{n=1}^{\infty}x_m$ converges absolutely in $(E,\norm{.})$ if $\sum_{n=1}^{\infty}\norm{x_n}$ converges $(\mathbb{R},\norm{.})$. \\
\end{bemerkung}

\subsection{Mappings between normed spaces}
\label{sub:mappings_between_normed_spaces}
\begin{definition*}
	Let $(E_1,\norm{.}_1)$, $(E_2,\norm{.}_2)$ be normed spaces. $T: E_1 \to E_2$ (not necessarily linear) is called continuous at $x_0 \in E_1$, if
	\[
		x_n \to x_0 \text{ in } (E_1,\norm{.}_1) \qquad \Rightarrow \qquad T(x_n) \to T(x_0) \text{ in } (E_2,\norm{.}_2).
	\]
	$T$ is called \underline{continuous} if it is continuous at $x_0 \in E_1$ for all $x_0 \in E_1$. We say that $T: E_1 \to E_2$ is \underline{linear} if
	\[
		T(\lambda_1 x_1 + \lambda_2 x_2) = \lambda_1 T(x_1) + \lambda_2 T(x_2)
	\]
	for all scalars $\lambda_1$, $\lambda_2$ and $x_1,x_2 \in E_1$. \\
	$T: E_1 \to E_2$ linear is called \underline{bounded} if there exists $M>0$ such that
	\[
		\norm{T(x)}_2 \leq M \norm{x}_1 \qquad \text{for all }x \in E_1.
	\]If $T$ is bounded linear $E_1 \to E_2$ define
	\[
		\norm{T} = \norm{T}_{E_1 \to E_2} := \inf \set[M \geq 0]{\norm{T(x)}_2 \leq M \norm{x}_1 \text{ for all }x \in E_1}.
	\]
\end{definition*}
\begin{lemma*}
	\[
		\norm{T} = \sup\limits_{\substack{x \in E_1 \\ x \neq 0}} \frac{\norm{T(x)}_2}{\norm{x}_1} = \sup\limits_{\substack{x \in E_1 \\ \norm{x}_1=1}} \norm{T(x)}_2.
	\]
\end{lemma*}
\begin{proposition}
	Assume $T: E_1 \to E_2$ linear. Then all the following statements are equivalent:
	\begin{enumerate}[(1)]
		\item $T$ continuous at $0 \in E_1$.
		\item $T$ continuous at $x_0 \in E_1$ for some $x_0 \in E_1$.
		\item $T$ continuous at $x_0 \in E_1$ for all $x_0 \in E_1$.
		\item $T$ is bounded.
	\end{enumerate}
\end{proposition}
\begin{beweis}
	\begin{description}
		\item[$(1) \Rightarrow (4)$:] Assume $T$ is continuous at $0 \in E_1$, i.e.
		\[
			x_n \to 0 \text{ in }(E_1, \norm{.}_1) \qquad \Rightarrow \qquad T(x_n) \to T(\underset{\in E_1}{\underbrace{0}}) = \underset{\in E_2}{\underbrace{0}} \text{ in }(E_2,\norm{.}_2).
		\]
		We want to prove that $T$ is bounded. We search a $M>0$ such that
		\[
			\norm{T(x)}_2 \leq  M \norm{x}_1.
		\]
		We assume that this doesn't hold true. \\
		For $n=1,2,\dots$ there exists $x_n \in E_1$ such that
		\[
			\norm{T(x_n)}_2 > n \norm{x_n}_1.
		\]
		Set for $n=1,2,\dots$
		\[
			z_n := \frac{1}{n \norm{x_n}_1}x_n.
		\]
		(Note that $\norm{x_n}_1 >0$. Otherwise we would get a contradiction.) \\
		Note
		\begin{align*}
		\norm{z_n}_1 &= \norm{\frac{1}{n \norm{x_n}_1}}_1 = \frac{1}{n \norm{x_n}_1} \norm{x_n}_1 = \frac{1}{n} \to 0, \qquad \text{for }n \to \infty.
		\end{align*}
		We have $z_n \to 0$ in $(E_1,\norm{.}_1)$. But
		\[
			\norm{T(z_n)}_2 = \norm{\frac{1}{n \norm{x_n}_1}T(x_n)}_2 = \frac{1}{n \norm{x_n}_1} \norm{T(x_n)}_2 > 1 \qquad \text{ for all }n.
		\]
		Hence
		\[
			T(z_n) \not \to 0 \qquad \text{ in }(E_2, \norm{.}_2).
		\]
		This is a contradiction.
		\item[$(1) \Leftarrow (4)$:] Assume $T$ is bounded. For some $M > 0$
		\[
			\norm{T(x)}_2 \leq M \norm{x}_1, \qquad \text{ for all }x \in E_1.
		\]
		We need to show that $T$ is continuous at $0 \in E_1$, i.e.
		\[
			x_n \to 0 \text{ in } (E_1, \norm{.}_1) \qquad \Rightarrow \qquad T(x_n) \to T(0) = 0 \text{ in } (E_2, \norm{.}_2).
		\]
		From \[
			\norm{T(x_n)}_2 \leq  M \norm{x_n}_1 \to 0
		\]
		so
		\[
			T(x_n) \to \underset{=T(0)}{\underbrace{0}} \text{ in }(E_2, \norm{.}_2).
		\]
	\end{description}
\end{beweis}
\begin{beispiele}
	\begin{enumerate}[(A)]
	\item
	$E_1 = E_2 = C([0,1])$, $\norm{.}_1 = \norm{.}_2 = \norm{.}_{\infty}=: \norm{.}$, i.e.
	\[
		\norm{f} := \max \limits _{x \in [0,1]} \abs{f(x)}.
	\]
	\[
		T(f)(x) = \int_{0}^{1-x} \min(x,y)f(y) \,\mathrm{d}y, \qquad \text{for }f \in C([0,1]), x \in [0,1].
	\]
	\begin{enumerate}[(1)]
		\item $T(f) \in C([0,1])$ for $ f \in C([0,1])$,
		\item $T$ linear,
		\item $T$ bounded,
		\item Calculate $\norm{T}$.
	\end{enumerate}
	\begin{beweis}
		\begin{enumerate}[(1)]
			\item Fix $f \in C([0,1])$ arbitrary and fix $x \in [0,1]$. Show that $T(f)$ is continuous at $x$. Consider a sequence $(x_n)_{n=1}^{\infty}$ in $[0,1]$ such that $x_n \to x$ in $(\mathbb{R},\abs{.})$. \\
			To show $T(f)(x_n) \to T(f)(x)$ in $(\mathbb{R},\abs{.})$.
			\begin{align*}
				\abs{T(f)(x_n)- T(f)(x)} &= \set{\text{assume that }x_n \leq x} \\
				&= \abs{\int_{0}^{1-x_n}\min(x_n,y)f(y) \,\mathrm{d}y - \int_{0}^{1-x} \min (x,y)f(y) \,\mathrm{d}y} \\
				&\leq  \abs{\int_{0}^{1-x}(\min (x_n,y) - \min(x,y) )f(y) \,\mathrm{d}y} \\
				&\qquad  + \abs{\int_{1-x}^{1-x_n}\min(x_n,y)f(y) \,\mathrm{d}y} \\
				&\leq \underset{\leq \abs{x_n-x} \norm{f}}{\underbrace{\int_{0}^{1-x} \underset{\leq \abs{x_n-x }}{\underbrace{\abs{\min (x_n,y) - \min(x,y)}}}
				 \underset{\leq \norm{f}}{\underbrace{\abs{f(y)}}} \,\mathrm{d}y}} \\
				& \qquad + \underset{0 \leq \dots \leq \abs{x_n-x}\cdot \norm{f}}{\underbrace{\int_{1-x}^{1-x_n}\underset{\leq
					 	1}{\underbrace{\min(x_n,y)}}\underset{\leq \norm{f}}{\underbrace{\abs{f(y)}}} \,\mathrm{d}y }} \to 0, \qquad \text{ as }n \to \infty
			\end{align*}
			If $x_n > x$ we get a similar calculation. Conclusion:
			\[
				T(f)(x_n) \to T(f)(x) \text{ in }(\mathbb{R},\abs{.}) \text{ as } n \to \infty.
			\]
			\item Fix $f_1,f_2 \in C([0,1])$ and $\lambda_1, \lambda_2$ scalars. Then
			\begin{align*}
				T(\lambda_1 f_1 + \lambda_2 f_2)(x) &= \int_{0}^{1-x} \min(x,y)\underset{= \lambda_1 f_1(y)+\lambda_2 f_2(y)}{\underbrace{(\lambda_1 f_1 + \lambda_2 f_2)(y)}} \,\mathrm{d}y \\
				&= \lambda_1 \int_{0}^{1-x}\min(x,y)f_1(y) \,\mathrm{d}y + \lambda_2 \int_{0}^{1-x} \min(x,y)f_2(y) \,\mathrm{d}y \\
				&= \lambda_1 T(f_1)(x) + \lambda_2 T(f_2)(x) \qquad \text{ for }x \in [0,1]
			\end{align*}
			\item Fix $f \in C([0,1])$. For $x \in [0,1]$
			\begin{align*}
				\abs{T(f)(x)} &= \abs{ \int_{0}^{1-x} \underset{\geq 0}{\underbrace{\min(x,y)}}f(y) \,\mathrm{d}y }\\
				&\stackrel{(*_1)}{\leq} \int_{0}^{1-x}\min(x,y)\underset{\leq \norm{f}}{\underbrace{\abs{f(y)}}} \,\mathrm{d}y \\
				&\stackrel{(*_2)}{\leq} \int_{0}^{1-x} \min(x,y) \,\mathrm{d}y \norm{f}.
			\end{align*}
			Clearly
			\[
				\max\limits_{x \in [0,1]}\int_{0}^{1-x} \min(x,y) \,\mathrm{d}y \leq 1.
			\]
			This gives:
			\[
				\norm{T(f)} = \max\limits_{x \in [0,1]}\abs{T(f)(x)} \leq 1 \cdot \norm{f}, \qquad \text{for all }f \in C([0,1]).
			\]
			Conclusion: $T$ is bounded with ($M=1$)
			\item Consider the unequality above. $(*_1)$ is an equality if $f$ has a constant sign. $(*_2)$ is an equality if $f$ is a constant function. So we have to calculate
			\[
				\int_{0}^{1-x} \min(x,y) \,\mathrm{d}y \qquad \text{for }x \in [0,1].
			\]
			\begin{description}
				\item[case 1:]$1-x \leq x$ i.e. $ \frac{1}{2} \leq x$ and we get
				\begin{align*}
					\int_{0}^{1-x} \underset{=y}{\underbrace{\min(x,y)}} \,\mathrm{d}y &= \left[ \frac{1}{2} y^2 \right]_0^{1-x}  \\ &= \frac{1}{2} (1-x)^2.
				\end{align*}
				\item[case 2:] $x < 1-x$ i.e. $ x < \frac{1}{2}$ and we get
				\begin{align*}
					\int_{0}^{1-x} \min(x,y) \,\mathrm{d}y &= \int_{0}^{x} y  \,\mathrm{d}y + \int_{x}^{1-x}x \,\mathrm{d}y  \\ &= \frac{1}{2}x^2 + x(1-2x)
					\\ & = x - \frac{3}{2}x^2.
				\end{align*}
				\textbf{Claim:} \text{    }
				\[
					\norm{T} = \max \left( \max\limits_{x \in [\frac{1}{2},1]} \frac{1}{2}(1-x)^2 , \max\limits_{x \in [0,\frac{1}{2}]}\left( x - \frac{3}{2}x^2
					 \right) \right) =
					\dots = \frac{1}{6}.
				\]
				Note
				\begin{itemize}
					\item $\norm{T(f)}\leq \norm{T} \cdot \norm{f}$ for all $f \in C([0,1])$,
					\item $\norm{T(1)} = \norm{T} \cdot \norm{1}$ where $1(x)=1$ for $x \in [0,1]$.
				\end{itemize}
			\end{description}
		\end{enumerate}
	\end{beweis}
	\item $E_1 = C([0,1])$ with maximumnorm, $E_2 = \mathbb{R}$ with absolut value. $T: E_1 \to E_2$ with
	\[
		T(f) = \int_{0}^{\frac{1}{2}}f(y) \,\mathrm{d}y - \int_{\frac{1}{2}}^{1} f(y) \,\mathrm{d}y \qquad \text{for }f \in E_1
	\]
	\begin{align*}
		\abs{T(f)} &= \abs{\int_{0}^{\frac{1}{2}}f(y) \,\mathrm{d}y - \int_{\frac{1}{2}}^{1} f(y) \,\mathrm{d}y} \\
		&\leq \abs{\int_{0}^{\frac{1}{2}}f(y) \,\mathrm{d}y} + \abs{\int_{\frac{1}{2}}^{1} f(y) \,\mathrm{d}y} \\
		&\leq \int_{0}^{\frac{1}{2}}\underset{\leq \norm{f}}{\underbrace{\abs{f(y)}}} \,\mathrm{d}y
		+ \int_{\frac{1}{2}}^{1} \underset{\leq \norm{f}}{\underbrace{\abs{f(y)}}} \,\mathrm{d}y \\
		&\leq 1 \norm{f}.
	\end{align*}
	Hence $T$ is bounded and $\norm{T}\leq 1$.
	\[
		T(f) = \int_{0}^{1}k(y)f(y) \,\mathrm{d}y,
	\]
	where
	\[
		T(f_n)= \begin{cases}
			\text{to be completed}, &\text{ falls }case\\
		\end{cases}.
	\]
	\[
		T(f_n) \leq 1 \left( \frac{1}{2} - \frac{1}{2n} + \frac{1}{2} - \frac{1}{2n} \right) = 1 - \frac{1}{n}, \qquad  n=1,2,\dots.
	\]
	Note
	\[
		k(y)f_n(y) \geq 0 \qquad \text{ for } y \in [0,1].
	\]
	Hence $\norm{T} \leq 1- \frac{1}{n}$ for $n =1,2,\dots$. Note $\norm{f_n}=1$ for all $n$. Conclusion $\norm{T}=1$. \\
	Here
	\[
		\abs{T(f)} \leq \underset{\leq 1}{\underbrace{\norm{T}}} \norm{f} \text{ for all }f \in C([0,1])
	\]
	but
	\[
		\abs{T(f)} < \norm{T} \norm{f} \qquad \text{ for all }f \in C([0,1]).
	\]
	\end{enumerate}
\end{beispiele}
\begin{satz}
	$T_1,T_2$ bounded linear mappings $(E_1,\norm{.}_1) \to (E_2,\norm{.}_2)$ and $\lambda$ scalar. Set
	\begin{align*}
		(T_1+T_2)(x) &= T_1(x) + T_2(x) \qquad x \in E_1 \\
		( \lambda T_1)(x) &= \lambda T_1(x) \qquad x \in E_1.
	\end{align*}
	\textbf{Claim:} \text{    }
	\begin{enumerate}[(1)]
		\item $T_1 + T_2$ and $\lambda T_1$ are both linear mappings $(E_1,\norm{.}_1) \to (E_2,\norm{.}_2)$,
		\item $T_1 + T_2$ and $\lambda T_1$ are both bounded mappings $(E_1,\norm{.}_1) \to (E_2,\norm{.}_2)$. \\
		$B(E_1,E_2)$ denote the vector space of all bounded linear mappings $(E_1,\norm{.}_1) \to (E_2,\norm{.}_2)$.
		\item \[
			\norm{T}_{E_1 \to E_2} := \inf \set[M > 0]{\norm{T(x)}_2 \leq M \norm{x}_1 \text{ for all }x \in E_1}
		\]
		defines a norm in $B(E_1,E_2)$.
	\end{enumerate}
\end{satz}
\begin{beweis}
	\begin{enumerate}[(1)]
		\item $\norm{T}=0$ implies that $\norm{T(x)}_2 = 0$ for all $x \in E_1$ $ \,\, \Rightarrow \,\, $ $T(x) = 0 \in E_2$.
		\[
			T = 0 \in B(E_1,E_2)
		\]
		\item $T \in B(E_1,E_2)$ and $\lambda$ scalar.
		\begin{align*}
			\norm{\lambda T} &= \inf \set[M >0]{\norm{(\lambda T)(x)}_2 \leq M \norm{x}_1 \text{ for all }x \in E_1} \\
			&= \inf \set[M>0]{\abs{\lambda} \norm{T(x)}_2 \leq M \norm{x}_1 \text{ for all }x \in E_1} \\
			&= \set{\text{if }\lambda \neq 0} \\
			&= \inf \set[\underset{= \abs{\lambda} \tilde M}{\underbrace{M}}>0]{\norm{T(x)}_2 \leq \underset{= \tilde M}{\underbrace{\frac{M}{\abs{\lambda}}}}\norm{x}_1 \text{ for all }x \in E_1} \\
			&= \abs{\lambda} \inf \set[\tilde M >0]{ \norm{T(x)}_2 \leq \tilde M \norm{x}_1 \text{ for all }x \in E_1} \\
			&= \abs{\lambda} \norm{T}
		\end{align*}
		\item Set $T_1,T_2 \in B(E_1,E_2)$.
		\begin{align*}
			\norm{T_1+ T_2} &= \inf \set[M>0]{\norm{(T_1+T_2)(x)}_2 \leq M \norm{x}_1 \text{ for all }x \in E_1} \\
			&\leq \inf \set[M_1 + M_2>0]{\norm{T_1(x)}_2 \leq M_1 \norm{x}_1, \, \norm{T_2(x)}_2 \leq M_2 \norm{x}_1 \text{ for all }x \in E_1} \\
			&= \norm{T_1} + \norm{T_2}
		\end{align*}
	\end{enumerate}
\end{beweis}
Conclusion: $(B(E_1,B_2),\norm{.}_{E_1 \to E_2})$ is a normed space.
\begin{satz}
	 $(B(E_1,B_2),\norm{.}_{E_1 \to E_2})$ is a Banach space if $(E_2,\norm{.}_2)$ is a Banach space.
\end{satz}
\begin{beweis}
	Assume $(T_n)_{n=1}^{\infty}$ is a Cauchy sequence in $(B(E_1,B_2),\norm{.}_{E_1 \to E_2})$ where $(E_2, \norm{.}_2)$ is a Banach space. Fix $x \in E_1$
	\begin{align*}
		\norm{T_n(x)-T_m(x)}_2 &= \norm{(T_n-T_m)(x)}_2  \\
		&\leq \underset{\substack{\to 0 \\ n,m \to \infty}}{\underbrace{\norm{T_n-T_m}_{E_1 \to E_2}}} \cdot \norm{x}_1 \to 0, \qquad n,m \to \infty.
	\end{align*}
	Hence $(T_n(x))_{n=1}^{\infty}$ is a Cauchy sequence in $(E_2, \norm{.}_2)$. This is a Banach space which implies that $(T_n(x))_{n=1}^{\infty}$ converges in
	$(E_2,\norm{.}_2)$. Call the limit $T(x) \in E_2$ for all $x \in E_1$. Show now
	\begin{enumerate}[(1)]
		\item $T: E_1 \to E_2$ is linear,
		\item $T$ is bounded,
		\item $\norm{T_n - T}_{E_1 \to E_2} \to 0$ for $n \to \infty$.
	\end{enumerate}
	\begin{enumerate}[(1)]
		\item Observe
		\begin{align*}
		T(\lambda_1 x_1 + \lambda_2 x_2)\leftarrow T_n(\lambda_1 x_1 + \lambda_2 x_2) = \set{T \text{ linear}} = \underset{\to \lambda_1 T(x_1) + \lambda_2 T(x_2)}{\underbrace{\underset{\to \lambda_1 T(x_1)}{\underbrace{\lambda_1 \underset{\to T(x_1)}{\underbrace{T_n(x_1)}}}} + \underset{\to \lambda_2 T(x_2)}{\underbrace{\lambda_2 \underset{\to T(x_2)}{\underbrace{T_n(x_2)}}}}}}.
		\end{align*}
		So for $n \to  \infty$ it is
		\[
			T(\lambda_1 x_1 + \lambda_2 + x_2) = \lambda_1 T(x_1) + \lambda_2 T(x_2) \qquad \text{ in }(E_2, \norm{.}_2).
		\]
		\item Fix $\varepsilon >0$. Then there exists $N$ such that:
		\[
			\norm{T_n- T_m}_{E_1 \to E_2} < \varepsilon \qquad \text{for }n,m \geq N
		\]
		So for $x \in E_1$
		\[
			\norm{T_n(x)-T_m(x)}_2 \leq \norm{T_n - T_m}_{E_1 \to E_2} \norm{x}_1 < \varepsilon \norm{x}_1 \qquad \text{for }n,m \geq N.
		\]
		Let $m \to \infty$.
		\[
			\norm{T_n(x)- T(x)}_2 \leq \varepsilon \norm{x}_1 \qquad \text{for }n \geq N
 		\]
		So
		\begin{align*}
			\norm{T(x)}_2 &\leq  \norm{T(x)- T_N(x)}_2 + \norm{T_N(x)}_2 \\
			&\leq \varepsilon \norm{x}_1 + \norm{T_N}_{E_1 \to E_2} \cdot \norm{x}_1 \\
			&= \left( \varepsilon +  \norm{T_N}_{E_1 \to E_2} \right) \norm{x}_1 \qquad \text{for }x \in E_1.
		\end{align*}
		\item Look above and get
		\[
			\norm{T_n - T}_{E_1 \to E_2} \to 0, \qquad  n \to \infty.
		\]
	\end{enumerate}
\end{beweis}
\begin{theorem}[Banach-Steinhaus Theorem (uniform boundedness principle)]
	Set \\ $(E_1,\norm{.}_1)$ Banach space, $(E_2,\norm{.}_2)$ normed space and $\mathcal{F} \subset B(E_1,E_2)$. Assume
	\[
		\sup\limits_{T \in \mathcal{F}}\norm{T(x)}_2 < \infty \qquad \text{for all } x \in E_1
	\]
	then
	\[
		\sup\limits_{T \in \mathcal{F}}\norm{T}_{E_1 \to E_2} < \infty.
	\]
	\end{theorem}
	\begin{bemerkung}
		The implication $\Leftarrow$ is easy to prove. If $\mathcal{F}$ is a finite set, the theorem is trivial.
	\end{bemerkung}
	\begin{beweis}
		\begin{enumerate}[Step 1:]
			\item Assume
			\[
				\exists\,x_0 \in E_1\, \exists\, r >0 \,\exists\, M>0: \,\forall\, x \in \overline{B(x_0,r)} \, \forall\,  T \in \mathcal{F}: \,\norm{T(x)}_2 \leq M.
			\]
			We have to show that
			\[
				\sup\limits_{T \in \mathcal{F}} \norm{T}_{E_1 \to E_2} < \infty.
			\]
			Fix $T \in \mathcal{F}$. For $\norm{x}_1 \leq r$
			\[
				\norm{T(x_0+x)}_2 \leq M.
			\]
			Note that $x_0+x \in \overline{B(x_0,r)}$.
			\begin{align*}
				\norm{T(x)}_2 &= \norm{T(x_0+x-x_0)}_2 \\ &= \set{T \text{ linear}} \\ &= \norm{T(x_0 + x)-T(x_0)}_2 \\ &\leq \norm{T(x_0+x)}_2 +
				\norm{T(x_0)}_2 \\ &\leq 2M.
			\end{align*}
			For $0 \neq x \in E_1$
			\[
				\norm{T \left( \frac{r}{\norm{x}_1} x \right)}_2 \leq 2M.
			\]
			$\frac{r}{\norm{x}_1} x$ has the $\norm{.}_1$-norm equal to $r$. This implies, since T linear,
			\[
				\frac{r}{\norm{x}_1} \norm{T(x)}_2 \leq 2M,
			\]
			i.e.
			\[
				\norm{T(x)}_2 \leq \frac{2M}{r}\norm{x}_1 \qquad \text{for all }0 \neq x \in E_1.
			\]
			We have
			\[
				\norm{T}_{E_1 \to E_2} \leq \underset{\substack{\text{independant}\\ \text{of }T}}{\underbrace{\frac{2M}{r}}} < \infty
			\]
			\[
				\sup\limits_{T \in \mathcal{F}}\norm{T}_{E_1 \to E_2} \leq \frac{2M}{r} < \infty.
			\]
			\item Justify the assumption in step 1. This assumption is equivalent to
			\[
			\exists\,x_0 \in E_1\, \exists\, r >0 \,\exists\, M>0: \,\forall\, x \in B(x_0,r) \, \forall\,  T \in \mathcal{F}: \,\norm{T(x)}_2 \leq M.
			\]
			(Note $\overline{B(x_0,r_1)} \subset B(x_0,r) \subset B(x_0,r_2)$ for $0 < r_1 < r < r_2$). \\
			Argue by contradiction. Assume that the assumption is false. Then it holds
			\[
				\forall\, x_0 \in E_1 \, \forall\, r >0 \,\forall\,  M>0: \,\exists\, x \in B(x_0,r) \,\exists\, T \in \mathcal{F} : \, \norm{T(x)}_2 > M.
			\]
			Idea: Find a converging sequence $x_n \in E_1$, $x_n \to x$ in $(E_1,\norm{.}_1)$ and a sequence $(T_n)_{n=1}^{\infty} \subset \mathcal{F}$ such that
			\[
				\norm{T_n(x_n)}_2 > n \qquad \text{for all }n, \qquad \text{and} \qquad \norm{T_n(x)}_2 > n \qquad \text{ for all }n.
			\]
			We have from above $x_1 \in B(0,1)$ and $T_1 \in  \mathcal{F}$ such that \[
				\norm{T_1(x_1)}_2 > 1.
			\] $T_1$ is bounded linear, hence continuous. This implies that there exists $0<r_1 < \frac{1}{2}$ such that
			\[
				\norm{T_1(x)}_2 >1 \qquad \text{for }x \in B(x_1,r_1)
			\]
			and \[
				\overline{B(x_1,r_1)}\subset B(0,1).
			\]
		\end{enumerate}
	\end{beweis}


\section{Introduction}
For experienced Blackjack players it won't be difficult to make the correct move with most hands of cards. \\
 \\
For example when the player gets 18, 19 or 20 in his starting hand, the player will always pass. If the player chooses to draw a card, the probability is very high he will lose. \\
Another example, when the player gets 9, 10 or 11 in his hand, he will always at least draw one extra card. This is because the player can\textquotesingle t go over 21 with 1 more card and the probability of winning with this starting hand is very low. \\
However when the player gets 14, 15 or 16 in his hand, things get more difficult. One more card can be fatal, but not drawing a card has a big probability of losing from the dealer. \\
 \\
This paper will discuss what the best move is with these difficult hands. The way this is tested is by playing many games of Blackjack and writing down the results. The result with the most wins, wins! However to be able to get a reliable result, we will need a lot of data. A few games will not give a reliable reflection of the probability of the game, because it could be coincidence. With coincidence is meant, when four games are played and all four are won by the player, this is coincidence. It is not a good reflection of the reality, but a result of random factor. In the case of Blackjack is the random factor the cards which are randomly shuffles. No matter how big the data set gets, we will always keep a coincidence. The probability will always exists that the player or dealer wins more games in the test than he will in reality. However this probability can be made smaller and smaller by expanding the dataset. This is why the experiment is done with a simulation of Blackjack in the programming language Python. With the power of computers, thousands of games of Blackjack can be played each second! With this approach is expected that it will minimize the coincidence and the results will be reliable. \\
With all the results of the games it is possible to extract the decisions the player made combined with how many times the player won and lost, resulting in which move gives the highest probability to win. \\
 \\
Another thing that will be looked at is the total wins of the dealer and the total wins of the player and the ratio between these. Expected is that, with the normal Blackjack rules used in the casino, the dealer will have a higher number of wins. If this is not the case, it wouldn't make sense for casinos to play this game. They would only be losing money in the long run! \\