\section{Description of algorithms}\label{sec:algos}

In this section, we describe all of the algorithms that we compare in this paper.
They all use the framework of Algorithm \ref{alg:framework}. The differences are in the instantiations of the functions (written in capital letters).
This allows for an easy and modular comparison.

\begin{algorithm}[htbp]
	\caption{Framework for all considered algorithms}\label{alg:framework}
	\begin{algorithmic}[1]
		\Require{MC $\MC$, reachability objective $\targetset$}
		\Ensure{(An estimate of) $\probability_{\initstate}(\Diamond \targetset)$}
		\Procedure{Compute reachability probability}{}
		\State $\INITIALIZE$

		\Repeat
		\State $X \gets \GETSTATES$
		\State $\UPDATE(X)$
		\Until{$\TERMCRIT$}
		\EndProcedure
	\end{algorithmic}
\end{algorithm}

\subsection{Value iteration}

\emph{Value iteration} (VI), e.g. \cite{Puterman}, computes the value for all states in the MC.
As memory, it saves a rational number (the current estimate of the value) for every state.
In $\INITIALIZE$, the estimate is set to 1 for target states in $\targetset$ and to 0 for all others.
$\GETSTATES$ returns the whole state space, as the estimate of all values is updated simultaneously.
The $\UPDATE$ works by performing a so called \emph{Bellman backup}, i.e. given the current estimate function $\lb<i>$, the next estimate $\lb<i+1>$ is computed by applying the Bellman Equation (\ref{eq:Vs}) as follows:
\[
\lb<i+1>(\state) = \sum_{\mathsf{s'} \in \states} \trans(\state,\state') \cdot \lb<i>(\state')
\]

\input{fig_VIMC}

\begin{example}\label{ex:vi}
	Consider the MC from Figure \ref{fig:VI_MC}, with $\trans(\state<2>,\state<2>)=\trans(\state<2>,\mathsf t)=\trans(\state<2>,\state<3>)=\frac 1 3$ and the reachability objective $\{t\}$.
	The estimates that VI computes in the first 4 iterations are depicted in Figure \ref{fig:VI_table}.
	The target state $\mathsf t$ is initialized to 1, everything else to 0.
	The estimate for $\state<3>$ stays at 0, as it is a BSCC with no possibility to reach the target state.
	Since these two states do not change, they are omitted in the figure.
	In every iteration, the estimates are updated and become more precise, coming closer to the true value $0.5$ for $\state<0>$, $\state<1>$ and $\state<2>$.
	However, they converge to $0.5$ only in the limit, as for any finite number of iterations there is a positive probability to remain in $\state<2>$.
	Note that $\initstate$ always is two steps behind $\state<2>$, as it takes two iterations to backpropagate the current estimate.

\end{example}

VI converges to the true value only in the limit, hence we need some termination criterion $\TERMCRIT$ to stop when we are close enough. However, to be certain that the estimate is close, one has to perform an exponential number of iterations \cite{visurvey}, which is infeasible. Hence, usually this version of VI does not give convergence guarantees, but instead just runs until the difference between two successive iterations is small.
The result of this heuristic is guaranteed to be a lower bound, but can be arbitrarily imprecise~\cite{HM}, as we will also see in Example \ref{ex:bvi}.

\subsection{Bounded value iteration}
To be able to give convergence guarantees, \emph{Bounded value iteration} (BVI, also called interval iteration) was introduced more generally for Markov decision processes in \cite{atva14,HM}. In this paper, we only focus on Markov chains, i.e. Markov decision processes with a single action in every state.
In addition to the under-approximation computed by VI, this approach also computes a convergent over-approximation. For this, it stores a second rational number for every state.
Dually to the under-approximation, $\INITIALIZE$ sets the estimate to 0 in states that cannot reach the target and 1 everywhere else. Note that finding the states with value 0, i.e. BSCC that do not contain the target, BVI has to perform a graph analysis, e.g. a backwards search from the targets.
BVI still works on the whole state space and the update is completely analogous to VI, only this time updating both approximations.
As $\TERMCRIT$, BVI checks that difference between the over- and under-approximation in the initial state is smaller than a given precision $\varepsilon$.
This guarantees that the returned value is $\varepsilon$-precise.

\begin{example}\label{ex:bvi}
		Consider the MC from Figure \ref{fig:VI_MC} with the same objective, but this time with
		$\trans(\state<2>,\state<2>)= 0.98$ and $\trans(\state<2>,\mathsf t)=\trans(\state<2>,\state<3>) = 0.01$.
		Note that by pre-processing we set the over approximation $\ub(\state<3>)$ to 0, as it is a BSCC with no possibility of reaching the target.
		The estimates BVI computes for $\state<2>$ in the first 4 iterations are depicted in Figure \ref{fig:BVI_table}.

		If we were running VI only from below, we might stop after iteration 4, as the lower bound changes by less than $0.01$ between these iterations and hence it seems to have converged close to the value.
		However, the difference between upper and lower bounds is still very high, so BVI knows that there still is a huge uncertainty in the values, as it could be anything between 0.048 and 0.961.
		Eventually, both estimates converge close enough to 0.5; for example, after around 400 iterations the lower bound is 0.49 and the upper bound 0.51.
		Then BVI can return the value 0.5 (the center of the interval) with a precision of $0.01$, as this value is off by at most that.
\end{example}

\subsection{Simulation-based asynchronous value iteration}

The biggest drawback of the two variants we introduced so far is that they always work on the whole state space.
Because of the state-space explosion, this is often infeasible.
In contrast, asynchronous value iteration only updates parts of the state space in every iteration of the loop, i.e. $\GETSTATES$ does not return the whole state space, but instead heuristically selects the states to update next.
This not only speeds up the main loop, but also allows the algorithm to reduce the memory requirements.
Indeed, instead of storing estimates for all states, one stores estimates only for the partial model consisting of previously updated states.
In~\cite{RTDP,BRTDP,atva14}, the heuristic for selecting the states is based on simulation: a path is sampled in the model, and only the states on that path are updated.
The partial model contains all states that have been encountered during some of the simulations.
If the part of the state space that is relevant for convergence of value iteration is small, this can lead to enormous speed-ups~\cite{atva14,cores}. For more details on why this happens and a formal definition of 'state space relevant for convergence', we refer the interested reader to~\cite{cores}.

\begin{algorithm}[htbp]
	\caption{Simulation-based implementation of $\GETSTATES$}\label{alg:simulate}
	\begin{algorithmic}[1]
		\Require{MC $\MC$, reachability objective $\targetset, \initstate$}
		\Ensure{A set of states $X \subseteq \states$}
		\Procedure{SIMULATE}{}
		\State $\path \gets \initstate$
		\Repeat
		\State $\state' \gets$ sample from $\delta(\last{\path})$ according to $\nextstate$
		\State $\path \gets \path \state'$
		\Until{$\last{\path} \in \targetset$ or $\STUCK$}
		\State \Return $\path$
		\EndProcedure
	\end{algorithmic}
\end{algorithm}

Algorithm~\ref{alg:simulate} shows how states can be sampled through simulations, as done in \cite{atva14}:
Starting from the initial state, in every step of the simulation a successor is chosen from the distribution of the last state on the path.
Note that this choice depends on another heuristic $\nextstate$. The successor can be chosen according to the transition probabilities $\delta$, but it has proven to be advantageous to additionally consider the difference between the upper and lower bound in the successor states \cite{BRTDP,atva14}.
In consequence, states where we already know a lot (under- and over-approximations are close to each other) are given less priority than states where we still need information.

The simulation is stopped in two cases: Either (i) it reaches a target state or (ii) it is stuck in a BSCC with no path to the target.
Different heuristics for checking whether the simulation is stuck are discussed in depth in Section \ref{sec:stuck}.
Note that being able to differentiate between targets and non-target BSCCs during the simulations allows us not to do anything in $\INITIALIZE$; we can set the value to 1 when reaching a target and 0 in the other case.
The $\UPDATE$ function for simulation based asynchronous value iteration again uses the Bellman equation (\ref{eq:Vs}) to update the estimates of all states on the path;
moreover, it can utilize additional information: Since $\GETSTATES$ returns a path, there is a notion of order of the states. Updating the states in reverse order backpropagates information faster.

\input{fig_brtdp}

\begin{example}
	Consider the MC in Figure \ref{fig:brtdp}, again with reachability objective $\{t\}$.
%	$\varepsilon$ and $1-\varepsilon$ denote transition probabilities.
	The cloud represents an arbitrarily large state space.
	However, since it is only reachable with a very small probability $\varepsilon$ (and we are interested in an $\varepsilon$-precise solution), it need not be explored.
	Let the first sampled path be $\state<0> \state<1> \state<2> \mathsf t$. This happens with high probability, as the only other possibility would be to select a successor from the cloud in state $\state<0>$, but since the selection process depends on the transition probabilities $\trans$, going to $\state<1>$ has a higher probability.
	After the simulation reaches $\mathsf t$, this value is backpropagated in reverse order.
	First the lower estimate $\lb(\state<2>)$ is set to 1, then $\lb(\state<1>)$ is set to 1, then $\lb(\state<0>)$ is set to $1-\varepsilon$.
	At this point the algorithm has converged, as difference between the lower and upper bound is~$\varepsilon$.

	So in this example, sampling the most probable path a single time gives a good approximation. The algorithm avoids exploring the large cloud and backprogagates values faster than synchronous VI.
\end{example}

\begin{example}\label{ex:adv}
	As an adversarial example, consider the MC in Figure \ref{fig:adv}.
	Here, the model exhibits high branching, so every single path has a low probability, and only by aggregating all paths we actually get a high value.
	Unlike the previous example, there is no part of the state space that is clearly irrelevant.
	In fact, to achieve precision of $\varepsilon$ the algorithm has to see so many paths that their cumulative probability is $1-\varepsilon$, which in this case means seeing all but one transition from the starting state.
	This needs at least $\frac 1 \varepsilon$ simulations, but since the successors are chosen probabilistically, most likely a lot more.
\end{example}

Note that similarly to synchronous VI, there are versions of asynchronous VI without (RTDP \cite{RTDP}) and with  (BRTDP \cite{BRTDP,atva14})\footnote{While all are more generally applicable to Markov decision processes, \cite{BRTDP} only ensures convergence if no end components \cite{BK08} are present (for MC, no BSCCs without a target are present) and \cite{atva14} lifts this restriction.} guaranteed error bounds.

\subsection{Statistical model checking}

Algorithms for statistical model checking (SMC), \cite{Younes02}, are different from all previously described ones in two ways, namely what they store and what they return.
The VI-based algorithms store estimates for every (seen) state and they update these values to be ever more precise.
Thus, the returned bounds on the values are certainly correct, although possibly quite loose.
In contrast, SMC stores only a single accumulator (for the value of the initial state) and the returned value is probably approximately correct (PAC \cite{pac}).
Being PAC with probability $\alpha$ and approximation $\epsilon>0$ guarantees the following:
with high probability ($\alpha$), the returned value is close to the true value (off by at most $\varepsilon$).
However, the returned confidence interval is not guaranteed to be a valid under- and over-approximation;
if we are unlucky (i.e. with the remaining probability $1-\alpha$), there is no guarantee whatsoever on the returned value.

SMC does not need to do anything in $\INITIALIZE$.
It only stores a single accumulator to remember how often a target state was reached.
$\GETSTATES$ works as in Algorithm \ref{alg:simulate} with $\nextstate$ typically sampling the successor according to the transition probabilities $\trans$ (in some settings, importance sampling may also be possible, e.g. \cite{DBLP:conf/cav/JegourelLS12,DBLP:conf/setta/BuddeDH17}).
$\UPDATE$ remembers whether we reached the target or not; in the end we can divide the number of reaches by the total number of samples to get the probability estimate.
$\TERMCRIT$ is a (typically low) number of samples that depends on the required probability of the guarantee and the width of the confidence interval; see \cite[Section 2.2]{DHKPjournal} for details or \cite{DBLP:journals/tomacs/JegourelSD19} for more advanced techniques.

\begin{example}\label{ex:smc}
	Consider again the MC depicted in Figure \ref{fig:VI_MC}.
    Let the first sampled path be $\state<0> \state<1> \state<2> \state<2> \mathsf t$. At this point the simulation stops, as we have reached a target state, and we remember that we have seen a target once.
    Let the second path be $\state<0> \state<1> \state<2> \state<2> \state<2> \state<3> \state<3> \dots$.
    On the one hand, the $\STUCK$ function has to let the simulation continue, even though $\state<2>$ is seen 3 times and it looks like a cycle.
    On the other hand, it has to detect that the simulation will loop forever in $\state<3>$ and has to stop it.
    Ways to detect this are discussed in Section \ref{sec:stuck}.
    After detecting that we are stuck, we remember that the simulation did not reach the target.

    Let the required probability of the guarantee be $\alpha=0.9$ and the width of the confidence interval $\varepsilon=0.1$.
    Using Hoeffding's inequality \cite{hoeffding} we can show that the required number of samples for this is 461.
    So assume that after 461 simulations we have seen the target 223 times.
    Then we know that with probability at least $0.9$, the value is in the interval $\sfrac {223} {461} \pm 0.05$, i.e. $[0.434,0.534]$.
    Increasing the number of simulations can both increase the confidence or decrease the width of the interval.

    Note that this number of simulations is independent of the system. While 461 simulations are a lot for this small system, the number would be the same if we were considering a model with several billion states where value iteration is impossible.
\end{example}

\section{STUCK}\label{sec:stuck}
In this section, we discuss heuristics for detecting whether a simulation is stuck in a BSCC with no path to a target state.
We also propose one new such heuristic with convenient theoretical properties.

For simulation-based asynchronous value iteration, previous work either excluded the existence of non-target BSCCs in their assumptions \cite{RTDP,BRTDP} or used a heuristic with no false negatives, but the possibility of false positives \cite{atva14}.
This means that if the simulation is stuck in a BSCC, the simulation definitely is stopped, which is required for termination.
However, if the simulation is not stuck in a BSCC, it might still be stopped, guessing the value of the last state in the path is 0, although it might not be.
The $\STUCK$-heuristics used in previous work either depend on the path length (\cite{atva14}, \cite[Chapter 7.5]{ujma}) or simply stops exploring when any state is seen twice \cite[Appendix A.3]{cav19}.

SMC has to be sure with high probability that the simulation is stuck, as otherwise it loses the probabilistic guarantee.
In \cite{YCZ10}, two approaches are described.
The first approach requires knowledge of the second eigenvalue of the MC in order to guarantee asymptotic convergence. However, getting the second eigenvalue is as hard as the verification problem itself.
The second approach works in the grey-box setting and pre-processes the MC so that all potentially infinite paths are eliminated.
A similar transformation, using white-box information, was suggested in \cite{ase10}.
However, both of these approaches transform the whole model and thus face problems in the case of very large models.
% The second approach of [26] requires the knowledge of the chain’s topology, which is used to transform the chain so that all potentially infinite paths are eliminated. In [9], a similar transformation is performed, again requir-ing knowledge of the topology. The (pre)processing of the state space required by the topology-aware methods, as well as by traditional numerical methods for Markov chain analysis, is a major practical hurdle for large (or unknown) statespaces

An alternative was suggested in \cite{DHKP16}.
It monitors the finite path sampled during the simulation, implicitly constructing a graph with all seen states as nodes and all seen transitions as edges.
The \emph{candidate} of the current path is the (possibly empty) set of states forming the maximal BSCC of this graph.
Intuitively, it is what we believe to be a BSCC given the observation of the current simulation.
This candidate has to be validated, because as we saw in Example \ref{ex:smc}, a state set can look like a BSCC for several steps before being exited.
In the black-box setting, this validation works by continuing the simulation until the probability of overlooking some transition exiting the candidate becomes very small \cite{DHKP16}.

In this paper, we pinpoint that in the grey-box or white-box setting, this costly type of validation is not necessary.
Instead of validating the candidate by running around in it for a huge number of steps, one can verify it using the additional information on the model.
If no successor of any state in the candidate is outside of the candidate, then it indeed is a BSCC.
Formally, for a candidate $T$, we check that $\{\state \mid \exists \mathsf t \in T: \state \in \post(t)  \} \subseteq T$ (if the topology is known), or alternatively that $\forall \mathsf t\in T: |\widehat{\post}(t)|=|\post(t)|$ (in what we defined as the grey-box setting) where $\widehat{\post}$ yields the number of successors within the observed candidate.

\begin{example}
	Consider again the MC depicted in Figure \ref{fig:VI_MC}.
	When a simulation enters $\state<3>$, $\STUCK$ should return true in order to stop the simulation, as it has reached a BSCC with no path to a target.
	In the black box setting of \cite{DHKP16}, this is only possible after continuing the simulation for another huge amount of steps.
	For example, even in a BSCC with only a single state, hundreds of further steps can be necessary to reach the required confidence.
	Given the grey-box information, the algorithm can determine that all successors of the states in the candidate ($\{\state<3>\}$) have been seen and conclude that the candidate is indeed a BSCC.
\end{example}

However, this check stops the simulation and can incur an overhead if there are many SCCs in the transient part of the state space.
Hence, we can delay it, not checking at the first occurrence of a cycle, but e.g. only when every state in the candidate has been seen twice.
Alternatively, one can only allow the check every $n$ (e.g. hundred) steps of the simulation.
Depending on the model and the implementation of the algorithm, these heuristics can have some impact on the runtime.
% we only want to perform it every $n$ steps or after getting a candidate of a certain \emph{strength} $k$, i.e. every state of the candidate was seen at least $k$ times.
%See Section~\ref{sec:discussion} for a discussion of the effect of these parameters. %\todo{this part kinda depends on what we want to say in discussion and what actually happens in experiments. Also check whether we actually keep the promise of investigating these parameters.}

Furthermore, one might modify this heuristic even further.
If a state of the BSCC is only reached with low probability, it takes many steps for the simulation to reach it.
When we check whether the current candidate is a BSCC, this state might not have occurred in the simulation yet.
Instead of concluding that the information is insufficient and the simulation has to continue, one could deterministically explore the unknown successors and \emph{compute} the BSCC.
On the one hand, for small to medium sized BSCCs, this could result in a speed-up.
%However, for large BSCCs or if the whole model forms an SCC, this could result in exploring the whole model.
On the other hand,  it increases the overhead when transient SCCs are checked by $\STUCK$.
%\todomaxi{I removed the comment on PRISM, cause we are not certain it is their fault. Also, the problem is not model construction, but checking whether some target is in the BSCC, as then you need to access model information, which takes a while. But we are not certain enough to say that, and it is not that interesting}
%, particularly costly in PRISM, where simulation and model construction do not work efficiently together.
Consequently, in the available benchmarks, this heuristic did not prove advantageous.
Hence we do not even report on it in the evaluation section.

%This STUCK also works for BRTDP.
%\todo{Did we implement that? Do we have models were it makes a difference? Do we want to explicitly say this?}
	%Would have to have a large SCC in the transient part, which is hard to leave and always breaks the paths.

\section{Discussion}\label{sec:discussion}

\subsection{Dependency of simulation length on topology}\label{sec:simBad}

Although the number of samples in SMC is independent of the model size, the length of the simulations is highly dependent on the model size and even more on the structure.
Indeed, any kind of cyclic behaviour in the transient part of the state space increases the simulation time for two reasons.
Firstly, the simulation loops in transient SCCs and does not make progress towards a target or a BSCC.
Secondly, the check whether the simulation is stuck in transient SCCs incurs an overhead.
An adversarial handcrafted worst-case example where simulations struggle is given in~\cite[Figure 3]{HM}.
Moreover, the structure of BSCCs affects the length of the simulation.
For cyclic BSCCs, the simulation easily encounters all states of the BSCC and can quickly terminate.
For more complex topologies, some states are typically only seen with very low frequency and thus the simulation takes longer.

If the model exhibits many transient SCCs, using any simulation-based technique is problematic.

\subsection{Black, grey and white SMC}

The difference between the variants of SMC we report on are their knowledge of the transition system: $\pmin$ corresponds to black, the number of successors to grey and the exact successors and probabilities to the white-box setting.
This information can be used in the $\STUCK$-check; apart from that, the algorithms are the same.

%Our heuristic using the additional information of the white box setting did not speed up the algorithm, as the overhead for the additional checks was too large, see end of Section \ref{sec:stuck}.

Comparing grey and black box, it is apparent that simulations in grey box can be much shorter, as upon detection of a candidate that is a BSCCs the simulation is immediately stopped, whereas in the black box setting it has to continue for a number of steps.
This number of steps depends on two things: (i) The size of the BSCC, as larger BSCC take longer to explore, especially since all states, no matter how improbable, need to be seen a certain amount of times, and (ii) the given under-approximation of the minimum transition probability $p_{min}$, as this determines how often every state in the candidate has to be seen until the probability of a false positive is small enough.

Thus, for large BSCCs or small $\pmin$, grey SMC is clearly better, as we also experimentally validate in Table \ref{tab:herman-short} (large BSCC) and Table \ref{tab:fsmc-vary-pmin} (various $\pmin$) in the next section.
For small BSCCs (e.g. only of size 1) and not so small $p_{\min}$, black and grey SMC become more comparable, but grey SMC still has shorter simulations.
However, practically, the overhead of verifying the candidates in grey SMC can be so large that black SMC can even be slightly faster than grey SMC (see e.g., \texttt{leader6\_11} in Table \ref{tab:grey-v-black}).

Heuristically reducing the number of checks in grey SMC (as described in Section \ref{sec:stuck}) can make it faster again, but the effectiveness of the heuristics depends on the models.
So, if it is known that the BSCC-detection is very easy for black SMC (e.g. they are of size 1 or cyclic and $\pmin$ is not too small), black SMC can be a viable choice.
However, as black SMC is never far better, using grey SMC is the safer variant when facing models with uncertain topology.

\subsection{Comparison of algorithms}
%\todo{DT/Table for algo selection in final version?}
Finally, we compare the (dis-)advantages of the different algorithms, giving a practical decision guidance.
If hard guarantees are required, then  BVI or BRTDP are to be used.
The latter is simulation based, and thus good if only a small part of the state space is relevant for convergence.
Additionally, if the model is too large for BVI, BRTDP still has a chance, but quite possibly the partial model will also be too large.
Conversely, if the model contains lots of transient SCCs, BVI is preferable, as simulation based approaches fail on this kind of model, see Section \ref{sec:simBad}.
Note that, if there are small probabilities present, it might take very long for BVI and BRTDP to converge, see Example \ref{ex:bvi}.

For a quick estimate, or if PAC guarantees are sufficient, or if the system is too large, so that it is not possible to provide hard guarantees, SMC is to be used, if possible (white or grey box setting) in our grey variant.
As both the memory and the termination criterion are independent of the size of the system, SMC always has a chance to yield an estimate, which additionally comes with a probabilistic guarantee.

There is no case in which un-guaranteed (synchronous or asynchronous) VI are preferable, as they suffer from the same drawbacks as BVI and BRTDP, but additionally do not provide guarantees.
Whenever hard guarantees are not of interest and the system is not strongly connected, grey SMC should be used for a quick estimate.
%Whenever guarantees are not of interest, SMC yields the quickest estimate. => Actually not true, see exp; hermann17 has 130,000 states, but VI is faster.

\subsection{Extensions to other unbounded-horizon properties}
	For more complex unbounded-horizon properties \cite{BK08}, such as Until (avoid-reach), LTL or long-run average reward, (B)VI pre-processes the state space to analyze the BSCCs \cite{BK08} and BRTDP \cite{atva14} can either do the same  or analyze the encountered BSCCs only.
	Black SMC of \cite{DHKPjournal} is applicable through additional analysis of the BSCC candidates after they have been found likely to be BSCCs.
	This is directly inherited by grey SMC and makes it available for these specifications with low overhead.

%\para{INITIALIZE:}
%For VI, set the initial values.
%For BRTDP and our SMC, nothing.
%For the other SMC, precompute 0 states.
%
%
%\para{TERM\_CRIT:}
%For VI and BRTDP, $\varepsilon$-convergence.
%For SMC, necessary number of samples.
%
%\para{GET\_STATES:}
%For VI: Everything.
%For BRTDP and SMC: Sample path until target or STUCK.
%
%\para{STUCK:}
%For BRTDP: Some heuristic (increasing path length, state seen twice...)
%For SMC: Depends. Can be our white thing (with different ideas), can be the candidate thing, can be importance sampling or whatever else there exists.
%Different ideas: When we think we have candidate: Check. If true, done. Else: Continue simulation/Unfold for n steps.
%
%\para{UPDATE}
%For VI: Bellman backup
%For BRTDP: Infer value of place where path ended. (Might use STUCK ideas), then Bellman backup.
%For SMC: Remember whether target or STUCK.


\documentclass[12pt]{article}
\usepackage{graphicx}
\usepackage{epstopdf} %converting to PDF
\begin{document}

\title{DCM III: Homework}
\author{Kevin Aquino}
\maketitle

\section{Homework set}
For this homework we will get to understand parts of the Balloon model as well as keep up our skills in understanding dynamic equations.
\subsection{Set I}
For the first set, we will get to solve the Flow equations which are given by the following:
\begin{eqnarray}
\frac{ds}{dt} =& z(t) - \kappa s - \gamma(f-1), \\
\frac{df}{dt} =& s,
\end{eqnarray}
with the conditions at $t=0$, $f=1$, $s=0$, and setting the input $z(t)$ as:
\begin{equation}
z(t) = 0.5\exp\left[-(t-2)^2/0.1\right].
\end{equation}
Initially use the following numbers for the parameters: $\kappa=0.65$ and $\gamma=0.41$. Remember to use what we have learned spefiically that:
\begin{equation}
\frac{ds}{dt} \approx \frac{\Delta s}{\Delta t} = \frac{s_{t_{i+1}} -  s_{t_{i}}}{\Delta t}.
\end{equation}
And use this approximation for $f$ as well. For the numerical simulation set $\Delta t = 0.001$, and set the maximum length of $t$ to be $50$ You should have the following solution in Figure 1.Make sure you get the figures right before moving on!.
\begin{figure}[h!]
\centering
\includegraphics[width=0.5\linewidth]{flow.eps}\includegraphics[width=0.5\linewidth]{input.eps}
\caption{What the solution should look like}
\end{figure}

\subsection{Set II}
After you have completed Set I, then simulate the same system using:
\begin{equation}
z(t) = 0.5\exp\left[-(t-2)^2/0.1\right] + 0.5\exp\left[-(t-\tau)^2/0.1\right]  .
\end{equation}
where $\tau$ is $3$. After this plot the flow response for $\tau=4,5,6,7$. Have a look at the responses and save/print out for next session!.
\subsection{Set III}
Finally repeat what we did in Set I, changing $\kappa=0.3,0.7$ and then keep $\kappa$ constant and set $\gamma = 0.2,0.8$.

Have all these plots ready in some electronic or printed format! :)
\end{document}


\label{sec:gameval}
These are values of options of general Partizan Poset games played on a chess-colored thee-row Young diagrams using Equation (\ref{eq:3rowvalue}) of Theorem \ref{thm:3rowvalue}.

\subsection*{$x,y,z\ge4$}
\begin{align*}
\begin{split}
A_{x,y,z}=\frac{237}{512} &-2^{-(2z+1)}\left(\frac{2^{z+1}}{3}\left((-1)^z-2^{z-4}\right)-\frac{1}{5}\left((-1)^z-4^{z-4}\right)\right)\\
& -2^{-(y+z+1)}\left(2^{z+1}-1\right)(-1)^y\frac{1}{3}\left(1-(-2)^{y-z}\right)\\
& -2^{-x}(-1)^x\frac{1}{3}\left(1-(-2)^{x-y}\right)
\end{split}
\end{align*}

\newpage
\subsection*{$x\ge y+2,y\ge z+2,z\ge6$}
\begin{align*}
\begin{split}
A_{x-2,y,z}=\frac{237}{512} &-2^{-(2z+1)}\left(\frac{2^{z+1}}{3}\left((-1)^z-2^{z-4}\right)-\frac{1}{5}\left((-1)^z-4^{z-4}\right)\right)\\
& -2^{-(y+z+1)}\left(2^{z+1}-1\right)(-1)^y\frac{1}{3}\left(1-(-2)^{y-z}\right)\\
& -2^{-x}(-1)^x\frac{1}{3}\left(4-(-2)^{x-y}\right)
\end{split}\\
\begin{split}
A_{x-1,y,z}=\frac{237}{512} &-2^{-(2z+1)}\left(\frac{2^{z+1}}{3}\left((-1)^z-2^{z-4}\right)-\frac{1}{5}\left((-1)^z-4^{z-4}\right)\right)\\
& -2^{-(y+z+1)}\left(2^{z+1}-1\right)(-1)^y\frac{1}{3}\left(1-(-2)^{y-z}\right)\\
& +2^{-x}(-1)^x\frac{1}{3}\left(2+(-2)^{x-y}\right)
\end{split}\\
\begin{split}
A_{x,y-1,z}=\frac{237}{512} &-2^{-(2z+1)}\left(\frac{2^{z+1}}{3}\left((-1)^z-2^{z-4}\right)-\frac{1}{5}\left((-1)^z-4^{z-4}\right)\right)\\
& +2^{-(y+z+1)}\left(2^{z+1}-1\right)(-1)^y\frac{1}{3}\left(2+(-2)^{y-z}\right)\\
& -2^{-x}(-1)^x\frac{1}{3}\left(1+2(-2)^{x-y}\right)
\end{split}\\
\begin{split}
A_{x,y-2,z}=\frac{237}{512} &-2^{-(2z+1)}\left(\frac{2^{z+1}}{3}\left((-1)^z-2^{z-4}\right)-\frac{1}{5}\left((-1)^z-4^{z-4}\right)\right)\\
& -2^{-(y+z+1)}\left(2^{z+1}-1\right)(-1)^y\frac{1}{3}\left(4-(-2)^{y-z}\right)\\
& -2^{-x}(-1)^x\frac{1}{3}\left(1-4(-2)^{x-y}\right)
\end{split}\\
\begin{split}
A_{x,y,z-2}=\frac{237}{512} &-2^{-(2z+1)}\left(\frac{2^{z+1}}{3}\left(4(-1)^z-2^{z-4}\right)-\frac{1}{5}\left(16(-1)^z-4^{z-4}\right)\right)\\
& -2^{-(y+z+1)}\left(2^{z+1}-4\right)(-1)^y\frac{1}{3}\left(1-4(-2)^{y-z}\right)\\
& -2^{-x}(-1)^x\frac{1}{3}\left(1-(-2)^{x-y}\right)
\end{split}\\
\begin{split}
A_{x,y,z-1}=\frac{237}{512} &+2^{-(2z+1)}\left(\frac{2^{z+1}}{3}\left(2(-1)^z+2^{z-4}\right)-\frac{1}{5}\left(4(-1)^z+4^{z-4}\right)\right)\\
& -2^{-(y+z+1)}\left(2^{z+1}-2\right)(-1)^y\frac{1}{3}\left(1+2(-2)^{y-z}\right)\\
& -2^{-x}(-1)^x\frac{1}{3}\left(1-(-2)^{x-y}\right)
\end{split}
\end{align*}

\newpage
\subsection*{$x=y+1,y\ge z+2,z\ge6$}
\begin{align*}
\begin{split}
A_{y,y,z}=\frac{237}{512} &-2^{-(2z+1)}\left(\frac{2^{z+1}}{3}\left((-1)^z-2^{z-4}\right)-\frac{1}{5}\left((-1)^z-4^{z-4}\right)\right)\\
& -2^{-(y+z+1)}\left(2^{z+1}-1\right)(-1)^y\frac{1}{3}\left(1-(-2)^{y-z}\right)
\end{split}\\
\begin{split}
A_{y-1,y-1,z}=\frac{237}{512} &-2^{-(2z+1)}\left(\frac{2^{z+1}}{3}\left((-1)^z-2^{z-4}\right)-\frac{1}{5}\left((-1)^z-4^{z-4}\right)\right)\\
& +2^{-(y+z+1)}\left(2^{z+1}-1\right)(-1)^y\frac{1}{3}\left(2+(-2)^{y-z}\right)
\end{split}\\
\begin{split}
A_{y+1,y-1,z}=\frac{237}{512} &-2^{-(2z+1)}\left(\frac{2^{z+1}}{3}\left((-1)^z-2^{z-4}\right)-\frac{1}{5}\left((-1)^z-4^{z-4}\right)\right)\\
& +2^{-(y+z+1)}\left(2^{z+1}-1\right)(-1)^y\frac{1}{3}\left(2+(-2)^{y-z}\right)\\
& -\frac{1}{2}2^{-y}(-1)^y
\end{split}\\
\begin{split}
A_{y+1,y-2,z}=\frac{237}{512} &-2^{-(2z+1)}\left(\frac{2^{z+1}}{3}\left((-1)^z-2^{z-4}\right)-\frac{1}{5}\left((-1)^z-4^{z-4}\right)\right)\\
& -2^{-(y+z+1)}\left(2^{z+1}-1\right)(-1)^y\frac{1}{3}\left(4-(-2)^{y-z}\right)\\
& +\frac{3}{2}2^{-y}(-1)^y
\end{split}\\
\begin{split}
A_{y+1,y,z-2}=\frac{237}{512} &-2^{-(2z+1)}\left(\frac{2^{z+1}}{3}\left(4(-1)^z-2^{z-4}\right)-\frac{1}{5}\left(16(-1)^z-4^{z-4}\right)\right)\\
& -2^{-(y+z+1)}\left(2^{z+1}-4\right)(-1)^y\frac{1}{3}\left(1-4(-2)^{y-z}\right)\\
& +\frac{1}{2}2^{-y}(-1)^y
\end{split}\\
\begin{split}
A_{y+1,y,z-1}=\frac{237}{512} &+2^{-(2z+1)}\left(\frac{2^{z+1}}{3}\left(2(-1)^z+2^{z-4}\right)-\frac{1}{5}\left(4(-1)^z+4^{z-4}\right)\right)\\
& -2^{-(y+z+1)}\left(2^{z+1}-2\right)(-1)^y\frac{1}{3}\left(1+2(-2)^{y-z}\right)\\
& +\frac{1}{2}2^{-y}(-1)^y
\end{split}
\end{align*}

\newpage
\subsection*{$x=y,y\ge z+2,z\ge6$}
\begin{align*}
\begin{split}
A_{y-2,y-2,z}=\frac{237}{512} &-2^{-(2z+1)}\left(\frac{2^{z+1}}{3}\left((-1)^z-2^{z-4}\right)-\frac{1}{5}\left((-1)^z-4^{z-4}\right)\right)\\
& -2^{-(y+z+1)}\left(2^{z+1}-1\right)(-1)^y\frac{1}{3}\left(4-(-2)^{y-z}\right)
\end{split}\\
\begin{split}
A_{y-1,y-1,z}=\frac{237}{512} &-2^{-(2z+1)}\left(\frac{2^{z+1}}{3}\left((-1)^z-2^{z-4}\right)-\frac{1}{5}\left((-1)^z-4^{z-4}\right)\right)\\
& +2^{-(y+z+1)}\left(2^{z+1}-1\right)(-1)^y\frac{1}{3}\left(2+(-2)^{y-z}\right)
\end{split}\\
\begin{split}
A_{y,y-1,z}=\frac{237}{512} &-2^{-(2z+1)}\left(\frac{2^{z+1}}{3}\left((-1)^z-2^{z-4}\right)-\frac{1}{5}\left((-1)^z-4^{z-4}\right)\right)\\
& +2^{-(y+z+1)}\left(2^{z+1}-1\right)(-1)^y\frac{1}{3}\left(2+(-2)^{y-z}\right)\\
& -2^{-y}(-1)^y
\end{split}\\
\begin{split}
A_{y,y-2,z}=\frac{237}{512} &-2^{-(2z+1)}\left(\frac{2^{z+1}}{3}\left((-1)^z-2^{z-4}\right)-\frac{1}{5}\left((-1)^z-4^{z-4}\right)\right)\\
& -2^{-(y+z+1)}\left(2^{z+1}-1\right)(-1)^y\frac{1}{3}\left(4-(-2)^{y-z}\right)\\
& +2^{-y}(-1)^y
\end{split}\\
\begin{split}
A_{y,y,z-2}=\frac{237}{512} &-2^{-(2z+1)}\left(\frac{2^{z+1}}{3}\left(4(-1)^z-2^{z-4}\right)-\frac{1}{5}\left(16(-1)^z-4^{z-4}\right)\right)\\
& -2^{-(y+z+1)}\left(2^{z+1}-4\right)(-1)^y\frac{1}{3}\left(1-4(-2)^{y-z}\right)
\end{split}\\
\begin{split}
A_{y,y,z-1}=\frac{237}{512} &+2^{-(2z+1)}\left(\frac{2^{z+1}}{3}\left(2(-1)^z+2^{z-4}\right)-\frac{1}{5}\left(4(-1)^z+4^{z-4}\right)\right)\\
& -2^{-(y+z+1)}\left(2^{z+1}-2\right)(-1)^y\frac{1}{3}\left(1+2(-2)^{y-z}\right)
\end{split}
\end{align*}

\newpage
\subsection*{$x\ge y+2,y=z+1,z\ge6$}
\begin{align*}
\begin{split}
A_{x-2,z+1,z}=\frac{237}{512} &-2^{-(2z+1)}\left(\frac{2^{z+1}}{3}\left((-1)^z-2^{z-4}\right)-\frac{1}{5}\left((-1)^z-4^{z-4}\right)\right)\\
& +2^{-(2z+2)}\left(2^{z+1}-1\right)(-1)^z\\
& -2^{-x}(-1)^x\frac{1}{3}\left(4+\frac{1}{2}(-2)^{x-z}\right)
\end{split}\\
\begin{split}
A_{x-1,z+1,z}=\frac{237}{512} &-2^{-(2z+1)}\left(\frac{2^{z+1}}{3}\left((-1)^z-2^{z-4}\right)-\frac{1}{5}\left((-1)^z-4^{z-4}\right)\right)\\
& +2^{-(2z+2)}\left(2^{z+1}-1\right)(-1)^z\\
& +2^{-x}(-1)^x\frac{1}{3}\left(2-\frac{1}{2}(-2)^{x-z}\right)
\end{split}\\
\begin{split}
A_{x,z-1,z-1}=\frac{237}{512} &+2^{-(2z+1)}\left(\frac{2^{z+1}}{3}\left(2(-1)^z+2^{z-4}\right)-\frac{1}{5}\left(4(-1)^z+4^{z-4}\right)\right)\\
& -2^{-x}(-1)^x\frac{1}{3}\left(1+2(-2)^{x-z}\right)
\end{split}\\
\begin{split}
A_{x,z,z}=\frac{237}{512} &-2^{-(2z+1)}\left(\frac{2^{z+1}}{3}\left((-1)^z-2^{z-4}\right)-\frac{1}{5}\left((-1)^z-4^{z-4}\right)\right)\\
& -2^{-x}(-1)^x\frac{1}{3}\left(1-(-2)^{x-z}\right)
\end{split}\\
\begin{split}
A_{x,z+1,z-2}=\frac{237}{512} &-2^{-(2z+1)}\left(\frac{2^{z+1}}{3}\left(4(-1)^z-2^{z-4}\right)-\frac{1}{5}\left(16(-1)^z-4^{z-4}\right)\right)\\
& +3\times2^{-(2z+2)}\left(2^{z+1}-4\right)(-1)^z\\
& -2^{-x}(-1)^x\frac{1}{3}\left(1+\frac{1}{2}(-2)^{x-z}\right)
\end{split}\\
\begin{split}
A_{x,z+1,z-1}=\frac{237}{512} &+2^{-(2z+1)}\left(\frac{2^{z+1}}{3}\left(2(-1)^z+2^{z-4}\right)-\frac{1}{5}\left(4(-1)^z+4^{z-4}\right)\right)\\
& -2^{-(2z+2)}\left(2^{z+1}-2\right)(-1)^z\\
& -2^{-x}(-1)^x\frac{1}{3}\left(1+\frac{1}{2}(-2)^{x-z}\right)
\end{split}
\end{align*}

\newpage
\subsection*{$x=y+1,y=z+1,z\ge6$}
\begin{align*}
\begin{split}
A_{z,z,z}=\frac{237}{512} &-2^{-(2z+1)}\left(\frac{2^{z+1}}{3}\left((-1)^z-2^{z-4}\right)-\frac{1}{5}\left((-1)^z-4^{z-4}\right)\right)
\end{split}\\
\begin{split}
A_{z+1,z+1,z}=\frac{237}{512} &-2^{-(2z+1)}\left(\frac{2^{z+1}}{3}\left((-1)^z-2^{z-4}\right)-\frac{1}{5}\left((-1)^z-4^{z-4}\right)\right)\\
& +2^{-(2z+2)}\left(2^{z+1}-1\right)(-1)^z
\end{split}\\
\begin{split}
A_{z+2,z-1,z-1}=\frac{237}{512} &+2^{-(2z+1)}\left(\frac{2^{z+1}}{3}\left(2(-1)^z+2^{z-4}\right)-\frac{1}{5}\left(4(-1)^z+4^{z-4}\right)\right)\\
& -\frac{3}{4}2^{-z}(-1)^z
\end{split}\\
\begin{split}
A_{z+2,z,z}=\frac{237}{512} &-2^{-(2z+1)}\left(\frac{2^{z+1}}{3}\left((-1)^z-2^{z-4}\right)-\frac{1}{5}\left((-1)^z-4^{z-4}\right)\right)\\
& +\frac{1}{4}2^{-z}(-1)^z
\end{split}\\
\begin{split}
A_{z+2,z+1,z-2}=\frac{237}{512} &-2^{-(2z+1)}\left(\frac{2^{z+1}}{3}\left(4(-1)^z-2^{z-4}\right)-\frac{1}{5}\left(16(-1)^z-4^{z-4}\right)\right)\\
& +3\times2^{-(2z+2)}\left(2^{z+1}-4\right)(-1)^z\\
& -\frac{1}{4}2^{-z}(-1)^z
\end{split}\\
\begin{split}
A_{z+2,z+1,z-1}=\frac{237}{512} &+2^{-(2z+1)}\left(\frac{2^{z+1}}{3}\left(2(-1)^z+2^{z-4}\right)-\frac{1}{5}\left(4(-1)^z+4^{z-4}\right)\right)\\
& -2^{-(2z+2)}\left(2^{z+1}-2\right)(-1)^z\\
& +\frac{1}{4}2^{-z}(-1)^z
\end{split}
\end{align*}

\newpage
\subsection*{$x=y,y=z+1,z\ge6$}
\begin{align*}
\begin{split}
A_{z,z,z}=\frac{237}{512} &-2^{-(2z+1)}\left(\frac{2^{z+1}}{3}\left((-1)^z-2^{z-4}\right)-\frac{1}{5}\left((-1)^z-4^{z-4}\right)\right)
\end{split}\\
\begin{split}
A_{z-1,z-1,z-1}=\frac{237}{512} &+2^{-(2z+1)}\left(\frac{2^{z+1}}{3}\left(2(-1)^z+2^{z-4}\right)-\frac{1}{5}\left(4(-1)^z+4^{z-4}\right)\right)
\end{split}\\
\begin{split}
A_{z+1,z-1,z-1}=\frac{237}{512} &+2^{-(2z+1)}\left(\frac{2^{z+1}}{3}\left(2(-1)^z+2^{z-4}\right)-\frac{1}{5}\left(4(-1)^z+4^{z-4}\right)\right)\\
& -\frac{1}{2}2^{-z}(-1)^z
\end{split}\\
\begin{split}
A_{z+1,z,z}=\frac{237}{512} &-2^{-(2z+1)}\left(\frac{2^{z+1}}{3}\left((-1)^z-2^{z-4}\right)-\frac{1}{5}\left((-1)^z-4^{z-4}\right)\right)\\
& +\frac{1}{2}2^{-z}(-1)^z
\end{split}\\
\begin{split}
A_{z+1,z+1,z-2}=\frac{237}{512} &-2^{-(2z+1)}\left(\frac{2^{z+1}}{3}\left(4(-1)^z-2^{z-4}\right)-\frac{1}{5}\left(16(-1)^z-4^{z-4}\right)\right)\\
& +3\times2^{-(2z+2)}\left(2^{z+1}-4\right)(-1)^z
\end{split}\\
\begin{split}
A_{z+1,z+1,z-1}=\frac{237}{512} &+2^{-(2z+1)}\left(\frac{2^{z+1}}{3}\left(2(-1)^z+2^{z-4}\right)-\frac{1}{5}\left(4(-1)^z+4^{z-4}\right)\right)\\
& -2^{-(2z+2)}\left(2^{z+1}-2\right)(-1)^z
\end{split}
\end{align*}

\newpage
\subsection*{$x\ge y+2,y=z,z\ge6$}
\begin{align*}
\begin{split}
A_{x-2,z,z}=\frac{237}{512} &-2^{-(2z+1)}\left(\frac{2^{z+1}}{3}\left((-1)^z-2^{z-4}\right)-\frac{1}{5}\left((-1)^z-4^{z-4}\right)\right)\\
& -2^{-x}(-1)^x\frac{1}{3}\left(4-(-2)^{x-z}\right)
\end{split}\\
\begin{split}
A_{x-1,z,z}=\frac{237}{512} &-2^{-(2z+1)}\left(\frac{2^{z+1}}{3}\left((-1)^z-2^{z-4}\right)-\frac{1}{5}\left((-1)^z-4^{z-4}\right)\right)\\
& +2^{-x}(-1)^x\frac{1}{3}\left(2-(-2)^{x-z}\right)
\end{split}\\
\begin{split}
A_{x,z-1,z-1}=\frac{237}{512} &+2^{-(2z+1)}\left(\frac{2^{z+1}}{3}\left(2(-1)^z+2^{z-4}\right)-\frac{1}{5}\left(4(-1)^z+4^{z-4}\right)\right)\\
& -2^{-x}(-1)^x\frac{1}{3}\left(1+2(-2)^{x-z}\right)
\end{split}\\
\begin{split}
A_{x,z-2,z-2}=\frac{237}{512} &-2^{-(2z+1)}\left(\frac{2^{z+1}}{3}\left(4(-1)^z-2^{z-4}\right)-\frac{1}{5}\left(16(-1)^z-4^{z-4}\right)\right)\\
& -2^{-x}(-1)^x\frac{1}{3}\left(1-4(-2)^{x-z}\right)
\end{split}\\
\begin{split}
A_{x,z,z-2}=\frac{237}{512} &-2^{-(2z+1)}\left(\frac{2^{z+1}}{3}\left(4(-1)^z-2^{z-4}\right)-\frac{1}{5}\left(16(-1)^z-4^{z-4}\right)\right)\\
& +2^{-(2z+1)}\left(2^{z+1}-4\right)(-1)^z\\
& -2^{-x}(-1)^x\frac{1}{3}\left(1-(-2)^{x-z}\right)
\end{split}\\
\begin{split}
A_{x,z,z-1}=\frac{237}{512} &+2^{-(2z+1)}\left(\frac{2^{z+1}}{3}\left(2(-1)^z+2^{z-4}\right)-\frac{1}{5}\left(4(-1)^z+4^{z-4}\right)\right)\\
& -2^{-(2z+1)}\left(2^{z+1}-2\right)(-1)^z\\
& -2^{-x}(-1)^x\frac{1}{3}\left(1-(-2)^{x-z}\right)
\end{split}
\end{align*}

\newpage
\subsection*{$x=y+1,y=z,z\ge6$}
\begin{align*}
\begin{split}
A_{z,z,z}=\frac{237}{512} &-2^{-(2z+1)}\left(\frac{2^{z+1}}{3}\left((-1)^z-2^{z-4}\right)-\frac{1}{5}\left((-1)^z-4^{z-4}\right)\right)
\end{split}\\
\begin{split}
A_{z-1,z-1,z-1}=\frac{237}{512} &+2^{-(2z+1)}\left(\frac{2^{z+1}}{3}\left(2(-1)^z+2^{z-4}\right)-\frac{1}{5}\left(4(-1)^z+4^{z-4}\right)\right)
\end{split}\\
\begin{split}
A_{z+1,z-1,z-1}=\frac{237}{512} &+2^{-(2z+1)}\left(\frac{2^{z+1}}{3}\left(2(-1)^z+2^{z-4}\right)-\frac{1}{5}\left(4(-1)^z+4^{z-4}\right)\right)\\
& -\frac{1}{2}2^{-z}(-1)^z
\end{split}\\
\begin{split}
A_{z+1,z-2,z-2}=\frac{237}{512} &-2^{-(2z+1)}\left(\frac{2^{z+1}}{3}\left(4(-1)^z-2^{z-4}\right)-\frac{1}{5}\left(16(-1)^z-4^{z-4}\right)\right)\\
& +\frac{3}{2}2^{-z}(-1)^z
\end{split}\\
\begin{split}
A_{z+1,z,z-2}=\frac{237}{512} &-2^{-(2z+1)}\left(\frac{2^{z+1}}{3}\left(4(-1)^z-2^{z-4}\right)-\frac{1}{5}\left(16(-1)^z-4^{z-4}\right)\right)\\
& +2^{-(2z+1)}\left(2^{z+1}-4\right)(-1)^z\\
& +\frac{1}{2}2^{-z}(-1)^z
\end{split}\\
\begin{split}
A_{z+1,z,z-1}=\frac{237}{512} &+2^{-(2z+1)}\left(\frac{2^{z+1}}{3}\left(2(-1)^z+2^{z-4}\right)-\frac{1}{5}\left(4(-1)^z+4^{z-4}\right)\right)\\
& -2^{-(2z+1)}\left(2^{z+1}-2\right)(-1)^z\\
& +\frac{1}{2}2^{-z}(-1)^z
\end{split}
\end{align*}

\newpage
\subsection*{$x=y,y=z,z\ge6$}
\begin{align*}
\begin{split}
A_{z-2,z-2,z-2}=\frac{237}{512} &-2^{-(2z+1)}\left(\frac{2^{z+1}}{3}\left(4(-1)^z-2^{z-4}\right)-\frac{1}{5}\left(16(-1)^z-4^{z-4}\right)\right)
\end{split}\\
\begin{split}
A_{z-1,z-1,z-1}=\frac{237}{512} &+2^{-(2z+1)}\left(\frac{2^{z+1}}{3}\left(2(-1)^z+2^{z-4}\right)-\frac{1}{5}\left(4(-1)^z+4^{z-4}\right)\right)
\end{split}\\
\begin{split}
A_{z,z-1,z-1}=\frac{237}{512} &+2^{-(2z+1)}\left(\frac{2^{z+1}}{3}\left(2(-1)^z+2^{z-4}\right)-\frac{1}{5}\left(4(-1)^z+4^{z-4}\right)\right)\\
& -2^{-z}(-1)^z
\end{split}\\
\begin{split}
A_{z,z-2,z-2}=\frac{237}{512} &-2^{-(2z+1)}\left(\frac{2^{z+1}}{3}\left(4(-1)^z-2^{z-4}\right)-\frac{1}{5}\left(16(-1)^z-4^{z-4}\right)\right)\\
& +2^{-z}(-1)^z
\end{split}\\
\begin{split}
A_{z,z,z-2}=\frac{237}{512} &-2^{-(2z+1)}\left(\frac{2^{z+1}}{3}\left(4(-1)^z-2^{z-4}\right)-\frac{1}{5}\left(16(-1)^z-4^{z-4}\right)\right)\\
& +2^{-(2z+1)}\left(2^{z+1}-4\right)(-1)^z
\end{split}\\
\begin{split}
A_{z,z,z-1}=\frac{237}{512} &+2^{-(2z+1)}\left(\frac{2^{z+1}}{3}\left(2(-1)^z+2^{z-4}\right)-\frac{1}{5}\left(4(-1)^z+4^{z-4}\right)\right)\\
& -2^{-(2z+1)}\left(2^{z+1}-2\right)(-1)^z
\end{split}
\end{align*}
%
%\newpage
%\subsection*{}
%\begin{align*}
%\begin{split}
%A_{y+1,y,z}=\frac{237}{512} &-2^{-(2z+1)}\left(\frac{2^{z+1}}{3}\left((-1)^z-2^{z-4}\right)-\frac{1}{5}\left((-1)^z-4^{z-4}\right)\right)\\
%& -2^{-(y+z+1)}\left(2^{z+1}-1\right)(-1)^y\frac{1}{3}\left(1-(-2)^{y-z}\right)\\
%& +\frac{1}{2}2^{-y}(-1)^y
%\end{split}\\
%\begin{split}
%A_{x,z+1,z}=\frac{237}{512} &-2^{-(2z+1)}\left(\frac{2^{z+1}}{3}\left((-1)^z-2^{z-4}\right)-\frac{1}{5}\left((-1)^z-4^{z-4}\right)\right)\\
%& +2^{-(2z+2)}\left(2^{z+1}-1\right)(-1)^z\\
%& -2^{-x}(-1)^x\frac{1}{3}\left(1+\frac{1}{2}(-2)^{x-z}\right)
%\end{split}
%\end{align*}


\documentclass[a4paper,12pt]{article}
\usepackage[left=2.5cm,right=2.5cm,top=2.5cm,bottom=2.5cm]{geometry}
\usepackage{color}
\usepackage[usenames,dvipsnames]{xcolor}
\usepackage{amsmath,amssymb,amsthm,algorithm,algorithmic,graphicx,yhmath,url,enumitem,lscape,mathtools}
\usepackage{wrapfig,subfigure}

\newcounter{problem}
\newenvironment{problem}{\refstepcounter{problem} \noindent {\bf Problem \arabic{problem}}}{\newpage}
\newenvironment{solution}{\vspace{0.3cm} \par \noindent {\bf Solution}}{}
\newenvironment{verification}{\vspace{0.3cm} \par \noindent {\bf Verification}}{}
\newenvironment{hint}{\vspace{0.3cm} \par {\bf Hint:}}{}

\newcounter{remark}
\newenvironment{remark}{\refstepcounter{remark} \vspace{0.3cm} \par \noindent {\bf Remark \arabic{remark}}}{\vspace{0.3cm}}
\newcounter{lesson}
\newenvironment{lesson}{\refstepcounter{lesson} \vspace{0.3cm} \par \noindent {\bf Lesson \arabic{lesson}}}{\vspace{0.3cm}}
\newcommand{\R}{\mathbb{R}}
\newcommand{\N}{\mathbb{N}}
\newcommand{\Rn}{\mathbb{R}^n}
\newcommand{\Rnn}{\mathbb{R}^{n \times n}}
\newcommand{\bes}{\begin{equation*}}
\newcommand{\ees}{\end{equation*}}
\newcommand{\be}{\begin{equation}}
\newcommand{\ee}{\end{equation}}
\newcommand{\eps}{\epsilon}
\newcommand{\fl}{\text{fl}}

\begin{document}

\title{5DV005, Fall 2018, Lab session 4}
\author{Carl Christian Kjelgaard Mikkelsen}

\maketitle
\tableofcontents

\section{The time and the place}
The lab session will take place on
\begin{center}
Wednesday, November 28th, 2018, (kl. 13.00-16.00), Room MA416-426.
\end{center}

\section{The problems}

\begin{center}
  {\bf It is a smashing idea to check the folder {\tt lab4/scripts} carefully!}
\end{center}

\begin{problem}
  \begin{enumerate}
  \item Develop a function {\tt MySinh} which computes the function
    \bes
    f(x) = \frac{e^x - e^{-x}}{2}.
    \ees
    You may use the built-in function {\tt exp} to evaluate $e^x$ when $|x|$ is sufficiently large, but you must rewrite $f$ to avoid the subtractive cancellation at when $x \approx 0$.
  \item Develop a minimal working example {\tt MySinhMWE} which compares your implementation to the built-in function {\tt sinh}. It is possible to reduce the relative error below $10^{-15}$ on the interval $[-3,3]$.
  \end{enumerate}
\end{problem}

\begin{problem}
% Newton's method for square root with good initial guess
% MyNSqrt
  \begin{enumerate}
    \item Develop a function {\tt MyNewtonSqrt} which uses Newton's method for computing square roots subject. Your function must use the initial guess
    \bes
    x_0(s) = \frac{1}{3} s  + \frac{17}{24}
    \ees
    for $\sqrt{s}$ when $s \in [1,4]$.
  \item Develop a minimal working example {\tt MyNewtonSqrtMWE1} which compares your implementation to the built in function {\tt sqrt}. It is possible to reduce the relative error to $2u$ on the interval $[10^{-3}, 10^3]$.
  \end{enumerate}
\end{problem}

\begin{problem}
  \begin{enumerate}
  \item  Develop a function {\tt MyLog} which uses Newton's method to solve the non-linear equation $f(x) = 0$ where $f(x) = \exp(x) - \alpha$ and $\alpha > 0$. Your function must exploit the fact that if $\alpha = f \cdot 2^e$, then
  \bes
  \log(\alpha) = \log(f) + e \log(2)
  \ees
 Your are free to use the special function {\tt log2} to determine $f$ and $e$. You are free to use the built-in value of $\log(2)$. Your function must use the initial guess
  \bes
  x_0(s) = a s + b, \qquad a = \log(2), \qquad b = - \frac{a + \log(a) + 1}{2}
  \ees
  for $\log(s)$ when $s \in [1,2]$.
\item Develop a minimal working example {\tt MyLogMWE} which compares your implementation to the built-in function {\tt log}. It is possible to reduce the relative error below $2u$ on the interval $[2,10]$.
\end{enumerate}
\end{problem}

\begin{problem}
% Develop a robust version of the secant method and the bisection method
% MyRobustSecant
  \begin{enumerate}
  \item Copy the script {\tt scripts/l4p4.m} into the function {\tt work/MyRobustSecant.m} and complete the function according to the specification.
  \item Develop a minimal working example {\tt MyRobustSecantMWE} which solves the your favorite non-linear equation. I recommend computing a firing solution.
    \end{enumerate}
\end{problem}

\bibliographystyle{plain}
  \bibliography{../../../lecture-notes/refs}

\end{document}


\chapter{Asymptotic Safety of Gravity-Matter Systems}\label{chap:Matter}
The calculation in $h^{\mathrm{TT}}$ approximation we performed in the last chapter, already allowed us to investigate the characteristic fixed point structure of the Einstein-Hilbert truncation. Nevertheless, in this part of the thesis, where the impact of minimally coupled matter fields is analyzed, we want to work with the full result, including also the vector and scalar modes arising from the York decomposition (\ref{eqn:York}) of the fluctuation field.
\section{Inclusion of the other Graviton Modes}
The gauge conditions and the results for the full graviton propagator are taken from \cite{PawlowskiNPgaugeLecture}.\\
For the full solution, we have to take care of an additional gauge fixing term
\begin{equation}
\mathcal{S}_{\mathrm{gf}} = \frac{1}{2\alpha} \int_x \sqrt{\bar{g}} \  \bar{g}^{\mu\nu} F_{\mu}F_{\nu},
\end{equation}
with a gauge fixing parameter $\alpha$ and a De-Donder-type gauge condition given by
\begin{equation}
	F_{\mu} = \bar{\nabla}^{\nu}h_{\mu\nu} - \frac{1+\beta}{4}\bar{\nabla}_{\mu}h^{\nu}_{\phantom{\nu}\nu}.
\end{equation}
We also have to include a ghost term $\mathcal{S}_{\mathrm{gh}}$ arising from the Faddeev-Popov procedure:
\begin{equation}
\mathcal{S}_{\mathrm{gh}} = Z_c\int_x \sqrt{\bar{g}} \  \bar{g}^{\mu\mu'} \bar{g}^{\nu\nu'}\bar{c}_{\mu'} \mathcal{M}_{\mu\nu}  c_{\nu'}.
\label{eqn:ghost_action}
\end{equation}
 The Faddeev-Popov operator $\mathcal{M}_{\mu\nu}(\bar{g},h)$ reads
\begin{align}
	\mathcal{M}_{\mu\nu} &= \bar{\nabla}^{\rho}(g_{\mu\nu}\nabla_{\rho} + g_{\rho\nu}\nabla_{\mu}) - \bar{\nabla}_{\mu}\nabla_{\nu}.
	\label{eqn:FPop}
\end{align}
If we choose to work in Landau gauge, where $\alpha \equiv 0$ and also set $\beta\equiv 0$, we are able to reduce the dynamical degrees of freedom to two, namely the transverse-traceless mode $h^{\mathrm{TT}}$ and the trace mode $h^{\mathrm{Tr}}$. This choice allows us to simplify the full graviton propagator a lot. We are left with:
\begin{equation} G_{k, h h}=\left(\Gamma^{(2)}_k+R_{k}\right)_{h h}^{-1} = \frac{32\pi}{Z_h}
\begin{pmatrix}
\frac{1}{\bar{\Delta}\left[1+r_{k}\right]-2\Lambda_k+\frac{2}{3}\mathcal{R}} & 0 & 0 & 0 \\[10pt]
0 & 0  & 0 & 0 \\[10pt]
0 & 0 & \frac{-\frac{8}{3}}{\bar{\Delta}\left[1+r_{k}\right]-\frac{4}{3} \Lambda_k}  &0\\[10pt]
0 & 0 & 0 & 0 \\
\end{pmatrix}.
\label{eqn:G_hh}
\end{equation}
For this calculation, the regularized 2-point-function has been determined using a regulator of the form
\begin{equation}
R_{k}=\eval{\Gamma_{k}^{(2)}}_{\bar{R}=0, \Lambda=0} \cdot r_{k}\left(\frac{\bar{\Delta}}{k^2}\right),
\end{equation}
where the shape function $r_k$ is again of Litim-type (\ref{eqn:Litim}). Since we already computed the contributions arising from the $h^{\mathrm{TT}}$ mode in the previous chapter, we only need to compute those from the trace mode $h^{\mathrm{Tr}}$ and the Faddeev-Popov ghosts associated with the graviton sector in the following.
\vspace{-0.5cm}
\subsection{Trace Mode}
For the trace mode $h^{\mathrm{Tr}}$, we take the propagator given in (\ref{eqn:G_hh}):
\begin{equation}
	G_{k, h^{\mathrm{Tr}}h^{\mathrm{Tr}}} =\left(\frac{32\pi}{Z_h}\right) \left(-\frac{8}{3}\right)\frac{1}{\bar{\Delta}\left[1+r_k\right] - \frac{4}{3}\Lambda_k}.
\end{equation}
The respective regulator term reads
\begin{equation}
	R_{k,h^{\mathrm{Tr}}} = -\frac{3}{8}\left(\frac{Z_h}{32\pi}\right)\cdot\bar{\Delta}\cdot r_k\left(\frac{\bar{\Delta}}{k^2}\right).
\end{equation}
We proceed by computing its scale derivative:
\begin{align}
	\partial_t R_{k,h^{\mathrm{Tr}}} = -\frac{3}{8}\left(\frac{Z_h}{32\pi}\right)\cdot\bar{\Delta}\left(\partial_tr_k - \eta_h r_k\right).
\end{align}
In total, the contribution from the r.\,h.\,s. of the flow equation is given by
\begin{equation}
	\begin{aligned}
	\frac{1}{2}\tr{G_{k, h^{\mathrm{Tr}}h^{\mathrm{Tr}}}\ \partial_t R_{k, h^{\mathrm{Tr}}}} =
		\frac{1}{2}\tr{\frac{\bar{\Delta}\left(\partial_tr_k - \eta_h r_k\right)}{\bar{\Delta}\left[1+r_k\right] - \frac{4}{3}\Lambda_k}}.
	\end{aligned}
\end{equation}
To evaluate the functional trace, we make again use of the heat-kernel techniques we already used for the computation in $h^{\mathrm{TT}}$ approximation:

\begin{align}
\frac{1}{2}\tr{\frac{\bar{\Delta}\left(\partial_tr_k - \eta_h r_k\right)}{\bar{\Delta}\left[1+r_k\right] - \frac{4}{3}\Lambda_k}} &= \frac{1}{2} \frac{1}{\left(4 \pi^{2}\right)}\left[\int_{x} \sqrt{\bar{g}}\ \Phi_{2}^{1}\left(-\frac{4}{3}\Lambda_k\right)+\frac{1}{6} \int_{x} \sqrt{\bar{g}} \ \bar{\mathcal{R}} \ \Phi_{1}^{1}\left(-\frac{4}{3}\Lambda_k\right)\right]\nonumber \\
\phantom{.} \\
&= 	\frac{1}{2}\frac{1}{(4\pi)^2}\int_x\sqrt{\bar{g}}\left[ \frac{1}{1-\frac{4}{3}\lambda_k}\left(\left(1-\frac{\eta_h}{6}\right) + \frac{\bar{\mathcal{R}}}{3}\left(1-\frac{\eta_h}{4}\right)\right)\right].\nonumber
	\end{align}
In the last step, we evaluated the threshold functions using equation (\ref{eqn:threshold}). This already completes the computation of the additional contribution from the trace mode.
\subsection{Faddeev-Popov Ghosts for the Graviton Sector}
Since we work in a background field approximation, where we assume $g_{\mu\nu}=\bar{g}_{\mu\nu}$, we can simplify the calculations for this part a lot. Nevertheless, we have to be very careful since we will be confronted with a modified Laplace operator, i.\,e. a spin-1 Laplacian $\bar{\Delta}_{\mu\nu}^{'(1)}$, occurring as kinetic operator in the ghost two-point function. A more detailed discussion on how these modified Laplacians effect the values of the heat-kernel coefficients is presented at the end of appendix \ref{chap:AppA}. \\
First we have a look at the Faddeev-Popov operator (\ref{eqn:FPop}). In background field approximation, $\mathcal{M}_{\mu\nu}$ is given by
\begin{equation}
\begin{aligned}
	\eval{\mathcal{M}_{\mu\nu}}_{g=\bar{g}} &= -\bar{g}_{\mu\nu}\bar{\nabla}^2 + \bar{\nabla}_{\nu}\bar{\nabla}_{\mu} - \bar{\nabla}_{\mu}\bar{\nabla}_{\nu} \\
	&= -\bar{g}_{\mu\nu}\bar{\nabla}^2 - \left[\bar{\nabla}_{\mu}, \bar{\nabla}_{\nu}\right].
\end{aligned}
\end{equation}
The minus sign in front of the first term arises from integrating by parts to obtain the $\bar{\nabla}^2$ operator. As usual we assumed vanishing boundary terms. Inserting this result into the ghost action (\ref{eqn:ghost_action}) yields
\begin{equation}
	\begin{aligned}
		\mathcal{S}_{\mathrm{gh}} &\overset{\phantom{(\mathrm{\ref{eqn:RiemannB}})}}{=} Z_c\int_x \sqrt{\bar{g}} \ \bar{c}^{\mu}\left[-\bar{g}_{\mu\nu}\bar{\nabla}^2 - \left[\bar{\nabla}_{\mu}, \bar{\nabla}_{\nu}\right]\right]  c^{\nu} \\
		&\overset{(\mathrm{\ref{eqn:RiemannB}})}{=}  Z_c\int_x \sqrt{\bar{g}} \ \bar{c}^{\mu}\underbrace{\left[-\bar{g}_{\mu\nu}\bar{\nabla}^2 - \bar{R}_{\mu\nu}\right]}_{=: \ \bar{\Delta}_{\mu\nu}^{'(1)}} c^{\nu}.
	\end{aligned}
\end{equation}
Note, that the bar referring to the background field should not be confused with the bar in the notation for the conjugated ghost.
We can directly read off the ghost two-point function:
\begin{align}
	\left[\Gamma^{(2)}_{\bar{c}c}\right]_{\mu\nu} = \frac{\delta^2 \mathcal{S}_{\mathrm{gh}}}{\delta c\ \delta\bar{c}} = Z_c \cdot\bar{\Delta}_{\mu\nu}^{'(1)}.
\end{align}
With the following choice of the regulator
\begin{equation}
	\left[R_{k,c}\right]_{\mu\nu} = Z_c\cdot\bar{\Delta}_{\mu\nu}^{'(1)}\cdot r_k\left(\frac{\bar{\Delta}^{'(1)}}{k^2}\right)
\end{equation}
and its scale derivative
\begin{align}
	\left[\partial_t R_{k,c}\right]_{\mu\nu} =  Z_c\cdot\bar{\Delta}_{\mu\nu}^{'(1)}\left(\partial_tr_k - \eta_c r_k\right),
\end{align}
we arrive at the regularized two-point function for the ghosts:
\begin{align}
	\left[\Gamma^{(2)}_{k, \bar{c}c}\right]_{\mu\nu} = \left[\Gamma^{(2)}_{\bar{c}c}+ R_{k, c}\right]_{\mu\nu}  = Z_c \cdot\bar{\Delta}_{\mu\nu}^{'(1)}\left(1 + r_k\left(\frac{\bar{\Delta}^{'(1)}}{k^2}\right)\right).
\end{align}
With equation (\ref{eqn:coefficients}), we find the new coefficients for the heat-kernel expansion for the modified Laplacian:
\begin{equation}
\begin{aligned}
	\operatorname{Tr}\mathbf{b}_0\left(\bar{\Delta}^{'(1)}\right) &= 4  \\
	\operatorname{Tr}\mathbf{b}_2\left(\bar{\Delta}^{'(1)}\right) &= \frac{5}{3}\bar{\mathcal{R}}.\\
\end{aligned}
\end{equation}
All together, we compute the following contribution:
\begin{equation}
\begin{aligned}
	-\tr{G_{k, \bar{c}c}\ \partial_t R_{k,c}} &= -\tr{\frac{\bar{\Delta}_{\mu\nu}^{'(1)}\left(\partial_t r_k - \eta_c r_k\right)}{\bar{\Delta}_{\mu\nu}^{'(1)}\left(1 + r_k\right)}} \\[10pt]
	&=  - \frac{1}{\left(4 \pi^{2}\right)}\left[4\int_{x} \sqrt{\bar{g}}\ \Phi_{2}^{1}\left(0\right)+\frac{5}{3} \int_{x} \sqrt{\bar{g}} \ \bar{\mathcal{R}} \ \Phi_{1}^{1}\left(0\right)\right] \\[10pt]
	&= -\frac{1}{(4\pi)^2}\int_x\sqrt{\bar{g}}\left[4\left(1-\frac{\eta_c}{6}\right) + \frac{10}{3}\bar{\mathcal{R}}\left(1-\frac{\eta_c}{4}\right)\right].
\end{aligned}
\end{equation}
The minus sign in front of the trace is due to the Grassmannian nature of the ghost fields. With the completion of this calculation, we are ready to consider minimally-coupled matter fields.
\section{Matter Contributions in Background Field Approximation}
The inclusion of matter in this theory setting is in principle straightforward. We extend our truncation (\ref{eqn:EHtruncation}) by including an additional matter term:
\begin{align}
	\Gammak = \Gamma_{\text{EH}} + \mathcal{S}_{\text{gf}}+ \mathcal{S}_{\text{gh}}+ \Gamma_{\text{matter}},
\end{align}
where $\Gamma_{\mathrm{matter}}$ consists of scalar, fermion and gauge field contributions, denoted with $\mathcal{S}_S, \mathcal{S}_D$ and $\mathcal{S}_V$ respectively:
\begin{align}
	\Gamma_{\text{matter}} = \mathcal{S}_S + \mathcal{S}_D + \mathcal{S}_V.
\end{align}
The different actions will be specified later on, every matter type will be treated separately. For conventions regarding the choice of the respective regulators and the general structure of this calculation, we are following \cite{DonaEichhornPercacci2013}. \\
In this truncation we have two essential couplings, $G$ and $\Lambda$, and five inessential\footnote{Inessential in this sense means, that they can be eliminated by field rescalings.} wave function renormalizations $Z_{\Psi}$ with $\Psi = (h,c,S,D,V)$. As before, the wave function renormalizations $Z_{\Psi}$ do not enter the $\beta$-functions for $G$ and $\Lambda$ directly, but are still present in a non-trivial way via the anomalous dimension $\eta_{\Psi}$, defined as
\begin{align}
	\eta_{\Psi} = -\partial_t \ln Z_{\Psi}.
\end{align}
For the scalar and gauge field regulators we choose
\begin{align}
	R_{k,\sfrac{S}{V}}(z) = Z_{\sfrac{S}{V}} \cdot \mathbbm{1}_{\sfrac{S}{V}} \cdot \tilde{\Delta}\cdot r_k\left(\frac{\tilde{\Delta}}{k^2}\right),
	\label{eqn:Rk_matter}
\end{align}
where $\tilde{\Delta}= -\nabla^2\mathbbm{1}_{\Psi} + \mathbf{E}_{\Psi}$ is a modified Laplacian, occurring as kinetic operator in the different matter field actions. The Litim-type shape function $r_k$ is in this case the same as the one defined in equation (\ref{eqn:Litim}), now as a function of the modified Laplacian $\tilde{\Delta}$. The regulator choice for the Dirac fermions is slightly different, details are discussed in the respective subsection. Nevertheless, we already present the values of $\mathbf{E}_{\Psi}$ for all three kinetic operators:
\begin{align}
	\mathbf{E}_{\Psi} =  \left\{\begin{array}{ll}{0} & {\text { for } \Psi = S} \\[5pt] {\frac{\mathcal{R}}{4}} & {\text { for } \Psi = D}\\[5pt]  {R^{\mu}_{\phantom{\mu}\nu}} & {\text { for } \Psi = V.}\end{array}\right.
\end{align}
\begin{figure}[t]
	\centering
	\includegraphics[width=0.95\textwidth]{figs/TikZ/matter_corrections}
\caption[Flow equation for the average effective action $\Gamma_k$ including different matter contributions in diagrammatic representation.]{Flow equation (\ref{eqn:matter_flow}) for the average effective action $\Gamma_k$ including different matter contributions in diagrammatic representation. The double, densely dotted, dashed, solid, wiggly and loosely dotted lines correspond to the graviton, graviton ghost, scalar, fermion, gauge field  and gauge field ghost propagators, respectively. The crossed circles denote the insertion of the respective regulator.}
	\label{fig:matter_calc}
	\hrulefill
\end{figure}
After having introduced the setup for the following calculation, we are now able to determine the different contributions from the matter fields step by step, by evaluating the functional traces ocurring on the r.\,h.\,s. of the flow equation separately. For the matter configuration in our setting the complete flow equation reads
\begin{equation}
\begin{aligned}
 \partial_t\Gamma_{k} =\frac{1}{2} \operatorname{Tr}&\bigl[G_k\ \partial_t R_{k}\bigr]_{h h} - \operatorname{Tr}\bigl[G_k\ \partial_t R_{k}\bigr]_{\bar{c}c} + \frac{1}{2}\operatorname{Tr}\bigl[G_k\ \partial_t R_{k}\bigr]_{\phi\phi}\\[10pt] -\operatorname{Tr}&\bigl[G_k\ \partial_t R_{k}\bigr]_{\bar{\psi} \psi}
 +\frac{1}{2}\operatorname{Tr}\bigl[G_k\ \partial_t R_{k}\bigr]_{AA} -\operatorname{Tr}\bigl[G_k\ \partial_t R_{k}\bigr]_{\bar{C}C}\end{aligned}
\label{eqn:matter_flow}
\end{equation}
As before, the minus signs arise due to the fact, that the ghosts and the fermions are Grassmann fields. A digrammatic representation of the flow equation (\ref{eqn:matter_flow}) is depicted in figure (\ref{fig:matter_calc}). \\
For our computation in the background field approximation, we expand the different actions on some background $\bar{g}_{\mu\nu}$ and drop all contributions of $\mathcal{O}(h)$.
\vfill
\subsection{Scalar Fields}
The action for $N_S$ scalar fields, minimally coupled to gravity reads
\begin{align}
	\mathcal{S}_S &= \frac{Z_{S}}{2}\int_x \sqrt{g} \ g^{\mu\nu} \ \sum\limits_{i=1}^{N_{\text{S}}} \partial_{\mu}\phi^{i}\partial_{\nu}\phi^{i} \nonumber \\
&=  \frac{Z_{S}}{2}\int_x \sqrt{\bar{g}} \ \bar{g}^{\mu\nu} \ \sum\limits_{i=1}^{N_{\text{S}}} \partial_{\mu}\phi^{i}\partial_{\nu}\phi^{i} + \mathcal{O}(h) \\
&= \frac{Z_{S}}{2}\int_x \sqrt{\bar{g}} \ \ \sum\limits_{i=1}^{N_{\text{S}}} \phi^{i}\left(-\bar{\nabla}^2\right)\phi^{i} + \mathcal{O}(h). \nonumber
\end{align}
In the last step, we use integration by parts and assume vanishing boundary terms. Since $\mathbf{E} =0$ for scalars, we use the initial definition of the Laplacian $\bar{\Delta} = -\bar{\nabla}^2$ for further calculations. These simple manipulations directly allow us to read off the corresponding two-point function
\begin{align}
	\Gamma^{(2)}_{\phi\phi} = \frac{\delta^2 \mathcal{S}_S}{\delta\phi^{i}\ \delta\phi^{j}} = Z_S \cdot\bar{\Delta}\cdot\mathbbm{1}_S + \mathcal{O}(h),
\end{align}
where $\mathbbm{1}_S$ has to be understood as the identity in field space. Using the regulator defined in (\ref{eqn:Rk_matter}), we find the regularized two-point-function:
\begin{align}
	\Gamma^{(2)}_{k, \phi\phi} = \left[\Gamma^{(2)}_{\phi\phi}+ R_{k, S}\right]  = Z_S \cdot\bar{\Delta}\cdot\mathbbm{1}_S\left(1 + r_k\left(\frac{\bar{\Delta}}{k^2}\right)\right).
\end{align}
This expression is already diagonal in field space, meaning we are directly able to invert it to obtain the propagator. Together with the scale derivative of the regulator
\begin{align}
	\partial_t R_{k, S} = Z_S\cdot\mathbbm{1}_S\cdot\bar{\Delta}\left(\partial_t r_k - \eta_S r_k\right),
\end{align}
we can start to evaluate the r.\,h.\,s. of the flow equation:
\begin{equation}
\begin{aligned}
	\frac{1}{2}\tr{G_{k,\phi\phi}\ \partial_t R_{k,S}} &= \frac{1}{2}\tr{\frac{Z_S\cdot\bar{\Delta}\left(\partial_t r_k - \eta_s r_k\right)}{Z_S \cdot\bar{\Delta}\left(1 + r_k\right)}\mathbbm{1}_S}\\[10pt]
	&=   \frac{N_S}{2}\tr{\frac{\bar{\Delta}\left(\partial_t r_k - \eta_s r_k\right)}{\bar{\Delta}\left(1 + r_k\right)}}.
\end{aligned}
\end{equation}
Here, we already performed the trace operation on the internal indices, leading to an overall factor of $N_S$. The functional trace is again evaluated using heat-kernel techniques. \vfill\newpage
\begin{equation}
\begin{aligned}
	\frac{N_S}{2}\tr{\frac{\bar{\Delta}\left(\partial_t r_k - \eta_s r_k\right)}{\bar{\Delta}\left(1 + r_k\right)}} &= \frac{N_S}{2}\frac{1}{(4\pi^2)}\left[\int_x\sqrt{\bar{g}} \  \Phi_2^1(0) + \frac{1}{6}\int_x\sqrt{\bar{g}} \ \bar{\mathcal{R}}\ \Phi_1^1(0) \right]\\[10pt]
	&= 	\frac{N_S}{2}\frac{1}{(4\pi)^2}\int_x\sqrt{\bar{g}}\left[\left(1-\frac{\eta_S}{6}\right) + \frac{\bar{\mathcal{R}}}{3}\left(1-\frac{\eta_S}{4}\right)\right].
\end{aligned}
\end{equation}
\subsection{Fermionic  Fields}
For the fermionic contribution, we  proceed slightly different. First, we present the action for $N_D$ minimally coupled Dirac fermions:
\begin{equation}
	\begin{aligned}
		\mathcal{S}_D &= iZ_D\int_x \sqrt{g} \ \sum\limits_{i=1}^{N_D}\bar{\psi}^{i}\slashed{\nabla}\psi^{i} \\[10pt]
		&=  iZ_D\int_x \sqrt{\bar{g}} \ \sum\limits_{i=1}^{N_D}\bar{\psi}^{i}\bar{\slashed{\nabla}}\psi^{i} + \mathcal{O}(h).
	\end{aligned}
\end{equation}
The Dirac operator $\slashed{\nabla}$ satisfies $\left(i\slashed{\nabla}\right)^2 = -\nabla^2 + \frac{\mathcal{R}}{4} =: \Delta_{\left(\sfrac{1}{2}\right)}$.
Once again, the notation for the conjugated field $\bar{\psi} = \psi^{\dagger}\mathfrak{h}$\footnote{The spin metric $\mathfrak{h}$ satisfies $\abs{\operatorname{det} \mathfrak{h}} = 1$ and $\mathfrak{h}^{-1} = -\mathfrak{h}$.} should not be confused with the bar referring to the background field. As usual, the slashed notation implies contraction with gamma matrices\footnote{In the discussion of Dirac fermions, the gamma matrices $\left\{\gamma^0, \gamma^1, \gamma^2, \gamma^3\right\}$ are a set of complex valued matrices, that constitute an irreducible representation of the Clifford algebra, defined by the anticommutation relation $\left\{\gamma_{\mu}, \gamma_{\nu}\right\}= 2g_{\mu\nu} \mathbbm{1}_{d_{\gamma}\times d_{\gamma}}$, with $d_{\gamma} = 2^{\left[\sfrac{d}{2}\right]}$. A more formal treatment of fermions in curved spacetimes is presented in \cite{LippoldtPHD}.}, i.\,e. $\slashed{\nabla} = \gamma^{\mu}\nabla_{\mu}$.  \\
In principle, this allows us to read off the fermion two-point function
\begin{align}
	\Gamma^{(2)}_{\bar{\psi}\psi} = \frac{\delta^2 \mathcal{S}_D}{\delta \psi^{i}\ \delta \bar{\psi}^{j}} = Z_D\cdot\left(i\bar{\slashed{\nabla}}\right)\cdot\mathbbm{1}_D + \mathcal{O}(h).
\end{align}
For the regularized two-point-function, we choose the following form:
\begin{equation}
\Gamma^{(2)}_{k, \bar{\psi}\psi} = \left[\Gamma^{(2)}_{\bar{\psi}\psi} + R_{k,D}\right] = Z_D\cdot\mathbbm{1}_D\cdot\left(i\bar{\slashed{\nabla}}\right) \left(1+r_{k,D}\left(\frac{ \bar{\Delta}_{\left(\sfrac{1}{2}\right)}}{k^2}\right)\right). \label{eqn:fermion_propagator}
\end{equation}
This allows to determine the expression for $R_{k, D}$ as the difference between the regularized and the initial two-point function:
\begin{equation}
\begin{aligned}
	R_{k,D} &= \Gamma^{(2)}_{k, \bar{\psi}\psi} - \Gamma^{(2)}_{\bar{\psi}\psi} \\[10pt]
	&= Z_D\cdot\left(i\bar{\slashed{\nabla}}\right)\cdot r_{k,D} \cdot\mathbbm{1}_D. \label{eqn:fermion_regulator}
\end{aligned}
\end{equation}
When computing fermion propagators in other theory settings, it follows quite naturally to consider the Dirac dispersion as the \enquote{square root} of the scalar Klein-Gordon dispersion. For a more detailed discussion of this idea in the context of Fermi-Bose mixtures, we refer to chapter 2 of \cite{PawlowskiNPgaugeLecture}. \\
This assumption allows us to express the shape function for the fermions as a function of the scalar shape function:
\begin{align}
\left(1+r_{k,D}\right)^2 = 1+r_{k,S} \qquad \longrightarrow \qquad r_{k, D} = \sqrt{1+r_{k,S}} - 1
\end{align}
Inserting this relation into the expression for the two-point function (\ref{eqn:fermion_propagator}) and the regulator (\ref{eqn:fermion_regulator}), we arrive at:
\begin{equation}
\begin{aligned}
	\Gamma^{(2)}_{k, \bar{\psi}\psi} &=\sqrt{1+r_{k,S}}\cdot Z_D\cdot\left(i\bar{\slashed{\nabla}}\right)\cdot\mathbbm{1}_D \\[10pt]
	R_{k,D} &= \left(\sqrt{1+r_{k,S}} -1 \right)\cdot Z_D\cdot\left(i\bar{\slashed{\nabla}}\right)\cdot\mathbbm{1}_D.
\end{aligned}
\end{equation}
To invert the Dirac operator $\left(i\slashed{\nabla}\right)$, we use
\begin{equation}
	\left(i\slashed{\nabla}\right)^{-1} =\left(i\slashed{\nabla}\right)^{-1}\cdot\left(\left(i\slashed{\nabla}\right)^{-1}\cdot \ \left(i\slashed{\nabla}\right)\right) = \left(\Delta_{\left(\sfrac{1}{2}\right)}\right)^{-1}\cdot\left(i\slashed{\nabla}\right)
\end{equation}
and therefore the full fermion propagator reads
\begin{equation}
	G_{k, \bar{\psi}\psi} = \frac{\left(i\bar{\slashed{\nabla}}\right)}{Z_D\cdot\bar{\Delta}_{\left(\sfrac{1}{2}\right)}\sqrt{1+r_{k,S}}}\mathbbm{1}_D.
\end{equation}
For the scale derivative of the regulator we find
\begin{equation}
\begin{aligned}
	\partial_tR_{k,D} &=
	Z_D\cdot\mathbbm{1}_D\left(i\bar{\slashed{\nabla}}\right)\left(\partial_t r_{k,D} - \eta_D r_{k,D}\right) \\[10pt]
	&=Z_D\cdot\mathbbm{1}_D\left(i\bar{\slashed{\nabla}}\right)\left(\frac{\partial_t r_{k,S}}{2\sqrt{1+r_{k, S}}} - \eta_D\left(\sqrt{1+r_{k,S}} -1\right)\right)
\end{aligned}
\end{equation}
Since we have to deal with the modified spin-$\frac{1}{2}$ Laplacian $\Delta_{\left(\sfrac{1}{2}\right)}$, we have to be careful with the heat-kernel coefficients once again. Using equation (\ref{eqn:coefficients}), we find:
\begin{equation}
\begin{aligned}
	\operatorname{Tr}\mathbf{b}_0\left(\Delta_{\left(\sfrac{1}{2}\right)}\right) &= 4\\
	\operatorname{Tr}\mathbf{b}_2\left(\Delta_{\left(\sfrac{1}{2}\right)}\right) &= \frac{5}{12}\bar{\mathcal{R}}. \\
	\label{eqn:fermion_coefficients}
\end{aligned}
\end{equation}
Altogether, we can start to evaluate the r.\,h.\,s. of the flow equation:
\begin{equation}
\begin{aligned}
	-\tr{G_{k, \bar{\psi}\psi}\ \partial_t R_{k,D}} &=-\tr{\frac{Z_D\cdot\bar{\Delta}_{\left(\sfrac{1}{2}\right)}\cdot\left(\frac{\partial_t r_{k,S}}{2\sqrt{1+r_{k, S}}} - \eta_D\left(\sqrt{1+r_{k,S}} -1\right)\right)}{Z_D\cdot\bar{\Delta}_{\left(\sfrac{1}{2}\right)}\sqrt{1 + r_{k,S}}}\mathbbm{1}_D} \\[10pt]
	&= -N_D\tr{\frac{k^2\cdot\theta\left(k^2-\bar{\Delta}_{\left(\sfrac{1}{2}\right)}\right)}{\bar{\Delta}_{\left(\sfrac{1}{2}\right)}\left(1+r_{k,S}\right)} + \eta_D\left(\frac{1}{\sqrt{1+r_{k,S}}}-1\right)},
	\end{aligned}
\end{equation}
The Heaviside function $\theta$ enters via the scale derivative of $r_{k,S}$. Since we are working with a different shape function, we won't use the definition of the threshold functions this time. Nevertheless, it is still possible, to solve this functional trace in terms of the heat kernel expansion. For this explicit trace, we solved the integrals occurring in the associated $Q$-functionals analytically. The most important steps of this calculation can be found in appendix \ref{chap:AppB}. The final contribution after solving all four integrals is given by:
\begin{equation}
	-\operatorname{Tr}\left[G_{k, \bar{\psi} \psi} \partial_{t} R_{k, D}\right]\overset{(\mathrm{\ref{eqn:trace_fermions}})}{=} -N_D\frac{1}{(4\pi)^2}\int_x\sqrt{\bar{g}}\left[2\left(1-\frac{\eta_D}{3}\right) + \frac{5}{12}\bar{\Ricci}\left(1-\frac{\eta_D}{2}\right)\right].
\end{equation}
\subsection{Gauge Fields}
\vspace{-0.35cm}

The structure of the gauge field contribution is more complex than for the other fields. This is due to the fact, that we have to employ a gauge fixing procedure w.\,r.\,t. the background field $\bar{g}_{\mu\nu}$. This ensures gauge invariance w.\,r.\,t. background gauge transformations. The action for $N_V$ gauge fields, minimally coupled to gravity reads
\begin{equation}
\begin{aligned}
\mathcal{S}_{V} &= \frac{Z_{\text{V}}}{4}\int_x \sqrt{g} \ \sum\limits_{i=1}^{N_{\text{V}}} g^{\mu\nu}g^{\kappa\lambda}F^{i}_{\mu\kappa}F^{i}_{\nu\lambda}
		+ \frac{Z_{\text{V}}}{2\xi}\int_x \sqrt{\bar{g}} \ \sum\limits_{i=1}^{N_{\text{V}}} \left(\bar{g}^{\mu\nu}\bar{\nabla}_{\mu}A_{\nu}^{i}\right)^2\\
		&+\int_x \sqrt{\bar{g}} \ \sum\limits_{i=1}^{N_{\text{V}}} \bar{C}_i(-\bar{\nabla}^2)C_i,
\end{aligned}
\end{equation}
where the second term is the gauge fixing term with gauge parameter $\xi$ and the third term is the associated ghost term. Since the two-point function is obtained from a functional derivative w.\,r.\,t. the fields $A^{i}$, we have to evaluate the ghost-term separately. We start by manipulating the first term:
\begin{equation}
\begin{aligned}
\frac{Z_V}{4}\int_x \sqrt{g} \ \sum\limits_{i=1}^{N_{\text{V}}} g^{\mu\nu}g^{\kappa\lambda}F^{i}_{\mu\kappa}F^{i}_{\nu\lambda} &\overset{\phantom{(\mathrm{\ref{eqn:FF2}})}}{=}  \frac{Z_{V}}{4} \int_x \sqrt{\bar{g}} \ \sum\limits_{i=1}^{N_{\text{V}}} \bar{g}^{\mu\nu}\bar{g}^{\kappa\lambda}\bar{F}^{i}_{\mu\kappa}\bar{F}^{i}_{\nu\lambda} + \mathcal{O}(h) \\[5pt]
&\overset{(\mathrm{\ref{eqn:FF2}})}{=} \frac{Z_{V}}{2} \int_x \sqrt{\bar{g}} \ \sum\limits_{i=1}^{N_{\text{V}}} A_{\lambda}^{i}\left[ \bar{\nabla}^{\mu}\bar{\nabla}^{\lambda} - \bar{g}^{\mu\lambda}\bar{\nabla}^2\right]A_{\mu}^{i} + \mathcal{O}(h).
\end{aligned}
\end{equation}
\newpage
The steps we skipped can be found in appendix \ref{chap:AppB}. For the gauge fixing term we find:
\begin{equation}
\begin{aligned}
\frac{Z_{\text{V}}}{2\xi}\int_x \sqrt{\bar{g}} \ \sum\limits_{i=1}^{N_{\text{V}}} \left(\bar{g}^{\mu\nu}\bar{\nabla}_{\mu}A_{\nu}^{i}\right)^2
	&= \frac{Z_{\text{V}}}{2\xi}\int_x \sqrt{\bar{g}} \ \sum\limits_{i=1}^{N_{\text{V}}} \bar{g}^{\mu\nu}\bar{\nabla}_{\mu}A_{\nu}^{i}g^{\kappa\lambda}\bar{\nabla}_{\kappa}A_{\lambda}^{i} \\[5pt]
	&= \frac{Z_{\text{V}}}{2\xi}\int_x \sqrt{\bar{g}} \ \sum\limits_{i=1}^{N_{\text{V}}} A_{\lambda}^{i}\left[-\bar{\nabla}^{\lambda}\bar{\nabla}^{\mu}\right]A_{\mu}^{i}.
\end{aligned}
\end{equation}
In the last step, we integrated by parts and assumed vanishing boundary terms.\\
 This allows us to write
\begin{equation}
\mathcal{S}_V = \frac{Z_{V}}{2} \int_x \sqrt{\bar{g}} \ \sum\limits_{i=1}^{N_{\text{V}}} A_{\lambda}^{i}\left[ - \bar{g}^{\mu\lambda}\bar{\nabla}^2 +  \bar{\nabla}^{\mu}\bar{\nabla}^{\lambda} - \frac{1}{\xi} \bar{\nabla}^{\lambda}\bar{\nabla}^{\mu}\right]A_{\mu}^{i} \ + \ \text{ghost term}
\end{equation}
In Feynman gauge, where we set $\xi \equiv 1$, this simplifies to
\begin{equation}
\begin{aligned}
\mathcal{S}_V &\overset{\phantom{(\mathrm{\ref{eqn:RiemannB}})}}{=} \frac{Z_{V}}{2} \int_x \sqrt{\bar{g}} \ \sum\limits_{i=1}^{N_{\text{V}}} A_{\lambda}^{i}\left[ - \bar{g}^{\mu\lambda}\bar{\nabla}^2 +  \left[\bar{\nabla}^{\mu}, \bar{\nabla}^{\lambda}\right]\right]A_{\mu}^{i} \ + \ \text{ghost term} \\
&\overset{(\mathrm{\ref{eqn:RiemannB}})}{=} \frac{Z_{V}}{2} \int_x \sqrt{\bar{g}} \ \sum\limits_{i=1}^{N_{\text{V}}} A_{\lambda}^{i}\left[ - \bar{g}^{\mu\lambda}\bar{\nabla}^2 +  \bar{R}^{\mu\lambda}\right]A_{\mu}^{i} \ + \ \text{ghost term}
\end{aligned}
\end{equation}
In this form, we are again directly able to read off the two-point-function:
\begin{equation}
	\left[\Gamma^{(2)}_{AA}\right]^{\mu\nu} = \left[\frac{\delta^2 \mathcal{S}_V}{\delta A^{i}\ \delta A^{j}}\right]^{\mu\nu} = Z_V\underbrace{\left[ - \bar{g}^{\mu\lambda}\bar{\nabla}^2 +  \bar{R}^{\mu\lambda}\right]}_{=: \  \bar{\Delta}^{\mu\nu}_{(1)}}\mathbbm{1}_V + \mathcal{O}(h),
\end{equation}
where $\bar{\Delta}^{\mu\nu}_{(1)}$ is another modified spin-one Laplacian, but this time with a different sign in front of the Ricci tensor.  With the respective regulator we find
\begin{align}
	\left[\Gamma^{(2)}_{k, AA}\right]^{\mu\nu} = \left[\Gamma^{(2)}_{AA}+ R_{k, V}\right]^{\mu\nu}  = Z_V \cdot\bar{\Delta}_{(1)}^{\mu\nu}\cdot\mathbbm{1}_V\left(1 + r_k\left(\frac{\bar{\Delta}_{(1)}}{k^2}\right)\right)
\end{align}
and
\begin{align}
	\left[\partial_t R_{k, V}\right]^{\mu\nu} = Z_V\cdot\bar{\Delta}_{(1)}^{\mu\nu}\cdot\mathbbm{1}_V\left(\partial_t r_k - \eta_V r_k\right).
\end{align}
In this case, the heat-kernel coefficients for $\bar{\Delta}^{\mu\nu}_{(1)}$ read
\begin{equation}
\begin{aligned}
	\operatorname{Tr}\mathbf{b}_0\left(\bar{\Delta}_{(1)}\right) &= 4 \\
	\operatorname{Tr}\mathbf{b}_2\left(\bar{\Delta}_{(1)}\right) &= -\frac{\bar{\mathcal{R}}}{3} \\
\end{aligned}
\end{equation}\newpage
and therefore, the result for the heat-kernel expansion for the gauge fields is given by:

\begin{align}
	\frac{1}{2}\tr{\frac{Z_V\cdot\bar{\Delta}^{\mu\nu}_{(1)}\left(\partial_t r_k - \eta_Vr_k\right)}{Z_V\cdot\bar{\Delta}^{\mu\nu}_{(1)}(1+r_k)}\mathbbm{1}_V} &= \frac{N_V}{2}\tr{\frac{\bar{\Delta}^{\mu\nu}_{(1)}\left(\partial_t r_k - \eta_Vr_k\right)}{\bar{\Delta}^{\mu\nu}_{(1)}(1+r_k)}}\nonumber \\[10pt]
	&= \frac{N_V}{2}\frac{1}{(4\pi)^2}\left[\int_x\sqrt{\bar{g}}\ \Phi_2^1(0) - \frac{1}{3}\int_x\sqrt{\bar{g}}\  \bar{\mathcal{R}} \  \Phi_1^1(0) \right] \\[10pt]
	&=  \frac{N_V}{2}\frac{1}{(4\pi)^2}\int_x\sqrt{\bar{g}}\left[\left(1-\frac{\eta_V}{6}\right)- \frac{2}{3}\bar{\mathcal{R}}\left(1-\frac{\eta_V}{4}\right)\right]\nonumber
\end{align}

To finish the calculation of the gauge field contribution, we need to take the associated ghost term into account. Fortunately, it has already the desired form, where we can directly read off the two-point function:
\begin{equation}
	\Gamma^{(2)}_{\bar{C}C} = \frac{\delta^2 \mathcal{S}_V}{\delta C^{i}\ \delta \bar{C}^{j}} = \mathbbm{1}_V\cdot\bar{\Delta}.
\end{equation}
Note, that we have the usual Laplacian $\bar{\Delta} = -\bar{\nabla}^2$ as kinetic operator and that no additional wave function renormalization was introduced. The ghost regulator $R_{k, \mathrm{gh}}$ is the same as for the scalar fields and therefore the regularized two-point function reads
\begin{equation}
		\Gamma^{(2)}_{k, \bar{C}C} = \left[\Gamma^{(2)}_{ \bar{C}C}+ R_{k, \mathrm{gh}}\right]  = \bar{\Delta}\cdot\mathbbm{1}_V\left(1 + r_k\left(\frac{\bar{\Delta}}{k^2}\right)\right).
\end{equation}
In absence of a wave function renormalization, the scale derivative only acts on the shape function $r_k$ and  therefore the final contribution is given by
\begin{equation}
\begin{aligned}
	-\tr{\frac{\bar{\Delta}\partial_tr_k}{\bar{\Delta}\left(1+r_k\right)}\mathbbm{1}_V} &= -N_{V}\tr{\frac{\bar{\Delta}\partial_tr_k}{\bar{\Delta}\left(1+r_k\right)}} \\[5pt]
	&= -N_V\frac{1}{(4\pi)^2}\left[\int_x\sqrt{\bar{g}} \ \Phi_2^1(0) + \frac{1}{6}\int_x\sqrt{\bar{g}} \bar{\mathcal{R}} \ \Phi_1^1(0) \right] \\[5pt]
	&= -N_V\frac{1}{(4\pi)^2}\int_x\sqrt{\bar{g}}\left[1 + \frac{1}{3}\bar{\mathcal{R}}\right].
\end{aligned}
\end{equation}
In the next section, we combine the obtained results and present the final expressions for the $\beta$-functions.

\section{Beta-Functions and Perturbative Approximation}
We follow the same strategy as last chapter. Simply by comparing the different orders in curvature occurring on both sides of the flow equation, we are able to read off the $\beta$-function for the cosmological constant. We collect all terms of order $\sim \sqrt{\bar{g}}$ and find:
\begin{equation}
\begin{aligned}
	\partial_t\lambda_k = \left(\eta_h - 2\right)\lambda_k + \frac{g_k}{4\pi}&\left[\left(\frac{5\left(1-\frac{\eta_h}{6}\right)}{1-2\lambda_k}\right) + \left(\frac{5\left(1-\frac{\eta_h}{6}\right)}{1-\frac{4}{3}\lambda_k}\right) - 8\left(1-\frac{\eta_c}{6}\right)\right. \\[10pt]
	\Biggl. &+ N_S\left(1-\frac{\eta_S}{6}\right) - 4N_D\left(1-\frac{\eta_D}{3}\right) - N_V\left(1- \frac{\eta_V}{6}\right)\Biggr].
\end{aligned}
\end{equation}
The expression for the graviton anomalous dimension follows analogously from a comparison of all terms of order $\sim\sqrt{\bar{g}}\bar{\Ricci}$:
\begin{equation}
\begin{aligned}
	\eta_h = \frac{g_k}{\pi}&\left[\frac{2\left(1-\frac{\eta_h}{4}\right)}{1-2\lambda_k} -\frac{10}{3}\frac{1-{\frac{\eta_h}{6}}}{\left(1-2\lambda_k\right)^2}+\frac{1}{6}\frac{1-\frac{\eta_h}{4}}{1-\frac{4}{3}\lambda_k}-\frac{10}{3}\left(1-\frac{\eta_c}{4}\right)\right.\\[10pt]
	 &\left. +\frac{N_S}{6}\left(1-\frac{\eta_S}{4}\right) - \frac{5N_D}{12}\left(1-\frac{\eta_D}{2}\right)-2N_V\left(\frac{1}{3}-\frac{\eta_V}{12}\right)\right].
\end{aligned}
\end{equation}
This allows us also to determine also the $\beta$-function for the Newton coupling using equation (\ref{eqn:beta_gk}) with the new expression for the graviton anomalous dimension:
\begin{equation}
	\begin{aligned}
		\partial_tg_k = 2g_k +\frac{g_k^2}{\pi}&\left[\frac{2\left(1-\frac{\eta_h}{4}\right)}{1-2\lambda_k} -\frac{10}{3}\frac{1-{\frac{\eta_h}{6}}}{\left(1-2\lambda_k\right)^2}+\frac{1}{6}\frac{1-\frac{\eta_h}{4}}{1-\frac{4}{3}\lambda_k}-\frac{10}{3}\left(1-\frac{\eta_c}{4}\right)\right.\\[10pt]
	 &\left. +\frac{N_S}{6}\left(1-\frac{\eta_S}{4}\right) - \frac{5N_D}{12}\left(1-\frac{\eta_D}{2}\right)-2N_V\left(\frac{1}{3}-\frac{\eta_V}{12}\right)\right].
	\end{aligned}
\end{equation}
To get a rough idea on how the different matter fields contribute to the RG flow, we want to perform a perturbative approximation, i.\,e. we neglect all contributions from the different anomalous dimensions and expand our $\beta$-functions up to second order in the couplings. This yields:
\begin{equation}
\begin{aligned}
	\partial_tg_k &\simeq 2g_k + \frac{g_k^2}{6\pi}\left(N_S - \frac{5}{2}N_D - 4N_V-27\right) \\[10pt]
	\partial_t\lambda_k &\simeq -2\lambda_k +\frac{g_k}{4\pi}\bigl(N_S-4N_D-N_V+2\bigr) + \frac{g_k\lambda_k}{6\pi}\left(N_S-\frac{5}{2}N_D - 4N_V  -27 \right)
\end{aligned}
\end{equation}
 The integer numbers $-27$ and $+2$ represent the contributions from the gravitons and the Faddeev-Popov ghosts. In this approximation, the $\beta$-functions attain a non-trivial zero, corresponding to the Non-Gaussian fixed point we are interested in. \\
 We find the following fixed point values:
 \begin{equation}
 	\begin{aligned}
 		g_k^{*} &= \frac{-12\pi}{N_S - \frac{5}{2}N_D - 4N_V-27} \\[10pt]
 		\lambda_k^{*} &= -\frac{3}{4}\frac{N_S - 4N_D-N_V+2}{N_S - \frac{5}{2}N_D-4N_V-27}.
 	\end{aligned}
 \end{equation}
 In the following we present some plots to visualize the effects on the fixed point values when a single matter species is increased while the other numbers are fixed to zero. \\
The plots, depicted in figure (\ref{fig:matter_plots}) on the next page, indicate, that the scalar fields tend to destabilize the system, after a certain amount is surpassed. The values for both couplings increase drastically and will probably diverge. The fermionic and the gauge fields seem to be compatible with the theory, since they tend to decrease the values of both couplings. The value for $\lambda^{*}$ is nearly constant over almost the whole depicted range for the gauge fields.
 \begin{figure}[t]
 	\centering
 	\vfill
 	\includegraphics[width=0.7\textwidth]{figs/Plots/FP_scalars}
 	\vfill
 	\includegraphics[width=0.7\textwidth]{figs/Plots/FP_fermions}
 	\vfill
 	\includegraphics[width=0.7\textwidth]{figs/Plots/FP_gauge}
 	\vfill
 	\caption{Fixed point values for increasing number of matter fields. Initially the matter content is set to zero, meaning we are only considering the respective matter type in each plot.}
 	\label{fig:matter_plots}
 \end{figure}


\documentclass{beamer}
\usetheme{metropolis}

\usepackage{xcolor}
\usepackage{graphicx}
\usepackage{tcolorbox}
\usepackage{listings}
\usepackage{booktabs}
\usepackage{array}
\usepackage{tabularx}
\usepackage{lmodern}
\usefonttheme[onlymath]{serif}

\begin{document}
\newcommand{\tabitem}{~~\llap{\textbullet}~~}

\definecolor{codegreen}{rgb}{0,0.6,0}
\definecolor{codegray}{rgb}{0.5,0.5,0.5}
\definecolor{codepurple}{rgb}{0.58,0,0.82}
\definecolor{backcolour}{rgb}{0.95,0.95,0.92}

\lstset{
	language=C++,
	basicstyle=\scriptsize\ttfamily,
	keywordstyle=\color{magenta},
	stringstyle=\color{codepurple},
	numbers=left,
	numbersep=5pt,
	numberstyle=\tiny\color{codegray},
	backgroundcolor=\color{backcolour},
	showstringspaces=false,
	tabsize=4
}

\title{Asymptotic Analysis}
\subtitle{Think Big}
\author{UTEC - Competitive Programming}
\date{}

\maketitle

\begin{frame}
	\frametitle{Complexity}

	\begin{itemize}
		\item When describing the performance of an algorithm, the word complexity is commonly used.
		\item Complexity can be considered as the amount of resources my algorithm will consume:
			\begin{itemize}
				\item \textbf{Time Complexity:} How long will my program take to run for a given input.
				\item \textbf{Space Complexity:} How much memory will my program consume for a given input.
			\end{itemize}
		\item In many cases there exists a trade-off between space and time complexity. More memory = Less time
	\end{itemize}
\end{frame}

\begin{frame}
	\frametitle{Challenge}

	Lets find a solution for the following problem:
	\begin{center}
		Given an array $a$ with $n$ elements, find the smallest one. $n \leq 10^6$
	\end{center}

	\begin{itemize}
		\item<2-> How long will your solution take if $n = 10^3, 10^5, 10^6$
		\item<3-> How many solutions there are to this problem?
		\item<4-> Is this solution the best solution?
		\item<5-> How can we compare solutions?
	\end{itemize}
\end{frame}

\section{Measuring Complexity}

\begin{frame}
	\frametitle{Sampling and Extrapolation}

	\begin{itemize}
		\item One first approach to measuring complexity can be to manually measure how long our solution takes to run for different inputs.
		\item We can then try to extrapolate our measurments and attempt to predict the time our program will take for other inputs.
		\item Let's try it out!
	\end{itemize}
\end{frame}

\begin{frame}
	\frametitle{Sampling and Extrapolation - Problems}

	\begin{itemize}
		\item Easy to miss \textbf{corner cases}.
		\item Takes a lot of time.
		\item Requires a lot of guessing.
		\item Sometimes it is really hard to generate input.
	\end{itemize}
\end{frame}

\begin{frame}
	\frametitle{Changing Perspective}

	\begin{itemize}
		\item Lets define the function $T(x)$ as the time our algorithm takes to run for an input $x$.
		\item Lets also define $N(x)$, as the number of instructions our algorithm takes for an input $x$.
		\item It is simple to see that $T(x) \alpha N(x)$
	\end{itemize}
\end{frame}

\begin{frame}
	\frametitle{Changing Perspective}

	\begin{itemize}
		\item Overall, we can say that:
			$$T(x) = kN(x)$$
		\item What would $k$ represent in this equation?
		\item $k_{C++} \approx 10^8$, $k_{py} \approx 10^6$
		\item Counting the number of steps is esay! ... \textit{usually}
	\end{itemize}
\end{frame}

\begin{frame}
	\frametitle{Counting instructions}

	\begin{itemize}
		\item The goal is to count how many basic instructions are executed during an algorithm.
		\item Assume that basic instructions are those that can be executed natively by the computer:
			\begin{itemize}
				\item addition, subtraction, multiplication, division, remainder
				\item modifying and calling variables
				\item calling functions
				\item etc...
			\end{itemize}
		\item We assume that all instructions take the same time.
		\item Find $N(n)$ for the following solutions
	\end{itemize}
\end{frame}

\begin{frame}[fragile]
	\frametitle{Counting instructions - Practice}
	\lstinputlisting{listings/min1.cpp}
\end{frame}

\begin{frame}[fragile]
	\frametitle{Counting instructions - Practice}
	\lstinputlisting{listings/min2.cpp}
\end{frame}

\section{Asymptotic Analysis}

\begin{frame}
	\frametitle{Asymptotic Analysis - Introduction}

	\begin{itemize}
		\item It is a method for defining the mathemathical boundry of the run-time performance of an algorithm.
		\item Using asymptotic analysis we look to find:
			\begin{itemize}
				\item Lower Bound - $\Omega(f(n))$ Big Omega Notation
				\item Tight Bound - $\Theta(f(n))$ Big Theta Notation
				\item \textbf{Upper Bound - $O(f(n))$ Big Oh Notation}
			\end{itemize}
		\item In competitive programming we only care about $O(n)$. \textbf{Why?}
	\end{itemize}
\end{frame}

\begin{frame}
	\frametitle{Big Oh - A Formal Introduction}

	\begin{itemize}
		\item $O(f(n))$ is a set that contains all functions that are asymptotically smaller than $f(n)$.
		\item Formally:
			$$f(n) = O(g(n)) \rightarrow f(n) < kg(n)$$
			For $n > n_0$, $n_0 \in \mathbb{N}$ and $ k > 0$
	\end{itemize}

	\begin{center}
		\includegraphics[scale=0.25]{images/big-oh}
	\end{center}
\end{frame}

\begin{frame}
	\frametitle{Big Oh - In Practice}

	\begin{itemize}
		\item In general lets say we can estimate that our program has a time complexity of:
			$$T(n) = a_mn^m a_{m - 1}n^{m - 1} + \ldots + a_1n + a_0$$
		\item It is simple to see that as $n$ gets bigger, $T(n)$ will be more heavily dominated by its largest term.
		\item Therefore,$T(n) \approx n^m$, for sufficiently large $n$.
		\item We can also realize that $T(n) = O(n^m)$. \textbf{Why?}
		\item Now that we know we only care about the largest term calculating $T(n)$ should be much faster!
	\end{itemize}
\end{frame}

\begin{frame}
	\frametitle{Using Asymptotic Analysis}

	In general, from the constrains of a problem we can get the expected complexity our solution should have. For example:

	\begin{table}[]
		\bgroup
		\setlength\tabcolsep{10pt}.
		\begin{tabular}{l|c}
			\multicolumn{1}{c|}{\textbf{Input Size}} & \multicolumn{1}{c}{\textbf{Maximum Valid Complexity}} \\ \hline
			$n \leq 10$ & $O(n!)$ \\
			$n \leq 20$ & $O(2^n)$ \\
			$n \leq 500$ & $O(n^3)$ \\
			$n \leq 5000$ & $O(n^2)$ \\
			$n \leq 10^6$ & $O(nlgn)$ \\
			$n \leq 10^7$ & $O(n)$ \\
			$n > 10^7$ & $O(1)$ or $O(lgn)$
		\end{tabular}
		\egroup
	\end{table}
\end{frame}

\end{document}


\section{Introduction} \label{sec:introduction}

The focus of this report is to discuss some commonly used supervised learning techniques. \newline \newline
We start with introducing the linear regression model. It is a model that predicts a response given an input vector and introduces a learnable parameter that is linear with respect to the input variable. Even though it is called linear, it can be used to model nonlinear functions. A combination of fixed nonlinear functions of input variables serves as a basis function to extend the linear regression capability. We use linear regression to fit 2D polynomials to the noisy Franke function. To obtain optimal model parameters, we use two common techniques. In the first technique the optimal parameters are obtained by minimizing the mean-squared error for which we have an analytic expression. This can be computationally costly since it involves calculating the matrix inverse. The second approach, commonly used for large data sets, uses stochastic gradient descent. We also explore both methods using shrinkage methods with L1 and L2 regularization. In addition, we use two resampling techniques, bootstrap resampling and cross-validation, to improve the reliability of the model performance statistics. Ultimately, we aim to obtain a statistical model that can map a new input variable to a response with acceptable accuracy. \newline \newline
Another type of supervised learning is classification. Here, we explore logistic regression and support vector machines. We use the Wisconsin breast cancer data. The optimization or training uses stochastic gradient descent with mini-batches for logistic regression. The classification models were trained on the cancer data using various hyperparameters such as minibatch size, number of epochs, and learning rate. For classification of the continuous-valued output, logistic regression uses a decision boundary. In the case of SVM classification, we utilize the built-in functionality of scikit. \newline \newline
For each type of supervised learning in the following section, we start with a theoretical discussion, followed by results and a discussion of them. \newline \newline
The code can be found in the \href{https://github.com/am-kaiser/CompSci-Project-1}{GitHub repository}.