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

\begin{document}
\section{Lecture 27}
\subsection{Lecture Notes - Scattering Theory}
\subsubsection{Motivation}
Scattering Theory is very useful for probing information on atomic scales, in condensed matter/nuclear/atomic physics. A familiar example is Rutherford scattering:
\begin{center}
    \includegraphics[scale=0.5]{Lecture-27/l27-img1.png}
    \includegraphics[scale=0.5]{Lecture-27/l27-img2.png}
\end{center}
Where $\alpha$ particles (Helium nuclei) were scattered off of gold atoms, and large deflections were observed.

\subsubsection{Fundamental parameters}
There are a couple quantities that are of relevance to consider. First, we have the impact parameter $b$, which is the perpendicular distance from the incoming trajectory to the parallel axis through the center of the target. Then, we have the scattering angle $\theta$, which is the angle between the initial and final velocities. The simplest possible interaction is the hard-sphere interaction:
\begin{center}
    \includegraphics[scale=0.8]{Lecture-27/l27-img3.png}
\end{center}
Now, lets consider a beam of area $A$ passing through a target of length $L$ and number density of particles $n$. Assume the target is larger in the cross sectional area than in the beam. What is the total number of target particles in the beam?
\begin{center}
    \includegraphics[scale=0.7]{Lecture-27/l27-img4.png}
\end{center}
\begin{s}
Since $n$ gives the volume number density, we have that $AL$ gives the volume of the beam in the target and hence the total number of target particles is given by $nAL$.
\end{s}
Next, the \textbf{cross-section} $\sigma$ is defined as the effective area of target for interacting with the particle. For hard spheres of radius $R$, we have that $\sigma = \pi R^2$ (the cross-sectional area of a circle).
\begin{center}
    \includegraphics[scale=0.8]{Lecture-27/l27-img5.png}
\end{center}
Now, given this cross section $\sigma$ of a single target particle, what is the probability that any one projectile makes a hit (assume the same scenario above with the beam of area $A$, the target of length $L$?)
\begin{s}
By dimensional analysis, since probability is dimensionless, since $n$ has units of inverse volume, then $L$ has units of length and $\sigma$ has units of area and hence this works out. This makes sense as the probability should scale with the cross-sectional area of a target particle, the length of the target, and the number density of the target. A way to see that the area $A$ of the beam drops out to see is that:
\[P(\text{hit}) = \frac{\text{Area of all targets}}{A} = \frac{n\sigma A L}{A} = n\sigma L\]
\end{s}
Given the beam has an incident rate $R_{inc}$ of incoming particles per unit time, what is the scattered rate (number of scattered particles per unit time?)
\begin{s}
The rate would just be $R_{inc}\sigma n L$, just multiply the scattering probability by the incoming rate.
\end{s}

