\chapter{Holographic Wilson loops}

As discussed in chapter \ref{ch:WilsonLoops}, Wilson loops are important gauge invariant observables
that can play the role of order parameters of the different phases of the gauge theory.
% Being non-local, there are also natural suggestions for their holographic dual.
Let us describe the basic idea that lead to find the holographic dual of Wilson loops,
in the context of AdS/CFT correspondence. We then summarize the results obtained for the Pilch-Warner supergravity.

\section{In the $AdS_5 \times S^5$ background}

\subsection{Fundamental representation}
In the fundamental representation, the (Maldacena-)Wilson loop \eqref{maldacenaWL}
describes the phase of a trajectory of an external quark.
A way to introduce the massive quark is to consider $\mathcal{N}=4$ SYM theory with all the fields in the adjoint representation
of $U(N+1)$ instead.
Then, we break spontaneously the gauge group $U(N+1) \rightarrow U(N) \times U(1)$.
In this way, the off-diagonal states of the scalars that were in the adjoint of $U(N+1)$
become fundamental quarks and anti-quarks in $U(N)$,
which are massive due to the Higgs mechanism.
This is a useful picture because, in string theory,
it is equivalent to separating one D-brane from the original stack of $N+1$ coincident D3-branes.
This produces excited open strings that stretch along the stack and the individual brane,
with the mass proportional to the separation distance.
Since we consider probe quarks (non-dynamical), the brane must be infinitely far away from the stack.
The stretched strings not only source the gauge fields, but by pulling the $N$ branes,
they cause deformation on the branes that are described by the scalar fields in \eqref{maldacenaWL}.
The details of the derivation can be found in the appendix of \cite{Drukker:1999zq}.

Now, let us consider the dual gravitational picture.
The stack gravitates and the near-horizon geometry is $AdS_5 \times S^5$.
Then the position of the single D-brane lays on the conformal boundary of $AdS_5$, i.e. $z\rightarrow 0$,
and sits at a point on $S^5$.
The probe particle moves on the single D-brane.
The Wilson loop operator is then dual to the partition function of fundamental strings in $AdS_5 \times S^5$
whose worldsheets end on the same curve $C$ that defines the Wilson loop at the boundary, \cite{Maldacena:1998im}:
\begin{equation}
 W(C) = \int_{C=\partial \Sigma} DX e^{-S_\text{string}[X]}.
\end{equation}

\begin{figure}[t]
\begin{center}
\includegraphics[width=11cm]{Images/WLcircle.pdf}
\end{center}
\caption{\label{fig:WLcircle} Circular Wilson loop as the minimal worldsheet area $\Sigma$ drawn by string ending in the contour $C$ at the boundary of $AdS_5$. }
\end{figure}

In the 't Hooft limit, which corresponds to classical supergravity limit,
minimizing the bosonic string action is sufficient for the leading order, which is essentially the minimal worldsheet area.
% \begin{equation}
%   W(C) \sim e^{-\sqrt{\lambda} A}.
% \end{equation}
Nevertheless, the area is infinite in $AdS$, hence we must regularize it.
For example, the minimal surface that is dual to the circular Wilson loop in the fundamental representation
is parametrized as
\begin{equation}
 z(r)=\sqrt{R^2-r^2}, \quad r\in[0, R], \quad \phi\in[0, 2\pi].
