text:
\title{\bf Cosmology}

\section{Basics \& Nomenclature}

The universe is expanding. What that means is that at some point all
of the known universe was previously in a tiny space. Since that time
it has expanded dramatically. This expansion can be seen today in the
fact that more distant galaxies are moving faster away from us, the
{\it Hubble Law}. The density of the universe appears homogeneous and
the expansion appears isotropic.

Our best evidence today suggests that at the earliest times we can
hope to constraint the Universe was expanding exponentially with time,
during a phase called {\it inflation}. Inflation explains how widely
separated regions of the universe have similar density, by supposing
that they were close enough to come to thermal equilibrium at
extremely early times, but during inflation were ripped apart.
Inflation also explains the small fluctuations in density that form
structure in the universe, as quantum fluctuations. After inflation,
the expansion of the universe was controlled by the amount of matter
and radiation within it.

At this phase the universe was very hot. At some point protons,
neutrons, electrons, and photons formed a baryon-photon fluid tightly
bound held in equilibrium by the electromagnetic and weak
forces. During big bang nucleosynthesis, the protons and the neutrons
fell out of equilibrium, and deuterium, ${}^3$He, ${}^4$He formed,
along with some Li. Later, at the recombination redshift of $z\sim
1100$, the electrons became bound to the hydrogen atoms; the
temperature of the gas at that redshift was $T\sim 3000$ K. Since that
time, at some point between $z\sim 7$ and 20, the first stars and
quasars ionized the vast majority of the gas again.

To understand the expansion itself, consider the gravitational
dynamics of a universe with just matter (no radiation), which is a
good enough approximation at $z<30$. The general relativistic version
of this picture can be derived from the Einstein equations. This
approach is necessary to understand how light travels through the
resulting curved space-time of the universe.

However, to just understand the dynamics of the expansion a
straightforward Newtonian approach suffices.  Assume a homogeneous,
expanding universe, and pick some center.  Consider some particle a
distance $r$ from the center today. Since the universe has to remain
homogeneous, it doesn't matter which direction it is in.  The particle
will be moving radially from the center. In fact, at one point it must
have been at radius zero. Let us express its distance as a function of
time as $a(t)r$ where $a(t_0 = {\rm now}) = 1$. Newton's laws mean
that the gravitational force is just due to the mass interior to $r$;
alternatively, the motion of the % particle is driven by the energy
equation, where the potential is given by the Keplerian potential due
to the mass interior:
\begin{equation}
\label{eq:energy}
E = \frac{1}{2} m v^2 + m \phi(a(t) r) = \frac{1}{2} m v^2 -
\frac{GM(<a(t) r)m}{a(t) r} - \frac{m\Lambda}{6} a^2(t) r^2 =
\mathrm{~constant}
\end{equation}
The $\Lambda$ accounts for the cosmological constant (in general
relativity, introducing $\Lambda$ retains some essential properties of
the theory, which we do not demonstrate here). The equations here are
only valid when the universe is matter-dominated; the earlier phase
when the universe was radiation-dominated requires some relativity to
understand. But this simplistic approach demonstrates the differences
between $E<0$ (closed universe), $E=0$ (``flat'' universe), and $E>0$
(open universe).

We define $H=v/a(t)r$. Note that $v={\dot a}(t) r$, so the {\it Hubble
  parameter} $H(z)$ is:
\begin{equation}
  H(t) = \frac{\dot a}{a}
\end{equation}
At redshift zero, the Hubble parameter is equal to the Hubble
Constant.

We define also:
\begin{eqnarray}
\Omega_k &=& \frac{2E}{mH^2a^2(t) r^2} \cr
\Omega_m &=& \frac{8\pi G\rho}{3H^2}\cr
\Omega_\Lambda &=& \frac{\Lambda}{3H^2}
\end{eqnarray}
$\Omega_m$ is the scaled matter density, $\Omega_\Lambda$ is the
contribution of the matter density, and for reasons that become clear
in the general relativistic picture, $\Omega_k$ is the term related to
the curvature of space-time.

Under these definitions:
\begin{equation}
\Omega_k + \Omega_m + \Omega_\Lambda = 1
\end{equation}
at all times.

Under the equations above with $\Omega_m = 1$, we can show that:
\begin{equation}
a(t) \propto t^{2/3}
\end{equation}
From Equation \ref{eq:energy}, $\Omega_m = 1$ will be a good
approximation at sufficiently early times.

The parameters $\Omega_{m0}$ and $\Omega_{\Lambda 0}$ are the present
time values of the matter density and the cosmological constant, and
they are roughly $0.25$--$0.30$ and $0.70$--$0.75$ respectively.  The
curvature $\Omega_k$ is consistent with zero within $0.02$ or so.
The Hubble parameter today is $H_0 \sim 65$--$75$ km/s/Mpc.

For the majority of galaxies whose distances we have an estimate of,
it comes from the Doppler shift inference of velocity and the Hubble
Law. Two common choices of units are as follows:
\begin{equation}
r {\rm ~in~}h^{-1}{\rm ~Mpc} {\rm ~where~} h = \frac{H_0}{100 {\rm
    ~km/s/Mpc}}
\end{equation}
and
\begin{equation}
r {\rm ~in~}h_{70}^{-1}{\rm ~Mpc} {\rm ~where~} h_{70} = \frac{H_0}{70
  {\rm ~km/s/Mpc}}
\end{equation}
The latter is becoming far more standard these days but the former
still abounds.

In homogeneous expansion, the universe just scales overall by the
factor $a(t)$. We can define a {\it comoving coordinate system} that
expands with the universe --- $r$ as used above is the radius in that
coordinate system. In contrast {\it physical} units express a fixed
size.

In the general relativistic picture, the metric for this expanding
universe is:
\begin{equation}
{\rm d}s^2 = c^2 {\rm d}t^2 - a^2(t) \left[ \frac{{\rm d}q^2}{1-Kq^2}
  + q^2\left({\rm d}\theta^2+ \sin^2\theta{\rm d}\phi^2\right) \right]
\end{equation}
This is the {\it Friemann-Lemaitre-Robertson-Walker metric}.  $K$
determines the curvature of space and can be $K=1$, $-1$, or $0$.
$K=0$ corresponds to the $E=0$ and is the ``flat'' case, because the
spatial term is Euclidean (though spacetime is not flat even in this
case).  The FLRW metric is necessary for determining light paths
through the universe.

At low redshift, the expansion velocity translates into a
nonrelativistic Doppler redshift:
\begin{equation}
\frac{\lambda_o}{\lambda_e} = 1+z  \approx 1 + \frac{v}{c} \approx 1
+ \frac{H_0 d}{c}
\end{equation}
and so
\begin{equation}
d \approx \frac{cz}{H_0}
\end{equation}
and sometimes the cosmological redshift is expressed in terms of
$v\approx cz$. At high redshift (e.g. above unity), the relationship
between $d$ and $z$ is ambiguous.

Within the FLRW metric, there is a relationship between the expansion
factor $a(t)$ and the redshift that that time is observed at today:
\begin{equation}
a(t) = \frac{1}{1+z(t)}
\end{equation}
Heuristically, the photons are stretched by the same factor that the
universe has expanded. The exercises derive this more rigorously.

The FLRW metric allows us to relate intrinsic luminosities and sizes
to observed fluxes and angular sizes of objects at a given
redshift. The focusing theorem in general relativity states that
matter makes light converge. For a flat, matter-dominated universe:
\begin{equation}
D_C=
\frac{c}{H_0} \int_0^z \frac{{\rm d}z}{E(z)}
=
\frac{c}{H_0} \int_0^z \frac{{\rm d}z}{\sqrt{\Omega_{\Lambda0} +
    \Omega_{m0}(1+z)^3}},
\end{equation}
where here we use the expression for the Hubble parameter as a
function of redshift $H(z) = H_0 E(z)$.  This expression can be
derived from the energy equation. In a flat universe, the luminosity
distance is simply:
\begin{equation}
D_L = D_C (1+z)
\end{equation}
and the angular diameter distance is:
\begin{equation}
D_A = \frac{D_C}{1+z}
\end{equation}
In non-flat universes things are a bit more complicated
mathematically.

The universe has perturbations and is not quite homogeneous, inducing
motions with respect to the Hubble flow, called {\it peculiar
velocities}.  The observed redshift is due to both effects combined:
\begin{equation}
1+z_{\rm obs} = (1+z_{\rm cosmo})(1+z_{\rm pec})
\end{equation}
Peculiar velocities are typically a few hundred km/s, and are at most
a few thousand, or $\Delta z \sim 0.01$ at the most, but we map the
universe out to much larger redshift. So usually it is adequate to
express this expression as follows:
\begin{equation}
z_{\rm obs} = z_{\rm cosmo}+z_{\rm pec} + z_{\rm cosmo}z_{\rm pec}
\approx z_{\rm cosmo} + \frac{v_{\rm pec}}{c} (1+z_{\rm cosmo})
\end{equation}

The universe does not only contain matter, but contains radiation and
neutrinos and potentially other ingredients.  The cosmic microwave
background is observed today as a 2.7 K bath of photons with a nearly
perfect blackbody spectrum.  There is also a bath of neutrinos
surrounding us, of roughly the same density. Together these
relativistic particles have $\Omega_{r0} \sim 4\times 10^{-5}$
$h^{-2}$.  The density of non-relativistic matter scales as $a^{-3}$
but due to redshift the energy density of relativistic particles
scales as $a^{-4}$. At these times, $a(t)\propto t^{1/2}$. Therefore,
sufficiently far into the past the radiation dominates.  This is
called the epoch of {\it matter-radiation equality}, and occurs at a
redshift of order $z \sim \Omega_{m0}/\Omega_{r0} \sim 3000$. Note that the
relativistic contribution of radiation still needs to be accounted for
in equations for the expansion at redshifts down to about $z\sim 30$.

A significant quantity to compute is the {\it particle horizon} at any
given time. This is the distance that any particle can travel between
$t=0$ and some later time; it defines the scale on which causal
communication could have happened at any given time. It is given by
integrating the distance a photon can travel in comoving coordinates
at each interval $\dd t$:
\begin{equation}
r_H = a \int_0^t \frac{c \dd t}{a(t)}
= \frac{1}{1+z} \int_{1+z}^\infty \frac{c}{H(z)}.
\end{equation}
During the matter dominated epoch, $r_H\propto a^{3/2}$. During the
radiation dominated epoch $r_H\propto a^2$.