\subsubsection{Example: Scattering Neutrons on Aluminum Foil}
Take $N_{\text{inc}} = 10000$. the alumnimum foil has thickness of $0.1\text{mm}$. For neutrons, we have that $\sigma = 1.5 \cdot 10^{-28}\text{m}^2$. Since this is such a common unit in nuclear physics, this is often denoted with a new unit, the \textit{barn} ($1 \text{barn} = 1\times 10^{-28}\text{m}^2$; i.e. $\sigma = 1.5\text{barns}$. For alumnimum, we have mass density $\rho_{Al} = 2.7\times 10^3 \text{kg/m}^3$ and we know that $m_{Al} = 27u$. Hence, the scattered number of particles is given by:
\[N_{\text{scatter}} = N_{\text{inc}}\frac{\rho_{\text{Al}}}{m_{Al}}L\sigma = 9\]

\subsubsection{Example: Scattering of Two Hard Spheres}
In this case, we have effective scattering area of $\pi(R_1 + R_2)^2$.
\begin{center}
    \includegraphics[scale=0.7]{Lecture-27/l27-img6.png}
\end{center}

\subsubsection{Example: Mean free path of air molecule}
Air molecules can be approximated as hard spheres with $R = 0.15\text{nm}$. Define the quantity \textbf{mean free path} $\lambda$ as the average distance between two collisions. For sigma, we take (from the formula above):
\[\sigma = \pi(2R)^2 = 4\pi R^2\]
We have number density:
\[n = \frac{N}{V}\]
The probability of a collision when travelling a distance $dx$ is given by:
\[P(\text{coll in dx}) = n\sigma dx\]
Hence the probability of having a first collision in $x$ and $x + dx$ as:
\[P(\text{first coll between in x and x + dx}) = P(\text{no coll in x})\cdot n \sigma dx\]
We can write this in another way as:
\[P(\text{first coll between in x and x + dx}) = P(\text{no coll in x}) - P(\text{no coll in x + dx})\]
Turning this small $dx$ into a differential, we have:
\[P(\text{first coll between in x and x + dx}) = -\dod{}{x}P(\text{no coll in x})\]
We call $P(\text{no coll in x})$ as $P(x)$ for notations. Setting the two expressions equal to each other, we have:
\[\dod{}{x}P(x) = -\frac{N\sigma}{V}P(x)\]
This has solution:
\[P(x) = \exp(-\frac{N\sigma}{V}x)\]
Then the mean free path can be calculated as the average value of x given this probaility distribution:
\[\lambda = \avg{x} = \int_{0}^{\infty}xP(x)dx = \int_0^\infty xn\sigma \exp(-\frac{N\sigma}{V}x)\]
Note that the $n\sigma$ is there as a normalization factor for the distribution. Taking this integral, we have:
\[\lambda = \frac{1}{n\sigma}\]
This makes sense intuitively; the larger the cross section and the larger the number density, the smaller the mean free path between collisions. Dimensionally, this also has units of length, which is good! At STP, we can calculate what this would be numerically:
\[\lambda = \frac{V_a}{N_a(4\pi R^2)} \approx 130\text{nm}\]

\subsubsection{Solid Angle}
\begin{center}
    \includegraphics[scale=0.5]{Lecture-27/l27-img7.png}
\end{center}
We are familiar with the normal angle, $\Delta \theta = \frac{s}{r}$, the ratio of the arc length to the radius. Generalizing this to 3D, we have the solid angle, $\Delta \Omega = \frac{A}{r^2}$ where $A$ is the "arc area" and $r$ the radius. For a cone with polar angles $\theta, \theta + d\theta$, $\phi, \phi + d\phi$. The expression is therefore given by:
\[d\Omega = \sin\theta d\theta d\phi\]
What is the integral of the solid angle increment $d\Omega$ over all possible solid angles (over the surface of a sphere?)
\begin{s}
$\int d\Omega = 4\pi$ (surface area of unit sphere). We could actually do the integral, or we could just recognize that the surface area of a sphere is given as $4\pi r^2$ and divide this by $r^2$.
\end{s}

\subsubsection{Differential Cross Section}
Typical scenario is we have that a detector covers some portion of a sphere around our target.
\begin{center}
    \includegraphics[scale=0.8]{Lecture-27/l27-img8.png}
\end{center}
We must have that:
\[N_{\text{scatter}}(\text{into d$\Omega$}) = N_{inc}n_{target}d\sigma(\text{into d$\Omega$}) = N_{inc}n_{target}\left(\dod{\sigma}{\Omega}(\theta, \phi)\right)d\Omega\]
The term $\od{\sigma}{\Omega}(\theta, \phi)$ is the differential cross section. This can be measured in experiment, or predicted in theory. We can also obtain the total cross section, which is the integral over all differnetial cross sections.
\[\sigma_{tot} = \int \dod{\sigma}{\Omega}(\theta, \phi) d\Omega = \int_0^\pi \sin\theta d\theta \int
_0^{2\pi}d\phi\dod{\sigma}{\Omega}\]
For a beam with area $A$ and total number of particles $N$, what is the total number of particles $dN$ that passes through the segment between $b$ and $b + db$ and $\phi$ and $\phi + d\phi$?
\begin{center}
    \includegraphics[scale=0.7]{Lecture-27/l27-img9.png}
\end{center}
\begin{s}
We know that the area of the segment is given by $b dbd\phi$, and then dividing this by the total area $A$ we get the fraction of particles that would hit that area. Hence, $dN = \frac{N}{A}bdbd\phi$.
\end{s}
Note that for the case with axial symmetry, we have:
\begin{center}
    \includegraphics[scale=0.7]{Lecture-27/l27-img10.png}
\end{center}
But we will continue this discussion next day.
\end{document}


\chapter{Viscoelastic Predictions}
%The ultrasound method \cite{Foiret2014} enables the simultaneous measurement of cortical thickness and tissue elastic properties where previous techniques such as DXA (the \textit{de facto} method) could archieve.
As explained before, factors of risk fracture such as thickness, porosity and particular quality elements of the extracellular matrix, define the bone quality assessed by DXA techniques and BMD values. The QUS method proposed by \textit{Minonzio and Foiret et al.} \cite{Foiret2014}, \cite{Minonzio2018} of axial transmission technique simulated in the chapter before, is based on recording from the guided-wave propagation over the media, where damping factors naturally affect the signal. This relates to a viscoelastic behavior of the cortical bone arising mainly from the presence of collagen fibers, specifically treated with Resonant Ultrasound Spectroscopy (RUS) techniques. Thus, it becomes natural to study the correspondence between such damping elements and their preponderance on the resulting homogenized coefficients by the two-scale homogenization theory.

Describing the damping effects on cortical bone is not new, \textit{Bernard} \textit{et al. }\cite{Bernard2015} studied a viscoelastic-type behavior on a frequency domain, in which he modelled the elastic tensor $C^*_{ij}$ with damping effect described by the formulas:
\begin{equation*}
C^*_{ij} = C_{ij} + i C_{ij}^{'} = C_{ij} (1+ iQ_{ij}^{-1}) \quad i,j = 1,\dots, 6
\end{equation*}
where the $Q^{-1}_{ij}$ are defined as ratios of the imaginary part ($C_{ij}'$) to the real part ($C_{ij}$), denoting the so-called quality factors.

In this section, I shall reformulate such quality factors following the two-scale homogenization formalism, recovering the homogenized coefficients in the elastic case at different porosity levels and particularly obtaining prediction for the quality factors at some interval. Using up-to-date references, such coefficients are yet to be validated since there isn't enough experimental literature to confirm nor further validate the predictions.

\section{Formalization of Q-factors}
The quality factors $Q_{ij}$ proposed by \textit{Bernard} in experimental fashion, provide an interesting formalization of the ratio between the real and imaginary constitutive coefficients of a full viscoelastic mechanical description of the bone, moreover it gives us a comparison using the existent literature and experimental results.

In the following, it is described the so-called Q-factors by means of the two-scale homogenization theory, derived from a \textit{Kelvin-Voigt} viscoelastic formulation of bone in frequency domain. More specifically, the mechanical behavior of bone is assumed as a multiphase viscoelastic material composed of two-phases, defined by a square cell unit on $\mathbf{R}^2$ with circular inclusion in the form $\mathbf{Y} = \mathbf{Y}_{m} \cup \mathbf{Y}_{f}$ being each the matrix and fluid parts respectively.
For the bone matrix, we associate an elastic behavior defined by the elastic coefficients:
\begin{equation*}
    C_{ijkl}(\mathbf{y}) = C_{ijkl}^m \mathbb{I}_{\mathbf{Y}_m}(\mathbf{y}) + C_{ijkl}^f \mathbb{I}_{\mathbf{Y}_f}(\mathbf{y})
\end{equation*}
while the porosity is modeled with a viscous contribution, associated to coefficients in the form:
\begin{equation*}
    D_{ijkl}(\mathbf{y}) =  D_{ijkl}^m \mathbb{I}_{\mathbf{Y}_m}(\mathbf{y}) + D_{ijkl}^f \mathbb{I}_{\mathbf{Y}_f}(\mathbf{y}).
\end{equation*}
Moreover, the relations between both behaviors are expressed with attenuation specified by parameters $\alpha^{(m)}, \alpha^{(f)} >0$ associated to the bone matrix and mesostructure respectively. Explicitly, it is assumed:
\begin{equation*}
    D_{ijkl}^m(\mathbf{y}) = \alpha^{m} C_{ijkl}^m(\mathbf{y}) , \quad D_{ijkl}^f (\mathbf{y}) = \alpha^{f} C_{ijkl}^f(\mathbf{y})
\end{equation*}

\begin{rem}
By assuming this kind of relation, the objective is to obtain a viscoelastic model in which the viscous part is modelled by a linear attenuation of the elastic one, so that the overall behavior is of transverse isotropic type defined by pair of parameters $(\alpha^m, \alpha^f)$ that mimic closely the experimental behavior of cortical bone.
\end{rem}

\subsection{Workflow Description}
Given the requirements of a viscous-like behavior, in time domain is considered a model of \textit{Kelvin-Voigt} type with mixed boundary conditions, described in the form:
\begin{equation*}
    \left \{
    \begin{array}{cc}
        \rho^{\epsilon}\partial_{tt}u^{\epsilon} - \nabla \cdot \sigma(u^{\epsilon}, \partial_t u^{\epsilon}) = \mathbf{0} & \text{ in } (0,T) \times \Omega\\
        \sigma^{\epsilon}(u^{\epsilon},\partial_t u^{\epsilon})  = \mathbf{C}:\mathbf{e}(u^{\epsilon}) + \mathbf{D}:\mathbf{e}(\partial_t u^{\epsilon}) & \text{ in } (0,T) \times \Omega\\
        \sigma^{\epsilon}(u^{\epsilon}, \partial_t u^{\epsilon})\cdot n = \mathbf{F} & \text{ on } (0,T) \times \Gamma_N\\
        u^{\epsilon} = \mathbf{0} & \text{ on } (0,T) \times \Gamma_D
    \end{array}
    \right .
    \label{ViscoElasticModel}
\end{equation*}
\begin{rem}
In the above and the next developments, we assume resting initial conditions, i.e., $\partial_t u^{\epsilon} = u^{\epsilon} = \mathbf{0}$ at $t = 0$, not written explicitly in the models and further deductions.
\end{rem}
Existence results can be derived similarly to the elastic case proposed before, by applying spectral decomposition on both: the elastic and viscoelastic operators. Similar mathematical description of viscous models are given by \cite{Abdessamad2009}, \cite{Boughammoura2013} on homogeneous \textit{Dirichlet} boundary condition cases.

The interest is regarded to the frequency-domain, thus applying \textit{Fourier} transform defined at frequency $\omega \in \mathbb{R}$ by assuming $u^{\epsilon}(t,\mathbf{x}) = \hat{u}^{\epsilon}(\mathbf{x}) e^{i\omega t}$ it follows the redefined problem in Fourier domain:
\begin{equation*}
    \left \{
    \begin{array}{cc}
        -\omega^2 \rho^{\epsilon} \hat{u}^{\epsilon} - \nabla \cdot \hat{\sigma}_{\epsilon,\omega}(\hat{u}^{\epsilon}) = \mathbf{0} & \text{ in } \Omega  \\
        \hat{\sigma}^{\epsilon} (\hat{u}^{\epsilon}) = (\mathbf{C} + i\omega \mathbf{D}):\mathbf{e}(\hat{u}^{\epsilon}) & \text{ in } \Omega \\
        \hat{\sigma}^{\epsilon} (\hat{u}^{\epsilon}) \cdot n = \hat{\mathbf{F}}(\omega) & \text{ on } \Gamma_N \\
        \hat{u}^{\epsilon} = \mathbf{0} & \text{ on } \Gamma_D
    \end{array}
    \right .
\end{equation*}
such that at $\omega = 0$ we have $\hat{u}^{\epsilon}=\mathbf{0}$ at $\Omega$. In particular, for easiness of exposure, it has been omitted dependencies on the frequency for the multiscale solution $u^{\epsilon}$.\\
Now, by the homogenization heuristic using the two-scale asymptotic method, it follows the effective (macroscopic) model defined at frequency $\omega$ in the form:
\begin{equation*}
    \left \{
    \begin{array}{cc}
        -\omega^2 \rho^{0} \hat{u}^0 - \nabla \cdot \hat{\sigma}^0(\hat{u}^0)  = \mathbf{0} & \text{ in } \Omega \\
        \hat{\sigma}^{0} (\hat{u}^0)  = (\mathbf{C} + i\omega \mathbf{D})^{hom}:\mathbf{e}(\hat{u}^0) & \text{ in } \Omega \\
        \hat{\sigma}^{0} (\hat{u}^0) \cdot n = \hat{\mathbf{F}}(\omega) & \text{ on } \Gamma_N \\
        \hat{u}^0 = \mathbf{0} & \text{ on } \Gamma_D
    \end{array}
    \right .
\end{equation*}

In particular, the homogenized coefficients are defined by the cell problem solutions $\mathbf{N}^{rs} \in \mathbf{H}^1_{0}(\mathbf{Y}, \mathbb{C})$, described for each $r,s \in \{1,2,3\}$ in the form
\begin{equation*}
    \left \{
    \begin{array}{cc}
         \partial_{y_j} \big[ \big( C_{ijkl} + i\omega D_{ijkl} \big) \mathbf{e}_{kl}(\mathbf{N}^{rs}) \big] &= - \partial_{y_j} \big[ C_{ijkl} + i\omega D_{ijkl} \big] \quad \forall y \in \mathbf{Y} \\
        \big \langle \mathbf{N}^{rs} \big \rangle_{\mathbf{Y}}  = \mathbf{0} &
    \end{array}
    \right.
\end{equation*}
Since the cell problems must be valid for each $\omega \in \mathbb{R}$ and for each $\mathbf{y} \in \mathbf{Y}$, a natural procedure would be to decouple the cell PDE problems thus being able the define viscosity-elasticity ratios, i.e. an expression to the so-called Q-factors.

The decoupling is then defined by considering the separation between real and imaginary parts associated to the cell solutions, i.e., by considering the following decomposition
\begin{equation*}
    \mathbf{N}^{rs}(\mathbf{y}) = \mathbf{N}_R^{rs}(\mathbf{y}) + i\mathbf{N}_I^{rs}(\mathbf{y})
\end{equation*}
being now the vectors functions $\mathbf{N}_R^{rs}, \mathbf{N}_I^{rs}$ in $\mathbf{H}^1_{0}(\mathbf{Y},\mathbb{R})$ solving the following PDE coupled system for each real and imaginary solution parts in the form:
\begin{equation*}
    \left \{
    \begin{array}{cc}
        \partial_{y_j} \big[ C_{ijkl} \mathbf{e}_{kl}(\mathbf{N}^{rs}_R) -\omega D_{ijkl} \mathbf{e}_{kl}(\mathbf{N}^{rs}_I) \big] = - \partial_{y_j} \big[ C_{ijrs} \big] & \forall \mathbf{y} \in \mathbf{Y} \\
        \partial_{y_j} \big[ C_{ijkl} \mathbf{e}_{kl}(\mathbf{N}^{rs}_I) +\omega D_{ijkl} \mathbf{e}_{kl}(\mathbf{N}^{rs}_R) \big] = - \partial_{y_j} \big[ \omega D_{ijrs} \big] & \forall \mathbf{y} \in \mathbf{Y} \\
        \big \langle \mathbf{N}^{rs}_R \big \rangle_{\mathbf{Y}}= \mathbf{0} \quad \big \langle \mathbf{N}^{rs}_I \big \rangle_{\mathbf{Y}} = \mathbf{0}.  &
    \end{array}
    \right.
\end{equation*}
\begin{rem}
Note that for the above cell problems, the existence and uniqueness of a weak solution is guaranteed since the problem can be rewritten as a fully elliptic operator, being the solution unique by applying a normalization condition of mean equal $\mathbf{0}$ type.
\end{rem}
With the solution to the cell problem, we can then define the homogenized coefficients associated to the elastic and viscous part by recalling first:
\begin{equation*}
    \hat{\sigma}_{ij}^0 (\hat{u}^0,\omega) = R_{ijkl}^{hom} (\omega) \mathbf{e}_{kl}(\hat{u}^0)
\end{equation*}
being the homogenized tensor
\begin{equation*}
    R^{hom}_{ijrs}= \big \langle  C_{ijrs} + i\omega D_{ijrs} + \big( C_{ijkl} + i \omega D_{ijkl} \mathbf{e}_{kl}(\mathbf{N}^{rs}) \big) \big \rangle
\end{equation*}
so that, using the decomposition of $N^{rs}$ it follows the full homogenized expression, described in (\ref{ViscoElasticDecom}) decomposed in real and imaginary parts characterizing the elastic and viscous contribution respectively.
\begin{equation}
    \begin{aligned}
        R^{hom}_{ijrs} &= \big \langle C_{ijrs} + \big( C_{ijkl}\mathbf{e}_{kl}( \mathbf{N}^{rs}_R) -\omega D_{ijkl}\mathbf{e}_{kl}(\mathbf{N}^{rs}_I) \big) \big \rangle \\
        & \, + i \big \langle \omega D_{ijrs} + \big( C_{ijkl} \mathbf{e}_{kl}(\mathbf{N}^{rs}_I) + \omega D_{ijkl}\mathbf{e}_{kl}(\mathbf{N}^{rs}_R) \big) \big \rangle \\
        & := C^{hom}_{ijrs} + \mathbf{i} \omega D^{hom}_{ijrs}
    \end{aligned}
    \label{ViscoElasticDecom}
\end{equation}

In particular, the definition of $Q_{ij}$ factors can be directly rewritten terms of a homogenized formulation, defined directly on the tensor coefficients described by (\ref{Qfactor-Def}). In particular, given the deduction done, the definition of such quality-factors becomes dependent on the frequency which derives from the multiscale \textit{Kelvin-Voigt} mechanical model assumed.
\begin{equation}
    \label{Qfactor-Def}
    Q_{ijrs}^{-1}(\omega) := \frac{D^{hom}_{ijrs}(\omega)}{ C^{hom}_{ijrs}(\omega)}
\end{equation}

\subsection{Nonlinear Decomposition}

An aspect that must be taken into account is the nonlinear effect added from the asymptotic assumption on the solution, expressed in the term $\mathbf{N}^{rs}$ at the homogenized coefficients definition that can be explicitly stated from (\ref{Qfactor-Def}).
It is possible to account for that effect by taking a decomposition on the linear part associated to the mean over the coefficient itself and the nonlinear effect produced from the solutions to the cell problems, i.e., from (\ref{Qfactor-Def}) the decomposition in their linear and nonlinear effects is obtained as:
\begin{equation}
    \label{Expansion-Qfactor}
        Q_{ijrs}^{-1} =  \frac{D_{hom}^{(0)}}{C_{hom}^{(0)}} + \frac{1}{C^{(0)}_{hom}\left( C^{(0)}_{hom} + C^{(1)}_{hom} \right)} \big[C^{(0)}_{hom} \big( D^{(0)}_{hom} + D^{(1)}_{hom}\big) - D^{(0)}_{hom}\big( C^{(0)}_{hom} + C^{(1)}_{hom} \big) \big]
\end{equation}
where the notation for the linear terms in $p \in [0,1]$ (porosity) in given by:
\begin{equation*}
    C^{(0)}_{hom} = \langle C_{ijrs} \rangle_{\mathbf{Y}} \quad  D^{(0)}_{hom} = \langle D_{ijrs} \rangle_{\mathbf{Y}}
\end{equation*}
and the nonlinear terms with respect to $p \in [0,1]$ associated to the solutions $N^{rs}$ is given by:
\begin{equation*}
    \begin{array}{cc}
        C^{(1)}_{hom} =& \langle C_{ijkl}\mathbf{e}_{kl}(N^{rs}_R) - \omega D_{ijkl}\mathbf{e}_{kl}(N^{rs}_I) \rangle_{\mathbf{Y}} \\
        D^{(1)}_{hom} =& \langle \omega^{-1} C_{ijkl}\mathbf{e}_{kl}(N^{rs}_I) + D_{ijkl}\mathbf{e}_{kl}(N^{rs}_R) \rangle_{\mathbf{Y}}
    \end{array}
\end{equation*}

\section{Predictions}

The explicit dependency on the frequency $\omega$, requires us to consider the frequency range in which the experimental setting take place. In this sense, after adjusting regards experimental data range, viscous factors with transverse isotropic behavior of the type are assumed in the form:
\begin{equation*}
    D^m_{ijkl} (\mathbf{y}) = 5\times10^{-2} C^{m}_{ijkl}(\mathbf{y}), \quad D^f_{ijkl}(\mathbf{y}) = 1 \times 10^{-3} C^{f}_{ijkl}(\mathbf{y})
\end{equation*}

Under such considerations, the figure (\ref{BernardPredictionHomCoeffs}) contains the prediction for the homogenized elastic coefficients and Q-factors associated to a fixed frequency $\omega = 0,5 \, [Mhz]$. It describes the behavior as function of density in the clinical range of interest. The main quality factors describing the axial-related behavior shows predictions comparable to up-to-date literature \cite{Bernard2015}. Moreover, homogenized elasticity coefficients are recovered with predictions regarding results obtained in fully elastic models \cite{Parnell2008}, therefore describing a generalization.
In particular, shear-like $C_{55}^{hom}, C_{66}^{hom}$ coefficients describe experimentally measured values validating the simulated model.

\begin{figure}[!h]
	\centering
	\includegraphics[width=\textwidth]{images/Qfactors/CellProb_QfactorCircular5E-2_Relations.pdf}
	\caption{Predicted behavior for the viscoelastic model. It is shown on the left figure the predicted quality factors for a \textit{Kelvin-Voigt} model; the center figure a prediction of homogenized coefficient ratios, and on the right figure some homogenized shear ratios with behavior as in \cite{Bernard2015}.}
	\label{BernardPredictionHomCoeffs}
\end{figure}

Nevertheless, figure (\ref{BernardPredictionHomCoeffs}) cannot be used to account for the nonlinearity effects which might not be preponderant on the definition of the quality factors. In this setting, the decomposition (\ref{Expansion-Qfactor}) can be used to describe characteristic behavior regarding the linear and nonlinear contribution and therefore, answering the question of dependency on preponderant linear behavior.  In this sense, figure (\ref{QfactorDecomposition}) shows a clear
direction-dependent strong non-linear preponderance on the overall behavior for the three cases, implying full cell-problem interactions to describe each factors. In particular, becoming the cell-problems the most relevant effect that describes the mechanical behavior.

\begin{figure}[!h]
	\centering
	\includegraphics[width=\textwidth]{images/Qfactors/PlotsVisc_Circular2DPart50EPS5-2_Ome5.pdf}
	\caption{The effects from cell-problem solutions is shown for some representative quality factors accounting the linear and non-linear contributions over the range of biomedical interest.}
	\label{QfactorDecomposition}
\end{figure}

Finally, a relevant dependency that must be taken into account from the Q-factors definition (\ref{Qfactor-Def}) is related to the frequency dependency. From the experimental setting proposed by \cite{Bernard2015}, such dependency is not taken into account on the viscoelastic operator nor in the quality-factor.
In this direction, figure (\ref{BernardPrediction-Freq}) describes the obtained factors for different frequency values. It shows a clear independent behavior at each frequency being used, therefore expressing the assumption proposed by \textit{Bernard et. al. (2015)} \cite{Bernard2015} in which given the frequency range under consideration, the overall behavior of the Q-factors remains the same, i.e., equal ratio of elastic and viscous part at each frequency
\begin{figure}[!h]
	\centering
	\includegraphics[width=\textwidth]{images/Qfactors/QfactorsFreqsEPS5-2.pdf}
	\caption{Predicted behavior for the viscoelastic model. It is shown in the left figure the predicted quality factors for a \textit{Kelvin-Voigt} model; the center figure a prediction of homogenized coefficient ratios, and in the right figure some homogenized shear ratios behaves as in \cite{Bernard2015} }
	\label{BernardPrediction-Freq}
\end{figure}.


%% ------------------------------------------------------------------------- %%
\chapter{Correlation rules and proposed extension}
\label{cap:proposed-solution}

\noindent A state of the art skin detection method has been recently developed by~\cite{brancati:17}. In this chapter, we review the method and extend it\footnote{All the implementations can be found at \url{https://bitbucket.org/rodrigoadfaria/skin-detector/}.} adding more rules to enforce the constraints and seeking for a better accuracy in terms of false positive rate without hurting the performance of the original method.

%% ------------------------------------------------------------------------- %%
\section{Correlation rules on YCrYCb colormap}
\label{sec:correlation_rules_ycrycb}
The pixels of human skin have a very particular color. They fall into a restricted range of hues and they are not deeply saturated. This phenomenon is due the appearance of skin: formed by a combination of blood (red) and melanin (brown, yellow), which leads the human skin color to be clustered within a small area in the color space~\citep{fleck:96}.

Although this cluster can be seen in different color spaces, authors often use those where it is possible to split the chrominance from the luminance information. YCbCr is one of these color spaces. \citet{chai:99}~firstly observed this cluster within this particular color space (see Fig.~\ref{fig:dataset_sfa_ycbcr}). Based on a given set of training images, they~\citep{chai:99} built a skin color map using a histogram approach. In this map, the Cr and Cb distributions of skin color fall into the ranges [133, 173] and [77, 127], respectively, regardless the skin color variation in different races (see Fig.~\ref{fig:dataset_sfa_ycbcr_hist}).

\begin{figure}[!ht]
    \centering
    \begin{minipage}{0.485\textwidth}
        \includegraphics[width=\textwidth]{sfa/sfa_ycbcr}
    \end{minipage}
    ~ % space
    \begin{minipage}{0.485\textwidth}
        \includegraphics[width=\textwidth]{sfa/sfa_ycbcr_skin_only}
    \end{minipage}
    \caption[3-dimensional view of the YCbCr channels of some image patches of the SFA dataset]{3-dimensional view of the YCbCr channels of some image patches of the SFA dataset. We used the patches with skin samples of size $15 \times 15$. The blue points are skin samples and the green ones are non-skin. On the right (skin samples only), we can clearly see a narrow and thin cluster. Source: adapted from~\citet{chai:99}.}
    \label{fig:dataset_sfa_ycbcr}
\end{figure}

\begin{figure}[!ht]
    \centering
    \begin{minipage}{0.485\textwidth}
        \includegraphics[width=\textwidth]{sfa/sfa_cb_histogram}
    \end{minipage}
    ~ % space
    \begin{minipage}{0.485\textwidth}
        \includegraphics[width=\textwidth]{sfa/sfa_cr_histogram}
    \end{minipage}
    \caption[Histogram of Cb and Cr channels of some image patches of the SFA dataset]{Histogram of Cb and Cr channels of some image patches of the SFA dataset. We used the patches skin samples of size $15 \times 15$. Clearly, the samples (pixels) fall into the intervals observed by~\citet{chai:99}. Source: adapted from~\citet{chai:99}.}
    \label{fig:dataset_sfa_ycbcr_hist}
\end{figure}

Therefore, a very simple and practical approach to detect human skin pixels would be to create a set of rules, based in those ranges, that identify the presence of chrominance (Cr, Cb) values who fit into the rules. In fact, this was the approach used by~\citet{chai:99}.

Another important finding regarding the skin color clusters in the YCbCr color space is their behavior when looking for the compositions of YCb and YCr separately. In other words, where rely this distribution into the YCb and YCr subspaces. In Figure~\ref{fig:obama_trapezoids}, we can see the distribution (clusters) for an image of the Pratheepan dataset. We can clearly see their shapes as taking a trapezoidal form~\citep{hsu:02}.

In fact, the skin color pixels distribution in the YCb and YCr subspaces is a pattern. However, this trapezoidal shape and size will change according to many factors. \citet{brancati:17} observed that change and identified that they are caused mainly due illumination conditions (i.e. the lighting of the scene when the image was acquired influences the size, height, and position of these trapezoidal shape). Moreover, they~\citep{brancati:17} observed a proportional behavior of the chrominance components (Cr, Cb) that could be fitted into a model for skin pixels detection. We will explain in details how this model has been created in Section~\ref{sec:original_method}.

\begin{figure*}[!htb]
    \centering
    \begin{subfigure}[t]{0.48\textwidth}
        \includegraphics[width=\textwidth]{pra/ori/obama}
        \caption{}
    \end{subfigure}
    \begin{subfigure}[t]{0.48\textwidth}
        \includegraphics[width=\textwidth]{pra/gtc/obama}
        \caption{}
    \end{subfigure}
    \begin{subfigure}[t]{0.88\textwidth}
        \includegraphics[width=\textwidth]{image_trap_plot}
        \caption{}
    \end{subfigure}

    \caption[Skin pixels distribution in the YCr and YCb subspaces of a sample image]{Skin pixels distribution in the YCr and YCb subspaces of a sample image. Each image is, respectively, (a) sample image from Pratheepan (b) ground truth (c) skin pixels distribution in YCr (orange) and YCb (blue) subspaces. We can clearly see a trapezoidal shape of the pixels distribution. These trapezoids are inversely positioned reflecting the proportional behavior of the chrominance components (Cr, Cb). Source: adapted from~\citet{brancati:17}.}
    \label{fig:obama_trapezoids}
\end{figure*}

%% ------------------------------------------------------------------------- %%
\section{Original method}
\label{sec:original_method}
In order to describe the proposed extensions, we will first present the original method that is based on the definition of image-specific trapezoids, named $T_{YCb}$ and $T_{YCr}$, in the \textit{YCb} and \textit{YCr} subspaces, respectively. The trapezoids are essential to verify a relationship between the chrominance components $Cb$ and $Cr$ in these subspaces~\citep{brancati:17}.

\begin{figure}[ht]
    \centering
    \includegraphics[width=0.8\textwidth]{trapezoids}
    \caption[Graphical representation of the trapezoids as well as their parameters]{Graphical representation of the trapezoids as well as the parameters $Y_{min} = 0$, $Y_{max} = 255$, $Y_{0}$, $Y_{1}$, $Y_{2}$, $Y_{3}$, $Cr_{min}$, $Cr_{max}$, $Cb_{min}$, $Cb_{max}$, $h_{Cr}$, $h_{Cb}$, $H_{Cr}(P_Y)$, $H_{Cb}(P_Y)$. Source: adapted from~\citep{brancati:17}.}
    \label{fig:trapezoids}
\end{figure}

To show the correlations, Brancati et. al. present the YCbCr space as a 2D graph where the $Y$ is presented in the abscissa and the $Cr$ and $Cb$ components is in the ordinate (see Fig.~\ref{fig:trapezoids}). The base of the trapezoids $T_{YCr}$ and $T_{YCb}$ are given by the coordinates $(Y_{min}, Cr_{min})$ and $(Y_{min}, Cb_{max})$ in the $YCr$ and $YCb$ , respectively~\citep{brancati:17}. The values $Cr_{min}$ = 133, $Cb_{max}$ = 128 were selected according to~\citet{chai:99} where a skin color map was designed using a histogram approach based on a given set of training images. Chai and Ngan observed that the Cr and Cb distributions of skin color fall in the ranges [133, 173] and [77, 127], respectively, regardless of the skin color variation in different races (see details in Section~\ref{sec:correlation_rules_ycrycb}).

The $Cr_{max}$ parameter is calculated dynamically, taking into account the histogram of the pixels with $Cr$ values in the range $[Cr_{min}, 183]$, looking for the maximum value of $Cr$ associated with at least 0.1\% \footnote{In \citet{brancati:17} this rate is reported to be equal to 10\%. However, in the distributed source code we found the value 0.1\%, that we are using in the experiments.} of pixels in the image. The same applies to $Cb_{min}$, taking the histogram with $Cb$ values in the range $[77, Cb_{max}]$. $Y_0$ and $Y_1$ (shorter base of the upper trapezoid) are, respectively, the 5${th}$ and 95$th$ percentile of the luminance values associated with the pixels of the image with $Cr = Cr_{max}$~\citep{brancati:17}. A similar procedure is used to find the values of the shorter base of the other trapezoid, $Y_2$ and $Y_3$ (see Fig.~\ref{fig:crmax_computation} for an example).

\begin{figure}[ht]
    \centering
    \includegraphics[width=0.7\textwidth]{crmax_computation}
    \caption[Computation of $Cr_{max}$ based on $Cr$ values histogram of a 724 x 526 image]{Computation of $Cr_{max} = 162$ based on $Cr$ values histogram of a 724 x 526 image. Source: adapted from~\citep{brancati:17}.}
    \label{fig:crmax_computation}
\end{figure}

The correlation rules' parameters between the chrominance components $P_{Cr}$ and $P_{Cb}$ of a pixel $P$ are specified as~\citep{brancati:17}:
\begin{itemize}
    \item the minimum difference between the values $P_{Cr}$ and $P_{Cb}$, denoted $I_P$;
    \item an estimated value of $P_{Cb}$, namely $P_{Cb_s}$;
    \item the maximum distance between the points $(P_Y, P_{Cb})$ and $(P_Y, P_{Cb_s})$, denoted $J_P$.
\end{itemize}

Therefore, to determine if $P$ is skin, the following correlation rules, expressed in terms of equations, must hold~\citep{brancati:17}:
\begin{equation}
    P_{Cr} - P_{Cb} \geq I_P
\label{condition_c0}
\end{equation}
\begin{equation}
   |P_{Cb} - P_{Cb_s}| \leq J_P
\label{condition_c1}
\end{equation}

The estimated value $P_{Cb_{s}}$ is given by \footnote{$dP_{Cb_{s}}$ is the distance between the points $(P_Y, P_{Cb_{s}})$ and $(P_Y, Cb_{max})$ in the $YCb$ subspace, calculated on the basis of $dP_{Cr}$, observing the proportional behavior of the components. $\alpha$ is the rate between the normalized heights of the trapezoids in relation to the $P_Y$ value~\citep{brancati:17}.}:
\begin{equation}
    P_{Cb_s} = Cb_{max} - dP_{Cb_s}
\end{equation}
where \footnote{$dP_{Cr}$ is the distance between $(P_Y, P_{Cr})$ and $(P_Y, Cr_{min})$ points in the $YCr$ subspace~\citep{brancati:17}.}:
\begin{align}
    dP_{Cb_s} &= \alpha \cdot dP_{Cr}
    \\
    dP_{Cr} &= P_{Cr} - Cr_{min}
\end{align}

The coordinates of the other sides of the trapezoids are given by $[P_Y, H_{Cr}(P_Y)]$ and $[P_Y, H_{Cb}(P_Y)]$, such that~\citep{brancati:17}:
\begin{align}
  H_{Cr}(Y) &=  \begin{cases}
                Cr_{min} + h_{Cr}\big(\frac{Y - Y_{min}}{Y_0 - Y_{min}}\big) & Y \in [Y_{min},\ Y_0] \\
                Cr_{max} & Y \in [Y_0,\ Y_1] \\
                Cr_{min} + h_{Cr}\big(\frac{Y - Y_{max}}{Y_1 - Y_{max}}\big) & Y \in [Y_1,\ Y_{max}]
              \end{cases}
\\
  H_{Cb}(Y) &=  \begin{cases}
                Cb_{min} + h_{Cb}\big(\frac{Y - Y_2}{Y_{min} - Y_2}\big) & Y \in [Y_{min},\ Y_2] \\
                Cb_{min} & Y \in [Y_2,\ Y_3] \\
                Cb_{min} + h_{Cb}\big(\frac{Y - Y_3}{Y_{max} - Y_3}\big) & Y \in [Y_3,\ Y_{max}]
              \end{cases}
\end{align}

\noindent where $h_{Cr} = Cr_{max} - Cr_{min}$ and $h_{Cb} = Cb_{max} - Cb_{min}$, which are the heights of $T_{YCr}$ and $T_{YCb}$, respectively.

The computation of those points are useful for the calculation of $\alpha$. We first compute the distances $\Delta_{Cr}(P_Y)$ and $\Delta_{Cb}(P_Y)$ between the points $(P_Y, H_{Cr}(P_Y))$, $(P_Y, H_{Cb}(P_Y))$ and the base of the trapezoids~\citep{brancati:17}:
\begin{align}
    \Delta_{Cr}(P_Y) &= H_{Cr}(P_Y) - Cr_{min} \\
    \Delta_{Cb}(P_Y) &= Cb_{max} - H_{Cb}(P_Y)
\end{align}

Next, the distances are normalized with respect to the difference in size of the trapezoids \citep{brancati:17}:
\begin{align}
  \Delta^{'}_{Cr}(P_Y) &=  \begin{cases}
                \Delta_{Cr}(P_Y) \cdot \frac{A_{T_{YCb}}} {A_{T_{YCr}}} &\quad \text{if}\ A_{T_{YCr}} \geq A_{T_{YCb}} \\
                \Delta_{Cr}(P_Y) &\quad \text{otherwise}
              \end{cases}
\\
  \Delta^{'}_{Cb}(P_Y) &=  \begin{cases}
                \Delta_{Cb}(P_Y) &\quad \text{if}\ A_{T_{YCr}} \geq A_{T_{YCb}} \\
                \Delta_{Cb}(P_Y) \cdot \frac{A_{T_{YCr}}} {A_{T_{YCb}}} &\quad \text{otherwise}
              \end{cases}
\end{align}
where $A_{T_{YCr}}$ and $A_{T_{YCb}}$ are the areas of trapezoid ${T_{YCr}}$ and ${T_{YCb}}$, respectively.

Then, the value of $\alpha$ is given by~\citep{brancati:17}:
\begin{equation}
    \alpha = \frac{\Delta^{'}_{Cb}(P_Y)} {\Delta^{'}_{Cr}(P_Y)}
\end{equation}

Finally, $I_P$ \footnote{There is a difference between the source code and the equation that defines $I_P$ in~\citet{brancati:17}. Basically, part of the equation must be taken its absolute value, which we have fixed here.} and $J_P$ are given by~\citep{brancati:17}:
\begin{equation}
    I_P = sf \cdot |(\Delta^{'}_{Cr}(P_Y) - dP_{Cr}) + (\Delta^{'}_{Cb}(P_Y) - dP_{Cb_s})|
    \label{eq:ip}
\end{equation}
\begin{equation}
    J_P = dP_{Cb_s} \cdot \frac{dP_{Cb_s} + dP_{Cr}} {\Delta^{'}_{Cb}(P_Y) + \Delta^{'}_{Cr}(P_Y)}
    \label{eq:jp}
\end{equation}
where:
\begin{equation}
    sf = \frac{min( (Y_1 - Y_0), (Y_3 - Y_2) )} {max( (Y_1 - Y_0), (Y_3 - Y_2) )}
\end{equation}
% Acho que um gráfico mostrando um ponto, ou alguns pontos, no trapézio superior e o respectivo ponto no trapézio inferior seria muito didático.

%% ------------------------------------------------------------------------- %%
\section{Complementary method}
\label{sec:proposed_method}
The hypothesis assumed in the original method is based on rules that an estimated value of the point $P_{Cb}$, namely $P_{Cb_s}$, must hold in order for the correlation to be valid. On the basis of the proportional behavior of the chrominance components, we will rewrite the correlation rules with respect to the $P_{Cr}$ point.

Thus, we have to refactor the correlation rules' parameters to put them in terms of the estimated value of $P_{Cr}$, that we denote as $P_{Cr_s}$ \footnote{$dP_{Cr_s}$ is the distance between the points $(P_Y, P_{Cr_s})$ and $(P_Y, Cr_{min})$ in the $YCr$ subspace, calculated on the basis of $dP_{Cb}$, observing the proportional behavior of the components. $\alpha$ is the rate between the normalized heights of the trapezoids in relation to the $P_Y$ value.}:
\begin{equation}
    P_{Cr_s} = dP_{Cr_s} + Cr_{min}
\end{equation}
where \footnote{$dP_{Cb}$ is the distance between $(P_Y, P_{Cb})$ and $(P_Y, Cb_{max})$ points in the $YCb$ subspace.}:
\begin{equation}
    dP_{Cr_s} = \alpha \cdot dP_{Cb}
\end{equation}
\begin{equation}
    dP_{Cb}   = Cb_{max} - P_{Cb}
\end{equation}

Next, the constraints given by $I_P$ and $J_P$ in the Eq. \ref{eq:ip} and \ref{eq:jp} respectively, can be redefined as:
\begin{equation}
    I^{'}_P = sf \cdot |(\Delta^{'}_{Cr}(P_Y) - dP_{Cr_s}) + (\Delta^{'}_{Cb}(P_Y) - dP_{Cb})|
\end{equation}
\begin{equation}
    J^{'}_P = dP_{Cr_s} \cdot \frac{dP_{Cb} + dP_{Cr_s}} {\Delta^{'}_{Cb}(P_Y) + \Delta^{'}_{Cr}(P_Y)}
\end{equation}

Therefore, to determine if the pixel $P$ is skin, we have to modify the correlations rules given by Eq. \ref{condition_c0} and \ref{condition_c1}:
\begin{equation}
    P_{Cr} - P_{Cb} \geq I^{'}_P
\label{condition_c00}
\end{equation}
\begin{equation}
   |P_{Cr} - P_{Cr_s}| \leq J^{'}_P
\label{condition_c11}
\end{equation}

Doing this simple extension, we need now to apply the method to the same sets of images to evaluate, in fact, the proportional behavior of the chrominance components. More than that, we can combine all these constraints, given by the pair equations \ref{condition_c0} and \ref{condition_c1}, \ref{condition_c00} and \ref{condition_c11}, to reinforce the firstly defined hypothesis.

\begin{figure}[!htp]
    \centering
    \includegraphics[width=0.25\textwidth]{pixel_neighborhood}
    \caption[Neighbors evaluation with respect to a pixel $P$]{Neighbors evaluation with respect to $P$. If the image is scanned in raster order, $N_8^-(P)$ is the set of points that can be reached before $P$ in an 8-\textit{neighbors} window. In other words, $N_8^-(P)$ are the blue points which we already have evaluated. Source: proposed by the author.}
    \label{fig:pixel_neighborhood}
\end{figure}

%% ------------------------------------------------------------------------- %%
\section{Neighborhood extended method}
\label{sec:neighborhood_extended_method}
Both methods presented in Sections~\ref{sec:original_method} and \ref{sec:proposed_method} can be applied to detect skin pixels, either separated or combined (i.e. the four equations of the correlation rules of each method -- original and complementary -- must hold). However, skin pixels do not usually appear isolated and we could improve the method using some of the already processed neighbors of a pixel $P$, in order to decide if $P$ represents human skin, or not.

To do that, let $N_8^-(P)$ be the 8-\textit{neighbors} of $P$ that can be reached before $P$ when scanning the image in raster order~\citep{rosenfeld:66}. We can see this idea graphically represented by the blue points in Figure~\ref{fig:pixel_neighborhood}.

Thus, we classify $P$ as skin in the following manner: if the constraints given by the pair of equations \ref{condition_c0} and \ref{condition_c1}, as well as \ref{condition_c00} and \ref{condition_c11} hold, then $P$ is classified as skin. When only one of the conditions is satisfied, then we check the decision in $N_8^-(P)$. If three or more pixels are skin, then $P$ will also be classified as a skin pixel. Figure~\ref{fig:n8-flowchart} shows a flowchart of the aforementioned procedure described.

\begin{figure}[ht]
    \centering

    % Define block styles
    \tikzstyle{decision} = [diamond, draw, fill=blue!20,
        text width=4.5em, text badly centered, node distance=3cm, inner sep=0pt]
    \tikzstyle{block} = [rectangle, draw, fill=blue!20,
        text width=5em, text centered, rounded corners, minimum height=4em]
    \tikzstyle{line} = [draw, -latex']
    \tikzstyle{cloud} = [draw, ellipse,fill=red!20, node distance=3cm,
        minimum height=2em]

    \begin{tikzpicture}[node distance = 3cm, auto]
        % Place nodes
        \node [block] (pcrs) {calculate \ref{condition_c00} and \ref{condition_c11} rules};
        \node [block, left of=pcrs] (pcbs) {calculate \ref{condition_c0} and \ref{condition_c1} rules};
        \node [decision, below of=pcrs] (bothtrue) {both true?};
        \node [block, right of=bothtrue, node distance=4cm, fill=gray!20] (isskin) {$P$ is skin};
        \node [decision, below of=bothtrue] (bothfalse) {both false?};
        \node [block, right of=bothfalse, node distance=4cm, fill=gray!20] (noskin) {$P$ is non skin};
        \node [decision, right of=noskin, node distance=4cm] (n8decision) {skin pixels $\geq 3$};
        \node [block, below of=n8decision, node distance=3cm] (n8) {check decision in $N_8^-(P)$};
        % Draw edges
        \path [line] (pcrs) -- (bothtrue);
        \path [line] (bothtrue) -- node {no} (bothfalse);
        \path [line] (bothfalse) -- node {yes} (noskin);
        \path [line] (bothfalse) |- node [near start] {no} (n8);
        \path [line] (bothtrue) -- node {yes}  (isskin);
        \path [line] (n8) -- (n8decision);
        \path [line] (n8decision) |- node [near start] {yes} (isskin);
        \path [line] (n8decision) -- node [near start] {no} (noskin);
        \path [line] (pcbs) |- (bothtrue);
    \end{tikzpicture}

    \caption[Flowchart of our proposed neighbors method]{Flowchart of our proposed neighbors method. In \textbf{both false} decision, the \textbf{no} path means that one of the rules is true and we are in doubt if $P$ is skin or not -- here is where the neighbors are used to find out the label of $P$. Source: proposed by the author.}
    \label{fig:n8-flowchart}
\end{figure}

%% ------------------------------------------------------------------------- %%
\section{Heuristics to fix neighborhood extended method}
\label{sec:sup_neighborhood_operations}
The neighborhood extended method presented in Section~\ref{sec:neighborhood_extended_method} will end up with an undesired behavior on the output images that we called \textit{diagonal effect} (see Fig.~\ref{fig:diagonal_effect}). In addition, besides being visually undesirable, the \textit{diagonal effect} phenomenon causes us to have an increase in the false positive rate. This is caused due to the shape of the window being used. Once we look only for the four already visited pixels of the 8-\textit{neighbors} window, the operation is so based in a non-symmetrical mask. Ideally, we could use another neighborhood strategy and look for all the eight neighbors of the pixel $P$ being evaluated. However, this particular implementation can add extra computational time and affect the performance of the method.

Therefore, we created an adaptation of the neighborhood method shown in Section~\ref{sec:neighborhood_extended_method}. In this version, we scan the image, with a size of $W \times H$, in the raster order, and apply the original and the extended complementary correlation rules for every single pixel. We keep both results in a matrix of the same size ($W \times H$) of the input image. For each coordinate of this output matrix, we will have a two-position vector with the result of the original and complementary rules answer for this pixel. Next, we read each position of this output matrix and we apply an 8-\textit{neighbors} operations in four different implementations, looking for the majority (five at least) neighbors:

\begin{enumerate}[label={(\arabic*)}]
    \item we look in the correlation rules answer performing an AND. In other words, if both original and complementary correlation rules are saying this pixel is skin, then we classify it as skin;
    \item we look in the correlation rules answer performing an OR. In other words, if one of the correlation rules (original or complementary) is saying this pixel is skin, then we classify it as skin;
    \item we look in the neighbors only querying the original ($P_{Cb_s}$) correlation rules;
    \item we look in the neighbors only querying the complementary ($P_{Cr_s}$) correlation rules.
\end{enumerate}

Of course, this variation will add some additional computational cost once we will scan the image one more time. This implementation can be enhanced, but the idea here is to only explore better the connectivity of the 8-\textit{neighbors} window and check, on the basis of a symmetric mask window, if the \textit{diagonal effect} is gone as well as the measures are improved. Some experiments can be seen further in Section~\ref{sec:sno_experiments}.

\begin{figure*}[!htb]
    \centering
    \begin{subfigure}[t]{0.18\textwidth}
        \includegraphics[width=2.6cm]{sfa/ori/img14}
        \includegraphics[width=2.6cm]{pra/ori/chenhao0017me9}
        \includegraphics[width=2.6cm]{hgr/ori/N_P_hgr1_id04_5}
        \includegraphics[width=2.6cm]{cpq/ori/1923132}
        \includegraphics[width=2.6cm]{cpq/ori/2226882}
        \caption{}
    \end{subfigure}
    \begin{subfigure}[t]{0.18\textwidth}
        \includegraphics[width=2.6cm]{sfa/gt/img14}
        \includegraphics[width=2.6cm]{pra/gt/chenhao0017me9}
        \includegraphics[width=2.6cm]{hgr/gt/N_P_hgr1_id04_5}
        \includegraphics[width=2.6cm]{cpq/gt/1923132}
        \includegraphics[width=2.6cm]{cpq/gt/2226882}
        \caption{}
    \end{subfigure}
    \begin{subfigure}[t]{0.18\textwidth}
        \includegraphics[width=2.6cm]{sfa/cmb/img14}
        \includegraphics[width=2.6cm]{pra/cmb/chenhao0017me9}
        \includegraphics[width=2.6cm]{hgr/cmb/N_P_hgr1_id04_5}
        \includegraphics[width=2.6cm]{cpq/cmb/1923132}
        \includegraphics[width=2.6cm]{cpq/cmb/2226882}
        \caption{}
    \end{subfigure}
    \begin{subfigure}[t]{0.18\textwidth}
        \includegraphics[width=2.6cm]{sfa/ngh/dgn/img14}
        \includegraphics[width=2.6cm]{pra/ngh/dgn/chenhao0017me9}
        \includegraphics[width=2.6cm]{hgr/ngh/dgn/N_P_hgr1_id04_5}
        \includegraphics[width=2.6cm]{cpq/ngh/dgn/1923132}
        \includegraphics[width=2.6cm]{cpq/ngh/dgn/2226882}
        \caption{}
    \end{subfigure}

    \caption[Image samples with the diagonal effect after the neighbors method segmentation]{Image samples with the diagonal effect after the neighbors method segmentation. Each image is from (top-down) SFA, Pratheepan, HGR, and Compaq (latest two) datasets, respectively, where: (a) original image (b) ground truth (c) combined method (f) neighbors method. Independently of the classification accuracy, we can clearly see the diagonal effect present in the output of the neighbors method segmentation in comparison with combined. Besides being a visually undesirable effect, this phenomenon causes us to have an increase in the false positive rate.}
    \label{fig:diagonal_effect}
\end{figure*}


\documentclass{tufte-handout}

%\geometry{showframe}% for debugging purposes -- displays the margins

\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amsthm}
\usepackage{stmaryrd}
\usepackage{graphicx}
\usepackage{setspace}
\usepackage{fancyhdr}
\usepackage[makeroom]{cancel}
\usepackage{booktabs}
\usepackage{units}
\usepackage{fancyvrb}
\fvset{fontsize=\normalsize}

% \pagestyle{fancyplain}

\DeclareMathAlphabet{\mathpzc}{OT1}{pzc}{m}{it}

%% Autoscaled figures
\newcommand{\incfig}{\centering\includegraphics}
\setkeys{Gin}{width=0.9\linewidth,keepaspectratio}

%% Commonly used macros
\newcommand{\eqr}[1]{Eq.\thinspace(#1)}
\newcommand{\pfrac}[2]{\frac{\partial #1}{\partial #2}}
\newcommand{\pfracc}[2]{\frac{\partial^2 #1}{\partial #2^2}}
\newcommand{\pfraca}[1]{\frac{\partial}{\partial #1}}
\newcommand{\pfracb}[2]{\partial #1/\partial #2}
\newcommand{\pfracbb}[2]{\partial^2 #1/\partial #2^2}
\newcommand{\spfrac}[2]{{\partial_{#1}} {#2}}
\newcommand{\mvec}[1]{\mathbf{#1}}
\newcommand{\gvec}[1]{\boldsymbol{#1}}
\newcommand{\script}[1]{\mathpzc{#1}}
\newcommand{\eep}{\mvec{e}_\phi}
\newcommand{\eer}{\mvec{e}_r}
\newcommand{\eez}{\mvec{e}_z}
\newcommand{\iprod}[2]{\langle{#1}\rangle_{#2}}

%\newcommand{\gcs}{\nabla_{\mvec{x}}}
\newcommand{\gcs}{\nabla}
\newcommand{\gvs}{\nabla_{\mvec{v}}}
\newcommand{\gps}{\nabla_{\mvec{z}}}
\newcommand{\dtv}{\thinspace d^3\mvec{v}}
\newcommand{\dtx}{\thinspace d^3\mvec{x}}

\newtheorem{proposition}{Proposition}
\newtheorem{lemma}{Lemma}
\newtheorem{remark}{Remark}

\newcommand{\nts}[1]{{\color{blue} {#1}}}

%Make the items smaller
\newcommand{\cramplist}{
	\setlength{\itemsep}{0in}
	\setlength{\partopsep}{0in}
	\setlength{\topsep}{0in}}
\newcommand{\cramp}{\setlength{\parskip}{.5\parskip}}
\newcommand{\zapspace}{\topsep=0pt\partopsep=0pt\itemsep=0pt\parskip=0pt}

\title{Premiminary results from fluid simulations of Vapor Box divertor}
%\author{Ammar H. Hakim}%
\date{\today}%

\begin{document}
\maketitle

\begin{abstract}
  \noindent Some \emph{very} preliminary results from invicid Euler
  simulations of vapor box divertor concept are presented.
\end{abstract}

\section{Notes on boundary conditions}

At present, the boundary conditions are applied using ``ghost
cells''. I.e. the vapor quantities in the cell just outside the domain
are held fixed to the values computed from the evaporation formula
which depends on the wall temperature\footnote{P. Browning and
  P.E. Potter, ``AN ASSESSMENT OF THE EXPERIMENTALLY DETERMINED VAPOUR
  PRESSURES OF THE LIQUID ALKALI METALS'', in the \emph{Handbook of
    Thermodynamic and Transport Properties of Alkali Metals},
  R.W. Ohse, Ed., 1985}. In the code, this is implemented as:
\begin{verbatim}
function vaporPressure(Twall)
   return math.exp(26.89-18880/Twall-0.4942*math.log(Twall))
end
\end{verbatim}
Once pressure is determined, the number density is computed assuming
that the evaporated vapor is at the same temperature as the wall
% \footnote{It is possible that these BCs are not quite correct. We have
%   computed fluxes based on drifting Maxwellians also, but these are
%   harder to implement. Eventually, I plan to use the flux BCs (rather
%   than the current ghost BCs) exclusively.}.

\section{Notes on equations and solver}

We are solving the standard invicid Navier-Stokes equations (Euler
equations). These are written in conservation law form (in 1D)
\begin{align}
  \frac{\partial}{\partial{t}}
  \left[
    \begin{matrix}
      \rho \\
      \rho u \\
      \rho v \\
      \rho w \\
      E
    \end{matrix}
  \right]
  +
  \frac{\partial}{\partial{x}}
  \left[
    \begin{matrix}
      \rho u \\
      \rho u^2 + p \\
      \rho uv \\
      \rho uw \\
      (E+p)u
    \end{matrix}
  \right]
  =
  0
\end{align}
Extension to higher dimensions is obvious. Here
\begin{align}
  E = \rho \varepsilon + \frac{1}{2}\rho q^2
\end{align}
is the total energy and $\varepsilon$ is the internal energy of the
fluid and $q^2=u^2 + v^2 + w^2$. The pressure is given by an equation
of state (EOS) $p=p(\varepsilon, \rho)$. For an ideal gas the EOS is
$p = (\gamma-1)\rho \varepsilon$. The specific enthalpy is defined as
$h = (E+p)/\rho$, and is used in constructing numerical fluxes at cell
interfaces\footnote{For details on this please see
  \url{http://ammar-hakim.org/sj/euler-eigensystem.html}}. I am using
ideal gas EOS for now, but this could be replaced later if
needed\footnote{If we expect a mixture of atomic/diatomic Lithium we
  may want to generate EOS tables and use them instead.}.

To solve these equations I am using a robust, second-order,
shock-capturing finite-volume scheme, which has been benchmarked very
carefully on dozens of difficult problems.\footnote{See
  \url{http://ammar-hakim.org/sj/je/je2/je2-euler-shock.html} for 1D
  shock tests,
  \url{http://ammar-hakim.org/sj/je/je22/je22-euler-2d.html} for 2D
  tests and \url{http://ammar-hakim.org/sj/je/je23/je23-euler-3d.html}
  for 3D tests.}.

% \section{Chain of two boxes}

% To get some insight into the flow I have setup a chain of 2
% boxes. Each box is $0.4\times 0.4$~m and the slot connecting them is
% $10$~cm wide, with a $10$~cm length. The left box walls are held to a
% fixed temperature of $950^o$~C and the right box to $300^o$~C. Note
% that baffles are held to the same temperature as the wall. The
% simulation is run to steady-state. Profiles along the centerline of
% the vapor box are shown below.
% \begin{figure}[ht]%
%   \setkeys{Gin}{width=0.3\linewidth,keepaspectratio}
%   \incfig{s3-two-box-chain-mach.png}
%   \incfig{s3-two-box-chain-numDensity.png}
%   \incfig{s3-two-box-chain-temperature.png}
%   \caption{Mach number, number density and temperature along
%     centerline from a two-box chain.}
% \end{figure}

% The 2D colorplots of these quantities are shown below
% \begin{figure}[ht]%
%   \setkeys{Gin}{width=0.5\linewidth,keepaspectratio}
%   \incfig{s3-two-box-chain_mach_00010.png}
%   \incfig{s3-two-box-chain_numDensity_00010.png}
%   \incfig{s3-two-box-chain_temp_00010.png}
%   \caption{Mach number (top), number density (middle) and temperature
%     (bottom) from a two-box chain simulation.}
% \end{figure}

\section{Chain of five boxes: Lithium covered baffles}

I ran a five-box chain simulation to steady state. Each box is
$0.4\times 0.4$~m and the slot connecting them is $10$~cm wide, with a
$10$~cm length. Each box walls (including baffles) are held at a fixed
temperature, as specified in Rob's paper. The simulation is run to
steady-state. Profiles of various quantities are shown below.
\begin{figure}[ht]%
  \setkeys{Gin}{width=0.75\linewidth,keepaspectratio}
  \incfig{s6-four-box-chain-ln-numDensity.png}
  \caption{Number density from a five-box chain, with Lithium
    covered baffles. See {\tt vapor\-box/s6} for input file.}
\end{figure}
\begin{figure}[ht]%
  \setkeys{Gin}{width=0.75\linewidth,keepaspectratio}
  \incfig{s6-four-box-chain-temperature.png}
  \caption{Temperature from a five-box chain, with Lithium covered
    baffles. Note the temperature drops below the condensation point,
    and hence the Lithium would form droplets and even Lithium
    ``snow''. A true snow-flake divertor! However, the incoming heat
    flux along the LCFS from the tokamak will probably prevent the
    temperature dropping so much. It remains to be seen. See {\tt
      vapor\-box/s6} for input file.}
\end{figure}
\begin{figure}[ht]%
  \setkeys{Gin}{width=0.75\linewidth,keepaspectratio}
  \incfig{s6-four-box-chain-xvel.png}
  \caption{X velocity from a five-box chain, with Lithium covered
    baffles. The flow velocity increases rapidly, however, consistent
    with flow into vacuum, asymptotes to a maximum value, which can be
    determined from conservation of enthalpy along streamlines. See
    {\tt vapor\-box/s6} for input file.}
\end{figure}
\begin{figure}[ht]%
  \setkeys{Gin}{width=0.75\linewidth,keepaspectratio}
  \incfig{s6-four-box-chain-mach.png}
  \caption{Mach number from a five-box chain, with Lithium covered
    baffles. For $x>1$ the Mach number increases linearly (consistent
    with flow into vacuum) as the temperature drops rapidly, even
    though the flow velocity reaches a maximum value as shown in the
    above figure. See {\tt vapor\-box/s6} for input file.}
\end{figure}

\section{Chain of five boxes: Equilibriated (reflecting) baffles}

I ran a five-box chain simulation to steady state. Each box is
$0.4\times 0.4$~m and the slot connecting them is $10$~cm wide, with a
$10$~cm length. Each box wall is held at a fixed temperature, as
specified in Rob's paper. The baffles are assumed to be in equilibrium
with the vapor impinging on them, and are hence treated as perfect
reflectors\footnote{The flux in the normal direction on the baffles is
  set to zero, and the fluid is allowed to slip tangentially,
  consistent with the invicid approximation.}. The simulation is run to
steady-state. Profiles of various quantities are shown below.

The key difference between the Lithium covered and equilibrated
baffles cases is the formation of a standing shock just behind each
baffle. This happens as the vapor reflects off the baffles, increasing
back-pressure and eventually forming a standing shock a few
centimeters behind each baffle.

\begin{figure}[ht]%
  \setkeys{Gin}{width=0.75\linewidth,keepaspectratio}
  \incfig{s7-four-box-chain-ln-numDensity.png}
  \caption{Number density from a five-box chain, reflecting baffle
    case. See {\tt vapor\-box/s7} for input file.}
\end{figure}
\begin{figure}[ht]%
  \setkeys{Gin}{width=0.75\linewidth,keepaspectratio}
  \incfig{s7-four-box-chain-temperature.png}
  \caption{Temperature from a five-box chain, reflecting baffle
    case. Note the temperature drops below the condensation point, and
    hence the Lithium would form droplets and even Lithium ``snow''. A
    true snow-flake divertor! However, the incoming heat flux along
    the LCFS from the tokamak will probably prevent the temperature
    dropping so much. It remains to be seen. See {\tt vapor\-box/s7}
    for input file.}
\end{figure}
\begin{figure}[ht]%
  \setkeys{Gin}{width=0.75\linewidth,keepaspectratio}
  \incfig{s7-four-box-chain-xvel.png}
  \caption{X velocity from a five-box chain, reflecting baffle
    case. The flow velocity increases rapidly, however, consistent
    with flow into vacuum, asymptotes to a maximum value, which can be
    determined from conservation of enthalpy along streamlines. See
    {\tt vapor\-box/s7} for input file.}
\end{figure}
\begin{figure}[ht]%
  \setkeys{Gin}{width=0.75\linewidth,keepaspectratio}
  \incfig{s7-four-box-chain-mach.png}
  \caption{Mach number from a five-box chain, reflecting baffle
    case. For $x>1$ the Mach number increases linearly (consistent
    with flow into vacuum) as the temperature drops rapidly, even
    though the flow velocity reaches a maximum value as shown in the
    above figure. See {\tt vapor\-box/s7} for input file.}
\end{figure}

\end{document}


\documentclass{article}
%\usepackage{fullpage}
%\usepackage{nopageno}
\usepackage[margin=1.5in]{geometry}
\usepackage{tikz}
\usetikzlibrary{shapes.geometric, calc}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage[normalem]{ulem}
\usepackage{fancyhdr}
\usepackage{cancel}
\usepackage{enumerate}
%\renewcommand\headheight{12pt}
\pagestyle{fancy}
\lhead{April 30, 2014}
\rhead{Jon Allen}
\allowdisplaybreaks

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

\begin{document}
Part 1 (7 points): Due in class Wednesday, April 30.

Chapter 8: \#11, 12 (do three parts), 15, 16, 22(b), 26 (do two parts), 27, 28, 30, (Grad: 29)

(Hint for \#28: Use the 'more formal' definition of conjugate given in the book right before the example on p. 293.)

\begin{enumerate}
  \setcounter{enumi}{10}
  \item
  Compute the Stirling numbers of the second kind $S(8,k),\;(k=0,1,\dots,8)$.
  \begin{align*}
    S(8,0)&=0&S(8,8)&=1\\
    \intertext{Cheating with figure 8.2 on page 284 to get $S(7,k)$}
    S(8,1)&=S(7,1)+S(7,0)=1&S(8,2)&=2S(7,2)+S(7,1)=127\\
    S(8,3)&=3S(7,3)+S(7,2)=966&S(8,4)&=4S(7,4)+S(7,3)=1701\\
    S(8,5)&=5S(7,5)+S(7,4)=1050&S(8,6)&=6S(7,6)+S(7,5)=266\\
    S(8,7)&=7S(7,7)+S(7,6)=28
  \end{align*}
  \item
  (do three parts)

  Prove that the Stirling numbers of the second kind satisfy the following relations:
  \begin{enumerate}
    \item
    $S(n,1)=1,\;(n\ge1)$
    \subsubsection*{proof}
    We take as given that $S(n,0)=S(1,0)=0$ and $S(1,1)=1$ (equations 8.16 and 8.17 in the text). Now lets assume that $S(n-1,1)=1$
    \begin{align*}
      S(n,1)&=1\cdot S(n-1,1)+S(n-1,0)=1+0=1
    \end{align*}
    And induction says we win $\Box$
    \item
    $S(n,2)=2^{n-1}-1,\;(n\ge2)$
    \subsubsection*{proof}
    We wish count the ways of putting $n\ge2$ elements into 2 indistinguishable boxes such that no box is empty. We can put our n elements into two distinguishable boxes in $2^n$ ways (2 choices for each element, n times). Now we subtract the cases where the first box is empty and where the second box is empty. and we have $2^n-2$ ways to put the elements into distinguishable boxes. If we have two colors to paint these boxes, we can do so in $2!=2$ ways. So dividing by the ways of distinguishing the boxes we have $\frac{2n-2}{2}=2^{n-1}-1$ which is the result we want. $\Box$
    \item
    $S(n,n-1)=\binom{n}{2},\;(n\ge1)$
    \subsubsection*{proof}
    We wish to count the number of ways of putting $n\ge1$ elements into $n-1$ indistinguishable boxes such that no box is empty. From the pigeonhole principle we know that at least one box has more than one element. If now take one element from every box we have $n-(n-1)=1$ element left. So one box has the one element left plus the one element we removed for two elements altogether. So we see we must put the $n$ elements into the boxes so 2 elements share a box and all the others are in boxes by themselves. So if we wish to count the ways to put the elements in boxes, we could simply count the number of ways to choose the two elements that share a box. And of course if we have $n$ elements we can choose two of them in $\binom{n}{2}$ ways. Notice that $\binom{1}{2}=0=S(1,0)$ so this result also works for the special case where where this proof makes no sense because we only have one element. $\Box$
%    \item
%    $S(n,n-2)=\binom{n}{3}+3\binom{n}{4},\;(n\ge2)$
  \end{enumerate}
  \setcounter{enumi}{14}
  \item
  The number of partitions of a set of $n$ elements into $k$ distinguishable boxes (some of which may be empty) is $k^n$. By counting in a different way, prove that
  \[k^n=\binom{k}{1}1!S(n,1)+\binom{k}{2}2!S(n,2)+\dots+\binom{k}{n}n!S(n,n).\]
  (if $k>n$, define $S(n,k)$ to be 0.)
  \subsubsection*{proof}
  Imagine we have $n$ elements that we want to put into $k$ boxes in such a way that $i\ge1$ boxes have things in them, and the rest are empty. Then we can put these elements into $i$ indistinguishable boxes in $S(n,i)$ ways. Now we distinguish the boxes by ``painting'' them in $i$ ``colors'' which we can do $i!$ ways. So we can put the elements into $i$ distinguishable nonempty boxes in $i!S(n,i)$ ways. Now we can pick the boxes that have elements in them from the $k$ boxes in $\binom{k}{i}$ ways, for a total of $\binom{k}{i}i!S(n,i)$ ways to fill $i$ of $k$ distinguisheable boxes with $n$ objects. To find the total number of ways to distribute the $n$ objects we sum the ways to distribute the objects with all possible values of $i$. This must be $k^n$ and so we have our result
  \begin{align*}
    k^n&=\sum\limits_{i=1}^k{\binom{k}{i}i!S(n,i)}
  \end{align*}
  $\Box$
  \item
  Compute the Bell number $B_8$. (Cf. Exercise 11.)
  \begin{align*}
    B_p&=S(p,0)+S(p,1)+\dots+S(p,p)\\
    B_8&=S(8,0)+S(8,1)+\dots+S(8,8)\\
    &=0+1+127+966+1701+1050+266+28+1\\
    &=4140
  \end{align*}
  \setcounter{enumi}{21}
  \item
  \begin{enumerate}
    \setcounter{enumii}{1}
    \item
    Calculate the partition number $p_7$ and construct the diagram of the set $\mathcal{P}_7$, partially orderedby majorization
    \begin{align*}
      \begin{matrix}
      &7^1\\
      &\downarrow\\
      &6^11^1\\
      &\downarrow\\
      &5^12^1\\
      \downarrow&&\downarrow\\
      5^11^2&&4^13^1\\
      &\downarrow\\
      &4^12^11^1\\
      \downarrow&&\downarrow\\
      4^11^3&&3^21^1\\
      \downarrow&&\downarrow\\
      \downarrow&&3^12^2\\
      \to&\to\leftarrow&\leftarrow\\
      &\downarrow\\
      &\leftarrow\to&\\
      \downarrow&&\downarrow\\
      3^12^11^2&&2^31^1\\
      \downarrow&&\downarrow\\
      3^11^4&&\downarrow\\
      \to&\to\leftarrow&\leftarrow\\
      &\downarrow\\
      &2^21^3\\
      &\downarrow\\
      &2^11^5\\
      &\downarrow\\
      &1^7
      \end{matrix}
    \end{align*}
    And of course $p_7=15$
  \end{enumerate}
  \setcounter{enumi}{25}
  \item
  (do two parts)

  Determine the conjugate of each of the following partitions
  \begin{enumerate}
    \item
    $12=5+4+2+1$

    We observe that $\{5,4,2,1\}$ has 4 elements. This is the length of our first row. The last element is size 1, so there will be one of those. The difference between the last two elements is 1, so we have one row of 3 next. The difference between 4 and 2 is 2, so we have 2 rows of 2. And 5-4 makes the last row have only one element. The other answers are obtained similarly.

    $12=4+3+2+2+1$
    \item
    $15=6+4+3+1+1$

    $15=5+3+3+2+1+1$
    \item
    $20=6+6+4+4$

    $20=4+4+4+4+2+2$
    \item
    $21=6+5+4+3+2+1$

    $21=6+5+4+3+2+1$
    \item
    $29=8+6+6+4+3+2$

    $29=6+6+5+4+3+3+1+1$
  \end{enumerate}
  \item
  For each integer $n>2$, determine a self-conjugate partition of $n$ that has at least two parts

  If $n$ is odd, then make one row of length $\frac{n+1}{2}$ and $\frac{n-1}{2}$ rows of length 1. If $n$ is even then make a row of $\frac{n}{2}$, a row of 2, and $\frac{n-4}{2}$ rows of length 1.
  \item
  Prove that conjugation reverses the order of majorization; that is, if $\lambda$ and $\mu$ are partitions of $n$ and $\lambda$ is majorized by $\mu$, then $\mu^*$ is majorized by $\lambda^*$.
  \subsubsection*{proof}
  Let us define the notation $\lambda_k, \mu_k, {\lambda_k}^*,{\mu_k}^*$ as the size of the $k$th row of the $\lambda,\mu,\lambda^*,\mu*$ partitions. Because $\lambda$ majorizes $\mu$ we know two important things.
  \begin{align*}
    \lambda_1&\ge\mu_1\\
    \sum\limits_{i=1}^k{\lambda_i}&\ge\sum\limits_{i=1}^k{\mu_i}
  \end{align*}
  Where $k$ is the number of partitions of $\lambda$ or $\mu$, whichever has fewer partitions. But of course we know that because these are partitions of $n$ the the sum of the partition sizes of the partition with less partitions must be $n$. So we see that
  \begin{align*}
    n=\sum\limits_{i=1}^k{\lambda_i}&\ge\sum\limits_{i=1}^k{\mu_i}\\
    n=\sum\limits_{i=1}^k{\lambda_i}&=\sum\limits_{i=1}^k{\mu_i}+\sum\limits_{i=1}^l{\mu_i}
  \end{align*}
  And so $k$ is the number of partitions of $\lambda$ while $k+l$ is the number of partitions of $\mu$ where $k\ge{k+l}$.

  Now when we conjugate these partitions we see that because $k$ is the number of rows of $\lambda$, ${\lambda_1}^*=k$. Similarly ${\mu_1}^*=k+l$. Now because $k\le{k+1}$ we know that ${\lambda_1}^*\le{\mu_1}^*$

  Now we strip one element from each row of our partitions. This is effectively removing ${\lambda_1}^*$ and ${\mu_1}^*$. Now because the partial sums of $\lambda_i$ are more than the partial sums of $\mu_i$ we know that we have a new set of partial sums that fit the same rule.
  We can repeat this until we run out of element, building our conjugates and the partial sum inequality will always hold. Now because the amount we have taken from our original partition and have put into our conjugate partition sums to n, and we start with the opposite inequality for our conjugate partitions (${\lambda_1}^*\le{\mu_1}^*)$ we know that as long as the inequality holds for the partial sum of the original partition, the opposite inequality will hold for the partial sums of the conjugate partitions. $\Box$

%  Now if we strip off an element from each of the partitions, then we are left with the following for all $k\ge1$.
%  \begin{align*}
%    \sum\limits_{i=1}^k{\lambda_i}&\ge\sum\limits_{i=1}^k{\mu_i}\\
%    \sum\limits_{i=1}^k{\lambda_i-1}&\ge\sum\limits_{i=1}^k{\mu_i-1}
%  \end{align*}
%  We have just stripped off the first row of our conjugated partitions. We have created some new groups of subsets (not really technically partitions anymore). Lets call these new groups $\lambda^+,\mu^+$. Notice that $\mu+$ is majorized by $\lambda+$. Now from the logic we just went over we can say that the first row of the conjugate of $\lambda+$ is shorter than the first row of the conjugate of $\mu^+$ and by extension ${\lambda_2}^*\le{\mu_2}^*$.
%  If we follow this process out until we run out of rows/columns, we can see that it will always be true that ${\lambda_k}^*\le{\mu_k}^*$ and so $\lambda^*$ is majorized by $\mu^*$
  \setcounter{enumi}{29}
  \item
  Prove that the partition function satisfies
  \[p_n>p_{n-1}\;(n\ge2).\]
  \subsubsection*{proof}
  If we take the $p_{n-1}$ partitions of $n-1$ and add a single element partition to it, then we have $p_{n-1}$ partitions of $n$. Also note that $n^1$ is not a partition of $n-1$ but is a partition of $n$. So we have $p_n\ge {p_{n-1}+1}>p_{n-1}$ and our simple proof. $\Box$
  \setcounter{enumi}{28}
  \item (grad)
\end{enumerate}
\end{document}


\documentclass[12pt, letterpaper]{article}
\include{eu}

\begin{document}

\section*{\textsl{Einstein's Universe} Problem Set 4}

This problem set is not to be handed in for credit. But it is due
before \textbf{Tuesday November 9}, when some of these problems
will appear in part, near-verbatim, on Term Exam 4.

\begin{problem}
The energy $E$ of a particle of mass $m$ moving
at speed $v$ is given by:
\begin{equation}\label{eq:energy}
E = \gamma\,m\,c^2
\end{equation}
\begin{equation}
\gamma = \frac{1}{\sqrt{1 - v^2/c^2}}
\end{equation}
This means that if something is at rest, its energy is $m\,c^2$.
We can define a \emph{kinetic energy} to be the difference
between the total energy of an object given by
equation~(\ref{eq:energy}) and the rest energy $m\,c^2$.

What would be the kinetic energy of a baseball moving at 80~percent of the
speed of light? Give your answer in joules but also in tons of TNT
equivalent. For context, the worst nuclear weapons are measured in
megatons.

Do you think we could ever accelerate a baseball to this speed?
\end{problem}

%% \begin{problem}
%% As we said in lecture, if you heat something up, it becomes more
%% massive! Imagine you took 1\,kg of water and heated it up by 50~deg~C.
%% By how much would its mass increase because of this heating?
%% You might have to look up the heat capacity of water.
%% \end{problem}

\begin{problem}
  HOGG: FOR NEXT YEAR: SAY MORE ABOUT UNITS.

  HOGG: FOR NEXT YEAR: TONNES is TONNES OF CO2 not TONNES OF C.

A typical American has a carbon footprint of 40-ish tonnes per year.
If somehow, magically, all of that fossil-fuel consumption could be
converted to nuclear fission energy, how much nuclear reactor fuel
would you need to use?

\textsl{(a)}~To perform this calculation, look up the energy you
get for every carbon triple bond you use up (use that for the carbon
mass-to-energy conversion, assming you release one carbon atom for
every triple bond broken). Also look up the fission energy
per uranium atom, and the fusion energy you would get if you could fuse
hydrogen to iron.

Note that the energies will have slightly different units: The chemical
energy will be joules or eV per bond, the fission energy will be joules
or MeV per atom, and the fusion energy will be joules or MeV per nucleon.

\textsl{(b)}~Now, using what you looked up, compute how much energy
corresponds to 40~tonnes of carbon, assuming that you started with one
carbon triple bond per carbon atom (a very optimistic assumption!).
Give your answer in joules. You will have to use the fact that a mole of
carbon atoms is 12~g.

\textsl{(c)}~Now compute how much uranium you would need to fission to
get the same amount of energy. You will have to use the molar mass of
Uranium here.
That is, if an American converts 40 tonnes of carbon fossil-fuel usage
per year over to uranium fission reactor nuclear energy, how much
uranium would that person use per year? Give your answer in kg.

\textsl{(d)}~Now consider nuclear \emph{fusion}:
How much fusion fuel would each American need each year? Give your answer
in kg. And note that this could be derived directly from water, in principle!

I'm only looking for rough answers here.
\end{problem}

\begin{problem}
A box of mass $M$ sits on the floor of an elevator at rest. Gravity
(which has a strength set by the local acceleration due to gravity
$g$) pulls the box and the floor pushes the box. The \emph{net} or
total force on the box is zero. What is the force on the box from the
floor? Give both the magnitude and the direction.

Now imagine that the elevator is accelerating upwards at acceleration $a$.
Now the two forces on the box don't balance! Because, after all, the box
is accelerating upwards. What is the force on the box from the floor in this
case?

Now imagine that the elevator is accelerating downwards at acceleration $a$.
Same question.

Now imagine that the elevator is accelerating downwards at acceleration $a = g$.
Same question. Look up the ``vomit comet'' and tell me what this problem has to
do with that airplane.
\end{problem}

\end{document}