\end{equation}
This result can be obtained either by minimizing the string Nambu-Goto action \cite{Drukker:1999zq},
% \begin{equation}
%  S_\text{NG} = \dfrac{\sqrt{\lambda}}{2\pi} \int d^2 \sigma e^{\Phi/2} \sqrt{\text{det}}
% \end{equation}
or by exploiting the conformal symmetry, i.e.
mapping the special conformal transformation of the straight line solution \cite{Berenstein:1998ij}.
The induced worldsheet metric, that is the pullback of the background metric $g$ \eqref{metricAdS} in polar coordinates for some $x^i$,
is:
\begin{equation}
 ds^2 = \dfrac{L^2}{z^2}\left((1+z'^2) dr^2 + r^2 d\phi^2 \right).
\end{equation}
Then the on-shell (Nambu-Goto) action gives:
\begin{eqnarray}
 S &=& T_\text{F1} \int \sqrt{\text{det} P[g]}\\
   &=& \dfrac{\sqrt{\lambda}}{2\pi} \int_0^{2\pi} d\phi \int_{0}^{\sqrt{R^2-\epsilon^2}} dr \dfrac{r}{z^2} \sqrt{1+z'^2}\\
   &=& \sqrt{\lambda} \left(\dfrac{R}{\epsilon}-1 \right). \label{minimalAction}
\end{eqnarray}
The correct prescription to regularize the action is to set the boundary cut-off at $z=\epsilon$,
then, we remove the perimeter divergence \cite{Drukker:1999zq}.
This regularization scheme will be used for other cases of Wilson loop dual computations.
The finite remnant in \eqref{minimalAction} matches with the leading order field theory result \eqref{W1holographic}, i.e.
\begin{equation}
 W_1 = e^{\sqrt{\lambda}},
 \quad (N\rightarrow \infty \quad \text{and} \quad \lambda \rightarrow \infty).
\end{equation}

In order to compute the subleading correction
% $\sqrt{2/\pi}\:\lambda^{-3/4}$
in \eqref{W1holographic},
the fermionic contribution must be taken into account.
The full string action to use would be the Green-Schwarz action.
Although it is not fully known in curved background,
its quadratic order is known \cite{Cvetic:1999zs}, which suffices for 1-loop corrections.
Its quartic order was also derived in \cite{Wulff:2013kga}.
Many efforts have been put into finding the subleading correction
\cite{Kruczenski:2008zk, Kristjansen:2012nz, Bergamin:2015vxa, Forini:2015bgo, Faraggi:2016ekd, Forini:2017whz}
but no full matching has been achieved.
The ambiguity in the path integral measure hindered this computation.
% A way to evade it was to use the ratio of Wilson loops, and then the matching was proved for the ratio when expanding for small angles \cite{Forini:2017whz}.

\subsection{Higher rank representations}

The lesson from the fundamental Wilson loop suggests that
the string dual of rank-$k$ representations must be an object that carries $k$ units of the string charge.
Intuitively, if we consider a Wilson loop wrapped $k$ times around the contour (the $k$-fundamental representation),
we would expect the worldsheet to puff up, due to repulsive charges from multiple coincident fundamental strings.
We see that the individual string action is no longer useful in this case.
Instead, we can describe the new object in terms of D-branes with fundamental string charges dissolve in it.
% The charges are the source of a worldvolume electric field in the DBI action (ref).
The worldvolume must also pinch off at the boundary of $AdS_5$,
ending along the curve defined by the Wilson loop, see figure \ref{fig:WLcircle}.
Supersymmetry will then guide us which D-brane configurations are allowed.

\begin{figure}[t]
\begin{center}
\includegraphics[width=11cm]{Images/DbraneWL.pdf}
\end{center}
\caption{\label{fig:DbraneWL} Circular Wilson loop of rank $k$ as a D-brane with $k$ string charges dissolved in it and the worldvolume ends in the contour $C$ at the boundary of $AdS_5$. }
\end{figure}

More generally, \cite{Gomis:2006sb} related supersymmetric Wilson loops of any representation of the gauge group
to a stack of bulk D3-branes or a stack of bulk D5-branes, see figure \ref{fig:YoungTable}.
They proved the correspondence by explicitly integrating out the physics on the D-branes,
which results to a half-BPS Wilson loop insertion in the desired representation in the $\mathcal{N}=4$ SYM path integral.

\begin{figure}[t]
\begin{center}
\includegraphics[width=7cm]{Images/YoungTable.png}
\end{center}
\caption{\label{fig:YoungTable} A generic Young table, taken from \cite{Gomis:2006sb}.
Row $i$ corresponds to a D3-brane with $n_i$ fundamental string charge dissolved in it.
Column $j$ corresponds to a D5-brane with $m_j$ fundamental string charge dissolved in it.
Thus, for symmetric (one row) and antisymmetric (one column) representations,
their rank $k$ corresponds to the string charges a D3-brane and a D5-brane contains.}
\end{figure}

Let us focus on a single D3-brane and a single D5-brane.
Consider first the line element for $AdS_5\times S^5$ is this convenient form:
\begin{equation}
    ds^2 = L^2 \left( du^2 + \cosh^2 u \,d\check{\Omega}^2  + \sinh^2 u \, d\Omega_2^2
  + d\theta^2 + \sin^2 \theta \, d\Omega_4^2 \right),
\end{equation}
where $u\geq 0$, and $\pi \geq \theta \geq 0 $.
$d\check{\Omega}_n^2$ and $d\Omega_n^2$ indicate the line element for $AdS_n$ and $S^n$, respectively.
% and we use global coordinates to parametrize $AdS_2$ line element:
% \begin{equation}
%  d\check{\Omega}^2 =d\chi^2+\sinh^2\chi d\varphi^2, \quad \chi\geq 0, \quad 2 \pi \geq \varphi \geq 0.
% \end{equation}
Using the supersymmetry condition\footnote{
May be up to a sign depending on the conventions.}
\begin{equation}\label{susyCondition}
 \Gamma \epsilon =  \epsilon,
\end{equation}
where $\Gamma$ is the kappa symmetry\footnote{
It is a fermionic local gauge symmetry that is present also in particles and strings.
Its full definition can be found in Paper III.}
projector for the D-brane and $\epsilon$ is the Killing spinor of the background geometry,
we can find the D-brane embeddings that preserve half of the original supersymmetries.
Note that the supersymmetry condition, which gives first order differential equations,
imply the D-brane equations of motions, which are of second order, up to some integration constants.
The list below shows the half-BPS D-brane embeddings with their worldvolume geometries
induced from the target space, and the worldvolume gauge fields $F$ \cite{Yamaguchi:2006tq}:
\begin{eqnarray}
 \text{D3-brane:} &\quad& AdS_2 \times S^2, \quad u=\text{constant}, \quad \theta = 0 \\
		  &\quad& \dfrac{1}{T_{F1}}F = L^2\sqrt{1+\kappa^2} e^0 e^1, \quad \kappa \equiv \sinh u \\
 \text{D5-brane:} &\quad& AdS_2 \times S^4, \quad u=0, \quad \theta = \text{constant} \\
 		  &\quad& \dfrac{1}{T_{F1}}F = L^2 \cos \theta e^0 e^1
\end{eqnarray}
where $e^0$ and $e^1$ are the vielbeins\footnote{
Vielbeins are defined by $ds^2=\eta_{mn} e^m e^n$, which is often referred as the \emph{local frame}.
In terms of components: $e^m=e^m_M dx^M$, thus, we can relate them to the metric as $g_{MN} = \eta_{mn} e^m_M e^n_M$.}
of $d\check{\Omega}^2$.
We see that the D3-brane sits on a fixed point on the $S^5$,
while the D5-brane sits on $S^4$ that is $\theta$ angle away from the pole of $S^5$, see figure \ref{fig:S5}.

\begin{figure}[t]
\begin{center}
\includegraphics[width=4cm]{Images/S5.png}
\end{center}
\caption{\label{fig:S5} $S^4$ that is $\theta$ angle away from the pole of $S^5$.
The angle depends on the amount of string charges $k$ that D5-brane contains.}
\end{figure}

The dual counterparts of the symmetric/antisymmetric representation in the leading order 't Hooft limit
are the on-shell action DBI \eqref{DBI} + WZ \eqref{WZ} of the D3-brane/D5-brane configuration aforementioned:
\begin{equation}\label{WLDbrane}
 \log W^{+}_k = - S_{D3}, \quad \log W^{-}_k = - S_{D5}.
\end{equation}
Moreover, we must ensure the string charge $k$ constraint, which can be added as a Lagrange multiplier term to the D-brane action:
\begin{equation} \label{stringChargeConstraint}
S_k = - k  \int_\Sigma F
\quad \Rightarrow \quad
k = \dfrac{1}{T_{F1}} \dfrac{\delta S_\text{DBI}}{\delta F} .
\end{equation}
The couplings in terms of $\lambda$ and $N$ are:
\begin{equation}
 T_\text{F1} = \dfrac{\sqrt{\lambda}}{2\pi L^2},
 \quad
%  T_\text{D1} = \dfrac{2N}{\sqrt{\lambda}},
%  \quad
 T_\text{D3} = \dfrac{N}{2\pi^2 L^4},
 \quad
 T_\text{D5} = \dfrac{N\sqrt{\lambda}}{8\pi^4 L^6},
\end{equation}
which are derived from \eqref{couplingsTension} using \eqref{couplings}.

Finally, the regularized actions are \cite{Drukker:2005kx, Yamaguchi:2006tq, Zarembo:2016bbk}:
\begin{eqnarray}
 S_\text{D3} &=& - 2 N  (\kappa\sqrt{1+\kappa^2}+\mathop{\mathrm{arcsinh}}\kappa)\\
 S_\text{D5} &=& - N \frac{2\sqrt{\lambda }}{3\pi}\,\sin^3\theta,
\end{eqnarray}
with the $\theta$ satisfying the string charge constraint \eqref{stringChargeConstraint} that gives \eqref{eqThetaAntisym}, i.e.
\begin{equation}
 \theta -\frac{1}{2}\,\sin 2\theta =\pi \frac{k}{N}.
\end{equation}
Thus the latitude angle $\theta$ depends on the amount of string charges $k$ dissolved in the D5-brane.
In conclusion, there is an exact agreement with \eqref{solW+} and \eqref{solW-}, according to \eqref{WLDbrane}.

\section{In Pilch-Warner background}

In $\mathcal{N}=2^*$ SYM on $S^4$, we took the decompactification limit for circular Wilson loops in order to have results on $\mathbb{R}^4$.
This means that in the Pilch-Warner background, the contour is a straight line of length $l\rightarrow \infty$.

\subsection{Fundamental representation}
The minimal surface of a straight Wilson line is a wall,
with the worldsheet coordinates $(\tau, \sigma)$ induced from the Pilch-Warner geometry in the following way:
\begin{equation}
 \tau = x^1, \quad \sigma = c.
\end{equation}
The regularized on-shell action was computed in \cite{Buchel:2013id},
which agrees with the leading order result in \eqref{WLFundN2}, that is:
\begin{equation}\label{W1leading}
 \log W_1 = \sqrt{\lambda} M \frac{l}{2\pi }, \quad (l\rightarrow \infty).
\end{equation}

The goal of Paper V was to compute the loop corrections to the minimal surface
by using string perturbation around the above classical solution.
There are two contributions, which turned out to be of equal weight in our case.
The first one comes from the dilaton coupling to the worldsheet curvature called the Fradkin-Tseytlin term \cite{Fradkin:1983xs}:
\begin{equation}
 S_{FT}=\dfrac{1}{4\pi} \int d^2\sigma \sqrt{h}  R^{(2)} \Phi,
\end{equation}
which is actually a bit controversial,
with some authors arguing it is not needed \cite{GRISARU1988625, GRISARU1985116, Cvetic:1999zs}.
Besides, it is zero for the familiar $AdS_5 \times S^5$ background due to a vanishing dilaton.
% explicitly break the conformal invariance of the classical world-sheet action
The other one comes from 1-loop stringy corrections,
which are computed by expanding the Green-Schwarz action up to quadratic fluctuations \cite{Cvetic:1999zs}.
These contribute as functional determinants, from generalizing the Gaussian integration formula \eqref{GaussianIntegral} for the bosons,
and the Grassmann integration for the fermions \eqref{GrassmannIntegral}.
Thus the semiclassical partition function is schematically of the form
\begin{equation}
 W = e^{-S_\text{cl}-S_\text{FT}} \dfrac{\text{det} F}{\sqrt{\text{det} B}},
\end{equation}
where $S_\text{cl}$ is the classical on-shell action in \eqref{W1leading},
$B$ and $F$ here just represent the bosonic and fermionic operators.
% of Schroedinger type (second order differential operator),
% of Dirac type ($2\times2$ first order differential operator).

Supersymmetry simplifies our problem by cancelling exactly
the sector of bosonic and fermionic operators that are asymptotically massless (far away from the boundary $\sigma=1$).
The remaining sector is asymptotically massive, and the operators (after several manipulations) look enticingly similar:
\begin{equation}\label{basicDirac}
 H_B=\begin{pmatrix}
  1+\frac{A}{\sigma }  & \mathcal{L} \\
  \mathcal{L}^\dagger  & -1 \\
 \end{pmatrix},\qquad
  H_F=\begin{pmatrix}
  -1                   & \mathcal{L} \\
  \mathcal{L}^\dagger  & 1+\frac{A}{\sigma }  \\
 \end{pmatrix},
\end{equation}
with
\begin{eqnarray}\label{EuclideanLs}
 \mathcal{L}&=&A\sqrt{\sigma ^2-1}\,\partial _\sigma +\frac{A\left(2\sigma ^2+1\right)}{2\sigma \sqrt{\sigma ^2-1}} ,
\nonumber \\
 \mathcal{L}^\dagger &=&-A\sqrt{\sigma ^2-1}\,\partial _\sigma
-\frac{A\left(4\sigma ^2-1\right)}{2\sigma \sqrt{\sigma ^2-1}}
+\frac{2}{\sqrt{\sigma ^2-1}}\,.
\end{eqnarray}
The final semiclassical partition function to compute is then:
\begin{equation}\label{semiclassicalW}
  W = e^{-S_\text{cl}-S_\text{FT}}\dfrac{\text{det}^2 (\partial_\tau-H_F)}{\text{det}^2 (\partial_\tau-H_B)},
\end{equation}

Instead of using the heat kernel technique or the Gelfand-Yaglom method,
both commonly used in the computation of functional determinants,
we used the phase-shift method from quantum mechanical scattering problems, see e.g. \cite{PhysRevD.10.4130}.
The method requires the operators to be asymptotically free, hence it works for (semi-)infinite intervals.
Our operators \eqref{basicDirac} share the same asymptotics in large $\sigma$, and they are defined in a semi-infinite interval $\sigma>1$,
so the method applies. Note that for $\tau$ variable, we do a usual Fourier transformation.
The exponential of the ratio of the determinants of the operators in \eqref{semiclassicalW}
can be written in terms of the phase-shift $\delta(p)$ between the wave function and the asymptotic plane wave,
see figure \ref{fig:potentialWavesPlot},
which is
\begin{equation}\label{deltaphases}
 -2 \, \int_{0}^{\infty }\frac{dp}{2\pi }\,\,
 \frac{4 p }{9\sqrt{\frac{4}{9}\,p^2+1}}\,\left(
 \delta_F ^+(p)
 +
\delta_F ^-(p)
-\delta_B ^+(p)
 -
\delta_B^-(p)
\right) = -\dfrac{1}{4},
\end{equation}
where $\pm$ distinguish the two eigenvectors (particles and holes) of the Dirac Hamiltonians \eqref{basicDirac}.
The last equality is backed by our numerics.
Thus, together with the Fradkin-Tseytlin contribution, the total correction is $-1/2$.
In conclusion, we do have a perfect matching with the field theory result \eqref{WLFundN2}.
% up to the subleading order in strong coupling expansion.
Moreover, the existence of Fradkin-Tseytlin term is necessary for this agreement.

\begin{figure}[t]
\begin{center}
\includegraphics[width=0.7\textwidth]{Images/potentialWavesPlotBlack.pdf}
\end{center}
\caption{\label{fig:potentialWavesPlot} Phase-shift $\delta(p)$ of the wave function
in the presence of a typical potential wall that many of our operators show, versus the free wave,
for certain momentum $p$.
}
\end{figure}

\subsection{Symmetric representation}
As for higher rank Wilson loops, Paper III found the D3-brane embedding dual to
the straight Wilson line of length $l$ in symmetric representation, with the help of the supersymmetric condition \eqref{susyCondition}.
The worldvolume metric is induced from the deformed $AdS$ part of \eqref{metricPW} in string frame\footnote{
We changed to mostly minus signature in order to follow Paper III.
The string metric $g$ and the Einstein metric $G$ are related by $g=e^{-\frac{4 \Phi }{D-2}} G$,
where $\Phi$ is the dilaton.
}:
\begin{equation}
 ds^2 = \dfrac{A M^2 L^2}{c^2-1}\left(dx^2  - \rho(c)^2 d\Omega_2^2 \right)
	-L^2\left(\dfrac{1}{A \left(c^2-1\right)^2} + \dfrac{A M^2 \rho'(c)^2}{c^2-1} \right) dc^2,
\end{equation}
where
\begin{equation}
 \rho(c)= \kappa \, \sqrt{c^2-1},
\end{equation}
since the deformed sphere shrinks to $\theta=\pi/2$ and $\phi=0$.
The worldvolume gauge field is given by
\begin{equation}
 \frac{1} {T_\text{F1}} F (c)  = -\dfrac{M L^2}{(c^2-1)^{3/2}} dx\wedge dc.
\end{equation}
As expected, it also reduces to the analogous case in $AdS_5 \times S^5$ close to the boundary.

The regularized on-shell action reduces to
\begin{equation}
 S_{D3} = - \sqrt{\lambda} k M \dfrac{l}{2\pi}.
%  , \quad (l \rightarrow \infty).
\end{equation}
This agrees with the matrix model result \eqref{WsymPW} according to \eqref{WLDbrane}, only in the low rank limit
\begin{equation}
 \kappa \ll M l.
\end{equation}
Furthermore, for $k=1$, we recover the fundamental case \eqref{W1leading}.
We can conclude that this D3-brane configuration cannot probe the entire matrix model region,
and a full dual object is still to be understood.

For the antisymmetric case, it is technically challenging to find the D5-brane solution.
So far, we have not succeeded.
We do expect it though to match the leading order field theory result,
because the matrix model result \eqref{WantisymPW} is proportional to $Ml$, the same as in the D-brane action.
It would be definitely interesting to compute the subleading order to determine the phase-transitions observed.


\section{Measure and Integration}
\subsection{Measure Spaces}
  \paragraph{1.}
  \begin{proof}
    Put $B_1=A_1$ and $B_n=A_n\setminus A_{n-1}$ for $n\ge 2$. $(B_n)$ is a
    sequence of disjoint measurable sets. By the
    countable additivity of $\mu$,
    \[
      \mu\left(\bigcup_{k=1}^\infty B_k\right)=
      \sum_{k=1}^\infty\mu(B_k)=
      \lim_{n\to\infty}\sum_{k=1}^n\mu(B_k)=
      \lim_{n\to\infty}\mu\left(\bigcup_{k=1}^n B_k\right).
    \]
    Since $\bigcup_{k=1}^n B_k=\bigcup_{k=1}^n A_k$ for $k=1,\dots,n,\dots,
    \infty$, this implies $\mu(\bigcup A_k)=\lim\mu(\bigcup_{k=1}^n A_k)$.
  \end{proof}

  \paragraph{3.}
  \begin{proof}
    $\,$\par
    (a) First,
    \[
      0=\mu(E_1\bigtriangleup E_2)=\mu(E_1\setminus E_2\cup E_2\setminus E_1)=
      \mu(E_1\setminus E_2)+\mu(E_2\setminus E_1).
    \]
    Together with the nonnegativity of $\mu$, we conclude that $\mu(E_1
    \setminus E_2)=\mu(E_2\setminus E_1)=0$. Note that
    \[
      \mu(E_1\cup E_2)=\mu(E_1\setminus E_2\cup E_2)=
      \mu(E_1\setminus E_2)+\mu(E_2).
    \]
    Hence, $\mu(E_1\cup E_2)=\mu(E_2)$. Similarly, $\mu(E_1\cup E_2)=\mu(E_1)$.
    Thus, $\mu(E_1)=\mu(E_2)$.\par
    (b) Since $\mu(E_1\bigtriangleup E_2)=0$ and $E_2\setminus E_1\subset E_1
    \bigtriangleup E_2$, by the completeness of $\mu$, $E_2\setminus E_1\in
    \mathcal{B}$. Similarly, $E_1\setminus E_2\in\mathcal{B}$. In consequence,
    $E_1\cap E_2 = E_1\setminus(E_1\setminus E_2)\in\mcal{B}$ and, therefore,
    $E_2=(E_1\cap E_2)\cup(E_2\setminus E_1)\in\mcal{B}$.
  \end{proof}

  \paragraph{7.}
  \begin{proof}
    Let $\mcal{B}_0$ be the collection of all sets $E=A\cup B$ where $B\in
    \mcal{B}$ and $A\subset C$, $C\in\mcal{B}$, $\mu C=0$. Clear that $\mcal{B}
    \subset\mcal{B}_0$. Now we show that it is a $\sigma$-algebra. Since $X\in
    \mcal{B}$, $X\in\mcal{B}_0$. Let $E_n=A_n\cup B_n$ be a sequence of elements
    of $\mcal{B}_0$. Then, $\bigcup E_n=(\bigcup A_n)\cup(\bigcup B_n)$ also
    belongs to $\mcal{B}_0$ since $\bigcup B_n\in\mcal{B}$ and $\bigcup A_n
    \subset\bigcup C_n$, which is a countable union of sets of measure zero.
    Hence, $\mcal{B}_0$ is closed under countable union. Now, let $E=A\cup B\in
    \mcal{B}_0$. Note that
    \[
      E^c=A^c\cap B^c=(C\setminus A)\cup(B^c\setminus C),
    \]
    where $C\setminus A\subset C$ and $B^c\setminus C\in\mcal{B}$. Hence,
    $\mcal{B}_0$ is closed under complement. Thus, it is a $\sigma$-algebra.\par
    We define $\mu_0:\mcal{B}_0\to[0,\infty]$ by $\mu_0 E=\mu_0(A\cup B)=\mu B$.
    First, we show that it is well-defined, that is, if $E=A\hp\cup B\hp$, then
    $\mu B=\mu B\hp$. Since $C\in\mcal{B}$ contains $A$, $(A\cup B)\setminus C
    \in\mcal{B}$. Meanwhile, since $\mu C=0$,
    \begin{equation}
      \label{eq:11.7-1}
      \mu B=\mu((A\cup B)\setminus C)=\mu(E\setminus C).
    \end{equation}
    Since $E\setminus C\subset E\cup C\hp$,
    \begin{equation}
      \label{eq:11.7-2}
      \mu(E\setminus C)\le \mu(E\cup C\hp)=\mu((A\hp\cup B\hp)\cup C\hp)=
      \mu B\hp,
    \end{equation}
    where the measurability of $E\cup C\hp$ and the last equality both comes
    from the fact that $A\hp\subset C\hp\in\mcal{B}$ and $\mu C\hp=0$. Combine
    \eqref{eq:11.7-1} and \eqref{eq:11.7-2} and we get $\mu B\le\mu B\hp$.
    Interchanging the role of $A\cup B$ and $A\hp\cup B\hp$ yields $\mu B\ge
    \mu B\hp$. Hence, $\mu B=\mu B\hp$ and, in consequence, $\mu_0$ is
    well-defined. Meanwhile, clear that for $E\in\mcal{B}$, $\mu E=\mu_0 E$.\par
    Finally, we show that $\mu_0$ is a measure. Clear that $\mu_0$ is
    nonnegative and $\mu_0\varnothing=0$. Let $\langle E_n\rangle\subset
    \mcal{B}_0$ be a sequence of disjoint sets. Then
    \[
      \mu_0\left(\bigcup E_n\right)=
      \mu_0\left(\bigcup A_n \cup \bigcup B_n\right)=
      \mu\left(\bigcup B_n\right)=
      \sum\mu B_n=
      \sum\mu_0 E_n.
    \]
    Namely, $\mu_0$ is countably additive. Thus, $\mu_0$ is a measure.
  \end{proof}

  \paragraph{9.}
  \begin{proof}
    $\,$\par
    (a) First, we argue by contradiction to show that $\mcal{R}$ and
    $\mcal{R}$. Assume that there exists some $E\in\mcal{R}\cap\mcal{R}\hp$,
    that is, $E\in\mcal{R}$ and $E^c\in\mcal{R}$. Then $X=E\cup E^c\in
    \mcal{R}$, which contradicts the assumption that $\mcal{R}$ is not a
    $\sigma$-algebra. Thus, $\mcal{R}\cap\mcal{R}\hp=\varnothing$.\par
    Clear that $\mcal{R}\cup\mcal{R}\hp$ is a $\sigma$-algebra containing
    $\mcal{R}$. Hence, $\mcal{R}\cup\mcal{R}\hp\supset\mcal{B}$. Meanwhile,
    since $\mcal{B}=\sigma(\mcal{R})$, $\mcal{R}\cup\mcal{R}\hp\subset
    \mcal{B}$. Thus, $\mcal{R}\cup\mcal{R}\hp=\mcal{B}$.\par
    (b) Since $\varnothing\in\mcal{R}$, $\bar{\mu}\varnothing=\mu\varnothing
    =0$. Meanwhile, clear that $\bar{\mu}$ is nonnegative. Let $(E_n)\subset
    \mcal{B}$ be a sequence of disjoint sets. By part (a), each $E_n$ is either
    an element of $\mcal{R}$ or $\mcal{R}\hp$. If all $E_n\in\mcal{R}$, then by
    the countable additivity of $\mu$, $\mu(\bigcup E_n)=\sum\mu E_n$. Suppose
    there exists some $E_n$ in $\mcal{R}$ and some $E_m$ in $\mcal{R}\hp$. Let
    $F_1$ and $F_2$ be the union of theses sets respectively. Since
    $\sigma$-ring is closed under union, $F_1\in\mcal{R}$, and since $(\bigcup
    E_m)^c=\bigcap E_m^c$, $F_2\in\mcal{R\hp}$. Hence, $F_1\cup F_2\in\mcal{R}
    \hp$, otherwise, $F_2=(F_1\cup F_2)\setminus F_1$ would be an element of
    $\mcal{R}$. Therefore, $\mu(\bigcup E_n)=\infty=\sum\mu E_n$. Thus, $\bar{
    \mu}$ is a measure on $\mcal{B}$.\par
    (c) Clear that $\ubar{\mu}$ is nonnegative and $\ubar{\mu}\varnothing=0$.
    Let $(E_n)\subset\mcal{B}$ be disjoint. Note that for $E\in\mcal{R}$, $\mu
    E=\sup\{\mu A:\,A\subset E,A\in\mcal{R}\}$. Hence, it suffices to show that
    \[
      M=\sup\left\{\mu A:\, A\subset\bigcup_n E_n,A\in\mcal{R}\right\}=
      \sum_n\sup\{\mu A:\, A\subset E_n,A\in\mcal{R}\}=\sum_n M_n.
    \]
    By definition, for all $\vep>0$, there exists a sequence $(A_n)\subset
    \mcal{R}$ such that $A_n\subset E_n$ and $M_n<\mu A_n+\vep/2^n$. Put $A=
    \bigcup A_n$. Since $(A_n)$ are disjoint as $(E_n)$ are,
    \[
      \sum M_n < \vep+\sum\mu A_n =\vep+\mu A.
    \]
    Meanwhile, since $A\subset\bigcup E_n$ and $A\in\mcal{R}$, $\mu A\le M$.
    Therefore, $\sum M_n<\vep+M$. Thus, $\sum M_n\le M$.\par
    For the converse, similarly, for every $\vep>0$, there exists an $A\in
    \mcal{R}$ such that $A\subset\bigcup E_n$ and $M-\vep>\mu A$. Put $A_n=E_n
    \cap A$. If $E_n\in\mcal{R}$, $A_n\in\mcal{R}$ by definition. If $E_n\in
    \mcal{R}\hp$, $A_n=A\setminus E_n^c\in\mcal{R}$. Hence, $A_n\in\mcal{R}$
    for each $n$. Thus,
    \[
      M-\vep<\mu A=\sum_n\mu A_n\le\sum_n M_n,
    \]
    implying that $M\le \sum M_n$. Therefore, $M=\sum M_n$, i.e., $\ubar{\mu}$
    is countably additive. Thus, we conclude that $\ubar{\mu}$ is a measure on
    $\mcal{B}$.\par
    (d) Clear that $\mu_\beta$ is nonnegative and $\mu_beta\varnothing=0$. The
    preceding discussion, \textit{mutatis mutandis}, yields the countable
    additivity.
  \end{proof}
% end
\subsection{Measurable Functions}
  \paragraph{10.}
  \begin{proof}
    For every integers $n$ and $k$, let
    \begin{align*}
      &E_{n,k}=\{x:\, k2^{-n}\le f(x)<(k+1)2^{-n}\}, (k\le 2^{2n})\\
      &E_{n,2^{2n}+1}=\{x:\, f(x)\ge(2^{2n}+1)2^{-n})\},\\
      &\varphi_n=2^{-n}\sum_{k=0}^{2^{2n}+1}k\chi_{E_{n,k}}
    \end{align*}
    Since $f$ is measurable, all $E_{n,k}$ are measurable. Thus, $\langle
    \varphi_n\rangle$ is a sequence of nonnegative simple functions. Clear that
    for fixed $n$, $\langle E_{n,k}\rangle_k$ are disjoint. Let $x\in X$ be
    fixed. If $x\in E_{n,k}$ for some $k\le 2^{2n}$, then $x\in E_{n+1,2k}\cup
    E_{n+1,2k+1}$. Hence, $\varphi_{n+1}(x)\ge 2k/2^{-(n+1)}=\varphi_n(x)$. If
    $x\in E_{n,2^{2n}+1}$, then $x\in E_{n+1,k\hp}$ for some $k\hp\ge
    2^{2n+2}$. Hence, $\varphi_{n+1}(x)\ge 2k/2^{-(n+1)}=\varphi_n(x)$. Thus,
    $\varphi_{n+1}\ge\varphi_n$ for all $n$.\par
    Now, we show that $\varphi_n$ converges to $f$ pointwisely. Let $x\in X$ be
    fixed. If $f(x)=\infty$, then $\varphi_n(x)=2^{-n}(2^{2n}+1)\to\infty$ as
    $n\to\infty$. If $f(x)<\infty$, then $f(x)<2^{N}$ for some integer $N$.
    For all $n>N$, $x\in E_{n,k_n}$ where $k_n=\lfloor 2^nf(x)\rfloor$. Thus,
    \[
      f(x)-\varphi_n(x)=f(x)-2^{-n}\lfloor 2^nf(x)\rfloor\to 0
    \]
    as $n\to\infty$. Namely, $\varphi_n(x)\to f(x)$.\par
    If the measure space is $\sigma$-finite, then let $(X_n)\subset X$ be a
    sequence of measurable sets such that $X_n\subset X_{n+1}$, $\mu X_n<
    \infty$ and $X=\bigcup X_n$. Replacing $E_{n,k}$ with $E_{n,k}\cap X_n$
    yields a sequence $\langle\varphi_n\rangle$ satisfying all previous
    requirements and vanishing outside $X_n$ for each $n$.
  \end{proof}

  \paragraph{11.}
  \begin{proof}
    Put $F_\alpha=\{x:\,f(x)\le\alpha\}$, $G_\alpha=\{x:\,g(x)\le\alpha\}$,
    $E=\{x:\,f(x)\ne g(x)\}$ and $E_\alpha=\{x\in E: g(x)\le\alpha\}$. Then
    $G_\alpha=(F_\alpha\setminus E)\cup E_\alpha$. Since $F$ is measurable, all
    $F_\alpha$ are measurable. Since $f=g$ a.e., $E$ is of measure zero.
    Meanwhile, since $\mu$ is complete, $E_\alpha\subset E$ is measurable.
    Thus, $G_\alpha$ is measurable. Namely, $g$ is measurable.
  \end{proof}

  \paragraph{13.}
  \begin{proof}
    Note that $f_n$ converges to $f$ in measure iff for every $\vep>0$,
    \begin{equation*}
      \lim_{n\to\infty}\mu\{x\in X:\, |f_n(x)-f(x)|\ge\vep\}=0.
    \end{equation*}\par
    (a) By definition, for every $\vep_m=2^{-m}$, there exists some integer
    $N_m$ such that for all $n\ge N_m$, $\mu\{x:\,|f_n(x)-f(x)|\ge\vep_m\}<
    \vep_m$. Consider the subsequence $\langle f_{N_m}\rangle_m$. We show that
    it converges to $f$ almost everywhere. Put $E_m=\{x:\,|f_{N_m}-f(x)|\ge
    \vep_m\}$ and $E=\limsup E_m$. Then, for each $k$,
    \[
      \mu E\le \bigcup_{m=k}^\infty E_m\le \sum_{m=k}^\infty 2^{-m+1}\to 0,
      \quad\text{as}\quad k\to\infty.
    \]
    For every $x\notin E$, $x\notin\bigcup_{m=k}^\infty E_m$ for some $k$. Then
    for all $m>k$, $|f_{N_m}(x)-f(x)|<\vep_{N_m}$. Hence, $f_{N_m}(x)\to f(x)$.
    Namely, $f_{N_m}\to f$ almost everywhere.\par
    (b) First we prove a lemma: Let $\langle E_n\rangle$ be a sequence of
    measurable subset of $A$. Then $\limsup\mu E_n\le \mu(\limsup E_n)$. Let
    $F_N=\bigcup_{n=N}^\infty E_n$. Clear that $F_{n+1}\subset F_n$ and $\mu
    F_1<\infty$. Hence, by Prop. 2,
    \[
      \limsup\mu E_n\le \lim\mu F_n=
      \mu\left(\bigcap_{n=1}^\infty F_n\right)=\mu(\limsup E_n).
    \]
    Thus, the lemma holds.\par
    For fixed $\vep>0$, let $E_n=\{x\in A:\, |f_n(x)-f(x)|\ge\vep\}$. We
    show that $\lim\mu E_n=0$. First, clear that $0\le\limsup\mu E_n$.
    Meanwhile, if $x\in\limsup E_n$, then $x$ belongs to infinitely many $E_n$.
    As a consequence, $f_n$ does not converges to $f$ at $x$. Since $f_n$
    converges to $f$ a.e., $\mu(\limsup E_n)=0$. Note that all $E_n\subset A$
    are of finite measure. Hence, by the preceding lemma, $\limsup\mu E_n\le
    0$. Thus, $\lim\mu E_n=0$. Let $F_n$ denote $\{x\in X:\,|f_n(x)-f(x)|\ge
    \vep\}$ and $G$ the collection of points at which $f_n$ does not converge
    to $f$. Since all $f_n$ vanishes outside $A$, for a point outside to belong
    to $F_n$, it has to belong to $G$, a set of measure zero. Therefore, $E_n
    \subset F_n\subset E_n\cup G$, implying that $\mu F_n=\mu E_n$. Thus, $f_n$
    converges to $f$ in measure.\par
    (c) By definition, for each positive integer $k$, there is an integer $N_k$
    such that for all $n,m\ge N_k$, $\mu\{x\in X:\,|f_n(x)-f_m(x)|\ge 2^{-k}\}<
    2^{-k}$. We may assume without loss of generality that $N_k$ is increasing.
    Put $E_k=\{x:\, |f_{N_{k+1}}-f_{N_k}|\ge 2^{-k}\}$ and $E=\limsup E_k$. By
    our construction, $\mu E=0$. For $x\notin E$, $|f_{N_{k+1}}(x)-f_{N_k}(x))|
    <2^{-k}$ for large $k$ and, therefore, the number series $\sum(f_{N_{k+1}}
    (x)-f_{N_k}(x))$ converges to some point, say, $g(x)$. Hence, $f_{N_k}$
    converges to $f=f_{N_1}+g$ almost everywhere. Since all $f_{N_k}$ are
    measurable, $f$ is measurable.\par
    Now we show that $f_n$ converges to $f$ in measure. Let $D$ be the set of
    points at which $f_{N_k}$ does not converge to $f$. For every $\vep>0$,
    let $F_n=\{x\in X\setminus D:\, |f_n(x)-f(x)|\ge\vep\}$. Note that for
    all sufficiently large $N_k$,
    \begin{align*}
      F_n
      &\subset\{x\in X\setminus D:\,|f_n(x)-f_{N_k}(x)|+|f_{N_k}(x)-f(x)|
      \ge\vep \}\\
      &\subset\{x\in X\setminus D:\,|f_n(x)-f_{N_k}(x)|\ge\vep/2\},
    \end{align*}
    where the measure of the last set can be less than $\vep$ for sufficiently
    large $n$ and $N_k$ as $\langle f\rangle$ is Cauchy in measure. Since $D$
    is of measure zero, we conclude that $\langle f_n\rangle$ converges to $f$
    in measure.
  \end{proof}

  \paragraph{16.}
  \begin{proof}
    Egoroff: Let $(X,\mcal{B},\mu)$ be a measure space and $E\subset X$ is of
    finite measure. Let $\langle f_n\rangle$ be a sequence of measurable
    functions which converge to some function $f$ a.e. on $E$. Then
    for every $\eta>0$, there is a subset $A\subset E$ with $\mu A<\eta$ such
    that $f_n$ converges to $f$ uniformly on $E\setminus A$.\par
    We may assume without loss of generality that all $f_n$ vanish outside $E$.
    Then, by Prob. 13(b), $f_n$ converges to $f$ in measure over $E$. Fix
    $\eta>0$. First, we construct $A$. Put $\delta_m=\delta/2^m$. For every
    $m$, there exists some integer $N_m$ and a measurable set $A_m$ with $\mu
    A_m<\delta_m$ such that for all $n>N_m$ and $x\notin A_m$, $|f_n(x)-f(x)|<
    \delta_m$. Put $A=\bigcup A_m$. Clear that $\mu A<\delta$.\par
    Now we show that $f_n$ converges to $f$ uniformly on $E\setminus A$. Fix
    $x\in E\setminus A$. For every $\vep>0$, suppose there is an $m$ such that
    $0<\delta_m<\vep$. For all $n>N_m$, since $x\notin A$, $|f_n(x)-f(x)|<
    \delta_m<\vep$. Thus, $f_n\to f$ uniformly on $E\setminus A$.
  \end{proof}
% end
\subsection{Integration}
  \paragraph{19.}
  \begin{proof}
    Since $|\int_E f|\le \int_E|f|$, it suffices to show the result for
    nonnegative $f$. Fix $\vep>0$. By definition, there is a nonnegative simple
    function $\varphi=\sum_{i=1}^n c_i\chi_{E_i}$ such that $\int f<\int
    \varphi+\vep/2$. Put $M=\max_ic_i$ and $\delta=\vep/2Mn$. Then, for every
    measurable $E$ with $\mu E<\delta$, we have
    \[
      \int_E f<\int_E\varphi+\vep/2=
      \sum_{i=1}^nc_i\mu(E_i\cap E)+\vep/2\le
      Mn\delta+\vep/2=\vep.
    \]
  \end{proof}

  \paragraph{20.}
  \begin{proof}
    We show here Fatou's Lemma: Let $\langle f_n\rangle$ be a sequence of
    nonnegative measurable functions which converges to a function $f$ in
    measure on a measurable set $E$. Then $\int_E f\le\lowlim\int_E f_n$.\par
    Since the collection of limits point of $\int_E f_n$ forms a closed set,
    there exists a subsequence $\langle f_{n_k}\rangle_k$ such that $\lim\int_E
    f_{n_k}=\liminf\int_E f_n$. Since $f_{n_k}$ also converges to $f$ in
    measure, by Prob. 13(a), there is a subsequence $\langle f_{n_{k_j}}\rangle$
    which converges to $f$ a.e. on $E$. Hence, by Theorem 10,
    \[
      \int_E f\le \liminf_j \int_E f_{n_{k_j}}=
      \lim_j \int_E f_{n_{k_j}}=
      \liminf_n\int_E f_n.
    \]
  \end{proof}

  \paragraph{21.}
  \begin{proof}
    $\,$\par
    (a) We may assume without loss of generality that $f$ is nonnegative since
    replacing $f$ by $|f|$ dose not change the integrability and the set $E=
    \{x:\,f(x)\ne 0\}$. For every positive integer $n$, since $\int f<\infty$,
    the set $E_n=\{x:\, f(x)\ge 1/n\}$ is of finite measure. Thus, $E=
    \bigcup_{n=1}^\infty E_n$ is of $\sigma$-finite measure.\par
    (b) It follows immediately from part (a) and Prop. 7.\par
    (c) If $f\ge 0$, then the existence of such a $\varphi$ comes directly from
    the definition. For general cases, let $f=f^+-f^-$ and $\varphi^+,\varphi^-$
    two simple functions such that
    \[
      \int|f^+-\varphi^+|<\vep/2
      \quad\text{and}\quad
      \int|f^--\varphi^-|<\vep/2.
    \]
    Note that $\varphi=\varphi^+-\varphi^-$ is also a simple function and
    \[
      \int|f-\varphi|\le
      \int|f^+-\varphi^+|+\int|f^--\varphi^-|
      <\vep.
    \]
  \end{proof}

  \paragraph{22.}
  \begin{proof}
    $\,$\par
    (a) Clear that $\nu$ is nonnegative and $\nu\varnothing=0$. Let $\langle
    E_n\rangle$ be a sequence of disjoint measurable sets and $E=\bigcup_n E_n$.
    By Corollary 14, we have
    \[
      \nu E=\int_E g\rd\mu=
      \int_E\sum g\chi_{E_n}\rd\mu=
      \sum\int_E g\chi_{E_n}\rd\mu=
      \sum\int_{E_n}g\rd\mu=
      \sum\nu E_n.
    \]
    Thus, $\nu$ is a measure.\par
    (b) First, we show the identity for an arbitrary simple function $\varphi=
    \sum_{k=1}^n c_k\chi_{E_k}$ where $E_k$ are disjoint.
    \[
      \int\varphi\rd\nu=
      \sum_{k=1}^nc_k\nu E_k=
      \sum_{k=1}^nc_k\int g\chi_{E_k}\rd\mu=
      \int \varphi g\rd\mu.
    \]\par
    Let $f$ be a nonnegative measurable function and $\langle\varphi_n\rangle$ a
    increasing sequence of simple functions converging to $f$, the existence of
    which is guaranteed by Prop. 7. Then, By the monotone convergence theorem,
    \[
      \int f\rd\nu=\lim\int\varphi_n\rd\nu=\lim\int\varphi_n g\rd\mu.
    \]
    Note that $\langle\varphi_ng\rangle$ is a increasing sequence of functions
    converging to $fg$ and with $\varphi_ng\le fg$. Hence, again by the
    monotone convergence theorem,
    \[
      \lim\int\varphi_n g\rd\mu=\int fg\rd\mu.
    \]
    Thus, $\int f\rd\nu=\int fg\rd\mu$.
  \end{proof}
% end
\subsection{General Convergence Theorems}
  \paragraph{24.}
  \begin{proof}
    Since $\mu_n E$ is increasing for every $E$, such limits do exists. Clear
    that $\mu$ is nonnegative and $\mu\varnothing=0$. Let $\langle E_k\rangle$
    be a sequence of disjoint measurable sets. Then
    \[
      \mu\left(\bigcup_{k=1}^\infty E_k\right)=
      \lim_{n\to\infty}\mu_n\left(\bigcup_{k=1}^n E_k\right)=
      \lim_{n\to\infty}\sum_{k=1}^\infty\mu_n(E_k).
    \]
    Since for fixed $k$, $\mu_n(E_k)\le\mu_{n+1}(E_k)$, it is valid to change
    the order of the limit and the summation, which implies that $\mu(\bigcup
    E_k)=\sum\mu E_k$. Thus, $\mu$ is a measure.
  \end{proof}
  % TODO: 11.26
% end
\subsection{Signed Measures}
  \paragraph{27.}
  \begin{proof}
    $\,$\par
    (a) Consider the usual Lebesgue measure on $\mathbb{R}$. Let $A$ be any
    countable subset of $\mathbb{R}$ and $B=\mathbb{R}\setminus A$. Clear that
    $A$ is negative set while $B$ is a positive set. Namely, $A$ and $B$ form a
    Hahn decomposition of $\mathbb{R}$ for $\mu$.\par
    (b) Let $\{A_1,B_1\}$ and $\{A_2,B_2\}$ be two Hahn decomposition of $X$
    for $\nu$ and $A_1$ and $A_2$ are two positive sets. We show that $A_1
    \bigtriangleup A_2$ is a null set. Since the roles of $A_1$ and $A_2$ are
    interchangeable, it suffices to show that $A_1\setminus A_2$ is a null set.
    Since $A_1$ is positive, every subset $E\subset A_1\setminus A_2\subset
    A_1$ is of nonnegative measure. Meanwhile, $A_1\setminus A_2$ is also
    contained in $B_2$, a negative set. Hence, $\nu E\le 0$. Thus, $\nu E=0$,
    implying that $A_1\bigtriangleup A_2$ is a null set.
  \end{proof}

  \paragraph{28.}
  \begin{proof}
    Let $\nu=\nu^+-\nu^-$ be the Jordan decomposition of $\nu$ and $A$ and $B$
    be such that $X=A\cup B$ and $\nu^+(A)=\nu^-(B)=0$. For every $E\subset A$,
    \[
      \nu E=\nu^+E-\nu^-E=-\nu^-E\le 0.
    \]
    Hence, $A$ is a negative set. Similarly, $B$ is positive set. Thus, $\{A,
    B\}$ is a Hahn decomposition of $X$.\par
    Let $\nu=\nu_1+\nu_2$ be another Jordan decomposition of $\nu$ and $\{C,
    D\}$ be the corresponding Hahn decomposition. By Prob. 27(b), $\{A,B\}$ and
    $\{C,D\}$ only differ by two null sets. Thus, $\nu_1=\nu^+$ and $\nu_2=
    \nu^-$. Namely, the decomposition is unique.
  \end{proof}

  \paragraph{31.}
  \begin{proof}
    Clear that
    \begin{align*}
      \left|\int_E f\rd\nu\right|
      \le \left|\int_E f\rd\nu^+\right|+\left|\int_E f\rd\nu^-\right|
      \le M\nu^+E+M\nu^-E=M|\nu|(E).
    \end{align*}
    Let $\{A,B\}$ be the corresponding Hahn decomposition of $X$ and $A$ is the
    positive set. Then define $f$ by
    \[
      f(x)=\begin{cases}
        1, & x\in A,\\
        -1, & x\notin A.
      \end{cases}
    \]
    Clear that $|f|\le 1$ and
    \[
      \int_E f\rd\nu=
      \int_E f\rd\nu^+-\int_E f\rd\nu^-=
      \mu^+(A\cap E)+\nu^-(A\cap B)=
      |\nu|(E).
    \]
  \end{proof}

  \paragraph{32.}
  \begin{proof}
    $\,$\par
    (a) Put $\mu\wedge\nu=\frac{1}{2}(\mu+\nu-|\mu-\nu|)$, which can be
    verified to be a measure. For every $E\subset X$, suppose $\mu E\le\nu E$.
    Then
    \[
      (\mu\wedge\nu)(E)=
      \frac{1}{2}(\mu E+\nu E-|\mu-\nu|(E))=
      \frac{1}{2}(\mu E+\nu E-\nu E+\mu E)=
      \mu E.
    \]
    Similarly, $(\mu\wedge\nu)(E)=\nu E$ if $\nu E\le\mu E$. Hence, $\mu
    \wedge\nu$ is smaller than both $\mu$ and $\nu$. Note that $(\mu\wedge\nu)
    (E)=\min\{\mu E, \nu E\}$. Thus, clear that it is larger than any other
    signed measure smaller than $\mu$ and $\nu$.\par
    (b) Put $\mu\vee\nu=\frac{1}{2}(|\mu-\nu|+\mu+\nu)$. The previous argument,
    \textit{mutatis mutandis}, shows that $(\mu\vee\nu)(E)=\max\{\mu E,\nu E
    \}$. Thus, it is the smallest measure larger than $\mu$ and $\nu$.
    Meanwhile, clear that $\mu\wedge\nu+\mu\vee\nu=\mu+\nu$.\par
    (c) Suppose that $\mu$ and $\nu$ are mutually singular and let $\{A,B\}$
    be such that $A\cup B=X$ $\mu A=\nu B=0$. Then
    \[
      (\mu\wedge\nu)(E)\le(\mu\wedge\nu)(E\cap A)+(\mu\wedge\nu)(E\cap B)
      \le\mu A+\nu B=0.
    \]
    For the converse, suppose that $\mu\wedge\nu=0$. If $\mu=0$ or $\nu=0$,
    then $\mu\perp\nu$ holds vacuously. Suppose that both $\mu$ and $\nu$ are
    nonzero. Since the roles of $\mu$ and $\nu$ are interchangeable, we may
    assume without loss of generality that $\mu E=0$ and $\nu E>0$ for some
    measurable $E$. Then, $\mu E^c\ne 0$, forcing $\nu E^c$ to be zero.
    Therefore, $\mu E=\nu E^c=0$, implying that $\mu\perp\nu$.
  \end{proof}
% end
\subsection{The Radon-Nikodym Theorem}
  \paragraph{33.}
  \begin{proof}
    Suppose $X=\bigcup_{n=1}^\infty X_i$ and $\mu X_i<\infty$ for each $n$
    and $X_i$ are disjoint. Then both $\mu|_{X_i}$ and $\nu|_{X_i}$, the
    restrictions to $X_i$, are finite. In consequence, by the Radon-Nikodym
    theorem for finite measure, there is a nonnegative measurable function
    $f_i:X_i\to\mathbb{R}$ such that $\nu(E\cap X_i)=\int_{(E\cap X_i)}
    f_i\rd\mu$. Without loss of generality, we may consider $f_i$ to be a
    function on $X$ (instead of $X_i$) that vanishes outside $X_i$.\par
    Put $f=\sum f_i$. Since $X_i$ are disjoint and $f_i$ vanishes outside $X_i$,
    the summation does make sense. Meanwhile, clear that $f$ is nonnegative and
    measurable. Note that for each measurable $E$,
    \[
      \nu E=\sum_{n=1}^\infty\nu(E\cap X_i)=
      \sum_{n=1}^\infty\int_E f_i\rd\mu=
      \int_E f\rd\mu,
    \]
    where the last equality comes from Corollary 14. Namely, $\nu E=\int_E
    f\rd\mu$.\par
    Finally, we show that $f$ is unique up to almost equality. Let $g$ be a
    nonnegative measurable function with this property. Then, $g|_{X_i}$, the
    restriction of $g$ to $X_i$, equals to $f_i$ a.e. [$\mu$]. Thus, $g=f$
    a.e. [$\mu$].
  \end{proof}

  \paragraph{34. Radon-Nikodym derivatives}
  \begin{proof}
    $\,$\par
    (a) It suffices to show the result for simple functions. Let $\varphi=
    \sum_{k=1}^nc_k\chi_{E_k}$ be a simple function. Then
    \begin{equation*}
      \int \varphi\,\rd\nu=\sum_{k=1}^nc_i\nu E_k.
    \end{equation*}
    Meanwhile,
    \[
      \int \varphi\left[\frac{\rd\nu}{\rd\mu}\right]\,\rd\mu=
      \sum_{k=1}^n c_k\int_{E_k}\left[\frac{\rd\nu}{\rd\mu}\right]\,\rd\mu=
      \sum_{k=1}^nc_i\nu E_k.
    \]
    Thus, $\int\varphi\,\rd\nu=\int\varphi[\rd\nu/\rd\mu]\rd\mu$.
  \end{proof}

  \paragraph{35.}
  \begin{proof}
    $\,$\par
    (d) Let $\rho_0,\rho_1$ be two measures with $\rho_0\perp\mu$, $\rho_1\ll
    \mu$ and $\nu=\rho_0+\rho_1$. We show that $\rho_0=\nu_0$ and $\rho_1
    =\nu_1$. Since $\nu_0\perp\mu$ and $\rho_0\perp\mu$, there exists measurable
    $A,B$ and $C,D$ such that $A\cup B=C\cup D=X$, $A\cap B=C\cap D=\varnothing$
    and $\nu_0A=\mu B=\rho_0C=\mu D=0$. Put $U=A\cap C$ and $V=B\cup D$. Note
    that
    \begin{align*}
      U\cup V=(A\cap C)\cup(B\cup D)=(A\cup B\cup D)\cap(C\cup B\cup D)=X,\\
      U\cap V=(A\cap C)\cap(B\cup D)=(A\cap C\cap B)\cup(C\cap B\cap D)=
      \varnothing.
    \end{align*}
    For every measurable $E$, if $E\subset U$, then $\nu_0E=\rho_0E=0$ and
    $(\nu_0+\nu_1)(E)=(\rho_0+\rho_1)(E)$ implies that $\nu_1 E=\rho_1 E$.
    If $E\subset V$, then $\mu E=0$, implying that $\nu_1E=\rho_1E=0$ and,
    therefore, $\nu_0E=\rho_0E$. Since $U$ and $V$ partitions $X$, this implies
    that $\nu_0=\rho_0$ and $\nu_1=\rho_1$ for all measurable $E$.
  \end{proof}

  \paragraph{36.}
  \begin{proof}
    We show that: Let $(X,\mcal{B},\mu)$ be a $\sigma$-finite signed measure
    space, and let $\nu$ be a signed measure on $\mcal{B}$ with $\nu\ll\mu$.
    Then there is a measurable function such that for all measurable $E$ we have
    $\nu E=\int_E f\,\rd\mu$. Furthermore, the function $f$ is unique up to
    almost equality with respect to $\mu$.\par
    Let $\mu=\mu^+-\mu^-$ and $\nu=\nu^+-\nu^-$ be the Jordan decompositions.
    Clear that $\nu^+\ll\mu^+$ and $\nu^-\ll\mu^-$. Hence, by the Radon-Nikodym
    theorem for measures, there exists nonnegative $g$ and $h$ such that
    \[
      \nu^+E=\int_E g\,\rd\mu^+
      \quad\text{and}\quad
      \nu^-E=\int_E h\,\rd\mu^-
    \]
    for all measurable $E$. Put $f=g-h$. Clear that it is measurable. Meanwhile,
    \[
      \nu E=\nu^+E-\nu^-E=
      \int_E g\,\rd\mu^+-\int_E h\,\rd\mu^-=
      \int_E (g-h)\,\rd\mu
    \]
    where the last equality comes from the mutual singularity of $\mu^+$ and
    $\mu^-$. And the argument in Prob. 33, \textit{mutatis mutandis}, gives the
    uniqueness.
  \end{proof}

  \paragraph{40.}
  \begin{proof}
    Let $I$ denote the index set of $\{X_\alpha\}$ and, just for convenience,
    let $\sum_J$ denote $\sum_{\alpha\in J}\mu(E\cap X_\alpha)$.\par
    (a) First, we suppose that $E$ is of finite measure. Let $J$ be any finite
    index subset of $I$. Then, since $X_\alpha$ are disjoint, $\mu E\ge\sum_J$.
    Hence, $\mu E\ge\sum_I$. For the converse, since, by our previous result,
    all $\sum_J$ are bounded by $\mu E$, $\sum_I$ is finite. For each positive
    integer $n$, there is a finite subset $J_n$ of $I$ such that $\sum_I-1/n<
    \sum_{J_n}$. Put
    \[
      J=\bigcup_{n=1}^\infty J_n
      \quad\text{and}\quad
      Y=\bigcup_{\beta\in J}X_\beta.
    \]
    We show that (1) $\mu(Y\cap E)\le\sum_I$ and (2) $\mu E=\mu(Y\cap E)$ to
    complete the proof. Since $\{X_\beta\}_{\beta\in J}$ is a countable
    collection of disjoint sets,
    \[
      \mu(Y\cap E)=\sum_{\beta\in J}\mu(X_\beta\cap E)\le
      \sum_{\alpha\in I}\mu(X_\beta\cap E).
    \]
    Namely, (1) holds. To show (2), we first show that, for each $\alpha\in I$,
    the set $X_\alpha\cap(E\setminus Y)$ is of measure zero. Assume, to obtain
    a contradiction, that there is some $\alpha$ such that $\mu(X_\alpha\cap(
    E\setminus Y))=\delta>0$. Since
    \[
      X_\alpha\cap(E\setminus Y)=
      X_\alpha\cap E\cap\left(\bigcap_{\beta\in J}X_\beta^c\right),
    \]
    this implies that $\alpha\notin J_n$ for all $n$ and $\mu(X_\alpha\cap E)=
    \delta$. Since $\delta>1/n$ for some large $n$, this leads to the
    contradiction
    \[
      \sum_{J_n\cup\{\alpha\}}=\sum_{J_n}+\mu(X_\alpha\cap E)
      >\sum_I-\frac{1}{n}+\delta\ge\sum_I.
    \]
    Hence, $\mu(X_\alpha\cap(E\setminus Y))=0$ for all $n$ and, therefore,
    $\mu(E\setminus Y)=0$. Note that $E\setminus(Y\cap E)=E\setminus Y$, this
    implies that $\mu(E\setminus(Y\cap E))=0$. In consequence, $\mu E=\mu(Y\cap
    E)$. Thus, $\mu E\le\sum_I$.\par
    Now suppose $\mu E=\infty$. If all $\sum_J$ are finite
  \end{proof}

  \paragraph{40.}
  \begin{proof}
    Let $I$ denote the index set of $\{X_\alpha\}$. Fix a measurable $E$. Put
    \[
      J=\{\alpha\in I:\,\mu(E\cap X_\alpha)>0\}
      \quad\text{and}\quad
      Y=\bigcup_{\beta\in J}X_\beta.
    \]
    First we show that $\mu E=\mu(E\cap Y)$. Clear that $\mu E\ge\mu(E\cap Y)$.
    For the converse, consider the set $E\setminus(E\cap Y)=E\setminus Y$. For
    every $X_\alpha$, if $\alpha\notin J$, by the construction of $J$, $\mu(
    X_\alpha\cap(E\setminus Y))=0$. If $\alpha\in J$, then
    \[
      X_\alpha\cap(E\setminus Y)=
      X_\alpha\cap E\cap\left(\bigcap_{\beta\in J}X_\beta\right)=
      \varnothing.
    \]
    As a result, $\mu(X_\alpha\cap(E\setminus Y))=0$ for all $\alpha\in I$.
    Since $\{X_\alpha\}$ is a decomposition, this implies that $\mu(E\setminus
    Y)=0$. Therefore, $\mu E\le \mu(E\cap Y)$. Thus, $\mu E=\mu(E\cap Y)$.\par
    (a) For each positive integer $n$, put
    \[
      J_n=\{\alpha\in I:\,\mu(E\cap X_\alpha)>1/n\}.
    \]
    Clear that $J=\bigcup_n J_n$. If $J$ is uncountable, then there must exist
    some uncountable $J_n$, which implies that $\mu E=\sum\mu(X_\alpha\cap E)=
    \infty$. If $J$ is countable, then
    \[
      \mu E=\mu(E\cap Y)=\sum_{\beta\in J}\mu(E\cap X_\beta)=
      \sum_{\alpha\in I}\mu(E\cap X_\alpha).
    \]
    Thus, $\mu E=\sum\mu(E\cap X_\alpha)$.
  \end{proof}
% end
\subsection{The $L^p$ Spaces}
  \paragraph{41.}
  \begin{proof}
    First, we prove the following lemma: For $a,b\ge 0$, $|a-b|^p\le 2|a^p-
    b^p|$. It suffices to show that $(a-b)^p\le 2(a^p-b^p)$ for all $a\ge b\ge
    0$. If $p=1$, then the inequality holds trivially. Suppose $p>1$ and put
    $h(x)=(x-b)^p-2(x^p-b^p)$. Clear that $h(b)=0$. Meanwhile, for $x\ge b$,
    \[
      h\hp(x)=p(x-b)^{p-1}-2px^{p-1}=px^{p-1}
      \left(\left(1-\frac{b}{x}\right)^{p-1}-2\right)<0.
    \]
    Thus, $h(x)\le 0$ for all $x\ge b$, which implies that $|a-b|^p\le 2|a^p-
    b^p|$ for all $a,b\ge 0$.\par
    Since $|f|^p$ is integrable, by Prob. 21(a), the set on which $f$ does not
    vanish is of $\sigma$-finite measure. Hence, $\int|f|^p=\sup\int\varphi$
    as $\varphi$ ranges over all simple functions that each vanishes outside a
    set of finite measure. Thus, for every $\vep>0$, there is a nonnegative
    simple function $\tilde{\varphi}\le|f|^p$, vanishing outside a set $E$ of
    finite measure, such that $\int(|f|^p-\tilde{\varphi})<\vep^p/2$. Put
    $\varphi=\sqrt[p]{\tilde{\varphi}}$, which is also a nonnegative simple
    function that vanishes outside $E$. Meanwhile, by the previous inequality,
    \[
      \|f-\varphi\|_p^p=
      \int|f-\varphi|^p\le
      2\int(|f|^p-\tilde{\varphi})<
      \vep^p.
    \]
    Namely, Prop. 26 holds.
  \end{proof}

  \paragraph{42.}
  \begin{proof}
    We may assume without loss of generality that $g$ is nonnegative. Assume,
    to obtain a contradiction, that $\esssup|g|>M$, that is, the measure of
    $E=\{t:\,g(t)>M+\eta\}$ is nonzero for some positive $\eta$. Meanwhile,
    since $\mu$ is finite, $\mu E<\infty$. Let $\varphi=\chi_E$, which is
    clearly a simple function. Then
    \[
      \left|\int g\varphi\right|\ge
      (M+\eta)\mu E>
      M\|\varphi\|_1.
    \]
    Contradiction. Hence, $\esssup|g|\le M$, implying that $g\in L^\infty$.
  \end{proof}

  \paragraph{43.}
    The case $p=1$ is left undone.
  \begin{proof}
    Suppose that $p>1$.
    Let $\langle X_n\rangle$ be such that $\mu X_n<\infty$ and $X=\bigcup X_n$.
    Furthermore, we may assume without loss of generality that $X_n$ are
    disjoint. Put $g_n=\sum g\chi_{X_n}$. By Lemma 27, for $n$, $g\chi_{X_n}\in
    L^q$ and $\|g_n\|_q\le M$. Since $g_n\to g$, by Fatou's lemma, $\|g\|_q\le
    M$. Thus, $g\in L^q$.
  \end{proof}

  \paragraph{44.}
  \begin{proof}
    Note that
    \[
      \int|f|^p=\sum\int|f|^p\chi_{E_n}=\sum\int|f_n|^p=\sum\|f_n\|^p.
    \]
    Thus, $f\in L^p$ iff $\sum\|f_n\|^p<\infty$.
  \end{proof}

  \paragraph{45.}
  \begin{proof}
    For every $f\in L^p$ with $\|f\|_p=1$,
    \[
      \int|fg|\le \|f\|_p\|g\|_q = \|g\|_q.
    \]
    Hence, $\|F\|\le\|g\|_q$. For the reverse inequality, put
    \[
      f=(\sgn g)|g|^{q-1}=(\sgn g)|g|^{p/q}.
    \]
    Note that $|f|^p=|g|^q$. Therefore, $g\in L^q$ implies $f\in L^q$.
    Meanwhile, $\|f\|_p^p=\|g\|_q^q$. Hence,
    \[
      \|F\|\|f\|_p \ge |F(f)| = \int|g|^q = \|g\|_q^q
      \quad\Rightarrow\quad
      \|F\|\ge\|g\|_q.
    \]
    Thus, $\|F\|=\|g\|_q$.
  \end{proof}
% end


\section{MODULE DESIGN}
\subsection{DATA PREPROCESSING}
JPEG uses a lossy image compression. Each re-encoding process (new saving) performed on the image leads to further loss of quality. The JPEG algorithm is based on a 8x8 pixel grid. Each 8x8 square grid is thereby treated and compressed separately. If the image is untouched, then all these 8x8 squares will show the same error level potential.
\subsubsection{Algorithm:}
\begin{enumerate}
    \item The image is resaved with 95\%(or 90\%)JPEG quality.
    \item Compare each(8*8) blocks of corresponding original and new resaved image.
\item If image is unmodified, then all 8 x8 squares should have similar error potentials.
\item Else modified areas will appear with a higher potential error level.
\end{enumerate}

INPUT \ \ \ \ : Tampered image

OUTPUT : The output of ELA is image with higher error potential.

\subsection{TRAINING THE CNN}
\begin{figure}[htp]
\centering
\includegraphics[scale=0.5,width=17cm]{Figures/cnn.PNG}
\caption{Training the model}
\label{fig:universe}
\end{figure}
The training process of a CNN is done through an iterative algorithm that alternates between feedforward  and back propagation passes of the data. The weights of the convolutional filters and fully-connected layers are updated at each iteration of the backpropagation passes. CNN is capable of learning classification features directly from the data. The ReLU activation function is applied to each value in the feature maps of every convolutional layer. The convolutional layers are followed by the max pooling layers. We use a batch normalization layer after each regular convolutional layer. However, the prediction error convolutional filters outputs are directly convolved with the next convolutional layer without using the batch normalization layer. We consider the RMSProp optimizer  to train our model. This module is proposed to extract features related to the traces left by different editing operations, and which are utilized to check the authenticity of images.

INPUT \ \ \ \ : The pre-processed images.

OUTPUT : The trained classifier to detect the tampered images.

\subsubsection{Algorithm:}
1. Initialize w_k 's\  using \ randomly\  drawn\  weights.

2. Assign i=1

3. While  i \leq  maximum\_iteration \ do

4. Feedforward  pass.

5. Update filter weights  and backpropagate errors.

6. Set w_k(0, 0)^(^1^) = 0  for \ all \ K \ filters

7. Normalize w_k^(^1^)  ’s \ such \ that \  \Sigma_l_,_m_ \neq _0 w_k^(^1^)   (l, m) = 1

8. Set w_k(0, 0)^(^1^) = - 1  \ for \ all \  K \ filters

9. i = i + 1

10. If training accuracy converges then

11. exit

12. end
\newpage
\subsubsection{RMSPROP OPTIMISER }
The RMSprop optimizer is similar to the gradient descent algorithm with momentum. The RMSprop optimizer restricts the oscillations in the vertical direction. Therefore, we can increase our learning rate and our algorithm could take larger steps in the horizontal direction converging faster.

              vdw =\beta. vdw  + (1- \beta).dw2

                     where  \beta \ is \ a \ momentum \ in \ learning \ rate

              vdb  = \beta. vdw  + (1- \beta).db2

              W = W -\alpha dw/(\sqrt(v\_db )+∈)

                     where W are weights to be updated during the back propagation and  \alpha \ is \ a \ value \  always \textless 1.

              b = b - \alpha dw/(\sqrt(v\_db )+\epsilon)

                     where b is the calculated gradient of the system while learning and \epsilon \  is\ a \ small \ value \  added \ to \ prevent \ gradient \ from \ blowing \ up.

\subsubsection{CROSS ENTROPY LOSS FUNCTION}
Cross Entropy is commonly-used in binary classification (labels are assumed to take values 0 or 1) as a loss function (For multi-classification, use Multiclass Cross Entropy), which is computed by

       L=-1/n \Sigma_(i_=_1)^n [\ (\ y^(^i^)  log(\ \^y^i)\ +(\ 1-y^i)log(\ 1-\^y^i) ]\

Where L is a loss calculated which is the difference between the actual and the predicted output.
Cross entropy measures the divergence between two probability distribution, if the cross entropy is large, which means that the difference between two distribution is large, while if the cross entropy is small, which means that two distribution is similar to each other. When the difference between predicted value and actual value is large, the learning speed, i.e., convergence speed, is fast, otherwise, the difference is small, the learning speed is small. Cross entropy cost function has the advantages of fast convergence and is more likely to reach the global optimization.

\subsection{CLASSIFICATION BLOCK}
\begin{figure}[htp]
\centering
\includegraphics[scale=0.5,width=10cm]{Figures/soft.PNG}
\caption{Classification}
\label{fig:universe}
\end{figure}
This first layer of the classification block contains about 256 nodes and accepts input as vectors. This layer uses ReLU activation function where negative values will not be considered significant hence makes it more efficient. To give the accurate result the last layer in the classification block of the neural network uses the softmax activation function which gives the highest activation level. The CNN model extracts the feature and classifies the pre-processed forged image to detect whether the given image is spiced or not.

\subsection{COPY MOVE TYPE DETECTION}
A copy move attack is commonly used to conceal parts of an image or to remove unwanted portions in an image. A portion from the picture is copied and pasted over any unwanted portion in the same image.
This block is where the image that is not detected to be spliced is checked for copy move forgery using the following steps:
\begin{enumerate}
    \item Blur image for eliminating image details.

\item Convert image to degraded palette.

\item Decompose the image into small NxN pixel blocks.

\item Alphabetically order these blocks by their pixel values.

\item Extract only these adjacent blocks which have small absolute color difference.

\item Cluster these blocks into clusters by intersection area among blocks.

\item Extract only these clusters which are bigger than block size.

\item Extract only these clusters which have similar cluster, by using some sort of similarity function (in this case Hausdorff distance between clusters).

\item Draw discovered similar clusters on image.

\end{enumerate}

\section{COMPLEXITY ANALYSIS}
\subsection{COMPLEXITY OF THE PROJECT}
\begin{itemize}
    \item  The complexity of the project lies in determining the passive type of forgery the image has undergone  rather than just determining if the image is only forged or not. The neural network is used to detect the spliced images.
    \item The accuracy of the neural network also affects the efﬁciency of the output. Hence efficient loss function and optimiser with the appropriate parameters needs to be chosen.
    \item Certain additional hints need to be added to the images in order to efficiently detect the tampered regions in the images. Error Level Analysis is used for this purpose. This analysis is made to all images irrespective of their formats and error potential.
    \item Determining the identical regions in a copy move image is done by the extraction of similar properties between those regions for which efficient similarity functions has to be used.
    \item The identification of copy move image is done without any comparison with the original image but rather the input image itself which makes it a tedious task to implement.
\end{itemize}


%!TEX root = ../main.tex
%-------------------------------------------------------------------------------
\section{Example}\label{Example}
%-------------------------------------------------------------------------------
We now present an exemplifying analysis of a canonical EKW model on human capital investment. The model was initially studied in \citet{Keane.1997} to explore the career decisions of young men about their schooling, work, and occupational choice. We first outline the basic setup of the model, provide some descriptive statistics of the empirical data used for its calibration, and then explore selected economic insights.
%-------------------------------------------------------------------------------
\subsection{Basic setup}
%-------------------------------------------------------------------------------
We follow individuals over their working life from young adulthood at age 16 to retirement at age 65 where the decision period $t = 16, \dots, 65$  is a school year. \autoref{Decision tree} %
%\comment[id=HG]{I would use different colors in \autoref{Decision tree}: white background for ``white-collar jobs'' and brown for ``military''.}
illustrates the initial decision problem as individuals decide $a\in\mathcal{A}$ whether to work in a blue-collar or white-collar occupation ($a = 1, 2$), to serve in the military $(a = 3)$, to attend school $(a = 4)$, or to stay at home $(a = 5)$.

%
\begin{figure}[t!]\centering
	\scalebox{0.75}{%
		%\input{../material/fig-decision-tree-bw}%
		\input{../material/fig-decision-tree-bw}%
	}
	\caption{Decision tree}
	\label{Decision tree}
\end{figure}%\FloatBarrier%\vspace{1.0cm}
%

Individuals are already heterogeneous when entering the model. They differ with respect to their level of completed schooling $h_{16}$ and have one of four different $\mathcal{J} = \{1, \hdots, 4\}$ alternative-specific skill endowments $\bm{e} = \left(e_{j,a}\right)_{\mathcal{J} \times \mathcal{A}}$.

The immediate utility $u(\cdot)$ of each alternative consists of a non-pecuniary utility $\zeta_a(\cdot)$ and, at least for the working alternatives, an additional wage component $w_a(\cdot)$. Both depend on the level of human capital as measured by their occupation-specific work experience $\bm{k}_t = \left(k_{a,t}\right)_{a\in\{1, 2, 3\}}$, years of completed schooling $h_t$, and alternative-specific skill endowment $\bm{e}$. The immediate utilities are influenced by last-period choices $a_{t -1}$ and alternative-specific productivity shocks $\bm{\epsilon_t} = \left(\epsilon_{a,t}\right)_{a\in\mathcal{A}}$ as well. Their general form is given by:

%
\begin{align*}
u(\cdot) =
\begin{cases}
    \zeta_a(\bm{k}_t, h_t, t, a_{t -1})  + w_a(\bm{k}_t, h_t, t, a_{t -1}, e_{j, a}, \epsilon_{a,t})
    & \text{if}\quad a \in \{1, 2, 3\}  \\
    \zeta_a(\bm{k}_t, h_t, t, a_{t-1}, e_{j,a}, \epsilon_{a,t})
    & \text{if}\quad a \in \{4, 5\}
\end{cases}.
\end{align*}
%
\noindent Work experience $\bm{k}_t$  and years of completed schooling $h_t$ evolve deterministically.
%
\begin{align*}
k_{a,t+1} & = k_{a,t} + \ind[a_t = a] \quad \text{if}\quad a \in \{1, 2, 3\} \\
h_{t + 1\phantom{,a}} & = h_{t\phantom{,a}} +   \ind[a_t = 4].
\end{align*}
%
The productivity shocks $\bm{\epsilon}_t$ are uncorrelated across time and follow a multivariate normal distribution with mean $\bm{0}$ and covariance matrix $\bm{\Sigma}$. Given the structure of the utility functions and the distribution of the shocks, the state at time $t$ is $s_t = \{\bm{k}_t, h_t, t, a_{t -1}, \bm{e},\bm{\epsilon}_t\}$.

Theoretical and empirical research from specialized disciplines within economics informs the specification of each $u_a(\cdot)$ and we discuss the exact functional form of the per-period utility in the blue-collar occupation as an example.\footnote{All additional details are available in Appendix \ref{Computational implementation}.}

Equation~\eqref{Non-pecuniary benefits} shows the parameterization of the non-pecuniary utility from working in a blue-collar occupation:
%
\begin{align}\label{Non-pecuniary benefits}
\zeta_{1}(\bm{k}_t, h_t, a_{t-1})  = \alpha_1  &+ c_{1,1} \cdot \ind[a_{t-1} \neq 1] + c_{1,2} \cdot \ind[k_{1,t} = 0] \\ \nonumber
                            & + \vartheta_1 \cdot \ind[h_t \geq 12] + \vartheta_2 \cdot \ind[h_t \geq 16] + \vartheta_3 \cdot \ind[k_{3,t} = 1].
\end{align}
%
It includes job amenities $\alpha_1$ and mobility and search costs $(c_{1,1}, c_{1,2})$ that capture the extra effort for individuals who only recently started working in a blue-collar occupation. Additional components depend on whether an individual has a high school $\vartheta_1$ or college $\vartheta_2$ degree. There is a detrimental impact of leaving the military after a single year $\vartheta_3$.

The wage component $w_{1}(\cdot)$ is given by the product of the market-equilibrium rental price $r_{1}$ and an occupation-specific skill level $x_{1}(\cdot)$. The latter is determined by the overall level of human capital. This specification leads to a standard logarithmic wage equation in which the constant term is the skill rental price $\ln(r_{1})$ and wages follow a log-normal distribution.

The occupation-specific skill level $x_{1}(\cdot)$ is determined by a skill production function, which includes a deterministic component $\Gamma_1(\cdot)$ and a multiplicative stochastic productivity shock $\epsilon_{1,t}$:
%
\begin{align}
    x_{1}(\bm{k}_t, h_t, t, a_{t-1}, e_{j, 1}, \epsilon_{1,t}) & = \exp \big( \Gamma_{1}(\bm{k}_t,  h_t, t, a_{t-1}, e_{j,1}) \cdot \epsilon_{1,t} \big). \nonumber
\end{align}
%
\noindent Equation (\ref{Skill production function}) shows the parameterization of the deterministic component of the skill production function:
%
\begin{align}\label{Skill production function}
    \Gamma_1(\bm{k}_t, h_t, t, a_{t-1}, e_{j, 1}) = e_{j,1} & + \beta_{1,1} \cdot h_t + \beta_{1, 2} \cdot \ind[h_t \geq 12]   \\ \nonumber
                                  & + \gamma_{1, 1} \cdot  k_{1,t} + \gamma_{1,2} \cdot  (k_{1,t})^2  \\ \nonumber
                                & + \gamma_{1,3} \cdot  \ind[k_{1,t} > 0] + \gamma_{1,4} \cdot  t + \gamma_{1,5} \cdot \ind[t < 18]\\
                                  & + \gamma_{1,6} \cdot \ind[a_{t-1} = 1] + \gamma_{1,7} \cdot  k_{2,t} + \gamma_{1,8} \cdot  k_{3,t}. \nonumber
\end{align}

\noindent There are several notable features. Skills increase with schooling $\beta_{1,1}$ and blue-collar work experience ($\gamma_{1,1}, \gamma_{1,2}$). There are so-called sheep-skin effects \citep{Hungerford.1987, Jaeger.1996} associated with completing a high school $\beta_{1,2}$ and graduate $\beta_{1,3}$ education that capture the impact of completing a degree beyond just the associated years of schooling. Also, there is a first-year blue-collar experience effect $\gamma_{1,3}$ while skills depreciate when not employed in a blue-collar occupation in the preceding period $\gamma_{1,6}$. Other work experience ($\gamma_{1,7}, \gamma_{1,8}$) is transferable.
%-------------------------------------------------------------------------------
\subsection{Empirical data}
%-------------------------------------------------------------------------------
We analyze the original dataset used by \citet{Keane.1997} and thus only provide a brief description here.\footnote{We provide additional details in Appendix \ref{Empirical data}.} The authors construct their sample based on the National Longitudinal Survey of Youth 1979 (NLSY79) \citep{NLSY.2019}. The NLSY79 is a nationally representative sample of young men and women living in the United States in 1979 and born between 1957 and 1964. Individuals were followed from 1979 onwards and repeatedly interviewed about their schooling decisions and labor market experiences. Based on this information, individuals are assigned to either working in one of the three occupations, attending school, or simply staying at home.

\citet{Keane.1997} restrict attention to white males that turn 16 between 1977 and 1981 and exploit the information collected between 1979 and 1987. Thus individuals in the sample are all between 16 and 26 years old. While the sample initially consists of 1,373 individuals at age 16, this number drops to 256 at the age of 26 due to sample attrition, missing data, and the short observation period. Overall, the final sample consists of 12,359 person-period observations.

\autoref{Overview} summarizes our information about choices and wages by age. We show the distribution of choices on the left, and report average wages on the right. Initially, roughly 86\% of individuals enroll in school, but this share steadily declines with age. Nevertheless, about 39\% obtain more than a high school degree and continue their schooling for more than twelve years. As individuals leave school, most of them initially pursue a blue-collar occupation. But the relative share of the white-collar occupation increases as individuals entering the labor market later have higher levels of schooling. At age 26, about 48\% work in a blue-collar occupation and 34\% in a white-collar occupation. The share of individuals in the military peaks around age 20 when it amounts to 8\%. At its maximum around age 18, approximately 20\% of individuals stay at home.

%
\begin{figure}[t!]\centering
\caption{Data overview}\label{Overview}
\subfloat[Choices]{\scalebox{0.19}{\includegraphics{fig-data-choice-all-bw}}}\hspace{0.3cm}
\subfloat[Average wage]{\scalebox{0.19}{\includegraphics{fig-data-wage-occupations-bw}}}
\begin{center}
\begin{minipage}[t]{0.8\columnwidth}
\item \scriptsize{\textbf{Notes:} The wage is a full-time equivalent deflated by the gross national product deflator, with 1987 as the base year. We do not report the wage if less than ten observations are available.}
\end{minipage}
\end{center}
\end{figure}%\FloatBarrier
%

Overall, average wages start at about \$10,000 at age 16 but increase considerably up to about \$25,000 at age 26. While wages in the blue-collar occupation are initially highest with about \$10,286, wages in the white-collar occupation and military start around \$9,000. However, wages in the white-collar occupation increase steeper over time and overtake blue-collar wages around age 21. At the end of the observation period, wages in the white-collar occupation are about 50\% higher than blue-collar wages with \$32,756 as opposed to only \$20,739. Military wages remain lowest throughout.

We fit the model to the empirical data using maximum likelihood calibration. Figure \ref{Model fit} shows the overall agreement between the empirical data and a dataset simulated using the calibrated parameters within the support of the data. On the left, we show the choice probability of working in a blue-collar occupation, while we plot the average wage across all occupations on the right.

%
\begin{figure}[t!]\centering
\caption{Model fit}\label{Model fit}
\subfloat[Blue-collar]{\scalebox{0.19}{\includegraphics{fig-model-fit-choice-blue-bw}}}\hspace{0.3cm}
\subfloat[Average wage]{\scalebox{0.19}{\includegraphics{fig-model-fit-wage-all-bw}}}
\begin{center}
\begin{minipage}[t]{0.7\columnwidth}
\item \scriptsize{\textbf{Notes:} We simulate a sample of 1,000 individuals using the calibrated model.}
\end{minipage}\end{center}
\end{figure}%\FloatBarrier
%

Overall, the values of the calibrated parameters of the model are in broad agreement with the relevant literature. For example, individuals discount future utilities by $6\%$ per year, and wages increase by about $7\%$ with each additional year of schooling.
%-------------------------------------------------------------------------------
\subsection{Economic insights}
%-------------------------------------------------------------------------------
\autoref{Economic mechanism and policy forecast} illustrates the ability of the model to quantify the impact of economic mechanisms and to forecast the effect of public policies. On the left, we vary the discount factor capturing time preferences between $0.91$ and $0.95$ while we introduce a tuition subsidy of up to $\$4{,}000$ on the right. In both cases, we are interested in the changes to average final schooling.

Increases in the discount factor and the tuition subsidy both result in higher average final schooling. However, they do so for very different reasons. While individuals emphasize the future benefits of their schooling investment in the former, they react to a reduction of its immediate cost in the latter.

\begin{figure}[h!]\centering
	\caption{Economic mechanism and policy forecast}\label{Economic mechanism and policy forecast}
	\subfloat[Time preference]{\scalebox{0.19}{\includegraphics{fig-economic-mechanism-bw}}}\hspace{0.3cm}
	\subfloat[Tuition subsidy]{\scalebox{0.19}{\includegraphics{fig-policy-forecast-bw}}}
	\begin{center}
		\begin{minipage}[t]{0.675\columnwidth}
			\item \scriptsize{\textbf{Notes:} We simulate a sample of 1,000 individuals using the calibrated model.}
		\end{minipage}
	\end{center}
\end{figure}%\FloatBarrier


\documentclass{article}
\usepackage{fullpage}
\usepackage{nopageno}
\usepackage{amsmath}
\allowdisplaybreaks

\newcommand{\abs}[1]{\left\lvert #1 \right\rvert}

\begin{document}
\title{Notes}
\date{November 20, 2013}
\maketitle
\section*{exam 2}
4.4 has 1 problem for 20 points
4.7 has one problem for 20 points
5.1 has 1 problem for 10 points
8.1-8.3 has one point (technically from 8.3) for 20 points
8.5 has one problem for 30 points

most should be similar to class problems, one is exactly the same as in class even

\section*{section 5.1}
determine the spring constant of the spring with natural length 10 in that is stretched to a distance 13 in by an object weighing 5 lb
\begin{align*}
    m\frac{\mathrm{d}^2x}{\mathrm{d}t^2}+kx&=0\\
    x(0)&=\alpha\\
    x'(0)&=\beta
\end{align*}
\subsection*{solution}
``English'' units
\begin{align*}
    s&=3\text{in}\\
    &=\frac{3}{12}\text{ft}=\frac{1}{4}\text{ft}\\
    F&=ks\\
    5&=k\frac{1}{4}\\
    k&=20\text{lb/ft}\\
    F&=mg\\
    5&=m32\\
    m&=\frac{5}{32}\text{slug}
\end{align*}
\section*{random question example}
\begin{align*}
    \mathcal{L}^{-1}\left\{\frac{4s}{(s^2+16)^2}\right\}\\
    \sin 4t &\to \frac{4}{s^2+16}\\
    t\sin 4t &\to -\frac{\mathrm{d}}{\mathrm{d}x}(\frac{4}{s^2+16})\\
    &=\frac{4(2s)}{(s^2+16)^2}\\
    &=\frac{8s}{(s^2+16)^2}\\
    \mathcal{L}\{t^nf(t)&=(-1)^n\frac{\mathrm{d}^nF}{\mathrm{d}s^n}\}\\
    \frac{1}{2}t\sin 4t&\to \frac{4s}{(s^2+16)^2}
\end{align*}
\end{document}


\section{Specification Model}
\label{sec:performance-modeling-specification-model}
The typical modeling workflow requires to specify
(i) the statistical analysis of data collected from the real system in order to determine the input model to drive simulations,
(ii) the analytical model and equations to determine performance metrics,
(iii) the adopted simulation approach and
(iv) the algorithms involved in computations.

\paragraph{Statistical specifications}
We have been provided with the statistical characterization of the target system.
Tasks belonging to the $i$-th class arrive to the system according to an exponential arrival process with rate $ \lambda_{i}$.
The Cloudlet serves tasks belonging to the $i$-th class according to an exponential service process with rate $\mu_{clt,i}$.
The Cloud serves tasks belonging to the $i$-th class according to an exponential service process with rate $\mu_{cld,i}$.
We assume that
(i) $\mu_{clt,i}>\mu_{cld,i}\ \forall i=1,2$ and
(ii) the setup time $T_{setup}$ is exponentially distributed with expected value $E[T_{setup}]$.

In particular, we consider values shown in Equations~\ref{eqn:statistical-specifications}.

\begin{equation}
\begin{split}
\lambda_{1}  &=6.00\;tasks/sec \\
\lambda_{2}  &=6.25\;tasks/sec \\
\mu_{clt,1}  &=0.45\;tasks/sec \\
\mu_{clt,2}  &=0.27\;tasks/sec \\
\mu_{cld,1}  &=0.25\;tasks/sec \\
\mu_{cld,2}  &=0.22\;tasks/sec \\
E[T_{setup}] &=0.8\;sec \\
\end{split}
\label{eqn:statistical-specifications}
\end{equation}

\paragraph{Analytical Model}
Given the importance and complexity of the analytical model, we preferred to reserve the whole Section~\ref{sec:analytical-model} to present it.

\paragraph{Simulation Approach}
We decided to adopt the \textit{next-event simulation method}, which is the most effective discrete-event technique in terms of algorithmic modeling, time management and computational requirements.

\paragraph{Algorithmic specifications}
From the point of view of algorithms involved in the simulation, we need to specify:

\begin{itemize}

	\item \textit{Off-Loading Algorithm}: defines the off-loading policy implemented by the \textit{Cloudlet Controller (CTRL)}.
	%
	The first policy, defined in Algorithm~\ref{alg:off-loading-policy-1}, makes no distinction between classes of tasks, which are all served by the Cloudlet as long as it has available resources.
	%
	The second policy, defined in Algorithm~\ref{alg:off-loading-policy-2}, gives higher priority to the $1^{st}$ class tasks by
	(i) accepting in Cloudlet at most $S$ $2^{nd}$ class tasks and
	(ii) freeing up Cloudlet resources occupied by the $2^{nd}$ class tasks in favor of $1^{st}$ class tasks restarting the former on Cloud.
	Notice that the threshold $S$ plays a key role here.
	On one hand, a high $S$ increases the opportunity for  $2^{nd}$ class tasks to be served by the Cloudlet, that is faster than the Cloud.
	On the other hand, a high $S$ increases also the risk for $2^{nd}$ class tasks to incur in the overhead caused by the restart in Cloud.

	\item \textit{Simulation Algorithm}: defines the main execution flow of the simulator, as specified in Algorithm~\ref{alg:simulation-workflow}.
\end{itemize}

With reference to the simulation algorithm, it is worth focusing on the following aspects:

\begin{itemize}

	\item \textit{event generation}: a new \textit{arrival event} is generated every time an arrival is processed and the closed-door condition does not hold. We adopted Algorithm~\ref{alg:arrivals} to generate classed arrivals, whose statistical correctness relies on the properties of the exponential distribution.
	%
	A new \textit{completion event} is generated every time an arrival is processed.
	%
	A new \textit{interruption event} is generated when an arrival is processed and the Cloudlet Controller determines that a task must be interrupted in the Cloudlet and restarted in the Cloud~\footnote{the generation of interruption events is possible only when Off-Loading Policy 2 is adopted.}.
	%
	Notice that the interruption event is never mentioned in the simulation workflow in Algorithm~\ref{alg:simulation-workflow}; this is because the interruption event is not an external arrival, but an internal task switching between subsystems.

	\item \textit{event submission}: when a new event is submitted to the system, the simulator updates (i) the system state and (ii) the simulation counters, e.g. number of arrivals, number of completions and so on.

	\item \textit{closed-door condition}: when this condition holds true, no more arrivals will be generated and system will only handle remaining completion events until it reaches the idle state.
	This condition is crucial because it identifies the point in time when the simulator has collected enough data to achieve our goals.
	To this aim, this condition holds true when the simulator has collected the configured number of batches, i.e. 64 batches with 512 samples each.

	\item \textit{stop condition}: when this condition holds true, the simulation is terminated. The logical definition of this condition depends on whether the simulator is used for the performance analysis in the transient state or in the steady state.

	In transient analysis, the condition holds true when the simulation clock is greater than a given stop time because we want to study whether or not performance metrics to converge to stable values within the given amount of time.

	In performance analysis, the condition holds true when the closed-door condition does and the system has reached the idle state because we assume that the steady state exists and we want to collect enough data to generated meaningful confidence intervals.

	\item \textit{sampling condition}: when this condition holds true, performance metrics should be sampled.
	In particular, it holds true when the processed event is a completion.
	We did like this because
	(i) sampling, as any other operation within the simulator, should happen in correspondence of an event, by design, and
	(ii) a completion events brings a super set of insights w.r.t. an arrival.

	\item \textit{metrics management}: when an event is submitted to the system, all the simulation counters are updated, e.g. number of arrivals, service time, integral areas and so on.
	When the sampling condition holds true, those counters are used to compute a sample of performance metrics. Such a sample is then used to update performance statistics leveraging \textit{One-Pass Wellford algorithm, batch means and confidence intervals} with formulas and algorithms described in \cite{leemis2006discrete}.

	We decoupled counters updates and metrics sampling in this way in order to improve the simulator performances both in terms of timing and memory consumption.
	%
	In fact
	(i) the former is a low-effort operation that must be executed whenever a new event is processed,
	(ii) the latter is a higher-effort operation that should be executed in correspondence of the event type carrying the most complete set of information, i.e. completion events.
	%
	Furthermore, we preferred to compute metrics by executing metrics updates within the simulation loop rather than at the end of the simulation because in this way we can consume subsets of data points at every sampling operation rather than collecting all of them until the end, thus saving up memory.
\end{itemize}

\begin{algorithm}
	\SetAlgoLined
	\If{arrival of class 1 or class 2}{
		\eIf{$n_{clt,1}+n_{clt,2}=N$}{
			send to the Cloud
		}{
			accept on Cloudlet
		}
	}
	\caption{Off-Loading Policy 1 (OP1).}
	\label{alg:off-loading-policy-1}
\end{algorithm}

\begin{algorithm}
	\SetAlgoLined
	\If{arrival of class 1}{
		\If{$n_{clt,1}=N$}{
			send to the Cloud
		}
		\If{$n_{clt,1}+n_{clt,2}<S$}{
			accept on the Cloudlet
		}
		\eIf{$n_{clt,2} > 0$}{
			accept on the Cloudlet, interrupt a $2^{nd}$ class task in the Cloudlet and restart it in the Cloud
		}{
			accept on Cloudlet
		}
	}
	\If{arrival of class 2}{
		\eIf{$n_{clt,1}+n_{clt,2}>=S$}{
			send to the Cloud
		}{
			accept on the Cloudlet
		}
	}
	\caption{Off-Loading Policy 2 (OP2).}
	\label{alg:off-loading-policy-2}
\end{algorithm}

\begin{algorithm}
	\SetAlgoLined

	calendar.schedule\_arrival();

	\While{$\neg stop\_condition()$}{
		e = calendar.next\_event();

		\If{$e.type = completion$}{
			submit\_event(e);
		}

		\If{$e.type = arrival \land \neg close\_door\_condition()$}{
			e\_next = submit\_event(e);

			calendar.schedule(e\_next);

			calendar.schedule\_arrival();
		}

		update\_simulation\_counters();

		\If{$sampling\_condition()$}{
			sample = sampling();

			update\_metrics(sample);
		}
	}

\caption{Simulation Workflow.}
\label{alg:simulation-workflow}
\end{algorithm}

\begin{algorithm}
	\SetAlgoLined

	rndgen.select\_stream(ARRIVAL)

	$p_{1}=\frac{\lambda_{1}}{\lambda_{1}+\lambda_{2}}$

	u = rndgen.uniform(0.0,1.0)

	\eIf{$u\leq p_{1}$}{
		arrival\_type = TASK\_1

		rndgen.select\_stream(ARRIVAL\_TASK\_1)

		$t_{inter-arrival}$ = rndgen.exponential($\lambda_{1}$)
	}{
		arrival\_type = TASK\_2

		rndgen.select\_stream(ARRIVAL\_TASK\_2)

		$t_{inter-arrival}$ = rndgen.exponential($\lambda_{2}$)
	}

	$t_{arrival}=t_{last\_arrival}+t_{inter-arrival}$

	$t_{last\_arrival}=t_{arrival}$

	schedule(arrival\_type,$t_{arrival}$)
	\caption{Generation of arrivals.}
	\label{alg:arrivals}
\end{algorithm}


\documentstyle[12pt]{article}
\begin{document}
\begin{center} {\Large Polynomial Ideals} \end{center}
\begin{center} Arithmetic for polynomial ideals supported by
Gr\"obner bases \end{center}
\begin{center} Version 1.0 May 1992 \end{center}

\begin{center} Herbert Melenk \\ Konrad-Zuse-Zentrum f\"ur
Informationstechnik \\
Takustra\"se 7 \\ D14195 Berlin--Dahlem \\ Federal Republic of Germany \\
melenk@zib.de \\ May 1992 \end{center}

\section{Introduction}

This package implements the basic arithmetic for polynomial ideals
by exploiting the Gr\"obner bases package of REDUCE.
In order to save computing time all intermediate Gr\"obner bases
are stored internally such that time consuming repetitions
are inhibited. A uniform setting facilitates the access.

\section{Initialization}

Prior to any computation the set of variables has to be declared
by calling the operator $I\_setting$ . E.g. in order to initiate
computations in the polynomial ring $Q[x,y,z]$ call
\begin{verbatim}
    I_setting(x,y,z);
\end{verbatim}
A subsequent call to $I\_setting$ allows one to select another set
of variables; at the same time the internal data structures
are cleared in order to free memory resources.

\section{Bases}

An ideal is represented by a basis (set of polynomials) tagged
with the symbol $I$, e.g.
\begin{verbatim}
   u := I(x*z-y**2, x**3-y*z);
\end{verbatim}
Alternatively a list of polynomials can be used as input basis; however,
all arithmetic results will be presented in the above form. The
operator $ideal2list$ allows one to convert an ideal basis into a
conventional REDUCE list.

\subsection{Operators}

Because of syntactical restrictions in REDUCE, special operators
have to be used for ideal arithmetic:

\begin{verbatim}
         .+            ideal sum (infix)
         .*            ideal product (infix)
         .:            ideal quotient (infix)
         ./            ideal quotient (infix)
         .=            ideal equality test (infix)
         subset        ideal inclusion test (infix)
         intersection  ideal intersection (prefix,binary)
         member        test for membership in an ideal
                         (infix: polynomial and ideal)
         gb            Groebner basis of an ideal (prefix, unary)
         ideal2list    convert ideal basis to polynomial list
                         (prefix,unary)
\end{verbatim}

Example:

\begin{verbatim}
    I(x+y,x^2) .* I(x-z);

      2                      2    2
   I(X  + X*Y - X*Z - Y*Z,X*Y  - Y *Z)
\end{verbatim}

The test operators return the values 1 (=true) or 0 (=false)
such that they can be used in REDUCE $if-then-else$ statements
directly.

The results of $sum,product, quotient,intersction$ are ideals
represented by their Gr\"obner basis in the current setting and
term order. The term order can be modified using the operator
$torder$ from the Gr\"obner package. Note that ideal equality
cannot be tested with the REDUCE equal sign:

\begin{verbatim}

   I(x,y)  = I(y,x)       is false
   I(x,y) .= I(y,x)       is true

\end{verbatim}

\section{Algorithms}

The operators $groebner$, $preduce$ and $idealquotient$ of the
REDUCE Gr\"obner package support the basic algorithms:

$GB(Iu_1,u_2...) \rightarrow groebner(\{u_1,u_2...\},\{x,...\})$

$p \in I_1 \rightarrow p=0 \ mod \ I_1$

$I_1 : I(p) \rightarrow (I_1 \bigcap I(p)) / p \ elementwise$

\noindent
On top of these the Ideals package implements the following
operations:

$I(u_1,u_2...)+I(v_1,v_2...) \rightarrow GB(I(u_1,u_2...,v_1,v_2...))$

$I(u_1,u_2...)*I(v_1,v_2...)\rightarrow
 GB(I(u_1*v_1,u_1*v2,...,u_2*v_1,u_2*v_2...))$

$I_1 \bigcap I_2 \rightarrow
  Q[x,...] \bigcap GB_{lex}(t*I_1 + (1-t)*I_2,\{t,x,..\}) $

$I_1 : I(p_1,p_2,...) \rightarrow I_1 : I(p_1) \bigcap I_1 : I(p_2)
\bigcap ...$

$I_1 = I_2 \rightarrow GB(I_1)=GB(I_2)$

$I_1 \subseteq I_2
   \rightarrow \ u_i \in I_2 \ \forall \ u_i \in I_1=I(u_1,u_2...)$

\section{Examples}

Please consult the file $ideals.tst$.
\end{document}


\documentclass{beamer}

\usepackage{amsmath,amssymb,amsthm,graphicx}
\usepackage{caption,subcaption}
\usetheme{Copenhagen}
 \newcommand{\N}{\mathbb{N}}
 \newcommand{\Z}{\mathbb{Z}}
 \newcommand{\Q}{\mathbb{Q}}
 \newcommand{\R}{\mathbb{R}}
 \newcommand{\C}{\mathbb{C}}
 \newcommand{\bM}{\begin{bmatrix}}
 \newcommand{\eM}{\end{bmatrix}}
 \newcommand{\Ni}{\N\cup\{\infty\}}
  \newcommand{\rmD}[1]{\mathrm{d}#1}
\newcommand{\floor}[1]{\lfloor #1 \rfloor}
\title{Optimal Path Planning for Robotic Arms in Household Assistance}
\author{Vikram Sunder and Zachary Greenberg}

\begin{document}
\begin{frame}
\maketitle
\end{frame}

\section{Introduction}
\begin{frame}{The Robot}
\begin{itemize}
\item Irobot Create Base\\
\item 5-degree of freedom arm
\end{itemize}
\begin{figure}[htb]
\centering
\includegraphics[scale=.05]{PathPics/Robot_With_Arm.jpg}
\end{figure}
\end{frame}

\begin{frame}{The Problem}
Find the shortest path the arm should take to a point.\\
~\\
Explore different notions of ``shortest'' to get different paths.
\begin{itemize}
\item Euclidean Distance
\item Energy Required to Hold an Object
\item Kinetic Energy
\end{itemize}
\end{frame}
\begin{frame}{The Algorithm}
\begin{itemize}
\item Divide configuration space into a grid to make a graph.
\item We used $A^*$ to compute the shortest path in the graph.
\item Use different cost functions to simulate different metrics.
\item As long as the cost is at least the euclidean distance, then the euclidean distance to the target is an admissible heuristic.
\end{itemize}
\end{frame}
\begin{frame}{Kinematics}
Forward Kinematics is a mapping $FK$ from configuration space to work space.\\
The Jacobian $J$ is the derivative matrix for $FK$.\\
To get linear velocities from angular velocities $\dot{\theta}$ take $J\dot{\theta}$\\
The $J^T$ maps from workspace forces to torques. $\tau = J^TF$.\\
~\\
For our robot only the first 4 angles determine position.\\
In addition the first angle determines the plane the arm moves in. So we can solve for it first and only have to search 3 dimensional space for the path.
\end{frame}

\section{Results}
\begin{frame}{Euclidean Distance}
Compute distance between nodes in work space.\\
Considering the angle of the end effector gives a different path.
\begin{figure}[htb]
\centering
\begin{subfigure}[b]{0.5\textwidth}
\centering
\includegraphics[scale=.3]{PathPics/Basic_Path.jpg}
\caption{Orientation Path}
\end{subfigure}%
~
\begin{subfigure}[b]{0.5\textwidth}
\centering
\includegraphics[scale=.3]{PathPics/NoAlpha_Path.jpg}
\caption{No Orientation Path}
\end{subfigure}

\caption{Euclidean Distance Paths}
\label{fig:basicPaths}
\end{figure}

\end{frame}

\begin{frame}{Energy To Hold Up an Object (Next State)}
Add the energy to hold up an object of weight $m$ in the next state:\\
$$	d(u,v) =  \left\|(FK(u)-FK(v))\right\|^2 + \small\left\|J^T_v\bM 0 \\ 0 \\ mg \eM\right\|^2$$\normalsize
\begin{figure}[htb]
\centering
\begin{subfigure}[b]{0.5\textwidth}
\centering
\includegraphics[scale=.2]{PathPics/Wrench_Path.jpg}
\caption{Orientation Path}
\end{subfigure}%
~
\begin{subfigure}[b]{0.5\textwidth}
\centering
\includegraphics[scale=.2]{PathPics/Wrench_NoAlpha_Path.jpg}
\caption{No Orientation Path}
\end{subfigure}

\caption{Paths When Considering Energy To Hold Up an Object}
\label{fig:EnergyPaths1}
\end{figure}
\end{frame}

\begin{frame}{Energy to Hold Up an Object (Ratios)}
Using the ratio of torques between the states gives:
 $$	d(u,v) =  \left\|(FK(u)-FK(v))\right\|^2 + \Tiny\frac{\left\|J^T_v\bM 0 \\ 0 \\ mg \eM\right\|^2}{\left\|J^T_u\bM 0 \\ 0 \\ mg \eM\right\|^2}$$\normalsize
\begin{figure}[htb]
\centering
\begin{subfigure}[b]{0.5\textwidth}
\centering
\includegraphics[scale=.19]{PathPics/Wrench_Path.jpg}
\caption{Path When Only Considering The Next State}
\end{subfigure}%
~
\begin{subfigure}[b]{0.5\textwidth}
\centering
\includegraphics[scale=.19]{PathPics/Wrench_Ratio_Path.jpg}
\caption{Path When Considering a Ratio of Torques}
\end{subfigure}

\caption{Paths When Considering Energy To Hold Up an Object}
\label{fig:EnergyPaths2}
\end{figure}
\end{frame}
\begin{frame}{Kinetic Energy}
Let $J$ be the Jacobian. Let $\dot{\theta}$ be the angular velocity vector.
 \small\[E_{linear} = \frac{1}{2}m \|J_u\dot{\theta}\|^2\]. \\
\[E_{angular} = \frac{1}{2}m \left\|\frac{\Delta\theta_1+\Delta\theta_2+\Delta\theta_3)}{h}\right\|^2\]\normalsize
\begin{figure}[htb]
\centering
\begin{subfigure}[b]{0.33\textwidth}
\centering
\includegraphics[scale=.135]{PathPics/Energy_Linear_Path.jpg}
\caption{Linear Kinetic Engery Path}
\end{subfigure}%
~
\begin{subfigure}[b]{0.33\textwidth}
\centering
\includegraphics[scale=.135]{PathPics/Energy_Angular_Path.jpg}
\caption{Angular Kinetic Energy Path}
\end{subfigure}%
~
\begin{subfigure}[b]{0.33\textwidth}
\centering
\includegraphics[scale=.135]{PathPics/Energy_Kinetic_Path.jpg}
\caption{Total Kinetic Energy Path}
\end{subfigure}

\caption{Paths When Considering Kinetic Energy}
\label{fig:EnergyPaths2}
\end{figure}
\end{frame}

\section{Future Work}
\begin{frame}{Future Work}
\begin{itemize}
\item Consider other metrics\\
\begin{itemize}
\item Better angular kinetic energy metric
\item More accurate physics model of the arm
\end{itemize}
\item Using the robot base as part of the path finding
\item Increasing the grid size for smoother path
\item Move beyond simulation to the actual robot
\item Collision detection and obstacle avoidance
\end{itemize}
\end{frame}
\end{document}