\section{Key References}

\begin{itemize}
  \item
    \href{http://adsabs.harvard.edu/abs/1999astro.ph..5116H}{
    {\it Distance measures in Cosmology},
      \citet{hogg99cosm}}
  \item
    {\it Physics Foundations of Cosmology},
    \citet{mukhanov05a}
\end{itemize}

\section{Order-of-magnitude Exercises}

\begin{enumerate}
\item What does the mean density of the universe correspond to in
    particles per cm$^3$?
\item Approximately, why does recombination occur at $z\sim 1100$?
\item How many ionizing photons per cubic Mpc are necessary to
reionize the Universe?
\item Estimate the particle horizon size at $z\sim 1100$, assuming
either the universe is radiation-dominated, or it is matter-dominated,
above that redshift.
\end{enumerate}

\section{Analytic Exercises}

\begin{enumerate}
\item Demonstrate that:
\begin{equation}
\Omega_k + \Omega_m + \Omega_\Lambda = 1
\end{equation}
\begin{answer}
We start by rearranging Equation (\ref{eq:energy}) expressing the
energy considerations:
\begin{eqnarray}
\frac{E}{m} &=& \frac{v^2}{2}-\frac{GM}{r} - \frac{\Lambda}{6}a^2(t)r^2 \cr
1 &=& \frac{2E}{mv^2} + \frac{2GM}{a(t) rv^2} +
\frac{\Lambda}{3}\frac{a^2(t) r^2}{v^2}
\end{eqnarray}
Now use $H=v/a(t)r$. Note that $v={\dot a}(t) r$, so:
\begin{equation}
H(t) = \frac{\dot a}{a}
\end{equation}
This is the time-dependent Hubble parameter. Also let us express the
mass $M$ in terms of the density: $M=4\pi r^3\rho/3$. Then:
\begin{eqnarray}
\frac{2E}{a^2(t) r^2 m H^2} + \frac{8\pi
  G\rho}{3H^2}+\frac{\Lambda}{3H^2} &=& 1 \cr
\Omega_k + \Omega_m + \Omega_\Lambda &=& 1
\end{eqnarray}
Note that the $E=0$ case is just the $\Omega_k=0$ case, where the
spatial curvature is zero.
% It can be useful to recast this in yet
% another way:
% \begin{eqnarray}
% \frac{2E}{mH_0^2 a^2(t_0) r^2} + \frac{8\pi
  % G\rho(t_0)}{3H_0^2}+\frac{\Lambda}{3H^2} &=& 1 \cr
% \end{eqnarray}
\end{answer}
\item Show that the expansion $a(t)$ as a function of $t$ in the
matter-dominated case (i.e. $\Omega_m \approx 1$) is $a(t)\propto t^{2/3}$ and in the radiation-dominated
case (i.e. $\Omega_r \approx 1$) is $a(t)\propto t^{1/2}$.
For the latter, use the fact that the gravitating energy density
$\rho \propto a^{-4}$ because of the effect of redshift.

\begin{answer}[Author: Gregory Beauregard]
First, we consider a matter-dominated case $\Omega_m\approx 1$. If we
consider the mass inside the expanding spherical shell, allowing that
it be constant and expressing it in terms of its density, we have that
$a(t_0)^3\rho_c=a(t)^3\rho$ where we specified that $t_0=\text{today}$
and $a(t_0)=1$ so that $\rho$ is expressible in terms of the critical
density $\rho_c$ as $\rho=\rho_c/a^3$ so that we get $\rho\propto
a^{-3}$ as stated in the notes for matter. We defined:
\begin{equation*}
  \Omega_m=\frac{8\pi G\rho}{3H^2}.
\end{equation*}
Definitions are chosen so that $H=\dot{a}/a$. Bringing things together
with the assumption that $\Omega_m\approx 1$, we have
\begin{equation*}
  \sqrt{a}\dot{a}=\sqrt{\frac{8\pi G\rho_c}{3}}.
\end{equation*}
The differential equation is separable to be easily solved, and the
righthand side is the Hubble parameter at current time (redshift
zero), so it's $H_0$.
\begin{equation*}
  a(t)=\left(3/2 H_0 t\right)^{2/3}\propto t^{2/3}
\end{equation*}
So we have in the matter dominated case that $a(t)\propto t^{2/3}$.
For the radiation dominated case, when we instead have that
$\rho\propto a^{-4}$ instead of $\rho\propto a^{-3}$, we get a
separable differential equation of the form
\begin{equation*}
  a\dot{a}=C.
\end{equation*}
With the same boundary of $a(0)=0$ as before, we have the solution is
of the form $a(t)=Ct^{1/2}$ (different $C$). In other words,
$a(t)\propto t^{1/2}$.
\end{answer}

\item
In the local universe, clearly the redshift $z$ can be interpreted as
a recession velocity $v$.  However, on non-local scales in general
relativity, there is no unambiguous definition of relative
velocity. Instead, the redshift $z$ needs to be interpreted as
resulting from the expansion of the universe over the path of the
photon.  How does the expansion scale $a(t)$ of the universe at the
time of emission $t$ relate to the redshift $z$?

\begin{answer}
The photons travel along null geodesics. If photons reach an observer,
then they have been traveling radially in the FRW coordinate system
centered on the observer (other photons are going other directions,
but they don't reach the observer). So:
\begin{equation}
{\rm d}s^2 = c^2 {\rm d}t^2 - a^2(t) \frac{{\rm d}q^2}{1-Kq^2} = 0
\end{equation}
and therefore:
\begin{equation}
\frac{{\rm d}t^2}{a^2(t)} = \frac{{\rm d}q^2}{c(1-Kq^2)}
\end{equation}
Now conceive of a wave peak leaving some radius $q$ at some time
$t_e$, and the next one leaving at $t_e+\delta t_e$.  Integrate the
square root of the above equation over the path taken by the first:
\begin{equation}
\int_{t_e}^{t_o} \frac{{\rm d}t'}{a(t')} =
\int_q^0 {\rm d}q'
\frac{1}{c\sqrt{1-Kq^2}}
\end{equation}
Note that for both wave peaks, the right hand side is the same,
because they leave from the same radius $q$. Therefore:
\begin{equation}
\int_{t_e}^{t_o} \frac{{\rm d}t'}{a(t')} =
\int_{t_e+\delta t_e}^{t_o+\delta t_o} \frac{{\rm d}t'}{a(t')} =
\int_{t_e}^{t_o} \frac{{\rm d}t'}{a(t')} + \frac{\delta t_o}{a(t_o)} -
\frac{\delta t_e}{a(t_e)}
\end{equation}
where the last equation is just from the way integrals are defined.
Then clearly:
\begin{equation}
\frac{\delta t_e}{\delta t_o} = \frac{a(t_e)}{a(t_o)}
\end{equation}
This means that the period of the wave is increasing, so the
wavelength is increasing and the frequency is decreasing. Assuming we
observe at $t_o=t_0$, we can write:
\begin{equation}
a(t_e) = \frac{\nu_o}{\nu_e} = \frac{\lambda_e}{\lambda_o} =
\frac{1}{1+z}
\end{equation}
where the last equality comes from the definition of redshift $z$:
\begin{equation}
\frac{\lambda_o}{\lambda_e} = 1+z
\end{equation}
You can think of this as the fact that the photons are being stretched
in precisely the same way that the universe is being expanded.
\end{answer}
\item
If an observer measures the rotation curve of a galaxy whose Hubble
velocity is $v_{\rm sys}$, they will measure a profile that ranges
from $v_{\rm sys} - v_{\rm max}$ to $v_{\rm sys} + v_{\rm
max}$. Convert the observed maximum rotational velocity $v_{\rm max}$
to the maximal rotation velocity in the galaxy's rest frame.
\item The blackbody radiation leftover after recombination is redshifted over
time. Assuming that the radiation is only affected by the redshift,
show how the energy density and temperature of this radiation depends
on redshift.
\end{enumerate}

\section{Numerics and Data Exercises}

\begin{enumerate}
\item Plot $\Omega_m(z)$ and $\Omega_\Lambda(z)$ between $z=0$ and 5,
for a flat Universe, assuming $\Omega_{m}(z=0)=0.3$.
\end{enumerate}

\bibliographystyle{apj}
\bibliography{exex}


