\documentclass[11pt, a4]{article}
\usepackage{qtree}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{mathtools}
\usepackage{tikz}
\usepackage{forest}

\usetikzlibrary{positioning}
\newcommand\tab[1][0.5cm]{\hspace*{#1}}

%% define left/right/full outer join symbols
\def\ojoin{\setbox0=\hbox{$\bowtie$}%
  \rule[-.02ex]{.25em}{.4pt}\llap{\rule[\ht0]{.25em}{.4pt}}}
\def\leftouterjoin{\mathbin{\ojoin\mkern-5.8mu\bowtie}}
\def\rightouterjoin{\mathbin{\bowtie\mkern-5.8mu\ojoin}}
\def\fullouterjoin{\mathbin{\ojoin\mkern-5.8mu\bowtie\mkern-5.8mu\ojoin}}
\newcommand*{\QEDB}{\null\nobreak\hfill\ensuremath{\square}}%
\newcommand{\car}[1]{\tiny\textcolor{red}{#1}}
\setcounter{section}{5}
\begin{document}
\title{Exercise Sheet 6}

\section{Exercise Sheet 6}
\subsection{Exercise 1}
$|R_0| = 20, |R_1| = 10, |R_2| = 50, |R_3| = 40, |R_4| = 50, |R_5| = 55, |R_6| = 50, |R_7| = 60$\\
$f_{0,1} = 0.1, f_{0,2} = 0.2, f_{0,6} = 0.2, f_{6,7} = 0.2, f_{2,5} = 0.2, f_{2,3} = 0.2, f_{3,4} = 0.3$

\subsubsection{Give the precedence graph rooted in $R_0$}
\begin{forest}
[$R_0$
    [$R_1$,edge=-> ]
    [$R_2$,edge=->
        [$R_3$,edge=->
            [$R_4$,edge=-> ]
        ]
        [$R_5$,edge=-> ]
    ]
    [$R_6$,edge=->
        [$R_7$,edge=-> ]
    ]
]
\end{forest}

\subsubsection{Perform the IKKBZ algorithm Root at $R_0$}
\begin{forest}
[$R_0$
    [$R_1$,edge=-> ]
    [$R_2$,edge=->
        [$R_3$,edge=->
            [$R_4$,edge=-> ]
        ]
        [$R_5$,edge=-> ]
    ]
    [$R_6$,edge=->
        [$R_7$,edge=-> ]
    ]
]
\end{forest}
\vspace{.2cm}\\
\begin{tabular}{|c|c|c|c|c|c|}
\hline
Relation & n & s & C & T & rank\\
\hline
$R_1$ & 10 & $0.1$ & 1 & 1 & $0$\\
$R_2$ & 50 & $0.2$ & 10 & 10 & $\frac{9}{10} = 0.9$\\
$R_3$ & 40 & $0.2$ & 8 & 8 & $\frac{7}{8} = 0.875$\\
$R_4$ & 50 & $0.3$ & 15 & 15 & $\frac{14}{15} = 0.933$\\
$R_5$ & 55 & $0.2$ & 11 & 11 & $\frac{10}{11} = 0.909$\\
$R_6$ & 50 & $0.2$ & 10 & 10 & $\frac{9}{10} = 0.9$\\
$R_7$ & 60 & $0.2$ & 12 & 12 & $\frac{11}{12} = 0.917$\\
\hline
\end{tabular}
\vspace{.2cm}\\
\begin{forest}
[$R_0$
    [$R_1$,edge=-> ]
    [$R_2$,edge=->
        [$R_3$,edge=->
            [$R_5$,edge=->
                [$R_4$,edge=-> ]
            ]
        ]
    ]
    [$R_6$,edge=->
        [$R_7$,edge=-> ]
    ]
]
\end{forest}
\tab $\longrightarrow$ Merge $R_2$ and $R_3$ $\longrightarrow$ \tab
\begin{forest}
[$R_0$
    [$R_1$,edge=-> ]
    [$R_{2,3}$,edge=->
        [$R_5$,edge=->
            [$R_4$,edge=-> ]
        ]
    ]
    [$R_6$,edge=->
        [$R_7$,edge=-> ]
    ]
]
\end{forest}
\vspace{.2cm}\\
\begin{tabular}{|c|c|c|c|c|c|}
\hline
Relation & n & s & C & T & rank\\
\hline
$R_1$ & 10 & $0.1$ & 1 & 1 & $0$\\
$R_4$ & 50 & $0.3$ & 15 & 15 & $\frac{14}{15} = 0.933 $\\
$R_5$ & 55 & $0.2$ & 11 & 11 & $\frac{10}{11} = 0.909 $\\
$R_6$ & 50 & $0.2$ & 10 & 10 & $\frac{9}{10} = 0.9 $\\
$R_7$ & 60 & $0.2$ & 12 & 12 & $\frac{11}{12} = 0.917 $\\
$R_{2,3}$ &  &  & 90 & 80 & $\frac{79}{90} = 0.878 $\\
\hline
$R_2$ & 50 & $0.2$ & 10 & 10 & $\frac{9}{10} = 0.9 $\\
$R_3$ & 40 & $0.2$ & 8 & 8 & $\frac{7}{8} = 0.875 $\\
\hline
\end{tabular}
\vspace{.2cm}\\
\begin{forest}
[$R_0$
    [$R_1$,edge=->
        [$R_{2,3}$,edge=->
            [$R_6$,edge=->
                [$R_5$,edge=->
                    [$R_7$,edge=->
                        [$R_4$,edge=-> ]
                    ]
                ]
            ]
        ]
    ]
]
\end{forest}
\tab $\longrightarrow$ denormalizing $\longrightarrow$ \tab
\begin{forest}
[$R_0$
    [$R_1$,edge=->
        [$R_2$,edge=->
            [$R_3$,edge=->
                [$R_6$,edge=->
                    [$R_5$,edge=->
                        [$R_7$,edge=->
                            [$R_4$,edge=-> ]
                        ]
                    ]
                ]
            ]
        ]
    ]
]
\end{forest}
\vspace{1cm}\\
Resulting Join Tree =\\
\tab$((((((R_0 \bowtie R_1) \bowtie R_2) \bowtie R_3) \bowtie R_6) \bowtie R_5) \bowtie R_7) \bowtie R_4 = RJT$
\vspace{1cm}\\
$M = R_0 \bowtie R_1 $\\
$C_{out}(M) = |R_0| * |R_1| * s_1 = 20 $\\
\\
%%20
$P = (R_0 \bowtie R_1) \bowtie R_2 $\\
$C_{out}(P) = |M| * |R_2| * s_2 + C_{out}(M) = 220 $\\
%%200
\\
$Q = ((R_0 \bowtie R_1) \bowtie R_2) \bowtie R_3 $\\
$C_{out}(Q) = |P| * |R_3| * s_3 + C_{out}(P) = 1'820 $\\
%%1'600
\\
$S = (((R_0 \bowtie R_1) \bowtie R_2) \bowtie R_3) \bowtie R_6 $\\
$C_{out}(S) = |Q| * |R_6| * s_6 + C_{out}(Q) = 17'820 $\\
%%16'000
\\
$T = ((((R_0 \bowtie R_1) \bowtie R_2) \bowtie R_3) \bowtie R_6) \bowtie R_5 $\\
$C_{out}(T) = |S| * |R_5| * s_5 + C_{out}(S) = 193'820 $\\
%%176'000
\\
$U = (((((R_0 \bowtie R_1) \bowtie R_2) \bowtie R_3) \bowtie R_6) \bowtie R_5) \bowtie R_7 $\\
$C_{out}(U) = |T| * |R_7| * s_7 + C_{out}(T) = 2'305'820 $\\
%%2'112'000
\\
$C_{out}(RJT) = |U| * |R_4| * s_4 + C_{out}(U) \mathbf{= 33'985'820} $
%%31'680'000

\subsubsection{Perform the MVP algorithm}
There are no edges with weights $< 1$, so we start with phase 2:\\
Weighted-Join-Graph $G$:\\
\begin{tikzpicture}[node distance=3cm]
  \node (v67) at (0,0) {$v_{6,7}$};
  \node (v67car) [above = 0cm of v67] {\car{600}};

  \node (v06) [right of=v67] {$v_{0,6}$};
  \node (v06car) [above = 0cm of v06] {\car{200}};

  \node (v01) [right of=v06] {$v_{0,1}$};
  \node (v01car) [above = 0cm of v01] {\car{20}};

  \node (v02) [below right of=v06] {$v_{0,2}$};
  \node (v02car) [above = 0cm of v02] {\car{200}};

  \node (v25) [below left of=v02] {$v_{2,5}$};
  \node (v25car) [above = 0cm of v25] {\car{550}};

  \node (v23) [below right of=v02] {$v_{2,3}$};
  \node (v23car) [above = 0cm of v23] {\car{400}};

  \node (v34) [right of=v23] {$v_{3,4}$};
  \node (v34car) [above = 0cm of v34] {\car{600}};

  \draw [->,thick] (v67) to [out=30,in=150] node[above] {12} (v06);
  \draw [->,thick] (v06) to [out=210,in=330] node[below] {4} (v67);

  \draw [->,thick] (v06) to [out=30,in=150] node[above] {10} (v01);
  \draw [->,thick] (v01) to [out=210,in=330] node[below] {1} (v06);

  \draw [->,thick] (v01) to [out=270,in=45] node[right] {1} (v02);
  \draw [->,thick] (v02) to [out=360,in=0] node[right] {10} (v01);

  \draw [->,thick] (v06) to [out=280,in=135] node[left] {10} (v02);
  \draw [->,thick] (v02) to [out=180,in=240] node[left] {10} (v06);

  \draw [->,thick] (v02) to [out=190,in=90] node[left] {4} (v25);
  \draw [->,thick] (v25) to [out=20,in=240] node[right] {11} (v02);

  \draw [->,thick] (v25) to [out=0,in=180] node[above] {27.5} (v23);
  \draw [->,thick] (v23) to [out=200,in=340] node[below] {20} (v25);

  \draw [->,thick] (v02) to [out=350,in=120] node[right] {4} (v23);
  \draw [->,thick] (v23) to [out=160,in=300] node[left] {8} (v02);

  \draw [->,thick] (v23) to [out=30,in=150] node[above] {10} (v34);
  \draw [->,thick] (v34) to [out=210,in=330] node[below] {15} (v23);
\end{tikzpicture}\\
Spanning Tree $S$:\\
\begin{tikzpicture}[node distance=3cm]
  \node (v67) at (0,0) {$v_{6,7}$};
  \node (v06) [right of=v67] {$v_{0,6}$};
  \node (v01) [right of=v06] {$v_{0,1}$};
  \node (v02) [below right of=v06] {$v_{0,2}$};
  \node (v25) [below left of=v02] {$v_{2,5}$};
  \node (v23) [below right of=v02] {$v_{2,3}$};
  \node (v34) [right of=v23] {$v_{3,4}$};
\end{tikzpicture}\\
%% ###########
%% STEP 1
%% ###########
\rule{\textwidth}{0.4pt}
$Q_1 = \emptyset$\\
$Q_2 = \{v_{0,1}, v_{0,6}, v_{0,2}, v_{2,3}, v_{2,5}, v_{3,4}, v_{6,7}\}$\\
Consider edge $v_{0,1} \rightarrow v_{0,2}$.\\
New cost: $\text{cost}(v_{0,1}') = 10 \cdot \frac{1}{10} \cdot 20 \cdot \frac{1}{5} \cdot 50 + 20 + 200 = 420$\\
\begin{tikzpicture}[node distance=3cm]
  \node (v67) at (0,0) {$v_{6,7}$};
  \node (v67car) [above = 0cm of v67] {\car{600}};

  \node (v06) [right of=v67] {$v_{0,6}$};
  \node (v06car) [above = 0cm of v06] {\car{200}};

  \node (v01) [right of=v06] {$v_{0,1}$};
  \node (v01car) [above = 0cm of v01] {\car{420}};

  \node (v02) [below right of=v06] {$v_{0,2}$};
  \node (v02car) [above = 0cm of v02] {\car{200}};

  \node (v25) [below left of=v02] {$v_{2,5}$};
  \node (v25car) [above = 0cm of v25] {\car{550}};

  \node (v23) [below right of=v02] {$v_{2,3}$};
  \node (v23car) [above = 0cm of v23] {\car{400}};

  \node (v34) [right of=v23] {$v_{3,4}$};
  \node (v34car) [above = 0cm of v34] {\car{600}};

  \draw [->,thick] (v67) to [out=30,in=150] node[above] {12} (v06);
  \draw [->,thick] (v06) to [out=210,in=330] node[below] {4} (v67);

  \draw [->,thick] (v06) to [out=30,in=150] node[above] {10} (v01);

  \draw [->,thick] (v06) to [out=280,in=135] node[left] {10} (v02);
  \draw [->,thick] (v02) to [out=180,in=240] node[left] {10} (v06);

  \draw [->,thick] (v02) to [out=190,in=45] node[left] {4} (v25);
  \draw [->,thick] (v25) to [out=360,in=240] node[right] {11} (v02);

  \draw [->,thick] (v25) to [out=0,in=180] node[above] {27.5} (v23);
  \draw [->,thick] (v23) to [out=200,in=340] node[below] {20} (v25);

  \draw [->,thick] (v02) to [out=350,in=120] node[right] {4} (v23);
  \draw [->,thick] (v23) to [out=160,in=300] node[left] {8} (v02);

  \draw [->,thick] (v23) to [out=30,in=150] node[above] {10} (v34);
  \draw [->,thick] (v34) to [out=210,in=330] node[below] {15} (v23);

\end{tikzpicture}\\
Spanning Tree $S$:\\
\begin{tikzpicture}[node distance=3cm]
  \node (v67) at (0,0) {$v_{6,7}$};
  \node (v06) [right of=v67] {$v_{0,6}$};
  \node (v01) [right of=v06] {$v_{0,1}$};
  \node (v02) [below right of=v06] {$v_{0,2}$};
  \node (v25) [below left of=v02] {$v_{2,5}$};
  \node (v23) [below right of=v02] {$v_{2,3}$};
  \node (v34) [right of=v23] {$v_{3,4}$};

  \draw [->,thick] (v01) to [out=270,in=45] (v02);
\end{tikzpicture}\\
%% ###########
%% STEP 2
%% ###########
\rule{\textwidth}{0.4pt}
$Q_1 = \emptyset$\\
$Q_2 = \{v_{0,6}, v_{0,2}, v_{2,3}, v_{2,5}, v_{3,4}, v_{6,7}\}$\\
Consider edge $v_{0,6} \rightarrow v_{6,7}$.\\
New cost: $\text{cost}(v_{0,6}') = 60 \cdot \frac{1}{5} \cdot 50 \cdot \frac{1}{5} \cdot 20 + 600 + 200 = 3200$\\
\begin{tikzpicture}[node distance=3cm]
  \node (v67) at (0,0) {$v_{6,7}$};
  \node (v67car) [above = 0cm of v67] {\car{600}};

  \node (v06) [right of=v67] {$v_{0,6}$};
  \node (v06car) [above = 0cm of v06] {\car{3200}};

  \node (v01) [right of=v06] {$v_{0,1}$};
  \node (v01car) [above = 0cm of v01] {\car{420}};

  \node (v02) [below right of=v06] {$v_{0,2}$};
  \node (v02car) [above = 0cm of v02] {\car{200}};

  \node (v25) [below left of=v02] {$v_{2,5}$};
  \node (v25car) [above = 0cm of v25] {\car{550}};

  \draw [->,thick] (v25) to [out=0,in=180] node[above] {27.5} (v23);
  \draw [->,thick] (v23) to [out=200,in=340] node[below] {20} (v25);

  \node (v23) [below right of=v02] {$v_{2,3}$};
  \node (v23car) [above = 0cm of v23] {\car{400}};

  \node (v34) [right of=v23] {$v_{3,4}$};
  \node (v34car) [above = 0cm of v34] {\car{600}};

  \draw [->,thick] (v02) to [out=180,in=240] node[left] {10} (v06);

  \draw [->,thick] (v02) to [out=190,in=45] node[left] {4} (v25);
  \draw [->,thick] (v25) to [out=360,in=240] node[right] {11} (v02);

  \draw [->,thick] (v02) to [out=350,in=120] node[right] {4} (v23);
  \draw [->,thick] (v23) to [out=160,in=300] node[left] {8} (v02);

  \draw [->,thick] (v23) to [out=30,in=150] node[above] {10} (v34);
  \draw [->,thick] (v34) to [out=210,in=330] node[below] {15} (v23);

  \draw [dashed, ->,thick] (v67) to [out=280,in=190] node[left] {1} (v02);
  \draw [dashed, ->,thick] (v67) to [out=30,in=150] node[above] {1} (v01);

\end{tikzpicture}\\
Spanning Tree $S$:\\
\begin{tikzpicture}[node distance=3cm]
  \node (v67) at (0,0) {$v_{6,7}$};
  \node (v06) [right of=v67] {$v_{0,6}$};
  \node (v01) [right of=v06] {$v_{0,1}$};
  \node (v02) [below right of=v06] {$v_{0,2}$};
  \node (v25) [below left of=v02] {$v_{2,5}$};
  \node (v23) [below right of=v02] {$v_{2,3}$};
  \node (v34) [right of=v23] {$v_{3,4}$};

  \draw [->,thick] (v01) to [out=270,in=45] (v02);
  \draw [->,thick] (v06) to  (v67);
\end{tikzpicture}\\
%% ###########
%% STEP 3
%% ###########
\rule{\textwidth}{0.4pt}
$Q_1 = \emptyset$\\
$Q_2 = \{v_{0,2}, v_{2,3}, v_{2,5}, v_{3,4}, v_{6,7}\}$\\
Consider edge $v_{0,2} \rightarrow v_{2,5}$.\\
New cost: $\text{cost}(v_{0,2}') = 20 \cdot \frac{1}{5} \cdot 50 \cdot \frac{1}{5} \cdot 55 + 200 + 550= 2950 $\\
\begin{tikzpicture}[node distance=3cm]
  \node (v67) at (0,0) {$v_{6,7}$};
  \node (v67car) [above = 0cm of v67] {\car{600}};

  \node (v06) [right of=v67] {$v_{0,6}$};
  \node (v06car) [above = 0cm of v06] {\car{3200}};

  \node (v01) [right of=v06] {$v_{0,1}$};
  \node (v01car) [above = 0cm of v01] {\car{420}};

  \node (v02) [below right of=v06] {$v_{0,2}$};
  \node (v02car) [above = 0cm of v02] {\car{2950}};

  \node (v25) [below left of=v02] {$v_{2,5}$};
  \node (v25car) [above = 0cm of v25] {\car{550}};

  \draw [->,thick] (v25) to [out=0,in=180] node[above] {27.5} (v23);
  \draw [->,thick] (v23) to [out=200,in=340] node[below] {20} (v25);

  \node (v23) [below right of=v02] {$v_{2,3}$};
  \node (v23car) [above = 0cm of v23] {\car{400}};

  \node (v34) [right of=v23] {$v_{3,4}$};
  \node (v34car) [above = 0cm of v34] {\car{600}};

  \draw [->,thick] (v23) to [out=160,in=300] node[left] {8} (v02);

  \draw [->,thick] (v23) to [out=30,in=150] node[above] {10} (v34);
  \draw [->,thick] (v34) to [out=210,in=330] node[below] {15} (v23);

  \draw [dashed, ->,thick] (v67) to [out=280,in=190] node[left] {1} (v02);
  \draw [dashed, ->,thick] (v67) to [out=30,in=150] node[above] {1} (v01);

  \draw [dashed, ->,thick] (v25) to [out=90,in=270] node[right] {1} (v06);

\end{tikzpicture}\\
Spanning Tree $S$:\\
\begin{tikzpicture}[node distance=3cm]
  \node (v67) at (0,0) {$v_{6,7}$};
  \node (v06) [right of=v67] {$v_{0,6}$};
  \node (v01) [right of=v06] {$v_{0,1}$};
  \node (v02) [below right of=v06] {$v_{0,2}$};
  \node (v25) [below left of=v02] {$v_{2,5}$};
  \node (v23) [below right of=v02] {$v_{2,3}$};
  \node (v34) [right of=v23] {$v_{3,4}$};

  \draw [->,thick] (v01) to (v02);
  \draw [->,thick] (v06) to (v67);
  \draw [->,thick] (v02) to (v25);
\end{tikzpicture}\\
%% ###########
%% STEP 4
%% ###########
\rule{\textwidth}{0.4pt}
$Q_1 = \emptyset$\\
$Q_2 = \{v_{2,3}, v_{2,5}, v_{3,4}, v_{6,7}\}$\\
Consider edge $v_{2,3} \rightarrow v_{0,2}$.\\
New cost: $\text{cost}(v_{2,3}') = 20 \cdot \frac{1}{5} \cdot 50 \cdot \frac{1}{5} \cdot 40 + 2950 + 400 = 4950 $\\
\begin{tikzpicture}[node distance=3cm]
  \node (v67) at (0,0) {$v_{6,7}$};
  \node (v67car) [above = 0cm of v67] {\car{600}};

  \node (v06) [right of=v67] {$v_{0,6}$};
  \node (v06car) [above = 0cm of v06] {\car{3200}};

  \node (v01) [right of=v06] {$v_{0,1}$};
  \node (v01car) [above = 0cm of v01] {\car{420}};

  \node (v02) [below right of=v06] {$v_{0,2}$};
  \node (v02car) [above = 0cm of v02] {\car{2950}};

  \node (v25) [below left of=v02] {$v_{2,5}$};
  \node (v25car) [above = 0cm of v25] {\car{550}};

  \draw [->,thick] (v25) to [out=0,in=180] node[above] {27.5} (v23);

  \node (v23) [below right of=v02] {$v_{2,3}$};
  \node (v23car) [above = 0cm of v23] {\car{4950}};

  \node (v34) [right of=v23] {$v_{3,4}$};
  \node (v34car) [above = 0cm of v34] {\car{600}};

  \draw [->,thick] (v34) to [out=210,in=330] node[below] {15} (v23);

  \draw [dashed, ->,thick] (v67) to [out=30,in=150] node[above] {1} (v01);

  \draw [dashed, ->,thick] (v25) to [out=90,in=270] node[right] {1} (v06);

  \draw [dashed, ->,thick] (v02) to [out=350,in=90] node[above] {1} (v34);

\end{tikzpicture}\\
Spanning Tree $S$:\\
\begin{tikzpicture}[node distance=3cm]
  \node (v67) at (0,0) {$v_{6,7}$};
  \node (v06) [right of=v67] {$v_{0,6}$};
  \node (v01) [right of=v06] {$v_{0,1}$};
  \node (v02) [below right of=v06] {$v_{0,2}$};
  \node (v25) [below left of=v02] {$v_{2,5}$};
  \node (v23) [below right of=v02] {$v_{2,3}$};
  \node (v34) [right of=v23] {$v_{3,4}$};

  \draw [->,thick] (v01) to (v02);
  \draw [->,thick] (v06) to (v67);
  \draw [->,thick] (v02) to (v25);
  \draw [->,thick] (v23) to (v02);
\end{tikzpicture}\\
%% ###########
%% STEP 5
%% ###########
\rule{\textwidth}{0.4pt}
$Q_1 = \emptyset$\\
$Q_2 = \{v_{2,5}, v_{3,4}, v_{6,7}\}$\\
Consider edge $v_{2,5} \rightarrow v_{0,6}$.\\
New cost: $\text{cost}(v_{2,5}') = 50 \cdot \frac{1}{5} \cdot 55 \cdot 20 \cdot \frac{1}{5} \cdot 50 + 550 + 3200 = 113750$\\
\begin{tikzpicture}[node distance=3cm]
  \node (v67) at (0,0) {$v_{6,7}$};
  \node (v67car) [above = 0cm of v67] {\car{600}};

  \node (v06) [right of=v67] {$v_{0,6}$};
  \node (v06car) [above = 0cm of v06] {\car{3200}};

  \node (v01) [right of=v06] {$v_{0,1}$};
  \node (v01car) [above = 0cm of v01] {\car{420}};

  \node (v02) [below right of=v06] {$v_{0,2}$};
  \node (v02car) [above = 0cm of v02] {\car{2950}};

  \node (v25) [below left of=v02] {$v_{2,5}$};
  \node (v25car) [above = 0cm of v25] {\car{113750}};

  \node (v23) [below right of=v02] {$v_{2,3}$};
  \node (v23car) [above = 0cm of v23] {\car{4950}};

  \node (v34) [right of=v23] {$v_{3,4}$};
  \node (v34car) [above = 0cm of v34] {\car{600}};

  \draw [->,thick] (v34) to [out=210,in=330] node[below] {15} (v23);
  \draw [dashed, ->,thick] (v67) to [out=30,in=150] node[above] {1} (v01);
  \draw [dashed, ->,thick] (v02) to [out=350,in=90] node[above] {1} (v34);

\end{tikzpicture}\\
Spanning Tree $S$:\\
\begin{tikzpicture}[node distance=3cm]
  \node (v67) at (0,0) {$v_{6,7}$};
  \node (v06) [right of=v67] {$v_{0,6}$};
  \node (v01) [right of=v06] {$v_{0,1}$};
  \node (v02) [below right of=v06] {$v_{0,2}$};
  \node (v25) [below left of=v02] {$v_{2,5}$};
  \node (v23) [below right of=v02] {$v_{2,3}$};
  \node (v34) [right of=v23] {$v_{3,4}$};

  \draw [->,thick] (v01) to (v02);
  \draw [->,thick] (v06) to (v67);
  \draw [->,thick] (v02) to (v25);
  \draw [->,thick] (v23) to (v02);
  \draw [->,thick] (v25) to (v06);
\end{tikzpicture}\\
%% ###########
%% STEP 6
%% ###########
\rule{\textwidth}{0.4pt}
$Q_1 = \emptyset$\\
$Q_2 = \{v_{3,4}, v_{6,7}\}$\\
Consider edge $v_{3,4} \rightarrow v_{2,3}$.\\
New cost: $\text{cost}(v_{3,4}') = 50 \cdot \frac{3}{10} \cdot 40 \cdot \frac{1}{5} \cdot 50 + 600 + 4950 = 11550$\\
\begin{tikzpicture}[node distance=3cm]
  \node (v67) at (0,0) {$v_{6,7}$};
  \node (v67car) [above = 0cm of v67] {\car{600}};

  \node (v06) [right of=v67] {$v_{0,6}$};
  \node (v06car) [above = 0cm of v06] {\car{3200}};

  \node (v01) [right of=v06] {$v_{0,1}$};
  \node (v01car) [above = 0cm of v01] {\car{420}};

  \node (v02) [below right of=v06] {$v_{0,2}$};
  \node (v02car) [above = 0cm of v02] {\car{2950}};

  \node (v25) [below left of=v02] {$v_{2,5}$};
  \node (v25car) [above = 0cm of v25] {\car{113750}};

  \node (v23) [below right of=v02] {$v_{2,3}$};
  \node (v23car) [above = 0cm of v23] {\car{4950}};

  \node (v34) [right of=v23] {$v_{3,4}$};
  \node (v34car) [above = 0cm of v34] {\car{11550}};

  \draw [dashed, ->,thick] (v67) to [out=30,in=150] node[above] {1} (v01);
  \draw [dashed, ->,thick] (v02) to [out=350,in=90] node[above] {1} (v34);

\end{tikzpicture}\\
Spanning Tree $S$:\\
\begin{tikzpicture}[node distance=3cm]
  \node (v67) at (0,0) {$v_{6,7}$};
  \node (v06) [right of=v67] {$v_{0,6}$};
  \node (v01) [right of=v06] {$v_{0,1}$};
  \node (v02) [below right of=v06] {$v_{0,2}$};
  \node (v25) [below left of=v02] {$v_{2,5}$};
  \node (v23) [below right of=v02] {$v_{2,3}$};
  \node (v34) [right of=v23] {$v_{3,4}$};

  \draw [->,thick] (v01) to (v02);
  \draw [->,thick] (v06) to (v67);
  \draw [->,thick] (v02) to (v25);
  \draw [->,thick] (v23) to (v02);
  \draw [->,thick] (v25) to (v06);
  \draw [->,thick] (v34) to (v23);
\end{tikzpicture}\\
spanning tree is complete $\Rightarrow$ stop.\\
Resulting join tree:\\

%% tree
\Tree[.$\bowtie$
        [.$\bowtie$
            [.$\bowtie$
                [.$\bowtie$
                    [.$\bowtie$
                      [.$\bowtie$
                        $R_3$
                        $R_4$
                      ]
                      $R_2$
                    ]
                    [.$\bowtie$
                      $R_0$
                      $R_1$
                    ]
                ]
                $R_5$
            ]
            $R_6$
        ]
        $R_7$
]

\end{document}


% !TeX root = ./apxthy.tex

\section{Nonlinear Approximation}
%
\label{sec:nonlin}
%

\subsection{Best polynomial approximation}
%
\label{sec:poly:bestapprox}
%
Best approximation in Hilbert spaces is a linear operation, indeed an orthogonal
projection. By contrast best approximation max-norms is far less trivial. This
section concerns the best approximation of continuous functions with polynomials
in the $L^\infty$-norm. Although this norm is not strictly convex, it turns out
that the best-approximant is still unique. Moreover, its characterisation leads
to an algorithm (the Remez algorithm). The high cost of the Remez algorithm an
together with the fact that Chebyshev interpolation (or projection) typically
gives accuracy very close to best-approximation means this is rarely used in
practise, however the mathematics is still interesting and worth studying.
Moreover, this is our first non-trivial example of a {\em non-linear
approximation algorithm}.

\begin{theorem} \label{th:poly:bestapprox}
   Let $f \in C([-1,1])$, then there exists a unique best approximation
   $p \in \Poly_N$ such that $\|f - p \|_\infty \leq \|f-q\|_\infty$ for
   all $q \in \Poly_N$.

   A polynomial $p \in \Poly_N$ is the best approximation if and only if
   it equioscillates at (at least) $N+2$ points $y_0 < \dots < y_{N+1}$;
   that is,
   \[
      (f-p)(y_j) = \pm (-1)^j \|f-p\|_\infty.
   \]
\end{theorem}
\begin{proof}
   test
   {\it 1. Existence: } This is covered in
   Exercise~\ref{exr:prelims:bestapprox}. Let $E := \inf_{p \in \Poly_N}
   \|f-p\|_\infty$.

   {\it 2. Equi-oscillation implies optimality: } Suppose $p$ satisfies
   the equi-oscillation property and $q \in \Poly_N$ such that
   $\|f-q\|_\infty < \|f-p\|_\infty$. Without loss of generality, we then have
   \begin{align*}
      (f-q)(y_j) &< (f-p)(x_j), \qquad j \text{ even},  \\
      (f-q)(y_j) &> (f-p)(x_j), \qquad j \text{ odd}, \\
   \end{align*}
   and hence
   \begin{align*}
      (p-q)(y_j) &> 0, \qquad j \text{ odd}, \\
      (p-q)(y_j) &< 0, \qquad j \text{ even}.  \\
   \end{align*}
   Consequently $p-q$ has at least $N+1$ roots, which means that $p - q = 0$.

   {\it 3. Optimality implies equi-oscillation: } Let $p \in \Poly_N$ and
   suppose there exist {\em at most} $M < N+2$ points $y_1 < \dots y_M$ at which
   $f-p$ equi-oscillates. Without loss of generality, assume that $(f-p)(y_1) =
   -E$, then we can find points
   \[
      z_1 \in (-1, y_1), z_2 \in (y_1, y_2), \dots,
      z_M \in (y_{M-1}, y_M), z_{M+1} \in (y_M, 1)
   \]
   such that
   \begin{align*}
      (f-p) &< E, \qquad \text{in } [-1, z_1], [z_2, z_3], \dots
      (f-p) &> E, \qquad \text{in } [z_1, z_2], [z_3, z_4], \dots
   \end{align*}
   Now, let
   \[
      \delta p(x) := (z_1 - x)(z_2-x)\cdots(z_{M+1}-1),
   \]
   then we readily see that
   \[
      \|f - (p + \eps \delta p)\|_\infty < \|f - p\|_\infty
      \qquad \text{for $\eps$ sufficiently small.}
   \]
   Thus, $p$ was not optimal.

   {\it 4. Uniqueness: } Suppose that $p, q$ are both best approximations, then
   $r := (p+q)/2$ is a best approximation as well. Let $y_j$ be the
   equi-oscillation points. $|r(y_j)| = E$ is only possible if $p(y_j) = q(y_j)
   = \pm E$. Thus $q, p$ agree at $N+2$ points and are therefore equal.
\end{proof}

Interestingly, then proof is semi-constructive and with a bit of immagination
gives rise to the following (not quite an) algorithm:

{\bf Remez Algorithm:} Input: $f, N$
\begin{enumerate}
\item Choose initial interpolation nodes $x_0 < \dots < x_N$. E.g., Chebyshev
nodes are a canonical choice.
\item Solve the system
\[
      b_0 + b_1 x_j + \dots + b_{N} x_{j}^{N} + (-1)^j E = f(x_j),
      \qquad j = 0, \dots, N+1
\]
for the $n+2$ unknowns $b_i, E$.
\item
\end{enumerate}

% A complete analysis of the Remez algorithm is a little involved

\subsection{Rational Approximation by Example}

% \subsection{Adaptive Grid Selection}
% %
% \alert{we did not cover this in 2019, but see \S~\ref{sec:splines:sing}
% for a similar topic}

\subsection{Rational Approximation by Iteratively Reweighted Least Squares}

\subsection{The AAA Algorithm}


%
% Chapter Six
%

\chapter{REACTION RATES AND IMPLICATIONS}
\section{Reaction Rates Calculation}
As discussed in Chapter 1, the reaction rate for the narrow resonances is given by
 \begin{equation}
 \label{eq:rate_1}
    \begin{aligned}
         N_A<\sigma v> =( \frac{2 \pi}{\mu k T_9 })^{3/2}h_2 \sum_i(\omega \gamma)_i exp(\frac{-E_{R,i}}{kT_9})
        \end{aligned}
\end{equation}
in units of cm$^3$ s$^{-1}$ mole$^{-1}$, and
 \begin{equation}
 \label{eq:rate_2}
    \begin{aligned}
         N_A<\sigma v> = 1.54 \times 10^{5} (\mu T_9)^{-3/2} \sum_i (\omega \gamma)_i \frac{-11.605E_{R,i}}{T_9}
        \end{aligned}
\end{equation}
in units of cm$^3$ s$^{-1}$ mole$^{-1}$ if applying the numerical values to the equation above, where $\mu$ refers to the reduced mass, $T_9$ the astrophysical temperature in in units of GK, $ (\omega \gamma)_i$ the resonance strength in the i$^{th}$ resonance in eV, $E_{R,i}$ the resonance energy of the  i$^{th}$ resonance in the center of mass system in MeV, respectively.

To calculate the reaction rate from Eq.\ref{eq:rate_2}, $T_9$ is associated with the effective temperature that  enables the stellar  burning, $E_{R,i}$  is determined by
 \begin{equation}
 \label{eq:Er}
    \begin{aligned}
    E_{R,i} = E_{x,i} - Q
        \end{aligned}
\end{equation}
where E$_{x,i}$ is the excitation energy of the i$_{th}$ excited states of the compound nuclei and Q is the Q-value of the reaction, i.e. Q = 10.615 MeV in the $^{22}$Ne($\alpha,\gamma$)$^{26}$Mg reaction in this work.
The resonance strength  $(\omega \gamma)_i$ is given by
 \begin{equation}
    \label{eq:strength}
    \begin{aligned}
    \omega \gamma_{i} = \frac{2J_{res} + 1}{(2J_1 + 1)(2J_2 + 1)} \frac{\Gamma_{in} \Gamma_{out}}{\Gamma_{tot}}
        \end{aligned}
\end{equation}
where $J_{res}$, $J_1$, $J_2$ refer to the spins of the resonance, the target nuclei $^{22}$Ne (J = 0) and the incoming $\alpha$ particle (J = 0), respectively. The particle widths  $\Gamma$ can be written as $\Gamma_{tot} = \Gamma_\alpha + \Gamma_\gamma$ for neutron bound states and  $\Gamma_{tot} = \Gamma_\alpha + \Gamma_\gamma + \Gamma_n$ for neutron unbound states.

As a result, Eq.\ref{eq:strength} becomes
 \begin{equation}
    \label{eq:width_n_bound}
    \begin{aligned}
 \omega \gamma_{(\alpha,\gamma)} &= (2J_{res} + 1) \frac{\Gamma_\alpha \Gamma_\gamma }{\Gamma_\alpha + \Gamma_\gamma } \\
                                & \sim (2J_{res} + 1)\Gamma_\alpha
        \end{aligned}
\end{equation}
for neutron bound states. Because of the large Coulomb barrier for $\alpha$ particles that the approximation $\Gamma_\alpha \ll \Gamma_\gamma , \Gamma_n$ has been made for low energy resonances.

Similarly, we obtain neutron unbound states,
\begin{equation}
    \label{eq:width_n_unbound1}
    \begin{aligned}
 \omega \gamma_{(\alpha,\gamma)} = (2J_{res} + 1) \frac{\Gamma_\alpha }{1+ \Gamma_n/\Gamma_\gamma }
        \end{aligned}
\end{equation}
and
\begin{equation}
    \label{eq:width_n_unbound2}
    \begin{aligned}
 \omega \gamma_{(\alpha,n)} = (2J_{res} + 1) \frac{\Gamma_\alpha }{1+ \Gamma_\gamma/\Gamma_n }
        \end{aligned}
\end{equation}

Typically spectroscopic factors  are very sensitive to the choice of optical potentials. However, it has been  shown~\citep{Fortune2003} that the width $\Gamma_{exp}$ does not critically depend on the selected potential, owing to  the fact that $\Gamma_{sp}$ also depends on the potential thus canceling most of the potential dependence, as long as both values are extracted with the same potential. In addition, DWBA calculations for transfer reactions to neutron unbound states use the Vincent-Fortune Method~\citep{Vincent1970}. In this method the width of the resonance, instead of the spectroscopic factor, is measured by the absolute magnitude of the cross section. Thus the particle width can be determined in the same theoretical framework where the spectroscopic factor is determined.

The reaction rates of $^{22}$Ne($\alpha$,n)$^{25}$Mg reaction are calculated by Eq.~\ref{eq:rate_2} with the parameters taken from the calculation in Talwar $et\ al.$\citep{Rashi2016} ,as listed in Table.~\ref{tb:rate_para}. The lowest-lying known resonance in the direct measurement has been observed at a c.m. energy of E$_\alpha$ = 702 keV corresponding to an excitation energy in $^{26}$Mg of 11.317 MeV~\citep{Wolke1989}~\citep{Jaeger2001}. The reaction rates corresponding to each individual resonances observed in this work has been normalized to this resonance.   Figure~\ref{fg:rate1} represents the behaviour of the $^{22}$Ne($\alpha,\gamma$)$^{25}$Mg reaction rates as a function of the temperature $T_9$ using the individual resonances 533 keV and 702 keV with several possible spin assignments and $\alpha$-spectroscopic factors obtained in \citep{Rashi2016}. Each resonance shows  similar behaviour in regards of the contribution to the ($\alpha$, $\gamma$) reaction rate.  For $T_9 < $ 0.31, the  four possible 553 keV resonances with different spin-parity assignments listed in Table.~\ref{tb:rate_para} make the similar  amount of contribution to the reaction rate. With higher temperatures, the contribution of 553 keV with $2^+$ and S = 0.44 drops, along with  553 keV ($2^+$, S=0.21) and 553 keV ($2^+$, S=0.99) resonances. Up until   $T_9 < $ 0.34, 553 keV($1^-$, S=0.36) is still the dominant with respect to the 702 keV resonance.

\begin{table}[tpb]
    \setlength{\capwidth}{0.7\textwidth}
    \begin{centering}
       \caption{Resonance parameters taken from Talwar $et\ al.$\citep{Rashi2016} used in the present work for the reaction rate calculation. }
       \label{tb:rate_para}
       \begin{tabular}{c c c c c c c c}
       \toprule
       \toprule
              $E_x$        &    $E_R^{c.m.}$ &  $J^{\pi}$  &  $S_{\alpha}$   &    $\Gamma_{sp}$     &   (2J+1)$\Gamma_\alpha$     &    $\omega\gamma_{(\alpha,\gamma)}$  & $\omega\gamma_{(\alpha,n)}$           \\
              (keV)        &    (keV)       &     &    &  (eV)   &   (eV)  &  (eV)  &   (eV)   \\
             \hline
            11167(11)       &    553         &   1$^-$  &  0.36   & 5.00 $\times$ 10$^{-07}$   & 5.4(7) $\times$ 10$^{-07}$  & 5.4(7) $\times$ 10$^{-07}$ & $\leq$6 $\times$ 10$^{-08}$   \\
                           &                &   2$^+$  &  0.99   & 8.78 $\times$ 10$^{-08}$   & 4.4(5) $\times$ 10$^{-07}$  & 4.4(5) $\times$ 10$^{-07}$ & $\leq$ 6 $\times$ 10$^{-08}$   \\
                            &                 &   1$^-$  &  0.44   & 5.00 $\times$ 10$^{-07}$   & 6.6(7) $\times$ 10$^{-07}$  & 6.6(7) $\times$ 10$^{-07}$ &$\leq$ 6 $\times$ 10$^{-08}$   \\
                            &                &   2$^+$  &  0.21   & 8.78 $\times$ 10$^{-08}$   & 5.3(7) $\times$ 10$^{-07}$  & 5.3(7) $\times$ 10$^{-07}$ & $\leq$6 $\times$ 10$^{-08}$   \\
               11317(11)       &    702        &   1$^-$  &  0.43   & 1.18 $\times$ 10$^{-04}$   & 1.5(2) $\times$ 10$^{-04}$  & 3.7(4) $\times$ 10$^{-05}$ & 1.2(1)$\times$ 10$^{-04}$   \\
                            &                  &   2$^+$  &  1.44   & 2.15 $\times$ 10$^{-05}$   & 1.5(2) $\times$ 10$^{-04}$  & 3.7(4) $\times$ 10$^{-05}$ & 1.2(1)$\times$ 10$^{-04}$   \\

             \hline
         \hline
       \end{tabular}
     \end{centering}
\end{table}

Despite of the resonance parameters, the errors of the variables in Eq.~\ref{eq:rate_2} also affect the magnitude of the values of the calculated reaction rates. According to  Mao~\cite{Mao1996}, there is a model dependence uncertainty of about 30\%  in $\Gamma_\alpha$ between  different $r_0$ values that are used to calculate the single particle widths in the DWBA model. As shown in Figure.~\ref{fg:ag_1}, adding the model dependence error of 30\% to the reaction rates gives the magnitude of the reaction rate of the individual resonance 553 keV with respect to the 702 keV resonance.

Another uncertainty that may affect the upper limits of the reaction rates comes from the uncertainty of the resonance energies. Talwar\citep{Rashi2016} measured the ($\alpha$, n) and ($\alpha$, $\gamma$) reaction rates with large error in the resonance energy with respect to the (d,p) measurements (error of 18 keV for the 703 keV resonance, compared to the error of 11 keV in this work). In this work the energy error of the resonance is 11 keV and the best error measured so far is about 3 keV~\citep{26mgaa2017}. To see how the uncertainty of the resonance energies affect the reaction rates, 3 keV and 18 keV are applied to the calculation, respectively.  As  shown in Fig.~\ref{fg:ag_2}, the left panel gives the result for the resonance with the error of 18 keV and the right panel shows the error of 3 keV. It is clearly seen that there are   dramatic differences between the larger  and the smaller uncertainties in the resonance energy. This is because   E$_{R}$ is in the exponential term in Eq.~\ref{eq:rate_2}, which also leads to the fact that the lower reaction rate ratio on the left plot drops to negative at about T$_9$ = 0.25.

In addition to the 553 keV resonance, in this work 13 resonances are observed between the $\alpha$ threshold and the lowest observed resonance by the $^{22}$Ne + $\alpha$ system. Amongst these resonances, contributions from the resonances at 374 keV ($E_x=$ 10.988(11) MeV), 455 keV ($E_x=$ 11.069(10) MeV) and 553  keV ($E_x=$ 11.165(11) MeV)  are not negligible because they are possibly associated with $E_x=$ 10.095(21) MeV, 11.085(8) MeV and 11.167 MeV with $S_{\alpha}$s obtained in ~\citep{Rashi}. Their reaction rates to the 702 keV are plotted in Fig.~\ref{fg:ag_a}. It is shown at For T$_9 <$ 0.3, the 553 keV is the dominant resonance to the ($\alpha, \gamma$) rate. When stellar temperature  drops down to about T$_9 <$ 0.23, the 347 keV resonance begins to contribute significantly  to the rate. When T$_9$ keeps going down to about T$_9 <$ 0.18, the 455 keV resonance starts to contribute significantly to the ($\alpha, \gamma$) reaction rate, and  the 374 keV resonance gradually replaces the 553 keV and becomes to the dominant resonance in the $^{22}$Ne($\alpha, \gamma$)$^{26}$Mg reaction.

%Table~\ref{tb:res} listed the resonances above the $\alpha$ threshold and the corresponding parameters observed in this work that contribute to the reaction rates up to E$_\alpha$ = 703 keV.

\begin{figure}[tpb]
  \begin{center}
    \centerline{\includegraphics[scale=0.8]{graph/ch6/an_rate}}
    \caption{The reaction rate ratio of ($\alpha$, $\gamma$) calculated from several possible spin parity assignments of 553 keV resonance ($1^-$, S=0.36), normalized to the 702 keV resonance, the lowest observed resonance from the direct measurement.}
    \label{fg:rate1}
  \end{center}
\end{figure}

\begin{figure}[tpb]
  \begin{center}
    \centerline{\includegraphics[scale=0.8]{graph/ch6/ag_1}}
    \caption{The uncertainty band  of the reaction rate ratio of ($\alpha$, $\gamma$)   calculated for the 552 keV resonance ($1^-$, S=0.36), normalized to the 702 keV resonance. The colored band represents is the error band of from the model dependent error of  30\%.}
    \label{fg:ag_1}
  \end{center}
\end{figure}

\begin{figure}[tpb]
  \begin{center}
    \centerline{\includegraphics[scale=1.5]{graph/ch6/ag_2}}
    \caption{The uncertainty band  of the reaction rate ratio of ($\alpha$, $\gamma$)   calculated from the 552 keV resonance ($1^-$, S=0.36), normalized to the 702 keV resonance.  The left panel (a) shows the light blue error band of 18 keV on the 702 keV resonance and the right panel (b) shows the light blue error band of 3 keV. }
    \label{fg:ag_2}
  \end{center}
\end{figure}

\begin{figure}[tpb]
  \begin{center}
    \centerline{\includegraphics[scale=0.8]{graph/ch6/ag_a}}
    \caption{The reaction rate ratios of  ($\alpha$, $\gamma$) ), calculated from the  374 keV (red line), 455 keV (yellow line) and 553 keV (blue line)  resonances, respectively, normalized to the 702 keV resonance.}
    \label{fg:ag_a}
  \end{center}
\end{figure}
%\section{Astrophysical Implication}

% % uncomment the following lines,
% if using chapter-wise bibliography
%
% \bibliographystyle{ndnatbib}
% \bibliography{example}


\documentclass[../thesis.tex]{subfiles}

%!TeX spellcheck = en-GB

\theoremstyle{definition}
\newtheorem*{def*}{Definition}

\begin{document}

\chapter{Quantum Chaos}
\label{chap:quantum-chaos}

\section{Fundamental notions}

In this section will briefly present the basic principles of quantum mechanics
and introduce the concepts which are required for the characterisation of
energy spectra.
We begin with the concept of the physical state.
A \emph{physical state} contains all the information that can be learned
about the system.
We associate to our physical system a \emph{Hilbert space}, denoted with
\(\mathbb{H}\), which will contain all the possible states of the system.
A vector in the Hilbert space will describe the state of the system
(more rigorously only the direction of the vector will describe the state
since by convention any two vectors that differ only by a constant describe
the same physical state). In the Dirac formalism~\cite{Dirac1967} the vectors in the Hilbert
space corresponding to physical states are represented by \emph{ket vectors},
denoted with \(\ket{\Psi}\). The elements of the dual of the Hilbert space
are called \emph{bra vectors} and are denoted with \(\bra{\Psi}\). Due to the
isomorphism between the Hilbert space and its dual, the bra vectors equally
describe the physical state and the correspondence between the ket vectors and
the bra vectors is given by dual conjugation.

\subsubsection{The observables postulate}

In quantum mechanics the properties of the physical system, called \emph{observables}
are described by linear hermitian operators.
As a result of a measurement, the obtained values of the observable are among
the eigenvalues of the associated hermitian operator.

\subsubsection{The measurement postulate}

Let us consider a physical system in a state described by the state vector
\(\ket{\Psi} \in \mathbb{H}\) and an observable described by the linear hermitian
operator \(A\). If a measurement of the observable is performed, then following
the measurement the system will jump in an uncontrollable manner in one of the
eigenstates of the operator associated with the measured observable and the result
of the measurement will be given by the corresponding eigenvalue. The probability
of obtaining a given eigenvalue is given by the square of the absolute value of
the scalar product between the final state associated with the given eigenvalue
and the initial state.

% {\color{red}discrete / continuous discussion?}

\subsubsection{Fundamental commutation relations}

In analogy with classical mechanics, a quantum version of the Poisson
brackets can be defined, postulating that they have the same properties
as the classical Poisson brackets, namely anti-symmetry, linearity, the product
rule and the Jacobi identity. These properties uniquely define the form
of the quantum Poisson brackets the commutator of two observables,
\(\comm{A}{B} = AB - BA\), as being proportional to the quantum Poisson brackets
\[
  \comm{A}{B} = \ii \hbar {\{A,B\}}_{QM}.
\]
Thus we obtain the fundamental commutation relations in quantum mechanics
\begin{align*}
  \comm{Q_i}{Q_j} &= 0 \\
  \comm{P_i}{P_j} &= 0 \\
  \comm{Q_i}{P_j} &= \ii \hbar \,\delta_{i,j}.
\end{align*}

\subsubsection{Time evolution postulate}

In quantum mechanics time is just a parameter and not an observable.
The time evolution can be postulated in different ways.
If we consider the states as time dependent entities and observables as time
independent ones, we can view the time
evolution as a temporal displacement, similar to a spatial displacement.
Then we can use the time evolution operator identity
\[
  \ii \hbar \pdv{t} U(t,t_0) = H U(t,t_0)
\]
to derive the Schrödinger equation:
\[
  \ii \hbar \pdv{t} \ket{\Psi} = H \ket{\Psi}.
\]
If we consider the states as time independent and the observables as time dependent,
then the time evolution of the observables will be given by
\[
  \ii \hbar \dv{t} A(t) = [A(t), H].
\]

We can observe the link between this equation and Hamilton's equations is given
by the correspondence between the commutator in quantum mechanics and the Poisson
bracket in classical mechanics, as mentioned in the previous chapter.

The first approach is called the Schrödinger picture of quantum mechanics, while
the second is called the Heisenberg picture. There is also another formulation,
namely the interaction picture also named the Dirac picture.
In the following we will only consider the Schrödinger picture.

In the particular case when the Hamiltonian is time-independent, Schrödinger's equation
reduces to
\[
  H \ket{\Psi} = E \ket{\Psi},
\]
also called the time-independent Schrödinger equation and the time evolution of
the state is given by
\[
  \ket{E(t)} = \ee^{-\frac{\ii}{\hbar} (t-t_0) H} \ket{E(t_0)}
             = \ee^{-\frac{\ii}{\hbar} (t-t_0) E} \ket{E}.
\]

Thus if the system is initially in an energy eigenstate, it will remain in the
same state, having at most a phase modulation. Such states are called
\emph{stationary states}.

\section{From symmetry to degeneracy}

Let us consider the above mentioned time-independent case. If we suppose that
the energy spectrum is discrete,
\[
  H \ket{\Psi_i} = E_i \ket{\Psi_i}.
\]
If for an eigenvalue \(E_i\) repeats itself for different eigenstates
\(\ket{\Psi_i}\) we have what is called a \emph{degeneracy}. In order to emphasise
this, we can use a second index for the eigenvectors, \(j=1,\dotsc,m\), where
\(m\) is the number of times the eigenvalue repeats.

Thus for the \(i\)-th eigenvalue,
\[
  H \ket{\Psi_{i,j}} = E_i \ket{\Psi_{i,j}}.
\]

If the Hamiltonian is invariant to a set of unitary transformations,
\(T^\dagger H T = H\), then this set forms a group since the transformation
given by \(T T'\), with \(T'\) an arbitrary transformation from the set,
will also leave the Hamiltonian invariant.
Since symmetry operations form a group, the unitary operators which correspond to the
symmetries of the Hamiltonian will form a group to which the Hamiltonian is invariant.
Thus,
\[
  T H = T T^\dagger H T = T T^{-1} H T = H T,
\]
or \(\comm{T}{H} = 0\). We can once again observe how classical mechanics and
quantum mechanics are linked through the Poisson bracket-commutator structure.
In classical mechanics Noether's theorem asserts that to any symmetry of the action
will correspond a constant of the motion. This will have a vanishing Poisson bracket
with the Hamiltonian. For example, the invariance to rotations around a given
axis will lead to angular momentum conservation.

Since the operators commute, they share a common set of eigenvectors
\[
  H (T \ket{\Psi_i}) = H T \ket{\Psi_i} = T H \ket{\Psi_i} = T E_i \ket{\Psi_i}
  = E_i (T \ket{\Psi_i}).
\]
Thus if the Hamiltonian is invariant to the set of unitary transformations
\( \{T_j\} \), with \(j=1,\dotsc,m\)
\[
  T_j H \ket{\Psi_i} = T E_i \ket{\Psi_i} = E_i (T \ket{\Psi_i}) = E_i \ket{\Psi_{i,j}}
\]
and we will not change the value of the eigenvalue \(E_i\) by applying \(T_j\),
we only transform the eigenstates \(\ket{\Psi_i}\) to a linear combination
\(\ket{\Psi_{i,j}}\).

\section{Level repulsion}

As is the case with classical mechanics there are few situations in which the
analytic solution is known. In order to find approximate solutions we can use
perturbation theory if we can assume that the Hamiltonian can be viewed as to
have a part for which the solutions are known and another part that can
be considered a small perturbation. The following concepts are mainly following
the notations from~\cite{Sakurai2011} and the lecture notes~\cite{Baran,Zus}.

In the framework of time-independent perturbation theory, we want to obtain
an approximate solution to the problem
\begin{equation}
  H \ket{\Psi^{[j]}} = E_j \ket{\Psi^{[j]}}
\label{eq:q-pert-th-ex-pr}
\end{equation}
and we consider that the Hamiltonian can be written as \(H = H_0 + \lambda V\),
where the solution to the unperturbed problem
\[
  H_0 \ket{\Psi^0_{n\alpha}} = E_n^0 \ket{\Psi^0_{n\alpha}}
\]
is known and \( \alpha \) gives the degeneracy of the \(n\)-th level.

Since the unperturbed eigenvectors form a basis in the Hilbert space, we can
expand the perturbed eigenvectors in that basis.
\[
  \ket{\Psi^{[j]}} = \sum_{m,\beta} c_{m,\beta}^{[j]} \ket{\Psi_{m,\beta}^0}.
\]
Inserting into eq.~\eqref{eq:q-pert-th-ex-pr} we obtain
\[
  (H_0 + \lambda V) \sum_{m,\beta} c_{m,\beta}^{[j]} \ket{\Psi_{m,\beta}^0}
  = \sum_{m,\beta} E_j\, c_{m,\beta}^{[j]} \ket{\Psi_{m,\beta}^0}.
\]
Using the solution to the unperturbed problem the above equation becomes
\[
\sum_{m,\beta} (E_m^0 + \lambda V)  c_{m,\beta}^{[j]} \ket{\Psi_{m,\beta}^0}
= \sum_{m,\beta} E_j\, c_{m,\beta}^{[j]} \ket{\Psi_{m,\beta}^0}.
\]

To simplify the discussion we will now consider what happens with two unperturbed
states \(\ket{\Psi_1^0}\) with the energy \(E_1^0\) and \(\ket{\Psi_2^0}\) with
the energy \(E_2^0\) when \(\lambda=1\).

\[
\sum_{m,\beta} (E_m^0 + V)  c_{m}^{[j]} \ket{\Psi_{m}^0}
= \sum_{m=1,2} E_j\, c_{m}^{[j]} \ket{\Psi_{m}^0}
.\]

By taking the scalar product with the state \(\bra{\Psi_{k}^0}\) and using the
orthogonality relation
\(\braket{\Psi_{k}^0}{\Psi_{m}^0} = \delta_{k,m}\)
we obtain
\[
E_k^0\, c_{k}^{[j]} + \sum_{m=1,2} \bra{\Psi_{k}^0} V \ket{\Psi_{m}^0} c_{m}^{[j]}
= E_j\, c_{k}^{[j]},
\]
or
\[
  c_{k}^{[j]} \left( E_k^0 - E_j + V_{k,k} \right) + \sum_{m \neq k} V_{k,m}\, c_{m}^{[j]} = 0,
\]
where \(\bra{\Psi_{k}^0} V \ket{\Psi_{m}^0} \equiv V_{k,m}\).

The above equation becomes
\begin{align*}
  (E_1^0 - E_j + V_{1,1})\, c_1^{[j]} + V_{1,2}\, c_2^{[j]} = 0, \text{ for } k=1 \\
  V_{2,1}\, c_1^{[j]} + (E_2 - E_j + V_{2,2})\, c_2^{[j]} = 0, \text{ for } k=2.
\end{align*}
We use the following notations:
\[
  H_{1,1} \equiv E_1^0 + V_{1,1}, H_{2,2} \equiv E_2^0 + V_{2,2}, H_{1,2} \equiv V_{1,2},
  H_{2,1} \equiv V_{2,1}, \delta \equiv H_{1,1} - H_{2,2}, \tan{\beta} \equiv \frac{2\abs{H_{1,2}}}{\delta}.
\]

The above system of equations has non-trivial solutions if the determinant vanishes.
\[
  (H_{1,1} - E_j)(H_{2,2} - E_j) - H_{1,2} H_{2,1} = 0
\]
or
\[
  E_j^2 - (H_{1,1} + H_{2,2}) E_j + H_{1,1} H_{2,2} - H_{1,2} H_{2,1} = 0.
\]
This equation has the solutions
\begin{align}
  E_j &= \frac{(H_{1,1} + H_{2,2}) \pm
         \sqrt{ {(H_{1,1} + H_{2,2})}^2 - 4(H_{1,1} H_{2,2} - H_{1,2} H_{2,1})}}{2} \\
      &= \frac{H_{1,1} + H_{2,2}}{2} \pm \frac{1}{2} \sqrt{\delta^2 + 4 \abs{H_{1,2}}^2}.
\label{eq:lvl-repulsion-e}
\end{align}

Since \((H_{1,1} - E_j)\, c_1^{[j]} + H_{1,2}\, c_2^{[j]} = 0\),
\[
  \frac{c_1^{[j]}}{c_2^{[j]}} = \frac{H_{1,2}}{E_j - H_{1,1}}.
\]
If we rewrite eq.~\eqref{eq:lvl-repulsion-e} as
\[
  E_j = \frac{1}{2} \left[ H_{1,1} + H_{2,2} \mp (H_{2,2} - H_{1,1})
        \sqrt{1 + \frac{4\abs{H_{1,2}}^2}{\delta^2}}\right]
\]
we obtain
\[
  \frac{c_1^{[j]}}{c_2^{[j]}} = \frac{2 H_{1,2}}{H_{2,2} - H_{1,1}}
  \left[ 1 \mp \sqrt{1 + \frac{4\abs{H_{1,2}}^2}{\delta^2}} \right]^{-1}
  = -\tan{\beta}\left(1 \mp \sqrt{1+\tan^2\beta}\right).
\]
This ratio can be also expressed as
\begin{align*}
  \frac{c_1^{[j]}}{c_2^{[j]}} &= \frac{-\tan{\beta}}{1 \mp \frac{1}{\cos{\beta}}}
  = \frac{-\sin{\beta}}{\cos{\beta} \mp 1} \\
  &= \frac{-2\sin{\frac{\beta}{2}} \cos{\frac{\beta}{2}}}
      {\cos^2{\frac{\beta}{2}} - \sin^2{\frac{\beta}{2}} \mp
        \left(\cos^2{\frac{\beta}{2}} + \sin^2{\frac{\beta}{2}}\right)}
  =
  \begin{cases}
    \cot{\frac{\beta}{2}} \\
    -\tan{\frac{\beta}{2}}
  \end{cases}.
\end{align*}
Thus,
\begin{align*}
  \ket{\Psi^{[1]}} &= \cos{\frac{\beta}{2}} \ket{\Psi_1^0} + \sin{\frac{\beta}{2}} \ket{\Psi_2^0} \\
  \ket{\Psi^{[2]}} &= -\sin{\frac{\beta}{2}} \ket{\Psi_1^0} + \cos{\frac{\beta}{2}} \ket{\Psi_2^0}.
\end{align*}

If the matrix elements of the interaction which mix distinct states are relatively small,
that is \(\abs{H_{1,2}} \ll \delta \), \(\beta \simeq 0\)
\[
  E_{1,2} = \frac{H_{1,1} + H_{2,2}}{2} \pm
            \frac{\delta}{2} \sqrt{1 + \frac{4 \abs{H_{1,2}}^2}{\delta^2}}
\]
Thus
\[
  E_1 \simeq H_{1,1} + \frac{\abs{H_{1,2}}^2}{\delta}
\]
and
\[
  E_2 \simeq H_{2,2} - \frac{\abs{H_{1,2}}^2}{\delta}.
\]
and the perturbed energy levels are close to the unperturbed ones.
The states will also be approximatively the unperturbed ones
\begin{align*}
  \ket{\Psi^{[1]}} &\simeq \ket{\Psi_1^0} \\
  \ket{\Psi^{[2]}} &\simeq \ket{\Psi_2^0}.
\end{align*}

If on the other hand, the matrix elements levels which mix distinct states are
relatively strong, that is \(\abs{H_{1,2}} \gg \delta \), \(\beta \simeq \frac{\pi}{2}\)
\[
  E_{1,2} = \frac{H_{1,1} + H_{2,2}}{2} \pm
            \sqrt{\frac{\delta^2}{4} + \abs{H_{1,2}}^2}
          \simeq \frac{H_{1,1} + H_{2,2}}{2} \pm
          \left(\abs{H_{1,2}} + \frac{\delta^2}{8\abs{H_{1,2}}}\right)
\]
and
\begin{align*}
  \ket{\Psi^{[1]}} &\simeq \frac{\sqrt{2}}{2} \ket{\Psi_1^0} + \frac{\sqrt{2}}{2} \ket{\Psi_2^0} \\
  \ket{\Psi^{[2]}} &\simeq -\frac{\sqrt{2}}{2} \ket{\Psi_1^0} + \frac{\sqrt{2}}{2} \ket{\Psi_2^0}.
\end{align*}
In this case we observe that if \(\delta \simeq 0\),
then \(E_1 - E_2 \simeq 2\abs{H_{1,2}}\). If the unperturbed energy levels were
degenerated, then the perturbed energy levels will not remain so. The removal
of the degeneracy is called \emph{level repulsion}.

We can illustrate this phenomena by considering an arbitrary \(2 \cross 2\)
hermitian matrix and computing its eigenvalues.
\[
  H = \begin{pmatrix}
  H_{1,1}   & H_{1,2} \\
  H_{1,2}^* & H_{2,2}
  \end{pmatrix}
\]
The eigenvalues will be given by eq.~\eqref{eq:lvl-repulsion-e}.

The first case, \(\abs{H_{1,2}} \ll \delta \), can be viewed as the case when
the off-diagonal elements are small and the matrix can be approximated with
a diagonal matrix. In this case we expect that the energy levels will be close
to the diagonal levels or the unperturbed levels. The perturbed eigenstates
will also be approximatively equal with the unperturbed eigenstates.

The level repulsion emphasised by the second case, \(\abs{H_{1,2}} \gg \delta \),
corresponds to the case when the off-diagonal elements are significant. When we
expand the perturbed eigenstates in the basis given by the unperturbed eigenstates
we will have significant components from each element in the basis and the new
states will be a mixture of the unperturbed states. We can say that the energy levels
are no longer independent. In the case when the unperturbed energy
levels are degenerated, the difference between the perturbed energy levels
is given by \(2 \abs{H_{1,2}}\), which is a measure of the mixing of the
unperturbed states.

\section{Probability notions}

\begin{def*}[Joint probability]
  Given two events $A$ and $B$, their joint probability, \(P(A \cap B)\), is
  the probability of the two events to occur simultaneously.
\end{def*}

\begin{def*}[Conditional probability]
  The conditional probability of an event $A$ given an event $B$ with \(P(B)>0\),
  denoted \(P(A\,|\,B)\) is given by
  \[
    P(A\,|\,B) = \frac{P(A \cap B)}{P(B)}.
  \]
\end{def*}

The joint probability of $A$ and $B$ can be expressed as
\(P(A \cap B) = P(A\,|\,B) P(B)\).

\begin{def*}[Continuous random variable]
  A continuous random variable is a function from the set of all outcomes to the
  set of real numbers \(X:\Omega \to \mathbb(R)\) such that
  \[
    P(a \leq X(\omega) \leq b) = \int_a^b f(x) \dd{x},
  \]
  where \(f(x) \geq 0\) and \(\int_{-\infty}^{+\infty}f(x)\dd{x}=1\).
\end{def*}
The above function \(f\) is called the \emph{probability density function}.
The probability for a continuous random variable $X$ to take a value in the
infinitesimal interval of length \(\dd{x}\) is given by
\begin{equation}
  \label{eq:prob-rv-in-int}
  P(x \in [x, x + \dd{x}]) = \int_x^{x+\dd{x}} f(z) \dd{z} \approx f(x)\dd{x}
\end{equation}

\section{Nearest neighbour distributions}

% \emph{Random matrices} are matrices which have random variables as elements,
% with their randomness is restricted by the symmetries of the whole matrix.

Nearest neighbour spacing distributions show how the differences
between consecutive energy levels fluctuate around the average.
In order to better understand this concept we shall begin with the simpler
case of real random numbers as presented in~\cite{Timberlake2006} and then
continue with a general case as in~\cite{Brody1981}.

\subsection{The nearest neighbour spacing distribution of random numbers}

We consider a sequence of uniformly distributed, ordered, real, random numbers.
We define the \emph{spacing} of an ordered sequence as the sequence of
differences between consecutive elements.
For an interval of length \(s, s>0\), we will denote with \( P(n \in s) \) the probability
for the interval to contain $n$ numbers and with \( P(n \in \dd{s} |\; m \in s) \)
the conditional probability for the interval of length \( \dd{s} \) to contain
$n$ numbers given that the interval of length $s$ contains $m$ numbers.

If $E$ is a given number in the sequence, we are interested in the probability
\( P(s)\dd{s} \) to have the next number between \( E+s \) and \( E+s+\dd{s} \).
Since we are interested in the next number after $E$, we know that in the
interval of length $s$ there is no other number and the next number is somewhere
in the infinitesimal interval \(\dd{s}\). Thus the joint probability of
the events \(1 \in \dd{s}\) and \(0 \in s\) is given by:
\begin{equation}
  \label{eq:jpr-next}
  P(s)\dd{s} = P(1 \in \dd{s} |\; 0 \in s) P(0 \in s).
\end{equation}

Since random numbers are not correlated, the probability of a random number to be found
in the interval \( \dd{s} \) does not depend on the number of random numbers in $s$, so
\[
  P(1 \in \dd{s} |\; 0 \in s) = P(1 \in \dd{s}).
\]

The random numbers are uniformly distributed, so their probability density function
\(f\) is a constant. Hence, according to eq.~\eqref{eq:prob-rv-in-int}, the probability
of finding a number in the interval of length \( \dd{s} \) is given by
\[
  P(1 \in \dd{s}) \equiv P(1 \in [0, 0+\dd{s}]) \approx f(s) \dd{s} \sim \dd{s}.
\]
If we denote the constant probability density function with $a$
\[
  P(s)\dd{s} = a \dd{s} P(0 \in s).
\]
\( P(0 \in s) \) can be expressed using the complementary probability as
\( {1 - \int_0^s P(s') \dd{s'}} \). Now we can express \( P(s)\dd{s} \) as follows:
\[
  P(s)\dd{s} = a \dd{s} \left( 1 - \int_0^s P(s') \dd{s'} \right).
\]

In order to differentiate with respect to $s$, we will use the Leibniz rule
for differentiating integrals, namely
\begin{equation}
  \label{eq:leibnitz}
  \dv{x} \int\limits_{G(x)}^{H(x)} F(x, t) \dd{t} = \int\limits_{G(x)}^{H(x)} \pdv{F}{x} \dd{t}
  + F(x, H(x))\, \dv{H}{x} - F(x, G(x))\, \dv{G}{x}
\end{equation}

Using this rule, we obtain
\[
  \dv{s}P(s) = -aP(s).
\]
This differential equation can be solved by separation of variables, yielding
\[
  P(s) = \mathcal{C} \ee^{-as}
\]
In order to determine the constant \(\mathcal{C}\), we use the normalisation condition
for the probability density function
\[
  \int_{-\infty}^{\infty} P(s) \dd{s} = 1
\]
Since \(s>0\), this reduces to
\[
  \int_{0}^{\infty} P(s) \dd{s} = \int_{0}^{\infty} \mathcal{C} \ee^{-as} \dd{s}
  = -\frac{\mathcal{C}}{a} \eval{\ee^{-as}}_0^{\infty} = \frac{\mathcal{C}}{a}
\]
Thus \(\mathcal{C} = a\) and \(P(s) = a \ee^{-as}\).
We can further simplify the formula if we set that the average spacing to unity.
The average spacing is given by
\[
  \mean{s} = \int_{0}^{\infty} s P(s) \dd{s}
  = -\int_{0}^{\infty} s \dv{s} \left( \ee^{-as} \right) \dd{s}
  = \int_{0}^{\infty} \ee^{-as} \dd{s} = \frac{1}{a},
\]
so setting it to unity results in \(a=1\).
Thus the probability density function becomes
\begin{equation}
  \label{eq:poisson-dist}
  P(s) = \ee^{-s}.
\end{equation}
This function is known as the \emph{Poisson distribution}.

\subsection{The Wigner distribution}

We will now consider a more complicated situation, by considering the
probability density function for the sequence of random numbers to be arbitrary.

We can start from eq.~\eqref{eq:jpr-next} since the discussion up to that point
did not include any details related to the distribution of the random numbers.

In this case \(P(1 \in \dd{s} |\; 0 \in s) = f_{1,0}(s) \dd{s}\), where
\(f_{n,m}(s)\) is function which describes how the probability of having $n$
numbers in \(\dd{s}\) is influenced by the $m$ numbers in $s$.
Thus
\[
  P(s)\dd{s}=f_{1,0}(s)\dd{s} \left( 1 - \int_0^s P(s') \dd{s'} \right)
\]
By solving
% {\color{red}\large????}
this integral equation, we obtain the solution
\[
  P(s) = \mathcal{C} f_{1,0}(s) \exp(-\int_0^s f_{1,0}(x) \dd{x})
\]
We observe that if we take the probability density function constant,
\(f_{1,0}(s) = \frac{1}{a}\), we obtain the above case of the Poisson distribution.
For a
% {\color{red}linear (why?)}
probability density function,
\(f_{1,0}(s) = \alpha s\) we obtain
\[
  P(s) = \mathcal{C} \alpha s \exp(-\alpha \frac{s^2}{2})
\]
From the normalisation condition we obtain
\[
  \int_{0}^{\infty} P(s) \dd{s} = \mathcal{C} = 1
\]
The average spacing is given by
\[
  \mean{s} = \int_{0}^{\infty} s P(s) \dd{s}
  = \alpha \int_{0}^{\infty} s^2 \exp(-\alpha \frac{s^2}{2}) \dd{s}
  = \frac{1}{\sqrt{\alpha}} \sqrt{\frac{\pi}{2}}.
\]
If we set the average spacing to unity, we obtain \(\alpha = \frac{\pi}{2}\)
and
\[
  P(s) = \frac{\pi}{2} s \exp(-\frac{\pi}{4} s^2)
\]
This function is known as the \emph{Wigner distribution}.

\section{From Classical Chaos to Quantum Chaos}

The classical concept of sensitivity to initial conditions loses its meaning
in the quantum realm since the trajectory cannot be defined due to
Heisenberg's uncertainty principle. However, there are some other
ways in which we can link classically chaotic dynamics to quantum features.
These bridges between classical mechanics and quantum
mechanics allows us to give a meaning to quantum chaos~\cite{Berry1989}.

% In the terms of classical mechanics, such as the sensitivity to initial conditions
% quantum chaos does not exist~\cite{Berry1989} because of the Heisenberg's uncertainty principle,
% the absence of trajectories and many other reasons. In turn, there are some other
% ways in which we can link classically chaotic systems to their
% quantum counterparts. These bridges between classical mechanics and quantum
% mechanics allows us to give a meaning to quantum chaos.
% {\color{red} (Berry $\to$ quantum chaology)}

Specifically, there are two important conjectures that allow us to connect
classical systems and quantum systems as mentioned above.

\subsubsection{The Berry-Tabor conjecture}% {\color{red}(or theorem?)}}

This conjecture states that the quantum counterpart of a classically integrable
system has a Poissonian nearest neighbour distribution.

\subsubsection{The Bohigas-Gianoni-Schmit conjecture}

This conjecture states that the nearest neighbour distribution of a quantum system
with a classically chaotic counterpart is given by the Wigner distribution.

\end{document}


\problemname{H-Index}

%% Image URL: https://www.pexels.com/photo/black-pen-on-white-book-page-159621/
%% Image License: https://www.pexels.com/photo-license/

\illustration{0.33}{books.jpg}{~}

In research, it is tough to determine how good of a researcher you are. One way that people determine how good you are is by looking at your \textit{$H$-Index}.

Each paper has a certain number of citations. Your $H$-Index is the largest number $H$ such that you have $H$ papers with at least $H$ citations. Given the number of citations on each paper you have written, what is your $H$-Index?

\section*{Input}

The first line of input contains a single integer $n$~($1 \leq n \leq 100\,000$), which is the number of papers you have written.

The next $n$ lines describe the papers. Each of these lines contains a single integer $c$~($0 \leq c \leq 1\,000\,000\,000$), which is the number of citations that this paper has.

\section*{Output}

Display your $H$-Index.


\documentclass[simplex.tex]{subfiles}
% NO NEED TO INPUT PREAMBLES HERE
% packages are inherited; you can compile this on its own

\onlyinsubfile{
\title{NeuroData SIMPLEX Report: Subfile}
}

\begin{document}
\onlyinsubfile{
\maketitle
\thispagestyle{empty}

The following report documents the progress made by the labs of Randal~Burns and Joshua~T.~Vogelstein at Johns Hopkins University towards goals set by the DARPA SIMPLEX grant.

%%%% Table of Contents
\tableofcontents

%%%% Publications
\bibliographystyle{IEEEtran}
\begin{spacing}{0.5}
\section*{Publications, Presentations, and Talks}
%\vspace{-20pt}
\nocite{*}
{\footnotesize	\bibliography{simplex}}
\end{spacing}
%%%% End Publications
}

\subsection{Robust Law of Large Graphs}

To estimate the mean of a collection of weighted graphs under a
low rank random graph model (e.g. Stochastic Blockmodel) when
observing contaminated graphs, we propose an estimator which not
only inherits robustness from element-wise robust estimators but
also has small variance due to application of a rank-reduction
procedure. Under appropriate conditions, we prove that our
estimator outperforms standard estimators via asymptotic relative
efficiency.  Previously we illustrated our theory and methods by Monte
Carlo simulation. And now we focus on the real data experiment.

The real data we consider is a structural connectomic data.
The graphs are based on diffusion tensor MR
images. It contains 114 different brain scans, each of
which was processed to yield an undirected, weighted graph with no
self-loops, using the m2g/ndmg pipelines.  The vertices of the graphs
represent different regions in the brain defined according to an atlas.
We used the  desikan atlas with 70 vertices. The weight of an edge
between two vertices represents the number of white-matter tract
connecting the corresponding two regions of the brain.
As we know, ndmg is a better pipeline compared to m2g, which means that the mean graph derived from ndmg should be a more accurate estimate to actual population mean graph.
In order to evaluate the performance of the four estimators, we build estimates based on the samples from m2g, while using the sample mean graph from ndmg as an estimate of the probability matrix $P$.
Specifically, each Monte Carlo replicate corresponds to sampling $m$ graphs out
of the 114 from the m2g dataset and computing the four estimates based on the $m$ sampled graphs.
We then compared these estimates to the sample mean for the 114 graphs from the ndmg dataset.
We ran 100 simulations for the sample sizes $m=2, 5, 10$.
We also considered all possible dimensions for adjacency spectral embedding by ranging d from 1 to 70 in
order to investigate the impact of the dimension selection procedures.
We plot the result in figure~\ref{fig:robDim}

\begin{figure}[h!]
\begin{cframed}
\centering
\includegraphics[width=\textwidth]{../../figs/CCI_m2g_ndmg_Weighted_q_0.9_EIG.png}
\caption{
{\bf Comparison of MSE of the four estimators for the desikan atlases at three sample sizes based on m2g and ndmg pipelines.}
{\bf 1. MLE (horizontal solid line) vs MLqE (horizontal dotted line):}
ML$q$E outperforms MLE since robust estimators are always preferred in practice;
{\bf 2. MLE (horizontal solid line) vs MLE\_ASE (dashed line):} MLE\_ASE wins the bias-variance tradeoff when embedded into a proper dimension;
{\bf 3. MLqE (horizontal dotted line) vs ML$q$E\_ASE (dashed dotted line):}
ML$q$E\_ASE wins the bias-variance tradeoff when embedded into a proper dimension;
{\bf 4.  ML$q$E\_ASE (dashed dotted line) vs MLE\_ASE (dashed
line):}
MLqE\_ASE is better, since it inherits the robustness from
ML$q$E. And the square and circle represent the dimensions selected by the Zhu and Ghodsi method. We can see it does a pretty good job. But more importantly, a wide range of dimensions could lead to an improvement.
}
\label{fig:robDim}
\end{cframed}
\end{figure}

\end{document}


\providecommand{\main}{..}
\documentclass[\main/thesis.tex]{subfiles}
\begin{document}
\chapter{Constructions}\label{constructions}

The representation for positional numeral systems will be constructed and
formalized with Agda in this section,
along with the generalizations introduced in section~\ref{generalizations}.

\begin{itemize}
    \item \textbf{base}: the base of a numeral system, denoted {\lstinline|b|}.
    \item \textbf{\#digit}: the number of digits, denoted {\lstinline|d|}.
    \item \textbf{offset}: the number where the digits starts from, denoted {\lstinline|o|}.
\end{itemize}

\subfile{\main/tex/constructions/digit.tex}
\subfile{\main/tex/constructions/num.tex}
\subfile{\main/tex/constructions/maximum.tex}
\subfile{\main/tex/constructions/bounded.tex}

\subfile{\main/tex/constructions/next.tex}
\subfile{\main/tex/constructions/increment.tex}
\subfile{\main/tex/constructions/continuous.tex}
\subfile{\main/tex/constructions/fromnat.tex}
\subfile{\main/tex/constructions/addition.tex}

% \subsection{Maximum}
%
%
%
% \section{Conclusions}\label{conclusions}

\end{document}