text:
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Freeman Curriculum Vitae
% XeLaTeX Template
% Version 2.0 (19/3/2018)
%
% This template originates from:
% http://www.LaTeXTemplates.com
%
% Authors:
% Vel (vel@LaTeXTemplates.com)
% Alessandro Plasmati
%
% License:
% CC BY-NC-SA 3.0 (http://creativecommons.org/licenses/by-nc-sa/3.0/)
%
%!TEX program = xelatex
% NOTICE: This template must be compiled with XeLaTeX, the line above should
% ensure this happens automatically but if it doesn't you will need to specify
% XeLaTeX as the engine in your editor or script
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%----------------------------------------------------------------------------------------
%	PACKAGES AND OTHER DOCUMENT CONFIGURATIONS
%----------------------------------------------------------------------------------------

\documentclass[10pt]{article} % Font size, can be: 10pt, 11pt or 12pt

\input{structure.tex} % Include the file that specifies the document structure

% Headers and footers can be added with the \lhead{} \rhead{} \lfoot{} \rfoot{} commands
% Example right footer:
%\rfoot{\color{headings}{\sffamily Last update: \today. Typeset with Xe\LaTeX}}

%----------------------------------------------------------------------------------------

\begin{document}

\begin{paracol}{2} % Begin the multi-column environment

%----------------------------------------------------------------------------------------
%	NAME AND CURRICULUM VITAE TEXT
%----------------------------------------------------------------------------------------

\parbox[top][0.12\textheight][c]{\linewidth}{ % Parbox to hold the author name and CV text; fixed height to match the coloured box to the right, centred vertically and full line width
	\vspace{-0.04\textheight} % Reduce whitespace above the parbox to separate it from the main content
	\centering % Centre text
	{\sffamily\Huge Dr. Carl Boettiger}\\\medskip % Your name
	{\Huge\color{headings}\cvtextfont Curriculum Vitae}
}

%----------------------------------------------------------------------------------------
%	WORK EXPERIENCE
%----------------------------------------------------------------------------------------

\section{Work Experience}

% Blank \workposition command to add another job:

%\workposition{} % Duration
%{} % FT/PT (full time or part time)
%{} % Employer
%{} % Job title
%{} % Description

% All 5 parameters must be supplied but any can be empty if you don't need them

%------------------------------------------------

\workposition{Current, from July 2015} % Duration
{FT} % FT/PT (full time or part time)
{University of California, Berkeley} % Employer
{Assistant Professor} % Job title
{Department of Environmental Science, Policy and Management} % Description

%------------------------------------------------

\workposition{2013-2015} % Duration
{FT} % FT/PT (full time or part time)
{University of California, Santa Cruz} % Employer
{NSF Post-doctoral Scholar} % Job title
{Department of Applied Mathematics and Statistics}  % Description

%------------------------------------------------

\vspace{-\baselineskip}\medskip % Standardise the whitespace after this section and before the next (the custom command adds too much otherwise)

%----------------------------------------------------------------------------------------
%	EDUCATION
%----------------------------------------------------------------------------------------

\section{Education}

% Blank \educationentry{} command to add another degree:

%\educationentry{} % Duration
%{} % Degree
%{} % Honours, achievements or distinctions (e.g. first class honours)
%{} % Department
%{} % Institution

% All 5 parameters must be supplied but any can be empty if you don't need them

%------------------------------------------------

\begin{supertabular}{rl} % Start a table with two columns, the table will ensure everything is aligned

	%------------------------------------------------

	\educationentry{2007 -- 2012} % Duration
	{Doctor of Philosophy} % Degree
	{} % Honours, achievements or distinctions (e.g. first class honours)
	{Population Biology. Mentor: Alan Hastings} % Department
	{University of California, Davis} % Institution

	%------------------------------------------------

	\educationentry{2003 -- 2007} % Duration
	{Bachelors of Physics} % Degree
	{with Honours} % Honours, achievements or distinctions (e.g. first class honours)
	{Physics, w/ Certs. in Applied Mathematics} % Department
	{Princeton University} % Institution

	%------------------------------------------------

\end{supertabular}

%----------------------------------------------------------------------------------------
%	AWARDS
%----------------------------------------------------------------------------------------

\section{Grants}

% Example \tableentry{} command to add another line:
%\tableentry{Heading}{Content}{spaceafter}
% All 3 parameters must be supplied but any can be empty if you don't need them
% A "spaceafter" value in the third parameter will add some vertical space -- this is to be used between headings

%------------------------------------------------

\begin{supertabular}{rl} % Start a table with two columns, the table will ensure everything is aligned

  \educationentry{2019 -- 2020}{Chan-Zuckerberg Initiative,  \$75,912}{}{C. Boettiger, N. Ross, D. Eddelbuettel}{\href{https://chanzuckerberg.com/eoss/proposals/maintaining-rocker-sustainability-for-containerized-reproducible-analyses/}{Essential Open Source Software for Science}}

  \educationentry{2018 -- 2022}{National Science Foundation,  \$1,301,737}{}{T. Bowles, A. Iles, C. Kremen, C. Boettiger}{Coupled Natural Human Systems \href{https://nsf.gov/awardsearch/showAward?AWD_ID=1824871}{\#CNH-1824871}}

  \educationentry{2019 -- 2021}{Helmsley Charitable Trust,  \$1,000,000}{}{K. Ram, C. Boettiger, S. Chamberlain}{\href{https://ropensci.org}{The rOpenSci Project}}

  \educationentry{2018}
  {Berkeley Institute for Data Science, \$67,000}
  {}
  {C. Boettiger, R. Gillespie, R. Nielsen}{\hspace{.1pt}}

  \educationentry{2018 -- 2021}
  {The Hellman Foundation, \$37,600}
  {}
  {C. Boettiger}
  {Junior Faculty Fellowship}

  \educationentry{2018 -- 2019}
  {Berkeley Collegium \$16,867}
  {}
  {C. Boettiger}
  {Narrowing the Gap Between Teaching and Research}

  \educationentry{2016 - 2019}{James S McDonnell Foundation, \$200,000}{}{(Awarded to Allison Barner, who brought it to my team)}{\href{https://www.jsmf.org/grants/20150024/}{Post-doctoral Fellowship in Complex Systems}}

  \educationentry{2015 -- 2018}{Helmsley Charitable Trust,  \$2,875,071}{}{K. Ram, C. Boettiger, S. Chamberlain} {\href{https://ropensci.org}{The rOpenSci Project}, \#2016PG-BRI004}

  \educationentry{2015 -- 2018}{National Science Foundation, \$165,782}{}{C. Boettiger, M. Jones}{The CodeMeta Project \href{https://www.nsf.gov/awardsearch/showAward?AWD_ID=1549758}{\#ACI-1549758}}

  \educationentry{2014}{Alfred P. Sloan Foundation, \$300,000}{}{K. Ram, C. Boettiger, S. Chamberlain}{The rOpenSci Project Phase II funding}

  \educationentry{2013}{Alfred P. Sloan Foundation, \$180,000}{}{K. Ram, C. Boettiger, S. Chamberlain}{The rOpenSci Project Phase I funding}

  \educationentry{2013 -- 2015}{National Science Foundation, \$138,000}{}{}
  {C Boettiger. \href{http://www.nsf.gov/pubs/2012/nsf12497/nsf12497.htm}{NSF Biology
  Post-doc}, \href{http://www.nsf.gov/awardsearch/showAward?AWD_ID=1306697}{\#DBI-1306697}}

  \educationentry{2009}
  {National Academy of Sciences \$8,000}
  {}
  {IIASA YSSP fellowship}
  {OISE-0738129}.

  \educationentry{2008 -- 2012}
  {Department of Energy, \$149,000}
  {}
  {Computational Science Graduate Fellowship}
  {\href{https://www.krellinst.org/csgf/alumni/profile?n=boettiger2008}{\#DE-FG02-97ER25308}}

  %Managing ecosystems under extreme uncertainty. (2016 - 2019) NSF
  %\textbf{XSEDE} TG-DEB160003. NSF Estimated value of computing
  %resources: \$34,558

 % Reproducible and Collaborative Data Science. NSF \textbf{XSEDE}
 % TG-DEB160021. (2016 - 2019) NSF Estimated value of computing
 % resources: \$20,028

\end{supertabular}

\section{Invited Talks and Workshops}

\begin{supertabular}{rl}

    \tableentry{2019}{Invited BRC seminar, UBC, Vancouver, Canada}{}
         \tableentry{}{AGU \href{https://agu.confex.com/agu/fm19/meetingapp.cgi/Session/87281}{Ecological Forecasting Oral Session}, San Fransisco, CA}{}
     \tableentry{}{Advancing Theory in Ecology, NSF Workshop. Penn State, PA}{}
     \tableentry{}{Biodiversity Data Workshop invited speaker, ASU, Tempe, AZ}{}
    \tableentry{}{Ecological Society of America \href{https://eco.confex.com/eco/2019/meetingapp.cgi/Session/15321}{invited OOS}, Louisville, KY}{}
    \tableentry{}{\href{https://ecoforecast.org/efi2019/}{Ecological Forecasting
  Initiative}, Washington DC.}{}
    \tableentry{}{\href{http://www.nimbios.org/workshops/WS_transients}{NIMBioS
       Workshop}, UT Knoxville, TN.}{}
    \tableentry{}{\href{https://serc.carleton.edu/eddie/earthecosystems/eddieevents/workshops/barriers_solutions/index.html}{Project
      EDDIE} keynote speaker, Carlton, Northfield MN.}{}
    \tableentry{}{\href{https://github.com/si2-urssi/software-credit}{URSSI Workshop}, NCEAS, Santa Barbara, CA.}{}
    \tableentry{}{\href{https://www.compassscicomm.org}{COMPASS Workshop} Asilomar, CA}{spaceafter}

\tableentry{2018}{\href{https://si2-pi-community.github.io/2018-meeting/}{NSF SI2 PIs
  Meeting}, Washington, DC.}{}
\tableentry{}{\href{http://unconf18.ropensci.org}{rOpenSci unconference}, Seattle,
  WA.}{}
\tableentry{}{\href{https://teaching.berkeley.edu/programs/transforming-stem-teaching-faculty-learning-program/become-flp-faculty-fellow}{FLP Fellows Workshop} Berkeley, CA.}{}
\tableentry{}{\href{https://graphxd.github.io/workshop/2018.html}{GraphXD},
  Berkeley, CA}{}
\tableentry{}{\href{https://www.idigbio.org/wiki/index.php/Digital_Data_in_Biodiversity_Research_Conference,_Berkeley}{Digital
  Data in Biodiversity} (co-org), Berkeley CA.}{}
\tableentry{}{\href{https://eco.confex.com/eco/2018/meetingapp.cgi/Session/14034}{ESA Invited Symposium} (Organizer). New Orleans, LA.}{}
\tableentry{}{ Nonlinear Forecasting, NOAA SFSC, Santa Cruz, CA}{spaceafter}

\tableentry{2017}{\href{https://cross.ucsc.edu/cross-events/research-symposium/2017-symposium/}{CROSS
  Symposium Speaker} Santa Cruz, CA}{}
\tableentry{}{\href{http://www.ncsa.illinois.edu/Conferences/ImagineU/participants.html}{Imagining
  Tomorrow's University} Chicago, IL}{}
\tableentry{}{\href{http://unconf17.ropensci.org}{rOpenSci unconference}, Los
  Angeles, CA}{}
\tableentry{}{\href{https://dataoneorg.github.io/provathon-2017/}{DataONE}, Tamaya, NM.}{}
\tableentry{}{\href{https://bids.berkeley.edu/events/translational-data-science-workshop}{NSF
  Translational Data Science}, Berkeley, CA.}{spaceafter}

\tableentry{2016}{\href{http://sched.co/5wK5}{Force16 Codemeta Workshop} (organizer), Portland OR}{}
\tableentry{}{\href{https://codemeta.github.io}{CodeMeta NSF Workshop} (Organizer) Portland, OR.}{}
\tableentry{}{\href{http://unconf16.ropensci.org}{rOpenSci unconference}, San
  Francisco, CA}{spaceafter}

\tableentry{2015}{\href{http://ecows.oc.ntu.edu.tw/itnlws/}{Empirical Dynamical Modeling}, NTU, Taiwan}{}
\tableentry{}{Moore-Sloan Second Annual Data Science Summit}{}
\tableentry{}{\href{https://github.com/NCEAS/ds-workshop-2015}{Improving Data Intensive Training}, NCEAS, Santa Barbara, CA}{}
\tableentry{}{\href{http://www.nsf.gov/pubs/2015/nsf15562/nsf15562.htm}{NSF Big Data
  Hubs} Design Charette, Western Region}{}
\tableentry{}{\href{http://unconf.ropensci.org/}{rOpenSci unconference}, San
  Francisco CA}{}
\tableentry{}{\href{http://www.nimbios.org/workinggroups/WG_PDG}{NIMBIOS Working Group}, Knoxville TN}{spaceafter}

\tableentry{2014}{Global Change Biology, UC Berkeley, CA}{}
\tableentry{}{Zoology Seminar, University of Wisconsin, Madison, WI}{}
\tableentry{}{\href{http://dimacs.rutgers.edu/Workshops/GlobalChange/announcement.html}{DIMACS} Global Change, Berkeley CA}{}
\tableentry{}{ESPM Seminar, UC Berkeley, CA}{}
\tableentry{}{\href{http://ropensci.org/blog/2014/05/14/ropenhack/}{rOpenSci unconf}, San Francisco CA}{}
\tableentry{}{\href{https://github.com/Reproducible-Science-Curriculum/Reproducible-Science-Hackathon-Dec-08-2014}{Reproducible Science Curriculum}, NESCent, Durham, NC}{}
\tableentry{}{\href{http://wssspe.researchcomputing.org.uk/wssspe2/}{WSSSPE 2.0 Meeting}. New Orleans, LA}{}
\tableentry{}{Workflows Working Group, NCEAS, Santa Barbara, CA}{spaceafter}

\tableentry{2013}{
  \href{http://www.mbi.ohio-state.edu/2013/ws3description.html}{MBI}, invited speaker, Columbus, OH}{}
\tableentry{and}{Seminar speaker, WHOI, Woods Hole, MA}{}
\tableentry{prior}{Seminar speaker, Davis, CA}{}
 \tableentry{}{SSB Symposium, Evolution Conference, Ottawa, CAN}{}
 \tableentry{}{\href{http://isees.nceas.ucsb.edu}{ISEES}, Santa Barbara, CA}{spaceafter}

\end{supertabular}

\switchcolumn % Switch to the next paracol column

%----------------------------------------------------------------------------------------
%	COLOURED CONTACT DETAILS BOX
%----------------------------------------------------------------------------------------

\parbox[top][0.12\textheight][c]{\linewidth}{ % Parbox to hold the colour box; fixed height to match the name/CV text to the left, centred vertically and full line width
	\vspace{-0.04\textheight} % Reduce whitespace above the parbox to separate it from the main content
	\colorbox{shade}{ % Create the coloured box
		\begin{supertabular}{p{0.05\linewidth}|p{0.775\linewidth}} % Start a table with two columns, the table will ensure everything is aligned
			\raisebox{-1pt}{\faHome} & ESPM Department, University of California, 130 Mulford Hall \#3114 Berkeley, CA 94720 \\ % Address
			\raisebox{0pt}{\small\faEnvelope} & \href{mailto:cboettig@berkeley.eu}{cboettig@berkeley.edu} \\ % Email address
			\raisebox{-1pt}{\small\faDesktop} & \href{https://carlboettiger.info}{https://carlboettiger.info} \\ % Website
			\raisebox{-1pt}{\faGithub} & \href{https://github.com/cboettig}{https://github.com/cboettig} \\ % GitHub profile
			%\raisebox{-1pt}{\faLinkedinSquare} & \href{https://www.linkedin.com/in/username}{https://www.linkedin.com/in/username} \\ % LinkedIn profile
			% See fontawesome.pdf in the fonts folder for all icons you can use
		\end{supertabular}
	}
}

%----------------------------------------------------------------------------------------
%	PUBLICATIONS
%----------------------------------------------------------------------------------------

\section{Publications (32)}

% Example \longformdescription{} command to add another publication:

%\longformpublication{Reference (format this manually as desired)}

%------------------------------------------------
\longformpublication{
Milad Memarzadeh, Gregory L. Britten, Boris Worm, \textbf{Carl
  Boettiger} (2019). Rebuilding global fisheries under uncertainty.
  \emph{Proceedings of the National Academy of Sciences}.
  \href{https://doi.org/10.1073/pnas.1902657116}{doi:10.1073/pnas.1902657116}
}

\longformpublication{
  \textbf{Carl Boettiger}, Ryan Batt (2019). Bifurcation or state
  tipping: assessing transition type in a model trophic cascade.
  \emph{Journal of Mathematical Biology}.
  \href{https://doi.org/10.1007/s00285-019-01358-z}{doi:10.1007/s00285-019-01358-z}
  (\href{https://github.com/cboettig/bs-tipping/blob/master/paper/paper.pdf}{oa},
  \href{https://github.com/cboettig/bs-tipping}{code})
}

\longformpublication{
  Milad Memarzadeh, \textbf{Carl Boettiger} (2019). Resolving the
  Measurement Uncertainty Paradox in Ecological Management.
  \emph{American Naturalist}.
  \href{https://doi.org/10.1086/702704}{doi:10.1086/702704}.
  (\href{https://github.com/boettiger-lab/pomdp-intro/tree/master/manuscripts}{oa},
  \href{https://github.com/boettiger-lab/pomdp-intro}{code},
  \href{https://doi.org/10.5281/zenodo.2528507}{data})
}

\longformpublication{
  Dan Sholler, Karthik Ram, \textbf{Carl Boettiger}, Daniel S Katz
  (2019). Enforcing public data archiving policies in academic
  publishing: A study of ecology journals. \emph{Big Data \& Society}
  6(1) 1-18.
  \href{https://doi.org/10.1177/2053951719836258}{doi:10.1177/2053951719836258}
}

\longformpublication{
  \textbf{Carl Boettiger} (2019). Ecological Metadata as Linked Data.
  \emph{Journal of Open Source Software}, 4(34), 1276,
  \href{https://doi.org/10.21105/joss.01276}{doi:10.21105/joss.01276}
  (\href{https://doi.org/10.5281/zenodo.1442890}{software}).
}

\longformpublication{
  Katz, Allen, Barba, Berg, Bik, \textbf{Boettiger}, et al. (2018). The
  principles of tomorrow's university. \emph{F1000Research}, 7:1926
  \href{https://doi.org/10.12688/f1000research.17425.1}{doi:10.12688/f1000research.17425.1}.
  (32 co-authors.)
}

\longformpublication{
  Karthik Ram, \textbf{Carl Boettiger}, Scott Chamberlain, Noam Ross,
  Maelle Salmon, \& Stephanie Butland (2018). A Community of Practice
  Around Peer-review for Long-term Research Software Sustainability.
  \emph{Computing in Science \& Engineering}, 9615(c), 1--1.
  \href{https://doi.org/10.1109/MCSE.2018.2882753}{doi:10.1109/MCSE.2018.2882753}
}

\longformpublication{
  \textbf{Carl Boettiger} (2018). Managing Larger Data on a GitHub
  Repository. \emph{Journal of Open Source Software}, 3(29), 971,
  \href{https://doi.org/10.21105/joss.00971}{doi:10.21105/joss.00971}.
  (\href{https://doi.org/10.5281/zenodo.1432525}{software}).
}

%%% \switchcolumn % Switch to the next paracol column

\longformpublication{
  Milad Memarzadeh, \textbf{Carl Boettiger} (2018). Adaptive management
  of ecological systems under partial observability. \emph{Biological
  Conservation}. 224, 9-15.
  \href{https://doi.org/10.1016/j.biocon.2018.05.009}{doi:10.1016/j.biocon.2018.05.009}.
  (\href{https://github.com/boettiger-lab/pomdpplus}{software})
}

\longformpublication{
  \textbf{Carl Boettiger} (2018). From noise to knowledge: how
  randomness generates novel phenomena and reveals information.
  \emph{Ecology Letters}.
  \href{https://doi.org/10.1111/ele.13085}{doi:10.1111/ele.13085}
  (\href{https://github.com/cboettig/noise-phenomena/raw/master/paper/paper.pdf}{oa},
  \href{https://github.com/cboettig/noise-phenomena}{code},
  \href{https://doi.org/10.5281/zenodo.1219779}{data})
}

\longformpublication{
  \textbf{Carl Boettiger}, Dirk Eddelbuettel (2018). An Introduction to
  Rocker: Docker Containers for R. \emph{The R Journal}.
  \href{https://doi.org/10.32614/RJ-2017-065}{doi:10.32614/RJ-2017-065}
}

\longformpublication{
  \textbf{Carl Boettiger} (2017). Generating Codemeta Metadata for R
  Packages. \emph{The Journal of Open Source Software} 2 (19), 454,
  \href{https://doi.org/10.21105/joss.00454}{doi:10.21105/joss.00454}
}

\longformpublication{
  Getz, Marshall, Carlson, Giuggioli, Ryan, Romañach,
  \textbf{Boettiger}, Chamberlain, Larsen, D'Odorico, O'Sullivan (2017).
  Making ecological models adequate. \emph{Ecology Letters}. \\
  \href{https://doi.org/10.1111/ele.12893}{doi:10.1111/ele.12893}
}

\longformpublication{
  Ben Marwick, \textbf{Carl Boettiger}, Lincoln Mullen (2017). Packaging
  data analytical work reproducibly using R (and friends). \emph{The
  American Statistician}.
  \href{https://doi.org/10.1080/00031305.2017.1375986}{doi:10.1080/00031305.2017.1375986}.
  (\href{https://doi.org/10.7287/peerj.preprints.3192v1}{oa})
}

\longformpublication{
  Hampton, Jones, Wasser, Schuldhauer, Supp, Brun, Herandez,
  \textbf{Boettiger}, Collins, Gross, Fernandez, Budden, White, Teal,
  Labou, Aukema (2017). Skills and Knowledge for Data Intensive
  Research. \emph{BioScience}.
  \href{https://doi.org/10.1093/biosci/bix025}{doi:10.1093/biosci/bix025}.
  (\href{https://doi.org/10.1093/biosci/bix025}{oa})
}

\longformpublication{
  T Alex Perkins, \textbf{Carl Boettiger}, Benjamin L. Philips. (2016)
  After the games are over: life-history trade-offs drive dispersal
  attenuation following range expansion. \emph{Ecology and Evolution} 6
  (18) 6425-6434.
  \href{http://dx.doi.org/10.1002/ece3.2314}{doi:10.1002/ece3.2314}.
  (\href{http://oadoi.org/10.1002/ece3.2314}{oa},
  \href{https://github.com/TAlexPerkins/dispersal_tradeoffs}{code})
}

\longformpublication{
  \textbf{Carl Boettiger}, Michael Bode, James N. Sanchirico, Jacob
  LaRiviere, Alan Hastings, and Paul Robert Armsworth (2016). Optimal
  management of a stochastically varying population when policy
  adjustment is costly. \emph{Ecological Applications} 26 (3) 808-817.
  \href{http://dx.doi.org/10.1890/15-0236}{doi:10.1890/15-0236}.
  (\href{http://arxiv.org/pdf/1507.07037v1.pdf}{oa},
  \href{https://github.com/cboettig/pdg_control}{code})
}

\longformpublication{
  \textbf{Carl Boettiger}, Scott Chamberlain, Rutger Vos and Hilmar Lapp
  (2016). RNeXML: a package for reading and writing richly annotated
  phylogenetic, character, and trait data in R. \emph{Methods in Ecology
  and Evolution}.
  \href{http://dx.doi.org/10.1111/2041-210X.12469}{doi:10.1111/2041-210X.12469}.
  (\href{http://arxiv.org/abs/1506.02722}{oa},
  \href{https://github.com/ropensci/RNeXML}{code},
  \href{http://cran.rstudio.com/web/packages/RNeXML}{software})
}

\longformpublication{
  \textbf{Carl Boettiger}, Scott Chamberlain, Edmund Hart, Karthik Ram
  (2015). Building Software, Building Community: Lessons from the
  rOpenSci Project. \emph{Journal of Open Research Software} 3: e8,
  \href{http://dx.doi.org/10.5334/jors.bu}{doi:10.5334/jors.bu}.
}

\longformpublication{
  \textbf{Carl Boettiger} (2015). An introduction to Docker for
  reproducible research. \emph{ACM SIGOPS Operating Systems Review}
  49(1), 71-79.
  \href{http://dx.doi.org/10.1145/2723872.2723882}{doi:10.1145/2723872.2723882}.
  (\href{http://arxiv.org/abs/1410.0846}{oa})
}

\longformpublication{
  \textbf{Carl Boettiger}, Marc Mangel, Stephan Munch (2015). Avoiding
  tipping points in fisheries management through Gaussian process
  dynamic programming. \emph{Proceedings of the Royal Society B}
  282(1801), 8--11.
  \href{http://dx.doi.org/10.1098/rspb.2014.1631}{doi:10.1098/rspb.2014.1631}.
  (\href{http://arxiv.org/abs/1412.8081}{oa},
  \href{https://github.com/cboettig/nonparametric-bayes}{code},
  \href{http://dx.doi.org/10.5061/dryad.mj226}{data})
}

%%%%%

\longformpublication{
  \textbf{Carl Boettiger}, Alan Hastings (2013). No early warning
  signals for stochastic transitions: insights from large deviation
  theory. \emph{Proceedings of the Royal Society B}. \\
  \href{http://dx.doi.org/10.1098/rspb.2013.1372}{doi:10.1098/rspb.2013.1372}.
  (\href{http://arxiv.org/abs/1307.4415}{oa},
  \href{https://github.com/cboettig/prosecutors-fallacy}{code})
}

\longformpublication{
  \textbf{Carl Boettiger}, Noam Ross, Alan Hastings (2013). Early
  warning signals: The charted and uncharted territories.
  \emph{Theoretical Ecology}
  \href{http://dx.doi.org/10.1007/s12080-013-0192-6}{doi:10.1007/s12080-013-0192-6}.
  (\href{http://arxiv.org/abs/1305.6700}{oa},
  \href{https://github.com/cboettig/ews-review}{code})
}

\longformpublication{
  \textbf{Carl Boettiger}, Alan Hastings (2013). Tipping points: From
  patterns to predictions, \emph{Nature} 493, 157--158.
  \href{http://dx.doi.org/10.1038/493157a}{doi:10.1038/493157a}.
}

\longformpublication{
  \textbf{Carl Boettiger}, Alan Hastings (2012). Early Warning Signals
  and the Prosecutor's Fallacy, \emph{Proceedings of the Royal Society
  B} 279 (1748) 4734-4739.
  \href{http://dx.doi.org/10.1098/rspb.2012.2085}{doi:10.1098/rspb.2012.2085}.
  (\href{http://arxiv.org/abs/1210.1204}{oa},
  \href{https://github.com/cboettig/prosecutors-fallacy}{code},
  \href{http://dx.doi.org/10.5061/dryad.2k462}{data})
}

\longformpublication{
  \textbf{Carl Boettiger}, Duncan Temple Lang, Peter Wainwright (2012).
  rfishbase: exploring, manipulating and visualizing FishBase data from
  R, \emph{Journal of Fish Biology}. 81 (6) 2030--2039.
  \href{http://dx.doi.org/10.1111/j.1095-8649.2012.03464.x}{doi:10.1111/j.1095-8649.2012.03464.x}.
  (\href{https://github.com/ropensci/rfishbase/blob/master/inst/doc/rfishbase/rfishbase_github.md}{oa},
  \href{https://github.com/ropensci/rfishbase}{code},
  \href{http://cran.at.r-project.org/web/packages/rfishbase/}{software})
}

\longformpublication{
  \textbf{Carl Boettiger}, Duncan Temple Lang (2012). Treebase: An R
  package for discovery, access and manipulation of online phylogenies,
  \emph{Methods in Ecology and Evolution} 3 (6) 1060--1066.
  \href{http://dx.doi.org/10.1111/j.2041-210X.2012.00247.x}{doi:10.1111/j.2041-210X.2012.00247x}.
  (\href{https://github.com/ropensci/treebase/blob/master/inst/doc/treebase/treebase_github.md}{oa},
  \href{https://github.com/ropensci/treebase}{code},
  \href{http://cran.at.r-project.org/web/packages/treebase/}{software})
}

\longformpublication{
  \textbf{Carl Boettiger}, Alan Hastings (2012). Quantifying Limits to
  Detection of Early Warning for Critical Transitions, \emph{Journal of
  the Royal Society: Interface} 9 (75) 2527-2539.
  \href{http://dx.doi.org/10.1098/rsif.2012.0125}{doi:10.1098/rsif.2012.0125}.
  (\href{http://arxiv.org/abs/1204.6231}{oa},
  \href{https://github.com/cboettig/earlywarning}{code})
}

\longformpublication{
  Jeremy M. Beaulieu, Dwueng-Chwuan Jhwueng, \textbf{Carl Boettiger},
  Brian O'Meara, (2012). Modeling Stabilizing Selection: Expanding the
  Ornstein-Uhlenbeck Model of Adaptive Evolution, \emph{Evolution} 66
  (8) 2369-2383.
  \href{http://dx.doi.org/10.1111/j.1558-5646.2012.01619.x}{doi:10.1111/j.1558-5646.2012.01619.x}
  (\href{http://cran.r-project.org/web/packages/OUwie/index.html}{software})
}

\longformpublication{
  \textbf{Carl Boettiger}, Graham Coop, Peter Ralph (2012). Is your
  phylogeny informative? Measuring the power of comparative methods,
  \emph{Evolution} 66 (7) 2240-51.
  \href{http://dx.doi.org/10.1111/j.1558-5646.2011.01574.x}{doi:10.1111/j.1558-5646.2011.01574.x},
  (\href{http://arxiv.org/abs/1110.4944}{oa},
  \href{https://github.com/cboettig/pmc}{code},
  \href{http://datadryad.org/handle/10255/dryad.37645}{data})
}

\longformpublication{
  \textbf{Carl Boettiger}, Jonathan Dushoff, Joshua S Weitz (2010).
  Fluctuation domains in adaptive evolution, \emph{Theoretical
  Population Biology} 77 (1) 6-13.
  \href{http://dx.doi.org/10.1016/j.tpb.2009.10.003}{doi:10.1016/j.tpb.2009.10.003}.
  (\href{http://arxiv.org/abs/1004.4233}{oa},
  \href{https://github.com/cboettig/fluctuationDomains}{code},
  \href{http://datadryad.org/handle/10255/dryad.37625}{data})
}

\longformpublication{
  James J. Wray, Neta A. Bahcall, Paul Bode, \textbf{Carl Boettiger},
  Phillip Hopkins (2006). The Shape, Multiplicity, and Evolution of
  Superclusters in Lambda-CDM Cosmology, \emph{The Astrophysical
  Journal} 652 (2) 907-916.
  \href{http://dx.doi.org/10.1086/508600}{doi:10.1086/50860}.
  (\href{http://arxiv.org/abs/astro-ph/0603060}{oa})
 }

\section{Book Chapters}

\longformpublication{ \textbf{Carl Boettiger} (2017). A Reproducible R Notebook Using Docker. In J. Kitzes, D. Turek, \& F. Deniz (Eds.), The Practice of
  Reproducible Research: Case Studies and Lessons from the
  Data-Intensive Sciences (1st ed., pp.~109--117). Oakland, CA: UC
  Press. \href{https://www.ucpress.edu/book.php?isbn=9780520294752}{ISBN:9780520294752}}

\switchcolumn

\section{Software}

\longformpublication{
  \href{https://github.com/ropensci/emld}{\texttt{emld}}: Ecological
  Metadata as Linked Data. Carl Boettiger (2019).}

\longformpublication{
  \href{https://github.com/ropensci/virtuoso}{\texttt{virtuoso}}:
  Interface to Virtuoso using ODBC. Carl Boettiger (2019).}
\longformpublication{
  \href{https://github.com/ropensci/rdflib}{\texttt{rdflib}}: Tools to
  Manipulate and Query Semantic Data. Carl Boettiger (2018).
}

\longformpublication{
  \href{https://github.com/ropensci/codemetar}{\texttt{codemetar}}:
  Generate CodeMeta Metadata for R Packages. Carl Boettiger, Maëlle
  Salmon (2018).
}

\longformpublication{
  \href{https://github.com/cboettig/EcoNetGen}{\texttt{EcoNetGen}}:
  Simulate and Sample from Ecological Interaction Networks. Marcus de
  Aguiar, Erica Newman, Mathias Pires, Carl Boettiger (2018).
}

\longformpublication{
  \href{https://github.com/ropensci/piggyback/}{\texttt{piggyback}}:
  Managing Larger Data on a GitHub Repository. Carl Boettiger (2018).
}

\longformpublication{
  \href{https://github.com/ropensci/arkdb/}{\texttt{arkdb}}: Archive and
  Unarchive Databases Using Flat Files. Carl Boettiger (2018).
}

\longformpublication{
  \href{https://github.com/ropensci/EML}{\texttt{EML}}: Read and Write
  Ecological Metadata Language File. Carl Boettiger, Matt Jones (2016;
  v2 2019).}

\longformpublication{
  \href{https://github.com/ropensci/RNeXML}{\texttt{RNeXML}}:
  Semantically Rich I/O for the NeXML Phylogenetics Format. Carl
  Boettiger, Scott Chamberlain, Hilmar Lapp, Rutger Voss (2014).}

\longformpublication{
  \href{https://github.com/cboettig/pmc}{\texttt{pmc}}: Phylogenetic
  Monte Carlo. Carl Boettiger (2012).}

\longformpublication{
  \href{https://github.com/cboettig/knitcitations}{\texttt{knitcitations}}:
  Citations for Knitr Markdown Files. Carl Boettiger (2012).
}

\longformpublication{
  \href{https://github.com/ropensci/rfishbase}{\texttt{rfishbase}}: R
  Interface to FishBase. Carl Boettiger, Scott Chamberlain, Duncan
  Temple Lang, Peter Wainwright (2011; v2 2015; v3 2019).}

\longformpublication{
  Carl Boettiger, Dirk Eddelbuettel. \href{https://rocker-project.org}{The Rocker Project}: Docker images
  for the R environment. (Language: Dockerfile)}

\longformpublication{
  Carl Boettiger, Matt Jones, et al. \href{https://codemeta.github.io}{The CodeMeta Project}: Software
  Metadata Exchange. (Language: JSON-LD)
}
\medskip % Extra whitespace before the next section

\section{Service}

  NCEAS \href{https://www.nceas.ucsb.edu/content/nceas-science-advisers}{Scientific
  Advisory Board}. (2014 - Current)\\

  rOpenSci \href{https://ropensci.org/about/\#team}{Leadership Team}. (2012 - Current)\\

  Jetstream Cloud Computing
  \href{https://jetstream-cloud.org/about/advisory-board.php}{Stakeholder
  Advisory Board}, XSEDE, NSF. (2015 - Current)\\

  Reviewer for over 40 journals, NSF review panelist, ad hoc reviewer
  for NSF, NERSC,NERC and UC-CCGA.

%----------------------------------------------------------------------------------------

\end{paracol}

%----------------------------------------------------------------------------------------

\end{document}

ext: tex

max_stars_repo_name: Rekyt/labnotebook

max_issues_repo_name: Rekyt/labnotebook

max_forks_repo_name: Rekyt/labnotebook


text:
\section{Limitations}

As starkly demonstrated above, the main limitation of our work is that
our {\sword} prototype is implemented as user-space software and not
on programmable networking hardware. There are additional limitations,
in terms of language restrictions and processing power which occur on
real hardware but not in our DPDK prototype. For example, in
programmable switches the need to recirculate packets which exceed the
computational capacity of a pipeline results in decreased overall
bandwidth. We use prior work on programable switches to inform our
DPDK prototype and intentionally avoid decisions which would not be
implementable on a programmable switch.

Our Clover experiments fall short of the underlying hardware limits.
While our results show real performance boosts from reducing hardware
contention, there may be additiona bottlenecks we have not yet
uncovered. In future work we would like to extend our measurements to
push the limitations of the underlying hardware. We expect that
measuring at line rate will only increase the benifit seen by reducing
this contention based on our current
measurements.

%~\ref{fig:full_system_performance}.

Some aspects of RDMA interposition are left out of this work. For
instance, correctly handling ECN packets is a difficult question when
connections are being multiplexed as the generated ECN packet has a
single destination. One option is to broadcast the ECN to all clients
multiplexed on the destination connection and allow end-to-end
congestion control. Another is to keep track of individual client
request rates and only issue ECN to the highest requesting clients. We
leave the finer points of congestion control to future work.

max_stars_repo_name: wantonsolutions/warm

max_issues_repo_name: wantonsolutions/warm

max_forks_repo_name: wantonsolutions/warm


text:
\section{Baseline with Middleware (90 pts)\label{sec:3}}

    This experiment extends on the design of experiment \ref{subsec:2_one-server} by introducing one and two \mw{}s
    into the system. The middleware can be configured to have a variable amount of worker threads where each worker
    thread handles one paired request-reply operation. This parameter is also considered in the evaluation. The
    configurations are listed in table \ref{tab:30_setup}.

    \begin{table}
        \scriptsize{
            \begin{tabular}{|l|c|}
                \hline Number of servers                & 1 \\
                \hline Number of client machines        & 3 \\
                \hline Instances of memtier per machine & 1 (3.1) / 2 (3.2) \\
                \hline Threads per memtier instance     & 2 (3.1) / 1 (3.2) \\
                \hline Virtual clients per thread       & [1, 2, 4, 8, 16, 32, 48] \\
                \hline Workload                         & Write-Only and Read-Only \\
                \hline Multi-Get behavior               & N/A \\
                \hline Multi-Get size                   & N/A \\
                \hline Number of middlewares            & 1 (3.1) / 2 (3.2) \\
                \hline Worker threads per middleware    & [8, 16, 32, 64]  \\
                \hline
            \end{tabular}
        }
            \caption{Experimental parameters for experiments 3.1 and 3.2.\label{tab:30_setup}}
    \end{table}

    \subsection{One Middleware\label{subsec:3_one-middleware}}

        This experiment is similar to experiment \ref{subsec:2_one-server}, but here each \cli{} connects to the single
        instance of \mw{} which itself connects to the single instance of \srv{}.

        \begin{figure*}
            \vspace*{-.5\baselineskip}
            \makebox[1\linewidth][c]{%
                \centering
                \begin{subfigure}[t!]{0.55\textwidth}
                    \centering
                    \includegraphics[width=1\textwidth]{../data_analysis/figures/3-1_mw_throughput.png}
                    \caption{Request throughput.\label{fig:single_mw_tp}}
                \end{subfigure}
                \begin{subfigure}[t!]{0.55\textwidth}
                    \centering
                    \includegraphics[width=1\textwidth]{../data_analysis/figures/3-1_mw_queue-size.png}
                    \caption{Queue sizes.\label{fig:single_mw_qs}}
                \end{subfigure}
            }
            \makebox[1\linewidth][c]{%
                \centering
                \begin{subfigure}[t!]{0.55\textwidth}
                    \centering
                    \includegraphics[width=1\textwidth]{../data_analysis/figures/3-1_mw_mc-comm-time.png}
                    \caption{Memcached communication time.\label{fig:single_mw_mct}}
                \end{subfigure}
                \begin{subfigure}[t!]{0.55\textwidth}
                    \centering
                    \includegraphics[width=1\textwidth]{../data_analysis/figures/3-1_mw_queue-wait-time.png}
                    \caption{Queue waiting time.\label{fig:single_mw_qwt}}
                \end{subfigure}
            }
            \makebox[1\linewidth][c]{%
                \centering
                \begin{subfigure}[t!]{0.55\textwidth}
                    \centering
                    \includegraphics[width=1\textwidth]{../data_analysis/figures/3-1_mw_response_time.png}
                    \caption{Response times.\label{fig:single_mw_rt}}
                \end{subfigure}
                \begin{subfigure}[t!]{0.55\textwidth}
                    \centering
                    \includegraphics[width=1\textwidth]{../data_analysis/figures/3-1_mw_throughput-il.png}
                    \caption{Throughput calculation using the interactive law with an adjusted client
                             count.\label{fig:single_mw_tp-il}}
                \end{subfigure}
            }
            \caption{\mw{} statistics based on SET and GET requests for various amounts of worker threads and active
                     clients.\label{fig:single_mw_all}}
        \end{figure*}

        \subsubsection{Explanation\label{subsubsec:3_one-middleware_summary}}

            Comparing the throughput of GETs with the baseline experiment only a small change in performance for 6
            clients is observed (the performance not reaching the stable phase which happens for 12 and more clients).
            The throughput of SET requests behaves most similarly to the baseline with 64 worker threads yet the
            throughput for 32 worker threads is in general higher for 48 and 96 connected clients. This observation will
            be discussed in the following paragraphs and explained with more data. It can be inferred that the
            throughput of a single client is limited to 11546 requests, a contrast to the measured 16334 without the use
            of a middleware. This limit occurs for 192 virtual clients. The throughput being lower for fewer worker
            threads is reasonable and the non-linear scaling highly likely due to the fact that \mw{}s have only 8
            physical cores.

            The response rates are also similar to the baseline experiment in general with SETs having a smaller
            response time than GETs. Looking at the constituents of response time (with detailed timings for queue
            waiting times and memcached communication and respective packet handling time) it can be observed that for
            few worker threads and many clients queue times grow from a certain point quasi-linear. The memcached
            communication and packet handling time does flatten though. The height of flattened sections can be
            explained due to thread scheduling (the flattened lines are all separated proportional to the number of
            worker threads divided by the core count of the machine). The reasoning for flattening due to the fact that
            the middleware cannot handle more requests in parallel and is therefore saturating for the worker thread and
            client configuration. This can be seen by queues growing for the configuration of active clients and
            threads.

            As such the total response time of the middleware is for a large amount of clients and few worker threads
            determined by the queueing time and for few clients and many worker threads determined mostly by the
            communication time with memcached.

            Coming back to the open question of why 32 worker threads perform better than 64 for 48 and 96 clients
            requires the use of the queue where requests are stored. As long as this queue is not at least the size of
            worker threads, performance impact can be expected due to worker threads being idle and waiting for a new
            request to process. This results in an effectively smaller throughput as only some threads are working but
            the threads waiting for a new element contend on a shared lock on the queue. Only once the queue at 192
            clients approaches 64 elements does the middleware become more saturated and is even more so at 288 clients.
            It is very close to the point of complete saturation when looking at the queue size, yet no real increase in
            throughput was measured. As the standard deviation for 288 clients and 64 worker threads is rather large
            compared to previous results allows the claim that beyond a certain amount of threads and connections the
            cloud environment is not scaling well.

            Overall it can be concluded that for 8\textendash 32 clients the maximal saturation point has been reached
            and for 64 threads the saturation point is within a few percent or has been reached.

            % A note on the large range for the memcached handling time at 12 total clients, 64 worker threads using SET
            % operations: Confirming with dstat logs it shows that performance decreases are observed on all connected
            % machines for the timestamp 03:09:23 (on the second repetition). This is with high probability an artifact of
            % running in a cloud environment where either an elephant flow was started or the machine migrated from one
            % rack to another. This was discovered after the machines have been turned off and a repetition for a single
            % data point deemed too costly. This outlier is less visible in the response time graphs as they scale
            % differently. Other outliers are not noteworthy to discuss.

    \subsection{Two Middlewares\label{subsec:3_two-middlewares}}

        This experiment is virtually identical to the previous experiment with the change of each \srv{} running two
        single-threaded memtier instances where the second connects to the newly added second \mw{}. As such each \mw{}
        is only subject to half the load compared to the previous experiment's single \mw{}.

        \begin{figure*}
            \vspace*{-.5\baselineskip}
            \makebox[1\linewidth][c]{%
                \centering
                \begin{subfigure}[t!]{0.55\textwidth}
                    \centering
                    \includegraphics[width=1\textwidth]{../data_analysis/figures/3-2_mw_throughput.png}
                    \caption{Request throughput.\label{fig:double_mw_tp}}
                \end{subfigure}
                \begin{subfigure}[t!]{0.55\textwidth}
                    \centering
                    \includegraphics[width=1\textwidth]{../data_analysis/figures/3-2_mw_queue-size.png}
                    \caption{Queue sizes.\label{fig:double_mw_qs}}
                \end{subfigure}
            }
            \makebox[1\linewidth][c]{%
                \centering
                \begin{subfigure}[t!]{0.55\textwidth}
                    \centering
                    \includegraphics[width=1\textwidth]{../data_analysis/figures/3-2_mw_mc-comm-time.png}
                    \caption{Memcached communication time.\label{fig:double_mw_mct}}
                \end{subfigure}
                \begin{subfigure}[t!]{0.55\textwidth}
                    \centering
                    \includegraphics[width=1\textwidth]{../data_analysis/figures/3-2_mw_queue-wait-time.png}
                    \caption{Queue waiting time.\label{fig:double_mw_qwt}}
                \end{subfigure}
            }
            \makebox[1\linewidth][c]{%
                \centering
                \begin{subfigure}[t!]{0.55\textwidth}
                    \centering
                    \includegraphics[width=1\textwidth]{../data_analysis/figures/3-2_mw_response_time.png}
                    \caption{Response times.\label{fig:double_mw_rt}}
                \end{subfigure}
                \begin{subfigure}[t!]{0.55\textwidth}
                    \centering
                    \includegraphics[width=1\textwidth]{../data_analysis/figures/3-2_mw_throughput-il.png}
                    \caption{Throughput calculation using the interactive law with an adjusted client
                             count.\label{fig:double_mw_tp-il}}
                \end{subfigure}
            }
            \caption{\mw{} statistics based on SET and GET requests for various amounts of worker threads and active
                     clients.\label{fig:double_mw_all}}
        \end{figure*}

        \subsubsection{Explanation\label{subsubsec:3_two-middlewares_summary}}

            Comparing the throughput of GETs with the baseline experiment and the experiment with a single \mw{} no
            large differences can be observed except a stable phase from the very beginning. The throughput for SET
            requests behaves much ``cleaner'' for increasing amounts of worker-threads, meaning that for not enough
            saturation by connected clients the resulting performance for SETs behaves the same. Also more throughput
            occurs throughout the system. The maximum observed throughput is 15312 requests, very close to the baseline
            experiment of 16334 requests. The middleware shows to be a reasonably small disturbance to the overall
            system for enough worker threads active. The scaling of throughput for worker threads follows the same
            reasoning as in experiment \ref{subsec:3_one-middleware}.

            The response times reflect the increased throughput with overall lower numbers. There is less spread for SET
            requests amongst different amounts of worker threads. A comparison between the response times with a single
            \mw{} and two \mw{}s is conducted in subsection \ref{subsec:3_summary}. The memcached communication and
            packet handling time doubling follows from the fact that with two concurrent \mw{} SET requests sent to the
            same \srv{} a serialization of requests is expected (as the \srv{} is only single-threaded). Thusly larger
            response times on the end of memcached are observed. This would result in an overall higher response time if
            not for the fact that as there are now two \mw{}s, each instance is only subject to half the load generated
            by \cli{}s. As such the queue sizes are also only half of what was measured when compared to a single
            instance of \mw{}.

            The queue sizes grow disregarding the type for different amounts of worker threads similarly. Even though
            fewer load is received by each middleware the system still has growing queues. Applying the previously
            stated argument of the system being fully saturated for queues of size exceeding the current amount of
            worker threads shows that this experiment as well shows saturation points for 8\textendash 32 worker threads
            and being very close to the saturation point of 64 worker threads.

            An artifact of running in a cloud environment can be seen for 6 clients and 32 worker threads where the
            throughput is low and the response time including memcached communication unexpectedly high. Looking at the
            respective logs shows a likely network issue on the second run, as no system is overtaxed yet the
            \srv{} is not sending enough data. Statistics generated by ping indicate unusually high response times for
            communication between \mw{}s and the single \srv{}. This reflects in the memcached communication time and
            response time of the system. The system is for most of the supposedly stable window overall very shaky.

    \subsection{Summary\label{subsec:3_summary}}

    \begin{table}
        \def\sym#1{\ifmmode^{#1}\else\(^{#1}\)\fi}%
        \footnotesize{
            \centering
            \begin{tabular}{l*{10}{c}}
                \toprule
                & & \multicolumn{2}{c}{Throughput}  & \multicolumn{2}{c}{Response Time} &
                \multicolumn{2}{c}{Queueing Time} & \multicolumn{2}{c}{Miss Rate} \\
                \cmidrule(lr){3-4}\cmidrule(lr){5-6}
                \cmidrule(lr){7-8}\cmidrule(lr){9-10}
                Type  & Machine & Exp 3.1  & Exp 3.2  & Exp 3.1 & Exp 3.2 & Exp 3.1 & Exp 3.2 & Exp 3.1 & Exp 3.2 \\
                \midrule
                GET      & \cli & 2936.83  & 2923.78  & 65.32 & 65.92 & N/A   & N/A   & 0.00 & 0.00 \\
                         & \mw  & 2939.61  & 2929.16  & 64.17 & 69.02 & 42.17 & 20.60 & 0.00 & 0.00 \\
                \addlinespace
                SET      & \cli & 11549.70 & 15308.52 & 16.73 & 12.55 & N/A   & N/A   & N/A  & N/A \\
                         & \mw  & 11546.60 & 15312.49 & 8.07  & 11.29 & 3.80  & 3.01  & N/A  & N/A \\
                \bottomrule
            \end{tabular}
            \caption{Evaluation of maximum throughputs for one and two \mw{}s in the system with 192
                     clients and 64 worker threads.\label{tab:3_throughput-summary}}
        }
    \end{table}

        As already mentioned, in the baseline experiments without the use of a middleware the evaluation of GET and SET
        requests follows similar base criteria, namely throughput and response time. In case where these are not
        sufficient, it is possible to use the middleware's instrumentation and deduce the system behaviour from them.

        In the case of GET requests the behaviour between experiments \ref{subsec:2_one-server},
        \ref{subsec:3_one-middleware} and \ref{subsec:3_two-middlewares} is comparable. Oddly for six clients the single
        \mw{} configuration is not immediately saturated for any amount of worker threads. Only at twelve clients this
        saturation occurs. It is quite likely that the overhead of the middleware is just high enough to introduce
        minimal latencies in such a configuration as the system has empty queues and as such it is not a problem of
        queueing. As experiment \ref{sec:2} and \ref{sec:3} were run on two different instances of machines changes in
        benchmarking performances are expected, yet the general behaviour should stay comparable. This is the case for
        GETs in our experiments as well as for SETs.

        In the case for SET requests the trends with more active clients introducing more throughput does not always
        match. As long as worker threads are not oversaturated the performance will not degrade. After oversaturating
        the system the middleware slows down the system as it cannot handle more requests. There is a trend of more
        worker threads introducing more throughput. Also adding another middleware helps and actually shows to scale
        better than adding more worker threads when comparing the throughput graphs for the total amount of comparable
        worker threads between both experiments (for experiment \ref{subsec:3_two-middlewares} half the worker thread
        count must be evaluated as two middlewares are used). This is to be expected as at some point scheduling
        overhead on a single system results in slowdowns. Another viable option is a better allocation in the cloud
        environment.

        For a thorough and clear evaluation of system behaviour it is necessary to include the queue and memcached
        communication time.\newline
        As already observed for a given amount of worker threads the memcached communication begins to flatten for a
        certain amount of active clients. The trend is that more worker threads can handle more clients but the time to
        process grows. This aligns well with the fact that there is contention for the actual cores of the machine by
        each worker thread. A detailed explanation on the respective behaviour has been given in
        subsubsection \ref{subsubsec:3_one-middleware_summary}. The queue sizes also reflect in the queue waiting times
        appropriately for both experiments in this section. Additionally the queue sizes offer a good metric in
        evaluating the saturation of the system and aid in defining the maximum throughput for each configuration of
        worker threads. Once the queue sizes reaches the amount of worker threads there is no more more waiting on the
        next task for each worker thread but adding more elements than there are worker threads slows down the system as
        at that point no bijection exists between worker threads and items to process.

        % Comparing the measured performances for GET requests in \ref{tab:3_throughput-summary} gives for \cli{}s and
        % \mw{}s similar results except for the discrepancy in response time for experiment
        % \ref{subsec:3_two-middlewares}.

        % The response time differences can be explaining by assuming machines to perform
        % similar amongst experiments, thus a standard average is taken. For machines performing differently this can
        % result in being off from the weighted mean, which is the case here. The discrepancy in performance between
        % different machines occurs due to the unavailability of deciding machine allocations in the cloud environment and
        % them being sometimes moved from one rack to another (as has been shown by the previous outliers). The queue time
        % between one and two \mw{}s being different by a factor of two stems from the fact that two \mw{}s subject to
        % half the client load, henceforth a smaller queue is expected for heavy workloads.\newline
        % For SET requests an increase in performance is observed using two \mw{}s with a corresponding decrease of the
        % response time measured at memtier. The difference between response times observed at the middleware and memtier
        % are much larger for the case of a single middleware. A reasonable explanation could be related to the middleware
        % receiving SET requests with a single thread. If multiple requests buffer on the socket then multiple complete
        % requests can be processed much quicker from it than having to receive each TCP alone. Both systems do have the
        % same queue waiting time so the worker threads are performing similarly well. This strengthens the assumption
        % that OS-side buffering of TCP packets occur and not somewhere measurable within the middleware.

        As the middleware doesn't include the full response time the interactive law doesn't hold when assuming the
        whole system is only \mw{} \textendash{} \srv. To fix this the interactive response time law, stated with

        $$ R = \frac{N}{X} - Z $$

        allows the modification of either $N$ (number of active clients) or setting $Z$ (the thinking time) to a
        non-zero value. The latter is usually done by using the RTT between \srv{} and \mw{} (and add some minimal extra to
        allow memtier processing time). To adjust $N$ it is relevant
        to define what the number of actual jobs are in the current system. This is defined by two components, the queue
        of the system modelling inactive jobs still to be processed and the active participants which are inferred from
        the system throughput and memcached communication time. Multiplying the throughput of the system with the time
        it takes for workers to have completely handled communication with memcached gives a good amount of active
        workers. Adding these two together and dividing by the observed response time of the middleware gives a
        prediction of the throughput on the system in relation to active participants.
        $$
        X_{pred} = \frac{X * \text{Time\textsubscript{Memcached}} +
                   \text{Size\textsubscript{Queue}}}{\text{Time\textsubscript{Middleware}}}
        % \begin{cases}
        %     \text{Size\textsubscript{Queue}} + \text{Clients}   & \quad \text{if Worker Threads > Clients} \\
        %     \text{Size\textsubscript{Queue}} + \text{Worker Threads}          & \quad \text{otherwise}
        % \end{cases}
        $$
        In the following the interactive law is applied and the response time derived using the latency from each
        experiment. Figures \ref{fig:single_mw_tp-il} and \ref{fig:double_mw_tp-il} depict the interactive law applied
        with a modified amount of clients and in figure \ref{fig:3_il} the application of the thinking time is compared
        to with measurements from memcached. In general the interactive law holds in both cases but the throughput
        calculation shows cleaner results and is thusly used onwards. Some outliers are expected for high loads as
        graceful failures are not the nature of computers.

        \begin{figure*}
            \vspace*{-.5\baselineskip}
            \makebox[1\linewidth][c]{%
                \centering
                \begin{subfigure}[t!]{0.55\textwidth}
                    \centering
                    \includegraphics[width=1\textwidth]{../data_analysis/figures/3-1_mw_response-time-il.png}
                    \caption{\mw{} interactive law deriving the response time.\label{fig:mw_rt-il}}
                \end{subfigure}
                \begin{subfigure}[t!]{0.55\textwidth}
                    \centering
                    \includegraphics[width=1\textwidth]{../data_analysis/figures/3-1_mt_response_time.png}
                    \caption{\cli{} measured response time.\label{fig:mt_rt}}
                \end{subfigure}
            }
            \makebox[1\linewidth][c]{%
                \centering
                \begin{subfigure}[t!]{0.55\textwidth}
                    \centering
                    \includegraphics[width=1\textwidth]{../data_analysis/figures/3-2_mw_response-time-il.png}
                    \caption{\mw{} interactive law deriving the response time.\label{fig:mw_rt-il}}
                \end{subfigure}
                \begin{subfigure}[t!]{0.55\textwidth}
                    \centering
                    \includegraphics[width=1\textwidth]{../data_analysis/figures/3-2_mt_response_time.png}
                    \caption{\cli{} measured response times.\label{fig:mt_rt}}
                \end{subfigure}
            }
            \caption{Visualizations of the interactive law plotted for experiments \ref{subsec:3_one-middleware} and
                     \ref{subsec:3_two-middlewares}. High loads result in less correct predictions.\label{fig:3_il}}
        \end{figure*}


text:
\documentclass{article}
\usepackage{graphicx}
\usepackage{amsmath}
\usepackage{tikz}
\usepackage[all]{xy}
\usetikzlibrary{positioning,chains,fit,shapes,calc}

\begin{document}

\title{Homework 2}
\author{Josh Cai}

\maketitle
\section*{Section 9.1}
\textbf{4b)} R is symmetric and transitive.
\\
\textbf{4c)} R is symmetric and transitive.
\\\\
\textbf{6a)} R is symmetric and transitive.
\\
\textbf{6b)} R is symmetric and transitive.
\\
\textbf{6d)} R is none of the properties.
\\
\textbf{6h)} R is symmetric.
\\\\
\textbf{30a)} R_{1} \cup R_{2} = \{(1,2),(2,3),(3,4),(1,1),(2,1),(2,2),(3,1),(3,2),(3,3)\}
\\
\textbf{30b)} R_{1} \cap R_{2} = \{(1,2),(2,3),(3,4)\}$
\\
\textbf{30c)} R_{1} - R_{2} = \emptyset
\\\\
\textbf{32)} R_{1} \circ R_{2} = \{(1,1),(1,2),(2,1),(2,2)\}
\\\\
\textbf{34a)} R_{1} \cup R_{3} = \{(a,b) \in \textbf{R}^{2}|a\neq b\}
\\
\textbf{34c)} R_{2} \cap R_{4} = \{(a,b) \in \textbf{R}^{2}|a=b\}
\\
\textbf{34e)} R_{1} - R_{2} = \emptyset
\\\\
\textbf{36b)} R_{1} \circ R_{2} = \{(a,b) \in \textbf{R}^{2}|a>b\}
\\\\
\textbf{56a)} R^{2} = \{(1,1),(1,2),(1,3),(1,4),(1,5),(2,2),(2,4),(2,5),(3,1),(3,2),(3,4),(3,5),(4,1),\\(4,2),(4,3),(4,4),(5,1),(5,2),(5,3),(5,4),(5,5)\}
\\\\
 \begin{bmatrix}
  1 & 1 & 1 & 1 & 1 \\
  0 & 1 & 0 & 1 & 1 \\
  1 & 1 & 0 & 1 & 1 \\
  1 & 1 & 1 & 1 & 0 \\
  1 & 1 & 1 & 1 & 1
 \end{bmatrix}
\\\\\\\\\\\\
\textbf{56b)} R^{3} = \{(1,1),(1,2),(1,3),(1,4),(1,5),(2,1),(2,2), (2,3)(2,4),(2,5),(3,1),(3,2),(3,3),\\(3,4),(3,5),(4,1),(4,2),(4,3),(4,4),(4,5),(5,1),(5,2),(5,3),(5,4),(5,5)\}
\\\\
 \begin{bmatrix}
  1 & 1 & 1 & 1 & 1 \\
  1 & 1 & 1 & 1 & 1 \\
  1 & 1 & 1 & 1 & 1 \\
  1 & 1 & 1 & 1 & 1 \\
  1 & 1 & 1 & 1 & 1
 \end{bmatrix}
\\
\section*{Section 9.5}
\textbf{2b)} This relation is an equivalence relation. \\ \textit{Reflexive:} A person has the same parents as himself/herself. \\ \textit{Symmetric:} If two people have the same parents, it doesn't matter what order they are listed. \\ \textit{Transitive:} If person A is a sibling of person B and person B is a sibling of person C, A and C are also siblings.
\\\\
\textbf{2d)} This relation isn't an equivalence relation. \\ \textit{Reflexive:} A person has met himself. \\ \textit{Symmetric:} If person A has met person B, then person B met person A as well. \\ \textit{Transitive:} However, if person A knows person B and person B knows person C, person A doesn't necessarily know person C.
\\\\
\textbf{8)} \textit{Reflexive:} Each set has the same number of elements as itself. \\ \textit{Symmetric:} If set A has the same cardinality as set B, then there exists a bijection between the two. Since a bijection exists between the two, set B has the same number of elements as set A. \\ \textit{Transitive:} If set A has the same cardinality as set B and set B has the same cardinality as set C, there exists a bijection between sets A and B and another bijection between sets B and C. Since a one-to-one mapping from A to B and B to C exists, there is a one-to-one mapping from A to C. \\\\ \{0,1,2\} is in the equivalence class of all sets with 3 real numbers. \\ \textbf{Z} is in the equivalence class of all countable sets.
\\\\
\textbf{12)} \textit{Reflexive:} Each bit string is the same as it itself, so it must have equivalent bits after the first three. \\ \textit{Symmetric:} If (x,y), then x and y agree on every bit except possibly not the first three bits. Since this is true, (y,x) must also be true. \\ \textit{Transitive:} If (x,y) and (y,z) the bit strings x, y, and z all agree on every bit except possibly not the first three bits. Since this is true, (x,z) must also be true.
\\\\
\textbf{20)} \textit{Reflexive:} A person has the same set of links as himself/herself when they browse. \\ \textit{Symmetric:} If (x,y), then person x has the same set of webpages followed as person y. Since it is the same set of links, (y,x) must also be true. \\ \textit{Transitive:} If (x,y) and (y,z), then x and y share the same set of webpages, and y and z share the same set of webpages. Since these sets are equal, (x,z) must be true.
\\\\
\textbf{22)} Yes, it is an equivalence relation. It is reflexive because all the vertices have loops. It is symmetric because each edge that is not a loop has a corresponding edge directed the opposite way. It is transitive because each partition only holds two elements.
\\\\
\textbf{24a)} No, it is not an equivalence relation. It is reflexive because of the main diagonal, but it is not symmetric because (1,2) is in the relation, but (2,1) is not. It is not transitive because (2,3) and (3,1) are in the relation but (2,1) is not.
\\\\

\end{document}

max_stars_repo_name: joshcai/math-hw

max_issues_repo_name: joshcai/math-hw

max_forks_repo_name: joshcai/math-hw