Expected Extinction Times of Epidemics with State-Dependent Infectiousness

Abstract: We model an epidemic where the per-person infectiousness in a network of geographic localities changes with the total number of active cases. This would happen as people adopt more stringent non-pharmaceutical precautions when the population has a larger number of active cases. We show that there exists a sharp threshold such that when the curing rate for the infection is above this threshold, the mean time for the epidemic to die out is logarithmic in the initial infection size, whereas when the curing rate is below this threshold, the mean time for epidemic extinction is infinite. We also show that when the per-person infectiousness goes to zero asymptotically as a function of the number of active cases, the mean extinction times all have the same asymptote independent of network structure. Simulations bear out these results, while also demonstrating that if the per-person infectiousness is large when the epidemic size is small (i.e., the precautions are lax when the epidemic is small and only get stringent after the epidemic has become large), it might take a very long time for the epidemic to die out. We also provide some analytical insight into these observations.

\section{Conclusion}
\label{sec:conclusion}

We have developed a model for epidemic spread within and across
population centers with state-dependent infectiousness.
In this model,  we directly prove (without mean-field assumptions) that
there exists a sharp threshold for the curing rate \(\delta\)
such that when \(\delta\) is more than a threshold, the epidemic
dies out quickly (the mean lifetime is of logarithmic order in the initial
infection size), and when \(\delta\) is less than the threshold, the
mean lifetime of the epidemic is infinite.
Although \(\delta\) is not typically something we can control, especially
in the initial stages of a pandemic without vaccines or other medication,
it is possible to lower the threshold by following more stringent
precautions.
While we do not provide prescriptive solutions for managing pandemics,
we hope that this work would offer useful insights to policymakers.

{

While our model makes no mean-field assumptions to
characterize the extinction time,
we provide theoretical results only on its expected value.
It is of interest to establish high-probability bounds on
extinction time
and
characterize how strongly extinction time concentrates.
Combining techniques in Claim~\ref{claim:ctmc-countable} with
literature on (discrete-time) Markov concentration
\cite{Kotzing2016, Paulin2015} might be pursued.

There is also scope for developing broader and
more realistic models of
state-dependent infectiousness.
Empirical work suggests
that people take precautions against contagions not only in response to
the actual number of infections, but also to other
factors like the media attention on infection prevalence \cite{FenichelKC2013, SpringbornCMF2015}.
These models should capture infectiousness as a function of both
the actual infection prevalence
and the spread of awareness through (social) media.

Finally, it is important to accurately infer parameters of our model
using historical and current epidemiological data so as to inform
practical applications.
}

\section{Proof of Claim~\ref{claim:constant-infection-spectral-lower}}
\label{appendix:constant-infection-spectral-lower}

The following proof that we provide here closely resembles
the proof of \cite[Theorem 3.1]{GaneshMT2005}.
However, since we are  not interested in the exact constant \(C\) like
\cite{GaneshMT2005}, we avoid the use of matrix exponentials
seen there.
The rates of \eqref{eq:node-rates} (with constant \(\beta(\cdot)\) and
\(\beta^\textsc{int}(\cdot)\)) give us the following differential
equation:
\begin{align*}
\frac{d\ensuremath{\mathbb{E}}\left[\mathbf{X}(t)\right]}{dt}=
\Big(
\beta G + \beta^\textsc{int}I - \delta I
\Big)\ensuremath{\mathbb{E}}\left[\mathbf{X}(t)\right],
\end{align*}
where \(I\) is the identity matrix (of correct size).
Multiply each side of the equation with \(\mathbf{q}^\top\)
(\(\mathbf{q}\) is the eigenvector of \(G\) corresponding to
\(\lambda_r\)).
This gives us
\begin{align}
\frac{d\ensuremath{\mathbb{E}}\left[\mathbf{q}^\top\mathbf{X}(t)\right]}{dt}=
\mathbf{q}^\top\Big(\beta G + \beta^\textsc{int}I - \delta I\Big)\ensuremath{\mathbb{E}}[\mathbf{X}(t)].
\label{eq:preceding-equation}
\end{align}
Since \(\mathbf{q}\) is an eigenvector of \(G\) with
eigenvalue \(\lambda_{r}\), and an eigenvector
of \(I\) with eigenvalue \(1\) (every vector is an eigenvector of \(I\)
with eigenvalue \(1\)),
\eqref{eq:preceding-equation} gives us
\begin{align*}
\frac{d\ensuremath{\mathbb{E}}\left[\mathbf{q}^\top\mathbf{X}(t)\right]}{dt}=
\Big(\beta \lambda_{r} + \beta^\textsc{int} - \delta \Big)
\ensuremath{\mathbb{E}}\left[\mathbf{q}^\top\mathbf{X}(t)\right].
\end{align*}
This is a differential equation in
terms of \(\ensuremath{\mathbb{E}}\left[\mathbf{q}^\top\mathbf{X}(t)\right]\),
and solving it gives us
\begin{align*}
\ensuremath{\mathbb{E}}\left[\mathbf{q}^\top\mathbf{X}(t)\right] = e^{t\left(\beta\lambda_{r}+\beta^\textsc{int}-\delta\right)}\mathbf{q}^\top\mathbf{X}(0).
\end{align*}
Let \(q_{\max}\) and \(q_{\min}\) denote the maximum and minimum elements
of \(\mathbf{q}\), i.e., \(q_{\max}=\max_{i}{q}_i\) and
\(q_{\min}=\min_{i}{q}_i\).
Since \(\mathbf{q}\succ0\), \(q_{\min}\) is strictly positive.
This gives us
\begin{align}
\ensuremath{\mathbb{E}}[X(t)] = \ensuremath{\mathbb{E}}\left[\mathbf{1}^\top\mathbf{X}(t)\right] \le
e^{t\left(\beta\lambda_{r}+\beta^\textsc{int}-\delta\right)}\frac{q_{\max}n}{q_{\min}}.
\label{eq:xt-exponential-bound}
\end{align}

The mean hitting time can be written as
\begin{align*}
\ensuremath{\mathbb{E}}\left[T_{\mathbf{X}(0)}\right] &=
\int_{0}^\infty \ensuremath{\mathbb{P}}(X(t) > 1) dt \\
&= \int_0^\tau \ensuremath{\mathbb{P}}(X(t)>1) dt + \int_\tau^\infty \ensuremath{\mathbb{P}}(X(t)>1) dt \\
&\le \tau + \int_\tau^\infty \ensuremath{\mathbb{E}}[X(t)] dt
\end{align*}
for any \(\tau>0\).
The last inequality follows from the fact that \(\ensuremath{\mathbb{P}}(X(t)>1)\le1\) since it
is a probability (which gives the first term), and  the Markov inequality
which gives us \(\ensuremath{\mathbb{P}}(X(t)>1)\le\ensuremath{\mathbb{E}}[X(t)]\) (for the second term).

Using \eqref{eq:xt-exponential-bound}, we get
\begin{align*}
\ensuremath{\mathbb{E}}[T_{\mathbf{X}(0)}] \le \tau+kne^{-\tau\Delta}
\quad \text{for all}\quad \tau > 0,
\end{align*}
where \(k=\frac{q_{\max}}{q_{\min}(\delta-\beta\lambda_{r}-\beta^\textsc{int})}>0\) and \(\Delta=\delta-\beta\lambda_{r}-\beta^\textsc{int}>0\).
Setting \(\tau=\frac{\ln n}{\Delta}\) gives us \(\ensuremath{\mathbb{E}}[T_{\mathbf{X}(0)}] \le C \ln n\).

\section{Proof of Claim~\ref{claim:ctmc-countable}}
\label{appendix:ctmc-countable}

Divide the time axis into intervals of unit length.
Given any (finite) \(t\in\mathbb{T}\), if the number of transitions in
all intervals preceding and including \(t\) is finite, then
the cardinality of the set \(\{s \mid s\in\mathbb{T}\ \text{and}\ s<t\}\)
is finite.
Further, this cardinality is unique for each \(t\),
allowing us to map \(t\) to this unique natural number plus one.
Thus we get an injective mapping (if the number of transitions in each interval
is finite).

At the start of the interval, assume that the Markov chain starts
in state \(\mathbf{X}\) with \(\mathbf{1}^\top\mathbf{X}=n\).
The probability that there are at least \(k\) transitions in the interval
satisfies
\begin{align}
\ensuremath{\mathbb{P}}(\text{at least \(k\) transitions in interval})
\le
\ensuremath{\mathbb{P}}\left(\sum_{j=0}^{k-1}X_j \le 1\right),
\label{eq:ktransitionsle1}
\end{align}
where \(\{X_j\}\) are the amounts of time it takes to transition out
of the first \(k\) states starting from \(\mathbf{X}\) at the beginning of the
interval.

Since the total rate of transition rate out of \(\mathbf{X}\) is given by
\(\mathbf{1}^\top\left(\beta(n)\mathbf{G}+\beta^\textsc{int}(n)\mathbf{I}+\delta\mathbf{I}\right)\mathbf{X}\),
the total transition rate out of any state with at most \(n\) infections
is less than or equal to \((\beta_{\max}d_{\max}+\beta^\textsc{int}_{\max}+\delta)n\).
Recall that \(\beta_{\max}=\sup_{i\in\ensuremath{\mathbb{N}}}\beta(i)\),
\(\beta^\textsc{int}_{\max}=\sup_{i\in\ensuremath{\mathbb{N}}}\beta^\textsc{int}(i)\),
and \(d_{\max}\) is the maximum degree among nodes of \(\mathcal{G}\).
Define \(\tau=\beta_{\max}d_{\max}+\beta^\textsc{int}_{\max}+\delta\).

So in the worst case, which gives the greatest probability on the right
side of \eqref{eq:ktransitionsle1}, we have \(X_j\sim\exp(\tau(n+j))\).
This gives us
\begin{align*}
\ensuremath{\mathbb{P}}\left(\sum_{j=0}^{k-1}X_j \le 1\right)
&\le
\ensuremath{\mathbb{P}}\left(e^{-\sum_{j=0}^{k-1}X_j}\ge e^{-1}\right) \\
&\le e\prod_{j=0}^{k-1}\ensuremath{\mathbb{E}}\left[e^{-X_j}\right] \\
&= e\prod_{j=0}^{k-1}\frac{\tau n+\tau j}{1+\tau n+\tau j} \\
&=\frac{e}{\prod_{j=0}^{k-1}\left(1+\frac{1}{\tau n+\tau j}\right)}.
\end{align*}
If \(\prod_{j=0}^{k-1}\left(1+\frac{1}{\tau n+\tau j}\right)\to\infty\)
as \(k\to\infty\), then the probability that there are infinite transitions
in the interval goes to \(0\).
But this is equivalent to \(\sum_{j=0}^{k-1}\ln\left(1+\frac{1}{\tau n+\tau j}\right)\to \infty\)
as \(k\to\infty\).

This gives us
\begin{align*}
\sum_{j=0}^{k-1}\ln\left(1+\frac{1}{\tau n+\tau j}\right)
&=
\sum_{j=0}^{k-1}\frac{\ln \left(1+\frac{1}{\tau n+\tau j}\right)}{\frac{1}{\tau n+\tau j}}\frac{1}{\tau n+\tau j}.
\end{align*}
For a large enough \(j\), we can make \(\frac{\ln\left(1+\frac{1}{\tau n+\tau j}\right)}{\frac{1}{\tau n+\tau j}}\) arbitrarily close to \(1\).
This implies
\begin{align*}
\sum_{j=0}^{k-1}\frac{\ln\left(1+\frac{1}{\tau n+\tau j}\right)}{\frac{1}{\tau n+\tau j}}\!\frac{1}{\tau n+\tau j}\!\! >\!\! \left(1-\epsilon\right)\!\!\sum_{j=l}^{k-1}\frac{1}{\tau n+\tau j}\to\infty,
\end{align*}
where \(l\) is chosen to be large enough so that \(\frac{\ln\left(1+\frac{1}{\tau n+\tau j}\right)}{\frac{1}{\tau n+\tau j}}\) is at most \(\epsilon\) away from
\(1\) for all \(j\ge l\).
The sum goes to infinity because the sum of the harmonic series
goes to infinity.
Since this ensures that the Markov chain only has a finite number of
transitions in any interval, it concludes the proof.

\section{Proof of Claim~\ref{claim:epsilon-bound}}
\label{appendix:epsilon-bound}

Since \(\lim_{n\to\infty}\gamma(n)=0\), for any \(\epsilon > 0\), we
can find an \(m_\epsilon\) such that for all \(n > m_\epsilon\),
\(\gamma(n) < \epsilon\).
Let \(T_{i,j}\) denote the time it takes to go from \(i\) infections to
\(j\) infections (for the first time).
Then we have
\begin{align*}
\ensuremath{\mathbb{E}}[T_n] = \ensuremath{\mathbb{E}}[T_{n,m_\epsilon}] + \ensuremath{\mathbb{E}}[T_{m_\epsilon}].
\end{align*}
But the birth rate of the Markov chain between \(n\) and \(m_\epsilon\)
is less than \(\epsilon\) (from the definition of \(m_\epsilon\)).
So \(\ensuremath{\mathbb{E}}[T_{n,m_\epsilon}]\) should be less than the expected time to go
from \(n\) to \(0\) in a Markov chain where
all the birth rates are \(\epsilon\).
This gives us (using Claim~\ref{claim:tn-constant}):
\begin{align*}
\ensuremath{\mathbb{E}}[T_n] \le \frac{\ln n}{\delta - \epsilon} + \ensuremath{\mathbb{E}}[T_{m_\epsilon}] + \frac{1}{\delta-\epsilon}.
\end{align*}
Since \(\ensuremath{\mathbb{E}}[T_{m_\epsilon}]\) depends only on \(\epsilon\) given a \(\gamma(\cdot)\), this concludes the proof for the second inequality.

The first inequality is relatively straightforward since
\(\frac{\ln (n+1)}{\delta}\) is the lower bound in
Claim~\ref{claim:tn-constant} if the birth rate was \(0\) throughout.

\section{Extinction time exponential in equilibrium point}
\label{appendix:exponential-equal}

For simplicity, we just consider the upper- and lower-bound Markov chains
using the rates from \eqref{eq:rates} defined using the \(\gamma(\cdot)\)
function here.
We expect similar arguments to hold for the network-wide epidemic as well.
Let \(\gamma(n)=\delta+\epsilon\) for all \(n \le N\)
and \(\gamma(n)=0\) for all \(n > N\).
Since this satisfies the condition of Theorem~\ref{thm:log-hitting},
we are guaranteed that the mean epidemic extinction time is logarithmic
in the initial infection size.
However, the mean extinction time also turns out to be exponential in
\(N\), the ``equilibrium point,'' or the size of the epidemic
where the rate of infectiousness \(\gamma(\cdot)\) goes below
the curing rate \(\delta\).

To see this, substitute these values into the expression for
\(\ensuremath{\mathbb{E}}[T_1]\) from Claim~\ref{claim:t1-gamma}.
We get
{
\begin{align*}
\ensuremath{\mathbb{E}}[T_1] &=
\frac{1}{\delta}\sum_{i=1}^{N+1}\frac{1}{i}\left(\frac{\delta+\epsilon}{\delta}\right)^{i-1} \\
&\ge\frac{1}{(N+1)\delta}\sum_{i=1}^{N+1}\left(1+\frac{\epsilon}{\delta}\right)^{i-1}
\end{align*}
}
\vspace{-0.3em}
\begin{align*}
=\frac{\left(1+\frac{\epsilon}{\delta}\right)^{N+1}-1}{(N+1)\epsilon}.\quad\
\end{align*}
If \(N\) or \(\epsilon\) are large enough, \(\ensuremath{\mathbb{E}}[T_1]\) is greater than an
exponential of the form \(a^N\) for some \(a>1\).
This implies that the mean die-out time is exponential in the
equilibrium point \(N\).

\section{Extension to General Networks}
\label{sec:extension}

So far, we have assumed that the connection graph among the population
centers
is symmetric (\(G_{uv}=G_{vu}\)) and unweighted (\(G_{uv}\in\{0,1\}\)).
However, this is not true for many real-world networks:
the rate of infection spread between any two connected centers need not be
identical, and the rate of infection spread from \(u\) to \(v\) need not be
equal to the rate of infection spread from \(v\) to \(u\) for a connected
pair \((u,v)\).
Thus, it is important to study the behavior of the epidemic under a general
connection network given by a general asymmetric, (nonnegative) real-valued
adjacency matrix \(G\).%
\footnote{
Rather than defining the graph \(\mathcal{G}\) as a set
\(\{(u,v)\}\) of node pairs,
we now define it as a set of triples \(\{(u,v,e_{uv})\}\), where \(e_{uv}\)
is the weight of the edge from \(u\) to \(v\).
The adjacency matrix \(G\) concisely captures all this information.
}
However, it is still reasonable to assume that the graph
is strongly connected, i.e., there exists a path with nonzero edges from any
center \(u\) to any other center \(v\).
This is because
it is rarely the case that there exist no paths from one population
center to another.

Further, the intra-locality growth rate
of infections need not be identical for all the population centers, as
this rate typically depends on local factors like
population density \cite{WongL2020} and social capital \cite{VarshneyS2020}.
Let us use the parameter \(D_u>0\) to modulate the growth rate of the infection at location \(u\).
Let \(D\) be a diagonal matrix with \(D_u\) as the \(u\)th element of its diagonal.

These considerations give us the following expressions
for the rates of epidemic spread.
\begin{align}
\mathbf{X}(t) &\to \mathbf{X}(t) + \mathbf{e}_u \nonumber \\
&\quad\quad\quad \text{at rate}\
\left[\Big(\beta(X(t))G+\beta^\textsc{int}(X(t))D\Big)\mathbf{X}(t)\right]_u,\nonumber \\
\mathbf{X}(t) &\to \mathbf{X}(t) - \mathbf{e}_u
\ \text{at rate}\
\delta\left[\mathbf{X}(t)\right]_u,
\label{eq:general-rates}
\end{align}
for all \(u\in\mathcal{L}\), where \(\left[\cdot\right]_u\) indicates the
\(u\)th element of a vector.

Let \(\rho(\cdot)\) denote the spectral radius of a matrix.
We generalize Theorem~\ref{thm:spectral-bound}
as Theorem~\ref{thm:general-bound}.
\begin{theorem}
Let the system start in some state \(\mathbf{X}\) that has \(n\)
infections cumulatively, i.e., \(\mathbf{1}^\top\mathbf{X}=n\).
For the epidemic described by \eqref{eq:general-rates}, the following hold.
\begin{itemize}
\item[(i)] If \(\rho\left(\beta_\infty G+\beta^\textsc{int}_\infty D\right)<\delta\),
then \(\ensuremath{\mathbb{E}}\left[T_\mathbf{X}\right] \le C \ln n\)
for some constant \(C>0\).
\item[(ii)] If \(\rho\left(\beta_\infty G+\beta^\textsc{int}_\infty D\right)>\delta\),
then \(\ensuremath{\mathbb{E}}\left[T_\mathbf{X}\right]=\infty\).
\end{itemize}
\label{thm:general-bound}
\end{theorem}
\begin{IEEEproof}
Note that the Perron-Frobenius theorem holds for the matrix
\(\beta_\infty G + \beta^\textsc{int}_\infty D\), and we can find
a strictly positive eigenvector \(\mathbf{q}'\succ0\) of
\(\beta_\infty G + \beta^\textsc{int}_\infty D\), which has the
(positive, real) eigenvalue \(\rho\left(\beta_\infty G + \beta^\textsc{int}_\infty D\right)\) (see \cite{GraphSpectraBook}).
The proof follows directly by replacing the \(\mathbf{q}\) used in
Claim~\ref{claim:constant-infection-spectral-lower} and
Theorem~\ref{thm:spectral-bound} with the Perron-Frobenius eigenvector
of \(\beta_\infty G + \beta^\textsc{int}_\infty D\).
\end{IEEEproof}

While Theorem~\ref{thm:general-bound} provides a sharp threshold in terms
of \(\rho\left(\beta_\infty G + \beta^\textsc{int}_\infty D\right)\),
it is difficult to separate the contributions of the between-locality
spreading term \(\beta_\infty G\) and the intra-locality spreading
term \(\beta^\textsc{int}_\infty D\).
It would be nice to have sufficient conditions for fast die-out and
long-lasting epidemic in terms of expressions where these two contributions
are decoupled.
Towards this end, we provide two corollaries.

\begin{corollary}
Let the system start in some state \(\mathbf{X}\) that has \(n\)
infections cumulatively, i.e., \(\mathbf{1}^\top\mathbf{X}=n\).
If \(D\) is a scalar matrix \(\eta I\), i.e., if the intra-locality
rate-modulating factor \(D_u=\eta\) for every locality \(u\),
then the following hold.
\begin{itemize}
\item[(i)] If \(\beta_\infty\rho(G)+\beta^\textsc{int}_\infty\eta<\delta\),
then \(\ensuremath{\mathbb{E}}\left[T_\mathbf{X}\right] \le C \ln n\)
for some constant \(C>0\).
\item[(ii)] If \(\beta_\infty\rho(G)+\beta^\textsc{int}_\infty\eta>\delta\),
then \(\ensuremath{\mathbb{E}}\left[T_\mathbf{X}\right]=\infty\).
\end{itemize}
\label{cor:intra-constant}
\end{corollary}
\begin{IEEEproof}
Please see Appendix~\ref{appendix:intra-constant}.
\end{IEEEproof}

For the next corollary, we need a theorem from \cite{Schwenk1986} which
relates the spectral radius of nonnegative
asymmetric matrices to the spectral radius of certain symmetric matrices.
We state this as Claim~\ref{claim:schwenk} (in a form useful for us).

\begin{claim}[from \cite{Schwenk1986}]
For any nonnegative (square) matrix \(A\),
\begin{align*}
\rho\left(\sqrt{A \odot A^\top}\right) \le \rho(A) \le \rho\left(\frac{A+A^\top}{2}\right),
\end{align*}
where \(\odot\) is the element-wise product of matrices and \(\sqrt{\cdot}\)
is the element-wise square root.
\label{claim:schwenk}
\end{claim}
Note that the \(ij\)th element of \(\sqrt{A \odot A^\top}\) is
\(\sqrt{A_{ij}A_{ji}}\) and the \(ij\)th element of
\(\frac{A+A^\top}{2}\) is \(\frac{A_{ij}+A_{ji}}{2}\).
Both \(\sqrt{A \odot A^\top}\) and \(\frac{A+A^\top}{2}\) are symmetric
matrices.
This reduction to symmetric matrices allows us to apply Weyl's inequalities on the conditions in
Theorem~\ref{thm:general-bound}.
We state this formally as Corollary~\ref{cor:weyl-derived}.
See the textbook \cite{Bhatia1997} for the details regarding Weyl's inequalities.
We also provide short proofs of the inequalities used here in Appendix~\ref{appendix:weyl-proof}.

\begin{corollary}
Let the system start in some state \(\mathbf{X}\) that has \(n\)
infections cumulatively, i.e., \(\mathbf{1}^\top\mathbf{X}=n\).
Then the following hold.
\begin{itemize}
\item[(i)] If \(\beta_\infty\rho\left(\frac{G+G^\top}{2}\right)+\beta^\textsc{int}_\infty\max_uD_u<\delta\),
then \(\ensuremath{\mathbb{E}}\left[T_\mathbf{X}\right] \le C \ln n\)
for some constant \(C>0\).
\item[(ii)] If \(\beta_\infty\rho\left(\sqrt{G \odot G^\top}\right)+\beta^\textsc{int}_\infty\min_uD_u>\delta\),
then \(\ensuremath{\mathbb{E}}\left[T_\mathbf{X}\right]=\infty\).
\end{itemize}
\label{cor:weyl-derived}
\end{corollary}
\begin{IEEEproof}
Applying the upper bound in Claim~\ref{claim:schwenk} to the spectral-radius expression in
part (i) of Theorem~\ref{thm:general-bound}, we get
\begin{align*}
\rho\left(\beta_\infty G + \beta^\textsc{int}_\infty D\right)
\le
\rho\left(\beta_\infty\tfrac{G+G^\top}{2}+\beta^\textsc{int}_\infty D\right).
\end{align*}
Since \(\beta_\infty\frac{G+G^\top}{2}\) and \(\beta^\textsc{int}_\infty D\)
are both symmetric matrices, we can apply one of Weyl's inequalities
(see \cite{Bhatia1997} or Appendix~\ref{appendix:weyl-proof}) to get
\begin{align}
\rho\left(\beta_\infty G + \beta^\textsc{int}_\infty D\right)
\le
\beta_\infty \rho\left(\tfrac{G+G^\top}{2}\right) + \beta^\textsc{int}_\infty \max_u D_u.
\label{eq:weyl-upper-in-proof}
\end{align}
Equation~\eqref{eq:weyl-upper-in-proof} ensures that whenever the condition in part (i) of Corollary~\ref{cor:weyl-derived} is satisfied, the condition in part (i) of Theorem~\ref{thm:general-bound} is satisfied as well.
This proves part (i) of Corollary~\ref{cor:weyl-derived}.

For part (ii) of Corollary~\ref{cor:weyl-derived}, observe that
\begin{align*}
(\beta_\infty G + \beta^\textsc{int}_\infty D)&\odot
(\beta_\infty G + \beta^\textsc{int}_\infty D)^\top \\
&= \beta_\infty^2 G \odot G^\top + (\beta^\textsc{int}_\infty)^2 D \odot D.
\end{align*}
This is because there is no position \(ij\) that has a nonzero element in
both the matrices \(G\) and \(D\).
Further, the matrix \(D\) is diagonal (and hence symmetric), and so we have
\begin{align*}
&\sqrt{
(\beta_\infty G + \beta^\textsc{int}_\infty D)\odot
(\beta_\infty G + \beta^\textsc{int}_\infty D)^\top
} \\
&\qquad\qquad\qquad\qquad
= \beta_\infty\sqrt{G \odot G^\top} + \beta^\textsc{int}_\infty D.
\end{align*}
Using the lower bound in Claim~\ref{claim:schwenk}, we get
\begin{align*}
\rho\left(\beta_\infty G + \beta^\textsc{int}_\infty D\right)
\ge
\rho\left(\beta_\infty\sqrt{G \odot G^\top}+\beta^\textsc{int}_\infty D\right).
\end{align*}
Since \(\beta_\infty\sqrt{G \odot G^\top}\) and \(\beta^\textsc{int}_\infty D\) are both symmetric matrices, we can apply another one of Weyl's
inequalities (see \cite{Bhatia1997} or Appendix~\ref{appendix:weyl-proof})
to get
\begin{align*}
\rho\left(\beta_\infty G + \beta^\textsc{int}_\infty D\right)
\ge \beta_\infty\rho\left(\sqrt{G \odot G^\top}\right) + \beta^\textsc{int}_\infty \min_u D_u.
\end{align*}
Thus, whenever the condition in part (ii) of Corollary~\ref{cor:weyl-derived} is true, the condition in part (ii) of Theorem~\ref{thm:general-bound} is true as well.
This concludes the proof of part (ii) of Corollary~\ref{cor:weyl-derived}.
\end{IEEEproof}

Unlike Theorem~\ref{thm:spectral-bound}, Theorem~\ref{thm:general-bound},
and Corollary~\ref{cor:intra-constant} where the thresholds are sharp,
there is a gap between the thresholds for a quick die-out
and long-lasting epidemic in Corollary~\ref{cor:weyl-derived}.
However, Corollary~\ref{cor:weyl-derived} decouples the contributions
of the graph structure \(G\) and the variation in intra-locality spreading
\(D\) in the thresholds.

\section{Proof of Corollary~\ref{cor:intra-constant}}
\label{appendix:intra-constant}

We need to show that
\begin{align*}
\rho\left(\beta_\infty G + \beta^\textsc{int}_\infty \eta I\right)
= \beta_\infty \rho(G) + \beta^\textsc{int}_\infty\eta.
\end{align*}
Recall that the spectral radius of a matrix is defined as the maximum
absolute value of the eigenvalues of the matrix.
Let \(\lambda\) be an eigenvalue of \(\beta_\infty G + \beta^\textsc{int}_\infty\eta I\).
This yields
\begin{align*}
\text{det}(\beta_\infty G + \beta^\textsc{int}_\infty \eta I - \lambda I)=0,
\end{align*}
or
\begin{align*}
\text{det}(\beta_\infty G - (\lambda-\beta^\textsc{int}_\infty\eta)I)=0.
\end{align*}
This implies \(\lambda-\beta^\textsc{int}_\infty\eta\) is an eigenvalue
of \(\beta_\infty G\) for every eigenvalue \(\lambda\) of \(\beta_\infty G + \beta^\textsc{int}_\infty\eta I\).
The Perron-Frobenius theorem (see \cite{GraphSpectraBook}) guarantees that there
exists a positive eigenvalue of \(\beta_\infty G\) which has the
maximum absolute value.
Thus the maximum absolute value of \(\lambda\) is \(\beta_\infty\rho(G)+\beta^\textsc{int}_\infty\eta\).

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

Newly emerging infectious diseases that quickly spread
across population centers in an increasingly interconnected world
form a large portion of human infections \cite{MorensF2013}.
These epidemics spread over contact networks and the characteristics
of this spread have been widely studied
\cite{ShirleyR2005, Newman2002,
GiordanoBBCDDC2020, ColizzaBBV2006, KuchlerRS2020,
ZhouWZSYHZOPS2020, GomezABMM2010}.
In this work, we develop a state-dependent infectiousness
model for the spread of epidemics
over a network of population centers and
analytically prove that the epidemic dynamics follow certain properties.
Specifically, we characterize the expected time of epidemic extinction and
show that it exhibits a threshold behavior where it
is either logarithmic in the initial infection size or infinite depending
on whether the curing rate is higher or lower than a threshold.
We make no mean-field assumption while deriving this threshold.
We believe our model captures important features of epidemic spreading
not captured in prior literature, and our results advance the understanding
of epidemic spread.

We model  the epidemic as a Markov spreading process over a network whose
nodes represent population centers such as cities or large communities,
and the connections between them indicate the amount of contact between the
population centers.
New infections could either be due to interactions with people from
neighboring population centers, or due to community spread within the
population center.
We model these two components of epidemic spread separately.

In a typical  epidemic, especially in the early stages of newly emerging
infections, vaccines and other  pharmaceutical means to combat the disease
are unlikely to be available.
Further, in the early stages of the epidemic, the number of susceptible
people in a typical population center is very large, and effectively
infinite, until a large majority of the population has developed
herd immunity.
We capture these properties in a model
where the number of infections in each population center can potentially
grow without bound.

{In cases where the infected population is a significant
fraction of the total population, the epidemic would spread more slowly
than what is predicted by our model.
This is because for a given number of infected individuals,
our model assumes that the susceptible population is larger than
it actually is.
So our model would over-estimate the effective rate at which the
contagion spreads, and the number of (new) infections in our model
stochastically dominates the actual number of infections.}
Thus, in those settings, the threshold obtained from our model would still
hold for the quick-extinction case.

Whereas models at the person level \cite{GaneshMT2005, FagnaniZ2017,
VanMieghemOK2008, SahnehVMS2017, SahnehCS2012} capture interactions
between individual
people and might help us predict the probability of
a particular person getting infected, it is prohibitively expensive to
collect information about all individuals in a city
and compute over a network that treats each person as a distinct node.
Population~center-level models allow us to predict the
epidemic trajectory over a much larger number of people at the level
of countries or even the world.

Related work on \emph{metapopulation}
\cite{ColizzaV2007, ColizzaPV2007, ColizzaV2008, WangL2014}
also develops population~center-level models,
but uses a mean~field-type approximation, which \emph{assumes}
the existence of a (sharp) threshold and finds it.
In contrast, sharp thresholds \emph{emerge} in our work.
Like \cite{GaneshMT2005, FagnaniZ2017}, we directly
characterize the time it takes for epidemic extinction.
But unlike \cite{GaneshMT2005, FagnaniZ2017}, where there is a gap between
the conditions for a short- and long-lasting epidemic, we prove there
is a sharp threshold for the curing rate which separates the conditions
for short- and long-lasting epidemics.%
\footnote{Note that the ``mean~field'' described in \cite{FagnaniZ2017} is
over the network, not the infection probabilities.}
Note that our model is at the
population~center-level (compared to the person-level model in
\cite{GaneshMT2005, FagnaniZ2017}).
Besides the work on metapopulation, other
prior work which claim a sharp threshold between the two regimes
\cite{VanMieghemOK2008, ChakrabartiWWLF2008, SahnehVMS2017, SahnehCS2012}
have assumed it and employed a mean~field-type approximation.
{Our analysis is significantly different
from the analysis of the extinction time of the mean-field
dynamics.
The advantage of this
stochastic-analysis framework is that it allows the possibility of
obtaining tail bounds for the extinction time, whereas the
existing mean-field models, in their current form, do not offer that scope.
While we do not present tail bounds on extinction time in this work,
in Sec.~\ref{sec:numerical-computations}, we plot the confidence bounds on
the extinction times obtained from simulations of the stochastic dynamics.}

Another key aspect of our model is that the per-person  infectiousness
of the epidemic is a function of the number of active cases in the system.
{
State-dependent infectiousness influences the epidemic trajectory as
people tend to take more precautions \cite{YanMBFCO2021, FenichelKC2013, SpringbornCMF2015}
and governments tend to impose more restrictions on travel, gatherings, etc.
\cite{Bourassa2021, YanMBFCO2021} as the number of active cases increases.
Moreover, these changes in contact can be well-described using changes in
the parameters of standard epidemiological compartment
models \cite{ChangPKGRGL2020}; models that incorporate these considerations
may yield predictions that are significantly different from
models that do not \cite{FenichelCCCPHHHMPSVV2011}.
}
As explained in \cite{Sattenspiel1990}, modeling the effects
of human behavior on epidemic spread is necessary for
realistic models.
Although time-dependent infectiousness has been studied empirically in
\cite{ChenLCL2020}, we analytically model infectiousness as a function
of the number
of active cases in the system, which provides a (tractable)
theoretical basis to time-varying infectiousness.
A person-level model for state-dependent infectiousness has been developed
in \cite{FagnaniZ2017}, but as explained earlier, modeling the epidemic
at the population~center-level allows us to predict the epidemic
trajectory over a much larger number of people.
We prove the population~center-level model has a sharp epidemic
threshold for the extinction times, in contrast to the gap between the
conditions for short- and long-lasting epidemics in \cite{FagnaniZ2017}.
Related to this are \cite{SahnehVMS2017} and \cite{SahnehCS2012}, which
develop person-level models where individual people get \emph{alerted}
in the presence of infected neighbors and take more precautions or change
their contacts.

Other related work on epidemic extinction time include \cite{Holme2013} which
estimates extinction time in SIR networks using simulations;
\cite{Khatri2020} which calculates the extinction-time distribution in an
aggregate non-network model; \cite{HolmeT2018} which computes the mean
extinction times for all possible configurations of small networks;
\cite{HindesS2016, ChenHZL2017} which use the Wentzel-Kramers-Brillouin
approximation; and \cite{BallH2017} which characterizes the epidemic
extinction times over a ``mean'' network formed from a given degree
distribution.

To summarize, our main contribution is a sharp, analytical, and direct
(not mean-field) characterization of
the extinction time in a population~center-level model with
state-dependent infectiousness.
This, to the best of our knowledge, is new.

The remainder of this paper is organized as follows.
Sec.~\ref{sec:model} describes our model.
Under this model,
Sec.~\ref{sec:sharp-threshold} proves the existence of a sharp threshold:
if the curing rate \(\delta\) is greater than this threshold, the mean time
for epidemic die-out starting from a state with a cumulative of \(n\) infections is of order
\(\ln n\), and if the curing rate is below this threshold, the mean die-out
time is infinite.
Sec.~\ref{sec:extension} generalizes the results to settings with
asymmetric and weighted graphs.
Then Sec.~\ref{sec:vanishing-infectiousness} proves that the
asymptotic mean extinction time is (exactly) equal to \(\frac{\ln n}{\delta}\)
independent of graph structure if the per-person infectiousness functions
go to zero asymptotically.
This would happen if the level of precautions people take to
combat the epidemic keep getting more stringent with increasing numbers
of active cases.
Sec.~\ref{sec:numerical-computations} provides simulation and computation
results, and Sec.~\ref{sec:conclusion} concludes.

\section{Model}
\label{sec:model}

Let there be a set of \emph{localities}%
\footnote{Note that ``localities'' can refer to
population centers at various levels of demographic aggregation.
They could represent countries, states, cities, or even
neighborhoods within a city.
Indeed, there can be marked differences in how
people react to a contagion even within a single large urban area
\cite{KimCCJL2017}.
}
\(\mathcal{L}\), and at each locality
\(u \in \mathcal{L}\), the number of infected people at time
\(t\) is given by \(X_u(t)\).
We assume each locality has a large enough population that for our
purposes, for all \(u\), the range of \(X_u(t)\) is the set of
all non-negative integers.
There is a graph \(\mathcal{G}\) across the localities, and \((u, v) \in \mathcal{G}\)
when the localities \(u\) and \(v\) are \emph{connected}.
The adjacency matrix \(G\) of \(\mathcal{G}\) is the matrix
having \(G_{uv}=1\) if \((u,v)\in\mathcal{G}\) and \(G_{uv}=0\) otherwise.
For ease of presentation, we first assume that the graph is symmetric:
\((u,v)\in\mathcal{G}\) implies \((v,u)\in\mathcal{G}\).
We relax this assumption in Sec.~\ref{sec:extension}.
A connection between two localities means that infected people in one
locality can infect susceptible people in the other locality.
Further, we assume the graph \(\mathcal{G}\) is connected,
i.e., for every \(u,v\in\mathcal{L}\), there exists a path between
\(u\) and \(v\) in \(\mathcal{G}\).

Let the total number of people infected at time \(t\) be \(X(t)\),
i.e.,  \(\sum_{u\in\mathcal{L}}X_u(t) = X(t)\).
The rate of growth of the infection at locality \(u\) at time \(t\)
consists of two components:
\begin{enumerate}
\item the intra-locality growth rate
due to interactions within the
locality given by \(\beta^\textsc{int}(X(t))X_u(t)\), and
\item the between-locality growth rate, where the rate of growth due to \(v\)
for each \((u,v)\in\mathcal{G}\) is given by \(\beta(X(t))X_v(t)\).
\end{enumerate}
Here, \(\beta(\cdot)\) and \(\beta^\textsc{int}(\cdot)\) are positive
real-valued functions of the total number of infections in the system,
which give the rate of
growth of the infection per infecting agent.
We assume that these per-person infectiousness functions are bounded.
Let their suprema be given by \(\sup_{n\in\ensuremath{\mathbb{N}}}\beta(n)=\beta_{\max}\) and
\(\sup_{n\in\ensuremath{\mathbb{N}}}\beta^\textsc{int}(n)=\beta^\textsc{int}_{\max}\).
We also assume that the asymptotic limits for these functions exist as
the total number of infections grows without bound:
\(\lim_{n \to \infty}\beta(n)=\beta_\infty\) and
\(\lim_{n \to \infty}\beta^\textsc{int}(n)=\beta^\textsc{int}_\infty\).
Let the curing rate for every infected agent be \(\delta\).
This is independent of the graph \(\mathcal{G}\), the
level of precautions taken (\(\beta\) and
\(\beta^\textsc{int}\)), or the number of
infections at any node \(\{X_u(t)\}\), and just depends on
the nature of the infection.
We show the model pictorially in Fig.~\ref{fig:model}.
\begin{figure}[h]
\begin{center}
\resizebox{0.8\columnwidth}{!}{
    \begin{tikzpicture}
        \filldraw [black] (-1,0) circle (1.5pt);
        \filldraw [black] (1,0) circle (1.5pt);
        \filldraw [black] (0.3,0.6) circle (1.5pt);
        \filldraw [black] (-0.3,-0.6) circle (1.5pt);
        \begin{scope}[>=stealth, decoration={markings,mark=at position 0.25 with {\arrow[red]{<}}, mark=at position 0.75 with {\arrow[red]{>}}}]
           \draw[postaction={decorate}] (-1,0) -- (1,0);
           \draw[postaction={decorate}] (-1,0) -- node[above, red, midway, sloped] {\tiny \(\beta(X(t))\)} (0.3,0.6);
           \draw[postaction={decorate}] (1,0) -- (0.3,0.6);
           \draw[postaction={decorate}] (1,0) -- (-0.3,-0.6);
        \end{scope}
        \begin{scope}[black!30!brown, >=stealth, decoration={markings, mark=at position 1 with {\arrow{>}}}]
            \draw[postaction={decorate}] (-1,0.1) -- (-1,0.3);
            \draw[postaction={decorate}] (-0.3,-0.5) -- (-0.3,-0.3);
            \draw[postaction={decorate}] (0.3,0.7) -- (0.3,0.9);
            \draw[postaction={decorate}] (1,0.1) -- (1,0.3);
        \end{scope}
            \node at (0.2, 0.9) [anchor=west, black!30!brown, yshift=0.07cm] {\tiny \(\beta^\textsc{int}(X(t))\)};
            \draw[->, thick, black!30!green, >=stealth] (1.5, 0.5) --  node[anchor=west] {\scriptsize \(\delta\)} (1.5, -0.5);
    \end{tikzpicture}
}
\end{center}
\caption{The epidemic model, where
nodes represent population centers, edges represent
the connections between the centers,
\(\beta(\cdot)\) and \(\beta^\textsc{int}(\cdot)\) are the
between-locality and intra-locality infectiousness functions, and \(\delta\)
is the curing rate.
}
\label{fig:model}
\end{figure}

For each \(u\in\mathcal{L}\), the above discussion implies the following rates for the infection:
\begin{align}
X_u(t) &\rightarrow X_u(t)+1\ \nonumber\\
\qquad\qquad&\text{at rate}\ \sum_{v:(u,v)\in\mathcal{G}}\!\!\!\beta(X(t))X_v(t) + \beta^{\textsc{int}}(X(t))X_u(t), \nonumber\\
X_u(t) &\rightarrow X_u(t)-1\ \text{at rate}\ \delta X_u(t).
\label{eq:node-rates}
\end{align}
Let us use the vector \(\mathbf{X}(t)\) to denote the state of the system at
time \(t\).
The \(u\)th element of \(\mathbf{X}(t)\) is \(X_u(t)\),
the number of infections at node \(u\) at time \(t\).
Let \(T_\mathbf{X}\) denote the time it takes to go from a
state \(\mathbf{X}\) to the all-zero state \(\mathbf{0}\).
Once the epidemic reaches the all-zero state, it is \emph{extinct,} since
one can only contract the infection from someone else,%
\footnote{Note that this is true for many viral infections since the only
host for these viruses are humans. However, this may not be the case
for other infections.}
and if there are
no infected individuals, the epidemic can never rebound later.
The mean extinction time (also called the
mean \emph{hitting time}) starting from the state \(\mathbf{X}\) is given
by \(\ensuremath{\mathbb{E}}\left[T_\mathbf{X}\right]\).

\section{Simulations \& Numerical Computations}
\label{sec:numerical-computations}

In this section, we  present some simulations and numerical
computations to demonstrate the theoretical results of the preceding
sections.

\subsection{Network-wide simulations}

For simulations, we use the network from \cite{ColizzaPV2007}
which is a graph where the nodes represent the top \(500\) US airports and the
edge weights are the number of seats scheduled on flights between the airports
in the year 2002.
We consider the top \(100\) of these \(500\) nodes and normalize the
adjacency matrix with the mean column weight
(this normalization just scales the values of \(\beta(\cdot)\)).
We simulate the model described in Sec.~\ref{sec:model} using Gillespie's
algorithm \cite{Gillespie1977}.

\begin{center}
\begin{figure}
\subfloat[Curing rate below the threshold.]{\label{fig:graph-constant:below}
\includegraphics[width=\columnwidth]{{r0.90}}}

\subfloat[Curing rate above the threshold.]{\label{fig:graph-constant:above}
\includegraphics[width=\columnwidth]{{r1.10}}}
\caption{Epidemic trajectories using constant values for \(\beta(\cdot)\) and \(\beta^\textsc{int}(\cdot)\).}
\label{fig:graph-constant}
\end{figure}
\end{center}

First, in Fig.~\ref{fig:graph-constant}, we simulate using constant
values for \(\beta(\cdot)\) and \(\beta^\textsc{int}(\cdot)\).
Specifically, we set \(\beta(n)=\beta=2\) and
\(\beta^\textsc{int}(n)=\beta^\textsc{int}=2\) for all \(n\),
and choose \(\delta\) to get the value of
\(\frac{\delta}{\beta\lambda_r+\beta^\textsc{int}}\) shown
on the plot.
For both the values of \(\delta\), we simulate the system {\(1000\)} times
and show the trajectories of \(X(t)\)  over time in the plot,
{and the interval that contains \(95\%\) of the simulated
states at each time instant.
We obtain this \(95\%\) interval by finding the maximum and minimum
state values after ignoring the top and
bottom \(2.5\%\) of the simulations.
}%
We also show the plot of \(\ensuremath{\mathbb{E}}[X(t)]\) computed theoretically by solving
the differential equation for \(\frac{d\ensuremath{\mathbb{E}}[X(t)]}{dt}\)
(see Appendix~\ref{appendix:constant-infection-spectral-lower}).
{
As we can see in Fig.~\ref{fig:graph-constant:below}, when
\(\beta\lambda_r+\beta^\textsc{int}>\delta\), most of the simulated
trajectories of the system show an epidemic that is not dying out.
Even though more than \(2.5\%\) of the simulations die out (as the
\(95\%\) interval shows), since most of the simulations show an
epidemic that becomes increasingly larger with time, the expected
extinction time would be infinite, in line with what we have
theoretically proven in Theorem~\ref{thm:spectral-bound}.
On the other hand, in Fig.~\ref{fig:graph-constant:above},
when \(\beta\lambda_r+\beta^\textsc{int}<\delta\),
all the trajectories of the system result in the epidemic dying out
relatively quickly.
Further, in this case, the confidence bounds on the extinction time
are meaningfully defined, and
we show the \(95\%\) confidence interval of the extinction time
\(T_\mathbf{X}\) in Fig.~\ref{fig:graph-constant:above}.
This interval is calculated in the same way as the \(95\%\)
interval for the state trajectory.
}%
For all the simulations, we start with an initial epidemic size  of
\(100\), placed uniformly at random at one of the nodes.

\begin{center}
\begin{figure}
\subfloat[Curing rate is greater than threshold when epidemic is
small.]{
\includegraphics[width=\columnwidth]{{early-drop}}
}

\subfloat[Curing rate is greater than threshold only after epidemic
gets very large.]{
\includegraphics[width=\columnwidth]{{late-drop}}
}
\caption{Epidemic trajectories when \(\beta(n)\) and \(\beta^\textsc{int}(n)\) change with \(n\).}
\label{fig:graph-variable-drop}
\end{figure}
\end{center}

When the values of \(\beta(n)\) and \(\beta^\textsc{int}(n)\) change with
\(n\), if \(\beta(n)\lambda_r+\beta^\textsc{int}(n)<\delta\)
or \(\beta(n)\lambda_r+\beta^\textsc{int}(n)>\delta\) for all
\(n\), then the results are very similar to the ones in Fig.~\ref{fig:graph-constant}, and hence we omit these plots.
In Fig.~\ref{fig:graph-variable-drop}, we show the results of simulations
where \(\beta(n)\lambda_r+\beta^\textsc{int}(n)\) starts from a value
greater than \(\delta\) for small \(n\), but eventually falls to a value
smaller than \(\delta\) for larger \(n\).
The value of \(n\) where this transition happens is shown on the plots
in Fig.~\ref{fig:graph-variable-drop}.
We can see in Fig.~\ref{fig:graph-variable-drop} that there seems to be
a ``metastable'' state at the point
where the infectiousness is equal to the curing rate.
Note that since the value of \(\beta(n)\lambda_r+\beta^\textsc{int}(n)\)
eventually falls below \(\delta\) for large enough \(n\), the
condition in part (i) of Theorem~\ref{thm:spectral-bound} is true,
and so the mean hitting time should be logarithmic in the initial
infection size.
However, these simulations suggest that the epidemic takes a very  long time
to die out in this case.
It seems that the die-out  times are in fact exponential
in the infection size where the infectiousness and curing rate are equal.
Please see Appendix~\ref{appendix:exponential-equal} for some insight
into this behavior.
This means that even though Theorem~\ref{thm:spectral-bound} guarantees
that the mean die-out time would be logarithmic in the initial infection size
if the asymptotic rate of infectiousness is less than the curing rate,
it is still very important that measures such as lockdowns and other
non-pharmaceutical precautions are implemented in the early stages
of an epidemic.

\subsection{Numerical computations for  vanishing \(\gamma(\cdot)\)}

Here,  we provide some numerical computations to support
Theorem~\ref{thm:log-hitting}.
Note that in contrast to the network-wide simulations in
Fig.~\ref{fig:graph-constant} and \ref{fig:graph-variable-drop}
where we have used
the infectiousness functions \(\beta(\cdot)\) and \(\beta^\textsc{int}(\cdot)\),
we use \(\gamma(\cdot)\) here which captures the infectiousness for
both the upper- and lower-bound Markov chains together in a single
expression using \eqref{eq:rates}.
We consider three different \(\gamma(\cdot)\)
functions and plot the values of \(\ensuremath{\mathbb{E}}[T_n]\) computed using the
recursion from \eqref{eq:sn-recursion}
(with the base case from Claim~\ref{claim:t1-gamma}).
We plot this in Fig.~\ref{fig:multiplicative-factor}.

\begin{figure}
\begin{center}
\includegraphics[width=0.9\columnwidth]{multiplicative-factor}
\caption{\(\ensuremath{\mathbb{E}}[T_n]\) for slightly different \(\gamma(\cdot)\) functions.}
\label{fig:multiplicative-factor}
\end{center}
\end{figure}

Fig.~\ref{fig:multiplicative-factor} shows that even small changes
in \(\gamma(\cdot)\) can cause large changes in the values of \(\ensuremath{\mathbb{E}}[T_n]\).
Further, Fig.~\ref{fig:multiplicative-factor} may seem to indicate that even
these small changes cause the mean hitting times to not converge to the same
asymptote.
This would be contrary to what we expect
from Theorem~\ref{thm:log-hitting}.
However, the reason we do not see all the three curves in
Fig.~\ref{fig:multiplicative-factor} converge to the same asymptote is that
the convergence happens extremely slowly.
This is not very surprising, given that the asymptote is the
function \(\frac{\ln n}{\delta}\).
Since the logarithmic function increases very slowly, differences between
\(\ensuremath{\mathbb{E}}[T_n]\) for different \(\gamma(\cdot)\) functions at small
values of \(n\) take a very long time to become insignificant, and the
\(\ensuremath{\mathbb{E}}[T_n]\) values become close to each other only at very large values
of \(n\).

To demonstrate this, consider \(\gamma(n)=\frac{k}{n}\).
We choose this function because it leads to easier analysis.
Similar arguments hold for any other function as well.
Substituting this into Claim~\ref{claim:t1-gamma} gives us
\begin{align}
\ensuremath{\mathbb{E}}[T_1] &= \frac{1}{\delta} + \frac{k}{1\cdot2\cdot\delta^2} +
\frac{k^2}{1\cdot2\cdot3\cdot\delta^3} + \cdots \nonumber \\
&= \frac{1}{k}\left(\frac{k}{\delta}+\frac{k^2}{2!\delta^2}+\frac{k^3}{3!\delta^3} + \cdots\right) \nonumber \\
&= \frac{e^{k/\delta}-1}{k}.
\label{eq:t1-kbyn}
\end{align}
Equation~\eqref{eq:t1-kbyn} is quite sensitive to the value of \(k\).
For example, with \(\delta=1\), we get a derivative of \(\frac{4e^5+1}{25}\approx23.79\) at \(k=5\).
Small changes in the value of \(k\) can significantly change the value
of \(\ensuremath{\mathbb{E}}[T_1]\).
We can use the recursion from \eqref{eq:sn-recursion} to analytically
find the value of \(\ensuremath{\mathbb{E}}[T_2]\) to find that \(\ensuremath{\mathbb{E}}[T_2]\) is even more
sensitive to the value of \(k\).
Since \(\ensuremath{\mathbb{E}}[T_n]\) is of the form \(\ensuremath{\mathbb{E}}[T_2]+\sum_{i=3}^nS_i\), and
\(S_n\) asymptotically reaches \(\frac{1}{n}\), these differences in
\(\ensuremath{\mathbb{E}}[T_2]\) become negligible only for a very large value of \(n\).

We can verify this using Fig.~\ref{fig:difference} where we plot the values
of \(S_n\) for different \(\gamma(\cdot)\) functions.
We see that all of them eventually reach the asymptote \(\frac{1}{n}\).
This means that for large enough \(n\), the mean hitting times will all be indistinguishable
from \(\ln n\).
However, we need an extremely large value of \(n\) for the differences to
become negligible.

\begin{figure}
\begin{center}
\includegraphics[width=0.9\columnwidth]{difference}
\caption{\(S_n\) for large \(n\).
Note that for these large values of \(n\), \(\gamma(n)\) is
too small for accurately computing the recursion in
\eqref{eq:sn-recursion} using
even 128-bit floating point arithmetic.
To compute \(S_n\), we need to divide a very small value, \(S_{n-1}\delta-\frac{1}{n-1}\), by another very small value, \(\gamma(n-1)\).
Insufficient numerical precision can lead to garbage values for \(S_n\).
Arbitrary-precision arithmetic (such as the one provided by
\texttt{mpmath} \cite{mpmath}) is needed.}
\label{fig:difference}
\end{center}
\end{figure}

\section{Sharp Threshold}
\label{sec:sharp-threshold}

In this section, we state our main result as Theorem~\ref{thm:spectral-bound}.

\begin{theorem}
Let \(\lim_{n\to\infty}\beta(n)=\beta_\infty\) and
\(\lim_{n\to\infty}\beta^\textsc{int}(n)=\beta^\textsc{int}_\infty\).
Let \(\lambda_r\) denote the spectral radius of the
adjacency matrix of the (symmetric) undirected graph \(\mathcal{G}\).
Let the system start in some state \(\mathbf{X}\) that has \(n\)
infections cumulatively, i.e., \(\mathbf{1}^\top\mathbf{X}=n\).
If the graph \(\mathcal{G}\) is connected, then the following hold.
\begin{itemize}
\item[(i)] If \(\beta_\infty\lambda_r+\beta^\textsc{int}_\infty<\delta\),
then \(\ensuremath{\mathbb{E}}\left[T_\mathbf{X}\right] \le C \ln n\)
for some constant \(C>0\).
\item[(ii)] If \(\beta_\infty\lambda_r+\beta^\textsc{int}_\infty>\delta\),
then \(\ensuremath{\mathbb{E}}\left[T_\mathbf{X}\right]=\infty\).
\end{itemize}
\label{thm:spectral-bound}
\end{theorem}

Before we prove Theorem~\ref{thm:spectral-bound}, let us first observe
a property of the spectral radius, \(\lambda_r\), of \(G\).
Since we have assumed that \(\mathcal{G}\) is connected,
the Perron-Frobenius theorem (see \cite{GraphSpectraBook})
implies that every element of the eigenvector
\(\mathbf{q}\) corresponding to
\(\lambda_{r}\) is strictly positive, i.e., \(\mathbf{q}\succ0\).

We prove Theorem~\ref{thm:spectral-bound} in two parts:
(i) \(\beta_\infty\lambda_r+\beta^\textsc{int}_\infty<\delta\), and
(ii) \(\beta_\infty\lambda_r+\beta^\textsc{int}_\infty>\delta\).

\subsection{Curing rate above the threshold}
For proving part (i) of Theorem~\ref{thm:spectral-bound},
the following claim, which follows from analyzing the time evolution of
\(\mathbf{X}\) along the eigen-direction of \(G\), is useful.
\begin{claim}
When \(\beta(n)\) and \(\beta^\textsc{int}(n)\) are constant, i.e.,
\(\beta(n)=\beta\) and \(\beta^\textsc{int}(n)=\beta^\textsc{int}\) for all
\(n\), and \(\beta\lambda_r+\beta^\textsc{int}<\delta\), then
\(\ensuremath{\mathbb{E}}\left[T_\mathbf{X}\right] \le C \ln n\) for some \(C>0\)
where \(\mathbf{1}^\top\mathbf{X}=n\).
\label{claim:constant-infection-spectral-lower}
\end{claim}
\begin{IEEEproof}
Please see Appendix~\ref{appendix:constant-infection-spectral-lower}.
\end{IEEEproof}

We are now ready to prove part (i) of Theorem~\ref{thm:spectral-bound}.
\begin{IEEEproof}[Proof of part {\normalfont (i)} of Theorem~\ref{thm:spectral-bound}]
Since we have \(\lim_{n\to\infty}\beta(n)=\beta_\infty\),
\(\lim_{n\to\infty}\beta^\textsc{int}(n)=\beta^\textsc{int}_\infty\),
and \(\beta_\infty\lambda_r+\beta^\textsc{int}_\infty<\delta\),
it follows from the definition of limit \cite{ThomasF1996} that
there is an \(m\) such that
\begin{align}
\beta(n)\lambda_r + \beta^\textsc{int}(n) < \delta,\
\text{for all}\ n \ge m.
\label{eq:ngem-lower}
\end{align}
When the system starts in any state with a cumulative number of
infections \(n\), which is greater than \(m\), it must go through a state
where the cumulative number of infections is \(m\) to reach the all-zero
state.
However, if the system starts in a state that has less than \(m\) infections
in total, then it may or may not reach a state with \(m\) infections.
This gives us
\begin{align*}
\ensuremath{\mathbb{E}}\left[T_\mathbf{X}\right] \le \ensuremath{\mathbb{E}}\left[T_{\mathbf{X},m}\right]
+ \max_{\mathbf{Y}:\mathbf{1}^{\!\!\top}\!\mathbf{Y}=m}\ensuremath{\mathbb{E}}\left[T_\mathbf{Y}\right],
\end{align*}
where \(T_{\mathbf{X},m}\) is the amount of time it takes to reach a state
with a total of \(m\) infections starting from state \(\mathbf{X}\).

Using \eqref{eq:ngem-lower}, we make the following observations.
\begin{enumerate}
\item[(a)] Between \(\mathbf{X}\) and any state with a total of \(m\)
infections, \emph{every} state satisfies
\(\beta(\cdot)\lambda_r+\beta^\textsc{int}(\cdot)<\delta\), and thus a
system with a constant infectiousness equal to
\(\max_{n\ge m}\left(\beta(n)\lambda_r+\beta^\textsc{int}(n)\right)\)
satisfies Claim~\ref{claim:constant-infection-spectral-lower}.
\item[(b)] Since our system has an infectiousness less than the system with
constant infectiousness in point~(a) for \emph{every} state with \(n\ge m\),
using a stochastic-dominance argument,
the time it takes for epidemic extinction in the constant-infectiousness
system should be greater (in expectation) than the time our system takes to
go from \(\mathbf{X}\) to a state with \(m\) infections.
\end{enumerate}
Using these observations and Claim~\ref{claim:constant-infection-spectral-lower},
it follows that
\(\ensuremath{\mathbb{E}}\left[T_{\mathbf{X},m}\right] \le C \ln n\) whenever \(n \ge m\).
Since \(\max_{\mathbf{Y}:\mathbf{1}^{\!\!\top}\!\mathbf{Y}=m}\ensuremath{\mathbb{E}}\left[T_\mathbf{Y}\right]\) is a constant independent of \(n\),
we have
\begin{align*}
\ensuremath{\mathbb{E}}\left[T_\mathbf{X}\right] \le C' \ln n,
\end{align*}
when \(\mathbf{1}^\top\mathbf{X}=n\) and \(n \ge m\).
For \(n<m\), \(\ensuremath{\mathbb{E}}\left[T_\mathbf{X}\right]\) is less than the constant
\(\max_{\mathbf{Y}:\mathbf{1}^{\!\!\top}\!\mathbf{Y}=m}\ensuremath{\mathbb{E}}\left[T_\mathbf{Y}\right]\),
and hence \(\ensuremath{\mathbb{E}}\left[T_\mathbf{X}\right] \le C' \ln n\) follows directly.
\end{IEEEproof}

\subsection{Curing rate below the threshold}

We now move to the case where \(\beta_\infty\lambda_r+\beta^\textsc{int}_\infty>\delta\).
For this case, we use the discrete-time Markov chain (DTMC)
embedded in
the continuous-time Markov chain (CTMC) \(\mathbf{X}(t)\).
Let \(\mathbf{X}_0=\mathbf{X}(0)\), and let \(\mathbf{X}_k\) be the state
of our system after \(k\) transitions.
Then \(\mathbf{X}_0, \mathbf{X}_1, \ldots\) form a DTMC.
However, the number of transitions in the CTMC
must be countable for every sample path of the CTMC if the
embedded DTMC is to include every transition in the CTMC.
If the transitions in the CTMC are otherwise uncountably infinite,
we cannot map all the transitions in the CTMC to transitions in the DTMC.

If the CTMC's transitions are countable, and if the embedded DTMC is transient, there is a nonzero
probability that the sequence
\(\mathbf{X}_0, \mathbf{X}_1, \mathbf{X}_2, \ldots\)
does not contain the all-zero state \(\mathbf{0}\), with
zero infections at all nodes.
This in turn implies there is a nonzero probability that our system
does not reach the zero state starting from \(n\) infections initially
(because the transitions are countable).
This gives us an infinite mean hitting time \(\ensuremath{\mathbb{E}}[T_{\mathbf{X}_0}]\).

We first state as Claim~\ref{claim:ctmc-countable}
that our system has a countable number of transitions.
We use this together with a theorem from \cite{MalyshevM1979} (stated as
Theorem~\ref{thm:potential} here)
to prove the transience of our system
when \(\beta_\infty\lambda_r+\beta^\textsc{int}_\infty>\delta\).
\begin{claim}
Let \(\mathbb{T}\) be the set of all transition times for the continuous-time Markov chain
given by \eqref{eq:node-rates}.
There exists an injection from \(\mathbb{T}\) to \ensuremath{\mathbb{N}}\ with probability
\(1\), i.e., the set \(\mathbb{T}\) is countable.
\label{claim:ctmc-countable}
\end{claim}
\begin{IEEEproof}
Please see Appendix~\ref{appendix:ctmc-countable} for the proof.
Claim~\ref{claim:ctmc-countable} is similar to the results in
\cite[Section~5.1]{ResnickAdventures}.
\end{IEEEproof}

To show that the embedded discrete-time Markov chain is transient,
the following theorem from \cite{MalyshevM1979}
(paraphrased in our notation) is useful.
\begin{theorem}[from \cite{MalyshevM1979}]
Let the state space of the Markov chain
\(\mathbf{X}_0, \mathbf{X}_1, \ldots\) be given by \(\mathcal{S}\).
If there exists a function \(V:\mathcal{S}\mapsto\ensuremath{\mathbb{R}}_+\cup\{0\}\)
that satisfies
the following properties:
\begin{enumerate}
\item[(a)] for some \(d>0\),
\(\ensuremath{\mathbb{P}}\Big(\lvert V(\mathbf{X}_{k+1})-V(\mathbf{X}_k)\rvert>d\Big) = 0\ \ \text{for all}\ \ \mathbf{X}_{k}\ \text{and}\ \mathbf{X}_{k+1}\),
\item[(b)] for some \(\epsilon>0\), and \(c>0\),
\(\ensuremath{\mathbb{E}}\Big[V(\mathbf{X}_{k+1})-V(\mathbf{X}_k)\mid\mathbf{X}_k=\mathbf{X}\Big]>\epsilon\ \text{for all}\ \mathbf{X}\in\{\mathbf{Y} \mid V(\mathbf{Y})\ge c\}\),
\end{enumerate}
then the Markov chain \(\mathbf{X}_0,\mathbf{X}_1,\ldots\) is transient.
\label{thm:potential}
\end{theorem}
Note that the conditions for transience in Theorem~\ref{thm:potential} are
similar to Foster's well-known work~\cite{Foster1953}.
While the conditions for positive recurrence from \cite{Foster1953}
are still widely used, the conditions for transience require
the potential function \(V\) to be bounded.
The conditions for transience given in Theorem~\ref{thm:potential}
from~\cite{MalyshevM1979} are easier to use.
See \cite{SrikantY2013} for other variants.

\begin{IEEEproof}[Proof of part {\normalfont (ii)} of Theorem~\ref{thm:spectral-bound}]
We first prove that the DTMC embedded in our CTMC satisfies the
conditions of Theorem~\ref{thm:potential}, which implies that the
embedded DTMC is transient.
Claim~\ref{claim:ctmc-countable} then ensures that the transience
of the embedded DTMC implies transience of the CTMC.

For the embedded DTMC, let us define the potential function
\begin{align*}
V(\mathbf{X})=\mathbf{q}^\top\mathbf{X}.
\end{align*}
Recall that \(\mathbf{q}\) is the Perron-Frobenius eigenvector of
\(G\),
which ensures that \(\mathbf{q}\succ0\) and so \(V(\mathbf{X})\) is a valid
potential function.
This gives us \(V(\mathbf{X}_{k+1})-V(\mathbf{X}_k)=\mathbf{q}^\top\left(\mathbf{X}_{k+1}-\mathbf{X}_k\right)\).
Condition~(a) of Theorem~\ref{thm:potential} is straightforward to verify since
\(\mathbf{X}_{k+1}-\mathbf{X}_k=\pm \mathbf{e}_i\) for some \(i\),
where \(\mathbf{e}_i\) is the vector whose \(i\)th element is \(1\)
and the rest are \(0\).
So \(\ensuremath{\mathbb{P}}\big(\lvert V(\mathbf{X}_{k+1})-V(\mathbf{X}_k)\rvert>d) = 0\)
for all \(d>q_{\max}\), where \(q_{\max}\) is the maximum element
of \(\mathbf{q}\).

We now define \(c\), and thus the set \(\{\mathbf{Y}\mid V(\mathbf{Y})\ge c\}\) in condition~(b) of Theorem~\ref{thm:potential}.
We set \(c=q_{\max}m\), where \(m\) shall be determined later.
This means that a sufficient condition for the transience of the
embedded DTMC is that condition~(b) of Theorem~\ref{thm:potential} should
hold in the set \(\mathcal{U}=\{\mathbf{Y}\mid V(\mathbf{Y})\ge q_{\max}m\}\).
Note that since we have defined \(V(\mathbf{Y})=\mathbf{q}^\top\mathbf{Y}\),
\(V(\mathbf{Y})\ge q_{\max}m\) implies \(\mathbf{1}^\top\mathbf{Y} \ge m\).

Let \(\mathbf{X}_k=\mathbf{X}\in\mathcal{U}\), and let
the sum of all rates in \eqref{eq:node-rates} when the system is
in this state be \(R\).
Let \(\mathbf{1}^\top\mathbf{X}=n\).
Using \eqref{eq:node-rates}, we get
\begin{align*}
\ensuremath{\mathbb{E}}[V(\mathbf{X}_{k+1})-&V(\mathbf{X}_k)\mid\mathbf{X}_k=\mathbf{X}] \\
&=
\mathbf{q}^\top\ensuremath{\mathbb{E}}\left[\mathbf{X}_{k+1}-\mathbf{X}_k\mid\mathbf{X}_k=\mathbf{X}\right] \\
&=
\mathbf{q}^\top\times\frac{1}{R}\Big(\beta(n) G \mathbf{X} + \beta^\textsc{int}(n)\mathbf{X} -
\delta \mathbf{X}\Big) \\
&= \frac{1}{R}(\beta(n)\lambda_{r}+\beta^\textsc{int}(n)-\delta)\mathbf{q}^\top\mathbf{X}.
\end{align*}

Observe that
\begin{align}
R &=
\mathbf{1}^\top\left(\beta(n) G \mathbf{X}+\beta^\textsc{int}(n)\mathbf{X}
+\delta\mathbf{X}\right) \nonumber \\
&\le (\beta(n) d_{\max}+\beta^\textsc{int}(n)+\delta)\mathbf{1}^\top\mathbf{X},
\label{eq:total-transition-rate}
\end{align}
where \(d_{\max}\) is the maximum degree in the graph.

Since \(\mathbf{q}^\top\mathbf{X} \ge q_{\min}\mathbf{1}^\top\mathbf{X}\),
where \(q_{\min}\) is the minimum element of \(\mathbf{q}\), we get
\begin{align*}
\ensuremath{\mathbb{E}}[V(\mathbf{X}_{k+1})-V(\mathbf{X}_k)&\mid\mathbf{X}_k=\mathbf{X}] \\
&\ge \frac{(\beta(n)\lambda_{r}+\beta^\textsc{int}(n)-\delta)q_{\min}}{
\beta(n) d_{\max}+\beta^\textsc{int}(n)+\delta}
\end{align*}
for all \(\mathbf{X}\in\mathcal{U}\).
Since \(\beta(n)\to\beta_\infty\) and
\(\beta^\textsc{int}(n)\to\beta^\textsc{int}_\infty\),
the definition of limit ensures that for a sufficiently large
\(m\), \(\frac{(\beta(n)\lambda_{r}+\beta^\textsc{int}(n)-\delta)q_{\min}}{\beta(n) d_{\max}+\beta^\textsc{int}(n)+\delta}\)
is arbitrarily close to
\(\frac{(\beta_\infty\lambda_{r}+\beta^\textsc{int}_\infty-\delta)q_{\min}}{
\beta_\infty d_{\max}+\beta^\textsc{int}_\infty+\delta}\)
for all \(n \ge m\).
Since \(\frac{(\beta_\infty\lambda_{r}+\beta^\textsc{int}_\infty-\delta)q_{\min}}{
\beta_\infty d_{\max}+\beta^\textsc{int}_\infty+\delta}>0\), we have
\begin{align*}
\ensuremath{\mathbb{E}}[V(\mathbf{X}_{k+1})-V(\mathbf{X}_k)&\mid\mathbf{X}_k=\mathbf{X}]
\ge \epsilon > 0
\end{align*}
for all \(\mathbf{X}\in\mathcal{U}\) for a sufficiently large \(m\).
(Recall that \(\mathcal{U}=\{\mathbf{Y}\mid V(\mathbf{Y})\ge q_{\max}m\}\)
which implies \(\mathbf{1}^\top\mathbf{X}\ge m\) for all \(\mathbf{X}\in\mathcal{U}\).)
This proves the transience of the embedded DTMC.

Transience of the embedded DTMC means that starting
in state \(\mathbf{X}_0=\mathbf{X}\,(\neq\mathbf{0})\), there is a nonzero
probability that the sequence of states
\(\mathbf{X}_1,\mathbf{X}_2, \mathbf{X}_3, \ldots\) does not contain the
all-zero state \(\mathbf{0}\) with nonzero probability
(directly from the definition of transience used in
\cite{MalyshevM1979} in their proof of Theorem~\ref{thm:potential}).
Using Claim~\ref{claim:ctmc-countable}, this means that the CTMC defined
in \eqref{eq:node-rates} has a nonzero probability of never reaching
the all-zero state.
Hence the average hitting time is infinite.
\end{IEEEproof}

\section{Vanishing Infectiousness}
\label{sec:vanishing-infectiousness}

In this section, we consider the special case where the per-person
infectiousness functions decrease to zero as the number of active cases
in the system increases:
\(\beta_\infty=\beta^\textsc{int}_\infty=0\).
For this, we define upper-bound and lower-bound Markov chains
using the maximum and minimum node degrees.
We then show that both these Markov chains have the same asymptotic
mean hitting times if the per-person infectiousness functions go to
zero asymptotically.

Let the maximum node in-degree
in \(\mathcal{G}\) be \(d_{\max}\) and the
minimum node in-degree be \(d_{\min}\).%
\footnote{
For weighted graphs, use the definitions
\(d_{\max}=\max_u\sum_vG_{uv}\) and \(d_{\min}=\min_u\sum_vG_{uv}\).
}
Adding up \eqref{eq:node-rates} over all the localities \(u\in\mathcal{L}\) gives us the following
\emph{upper-} and \emph{lower-bound} Markov chains for the system-wide epidemic.
\begin{align}
&\textit{Upper-bound Markov chain:} \nonumber\\
&X(t) \rightarrow X(t)+1\ \text{at rate}\ \Big(d_{\max}\beta\big(X(t)\big)\!\!+\!\! \beta^\textsc{int}\big(X(t)\big)\Big)X(t), \nonumber \\
&X(t) \rightarrow X(t)-1\ \text{at rate}\ \delta X(t),
\label{eq:ub-rates}
\end{align}
and
\begin{align}
&\textit{lower-bound Markov chain:} \nonumber\\
&X(t) \rightarrow X(t)+1\ \text{at rate}\ \Big(d_{\min}\beta\big(X(t)\big)\!\!+\!\! \beta^\textsc{int}\big(X(t)\big)\Big)X(t), \nonumber \\
&X(t) \rightarrow X(t)-1\ \text{at rate}\ \delta X(t).
\label{eq:lb-rates}
\end{align}
The mean hitting times of these upper- and lower-bound Markov chains are,
respectively,
higher and lower than the mean hitting times of the original epidemic.
Proofs that they are in fact bounds are straightforward.

We can see that the form of both \eqref{eq:ub-rates} for the
upper-bound Markov chain and \eqref{eq:lb-rates} for the
lower-bound Markov chain can be captured using a rate coefficient
\(\gamma(\cdot)\) as follows.
\begin{align}
&X(t) \to X(t)+1\ \text{at rate}\ \gamma(X(t))X(t), \nonumber\\
&X(t) \to X(t)-1\ \text{at rate}\ \delta X(t).
\label{eq:rates}
\end{align}
Any results we derive for a general \(\gamma(\cdot)\) apply for both the
upper-bound and lower-bound Markov chains.
So we now derive bounds for the hitting times of a general Markov chain
satisfying \eqref{eq:rates}.

Let \(T_n\) be  the time it takes for the infection to go to \(0\) infections starting
from \(n\) infections.
Starting from \(n\) infections,
the probability that the system given by \eqref{eq:rates} goes to \(n+1\) infections next
(instead of \(n-1\) infections) is given by
\(\frac{\gamma(n)}{\gamma(n)+\delta}\).
Similarly, the probability that the system goes to \(n-1\) infections
next after \(n\) infections is given by \(\frac{\delta}{\gamma(n)+\delta}\).
This gives us
\begin{align*}
\ensuremath{\mathbb{E}}[T_n] &=
\ensuremath{\mathbb{E}}[T_{n+1}]\frac{\gamma(n)}{\gamma(n)+\delta} + \ensuremath{\mathbb{E}}[T_{n-1}]\frac{\delta}{\gamma(n)+\delta} + \ensuremath{\mathbb{E}}[\tau_n],
\end{align*}
where \(\tau_n\) is the time it takes to make the next transition from \(n\) infections.
Using \(\ensuremath{\mathbb{E}}[\tau_n]=\frac{1}{n(\gamma(n)+\delta)}\), rearranging the terms,
and replacing
\(n\) with \(n-1\) throughout, we get
\begin{align*}
\ensuremath{\mathbb{E}}[T_{n}] &= \ensuremath{\mathbb{E}}[T_{n-1}]\tfrac{\gamma(n-1)+\delta}{\gamma(n-1)} - \ensuremath{\mathbb{E}}[T_{n-2}]\tfrac{\delta}{\gamma(n-1)}
- \tfrac{1}{(n-1)\gamma(n-1)}
\end{align*}
for \(n \ge 2\).
Defining \(S_n = \ensuremath{\mathbb{E}}[T_n]-\ensuremath{\mathbb{E}}[T_{n-1}]\) yields
\begin{align}
S_{n+1}\gamma(n) - S_{n}\delta = -\frac{1}{n}
\label{eq:sn-recursion}
\end{align}
for \(n \ge 1\) with \(S_1=\ensuremath{\mathbb{E}}[T_1]\).

So if we can find \(\ensuremath{\mathbb{E}}[T_1]\), we will be able to compute all the
mean hitting times (not necessarily in closed form).
To compute \(\ensuremath{\mathbb{E}}[T_1]\), we compute the steady-state probability in
state \(0\) of
the transformed Markov chain in Fig.~\ref{fig:modified-markov},
whose hitting times are the same as the required Markov chain in \eqref{eq:rates}.
The modification we have done to the Markov chain in \eqref{eq:rates}
is the addition of the extra transition out of the zero state with a rate
\(\theta\).
This does not change the hitting time from any nonzero state since the
time it takes to reach the zero state for the first time is
independent of the rate of transition out of the zero state.
However, the transformation gives us a positive-recurrent Markov chain,
for which the steady-state probabilities are well-defined and non-trivial.
Further, the mean hitting times are independent of the birth rate from \(0\), \(\theta\).

\begin{figure*}[t!]
\begin{center}
\resizebox{0.8\textwidth}{!}{
    \begin{tikzpicture}[>=stealth,thick]
        \tikzset{minimum size=3em}
        \node (0) [circle, draw] {0};
        \node (1) [right=3em of 0, circle, draw] {1};
        \node (2) [right=3em of 1, circle, draw] {2};
        \node (dot) [right=3em of 2, circle] {\(\cdots\)};
        \path (0)
            edge[bend left, ->, magenta] node [above]
                                    {\textcolor{magenta}{\(\theta\)}} (1)(1)
            edge[bend left, ->] node [above] {\(\gamma(1)\)} (2)(2)
            edge[bend left, ->] node [above] {\(2\gamma(2)\)} (dot);
        \path (dot)
            edge[bend left, ->] node [pos=0.5, below] {\(3\delta\)} (2)(2)
            edge[bend left, ->] node [below] {\(2\delta\)} (1)(1)
            edge[bend left, ->] node [below] {\(\delta\)} (0);
        \node (n) [right=3em of dot, circle, draw] {\(n-1\)};
        \node (n1) [right=3em of n, circle, draw] {\(n\)};
        \node (lastdot) [right=3em of n1, circle] {\(\cdots\)};
        \path (dot)
            edge[bend left, ->] node [above] {} (n)(n)
            edge[bend left, ->] node [above] {\((n-1)\gamma(n-1)\)} (n1)(n1)
            edge[bend left, ->] node [above] {} (lastdot);
        \path (lastdot)
            edge[bend left, ->] node [below] {} (n1)(n1)
            edge[bend left, ->] node [below] {\(n\delta\)} (n)(n)
            edge[bend left, ->] node [below] {} (dot);
    \end{tikzpicture}
}
\caption{Modified Markov chain with same mean hitting times as the Markov
chain in \eqref{eq:rates}.
Adding \(\theta\) does not change the hitting times, but makes the chain
positive-recurrent.}
\label{fig:modified-markov}
\end{center}
\end{figure*}

Let \(\pi_n\) be the steady-state probability of finding the chain in node \(n\).
Local balance between node \(n-1\) and node \(n\) gives
\begin{align*}
\pi_{n-1}(n-1)\gamma(n-1) = \pi_nn\delta,
\end{align*}
which on expanding out yields
\begin{align*}
\pi_n &=
\theta\pi_0\frac{\gamma(1)\gamma(2)\cdots\gamma(n-1)}{n\delta^n},
\end{align*}
for \(n \ge 1\).
Using \(\sum_{n=0}^\infty\pi_n=1\), we get
\begin{align}
\pi_0\left(
1 + \theta\left(
\frac{1}{\delta} + \frac{\gamma(1)}{2\delta^2} + \frac{\gamma(1)\gamma(2)}{3\delta^3} +
\cdots
\right)
\right)
=1.
\label{eq:pi0}
\end{align}
From renewal theory (see \cite[Chapter~7]{Ross2019}), we have
\begin{align*}
\pi_0 = \frac{\ensuremath{\mathbb{E}}[\tau_0]}{\ensuremath{\mathbb{E}}[\tau_0]  + \ensuremath{\mathbb{E}}[T_1]}.
\end{align*}
Since the rate of transition out of the zero state
(in the modified Markov chain) is \(\theta\),
\(\ensuremath{\mathbb{E}}[\tau_0]=\frac{1}{\theta}\), and this  gives
\begin{align*}
\ensuremath{\mathbb{E}}[T_1] = \frac{1}{\theta}\left(\frac{1}{\pi_0}-1\right).
\end{align*}
Substituting the expression for \(\pi_0\) from \eqref{eq:pi0} implies the following claim.
\begin{claim}
\label{claim:t1-gamma}
The mean hitting time from one infected agent to zero infected agents is given by
\begin{align*}
{
    \ensuremath{\mathbb{E}}[T_1] = \frac{1}{\delta}\sum_{i=1}^\infty \frac{1}{i}\frac{\prod_{j=1}^{i-1}\gamma(j)}{\delta^{i-1}}
}
\end{align*}
whenever the Markov chain in Fig.~\ref{fig:modified-markov} is positive
recurrent.
\end{claim}

Our goal in this section has been to compute the
asymptotic mean hitting times
when \(\beta_\infty\) and \(\beta^\textsc{int}_\infty\) are \(0\).
These conditions translate to \(\lim_{n\to\infty}\gamma(n)=0\) for both
the upper-bound Markov chain \eqref{eq:ub-rates} and the lower-bound
Markov chain \eqref{eq:lb-rates}.
We get there by first computing the (asymptotic) mean hitting times when
\(\gamma(n)=\alpha\), which we do in the next subsection.

\subsection{Hitting time bounds when \(\gamma(\cdot)\) is a constant}

Substituting \(\gamma(n)=\alpha\) in the expression for \(\ensuremath{\mathbb{E}}[T_1]\) in
Claim~\ref{claim:t1-gamma}, we get
\begin{align}
{
\ensuremath{\mathbb{E}}[T_1] = \frac{1}{\delta}\sum_{i=1}^\infty \frac{1}{i}\left(\frac{\alpha}{\delta}\right)^{i-1}
}
\label{eq:t1-alpha}
\end{align}
and expanding out \eqref{eq:sn-recursion} for \(\gamma(n)=\alpha\)
gives us
\begin{align*}
S_n = S_{n-1}\frac{\delta}{\alpha} - \frac{1}{\alpha(n-1)}\qquad\quad \\
\end{align*}
\vspace{-3em}
{
\begin{align*}
\qquad\qquad&= \frac{\delta^2}{\alpha^2}S_{n-2} - \frac{\delta}{\alpha^2(n-2)} - \frac{1}{\alpha(n-1)} \\
&\ \ \vdots \\
&= \frac{\delta^{n-1}}{\alpha^{n-1}}\left(
S_1 - \frac{1}{\delta}\sum_{i=1}^{n-1}\frac{1}{i}\left(\frac{\alpha}{\delta}\right)^{i-1}
\right)
\end{align*}
}
Since \(S_1=\ensuremath{\mathbb{E}}[T_1]\) by definition, substituting the expression from
\eqref{eq:t1-alpha} gives us
{
\begin{align*}
S_n &=
\frac{\delta^{n-1}}{\alpha^{n-1}}\cdot\frac{1}{\delta}\sum_{i=n}^\infty\frac{1}{i}\left(\frac{\alpha}{\delta}\right)^{i-1} \\
&= \frac{1}{\delta n}\sum_{i=0}^\infty\frac{n}{n+i}\left(\frac{\alpha}{\delta}\right)^{i},
\end{align*}
}
and since \(\frac{n}{n+r}<1\) for all positive integers \(r\), we get
\begin{align*}
\frac{1}{\delta n}\ \le\ &S_n\ \le\ \frac{1}{(\delta-\alpha)n},
\end{align*}
using the geometric series \(1+\frac{\alpha}{\delta}+\frac{\alpha^2}{\delta^2}+\cdots=\frac{\delta}{\delta-\alpha}\),
which implies
\begin{align*}
\frac{1}{\delta}\sum_{i=1}^n\frac{1}{i}\ \le\ &\ensuremath{\mathbb{E}}[T_n]\ \le\ \frac{1}{\delta-\alpha}\sum_{i=1}^n\frac{1}{i}.
\end{align*}
This directly leads us  to the following claim.
\begin{claim}
When the per-person infectiousness is given by \(\gamma(n)=\alpha\) for
all \(n\) for some
\(\alpha\in(0,\delta)\), the mean hitting time to go
to zero infections starting from \(n\) infections satisfies
\begin{align*}
\frac{\ln (n+1)}{\delta} \ \ \le\ \ \ensuremath{\mathbb{E}}[T_n]\ \ \le\ \ \frac{1 + \ln n}{\delta-\alpha}.
\end{align*}
\label{claim:tn-constant}
\end{claim}

\subsection{When \(\lim_{n\to\infty}\gamma(n)=0\)}

When the infectiousness functions \(\beta(\cdot)\)
and \(\beta^\textsc{int}(\cdot)\) go to zero, i.e.,
\(\beta_\infty=0\) and \(\beta^\textsc{int}_\infty=0\),
the \(\gamma(\cdot)\) for both the upper-bound Markov chain in
\eqref{eq:ub-rates} and the
lower-bound Markov chain in \eqref{eq:lb-rates} go to zero.
Hence, if we can derive the asymptotic mean hitting time for
\(\lim_{n\to\infty}\gamma(n)=0\), it will give us matching asymptotes
for the upper and lower bounds,
which means we have the exact asymptote.

We will show that for any arbitrarily small \(\alpha\), we can use
Claim~\ref{claim:tn-constant} to show that the asymptote for \(\ensuremath{\mathbb{E}}[T_n]\) is
arbitrarily close to \(\frac{\ln n}{\delta}\).
We state this formally as Theorem~\ref{thm:log-hitting}.
\begin{theorem}
If \(\lim_{n\to\infty}\gamma(n)=0\), then the mean hitting times of
the Markov chain in Fig.~\ref{fig:modified-markov} satisfy
\begin{align*}
\lim_{n\to\infty}\frac{\delta\ensuremath{\mathbb{E}}[T_n]}{\ln n} = 1.
\end{align*}
\label{thm:log-hitting}
\end{theorem}

Before proving Theorem~\ref{thm:log-hitting}, let us first state a
claim which will be useful.
\begin{claim}
If \(\lim_{n\to\infty}\gamma(n)=0\), then for any \(\epsilon > 0\),
the Markov chain  in Fig.~\ref{fig:modified-markov} satisfies
\begin{align*}
\frac{\ln (n+1)}{\delta} \le \ensuremath{\mathbb{E}}[T_n] \le \frac{\ln n}{\delta - \epsilon} + h(\epsilon)\quad \text{for all}\ n,
\end{align*}
for some function \(h(\epsilon)\) that is independent of \(n\).
\label{claim:epsilon-bound}
\end{claim}
\begin{IEEEproof}
Please see Appendix~\ref{appendix:epsilon-bound}.
\end{IEEEproof}

We are now ready to prove Theorem~\ref{thm:log-hitting}.
\begin{IEEEproof}[Proof of Theorem~\ref{thm:log-hitting}]
Proving \(\lim_{n\to\infty}\frac{\delta\ensuremath{\mathbb{E}}[T_n]}{\ln n}=1\) is equivalent
to proving that for any \(\epsilon > 0\), we can find an \(n_\epsilon\)
such that \(\left|\frac{\delta\ensuremath{\mathbb{E}}[T_n]}{\ln n}-1\right| < \epsilon\) for
all \(n > n_\epsilon\) (from the definition of limit \cite{ThomasF1996}).

For any \(\epsilon\), substitute
\(\min\left(\frac{\epsilon\delta}{4}, \frac{\delta}{2}\right)\) for
\(\epsilon\) in Claim~\ref{claim:epsilon-bound}.
This gives us
\begin{align*}
\frac{\delta\ensuremath{\mathbb{E}}[T_n]}{\ln n} - 1 \le \frac{\epsilon}{2} +
\frac{\delta\max\left(h\left(\frac{\epsilon\delta}{4}\right),h\left(\frac{\delta}{2}\right)\right)}{\ln n}.
\end{align*}
For sufficiently large \(n\), we get
\begin{align*}
\frac{\delta\ensuremath{\mathbb{E}}[T_n]}{\ln n} - 1 < \epsilon.
\end{align*}

Further, from the lower bound in Claim~\ref{claim:epsilon-bound}, we get
\begin{align*}
\frac{\delta\ensuremath{\mathbb{E}}[T_n]}{\ln n}-1 \ge \frac{\ln (n+1)}{\ln n}-1.
\end{align*}
For a sufficiently large \(n\), \(\frac{\ln(n+1)}{\ln n}-1\)
can be made arbitrarily close to \(0\).
Thus we get
\begin{align*}
\left|\frac{\delta\ensuremath{\mathbb{E}}[T_n]}{\ln n}-1\right| < \epsilon
\end{align*}
for all sufficiently large \(n\), which concludes the proof.
\end{IEEEproof}

\subsection{Putting it together for the original epidemic on \(\mathcal{G}\)}

For both the upper-bound Markov chain in \eqref{eq:ub-rates} and
the lower-bound Markov chain in \eqref{eq:lb-rates}, the
infectiousness per person goes to zero if both \(\beta(\cdot)\) and
\(\beta^\textsc{int}(\cdot)\) go to zero as \(n \to \infty\).
Since Theorem~\ref{thm:log-hitting} applies for any chain with
\(\lim_{n\to\infty}\gamma(n)=0\), both these upper- and lower-bound
Markov chains satisfy Theorem~\ref{thm:log-hitting}.
Since both these chains have the same asymptote, by sandwiching,
even the original epidemic
on \(\mathcal{G}\) must have the same asymptote.
This gives us the following corollary.
\begin{corollary}
If \(\lim_{n\to\infty}\beta(n)=0\) and \(\lim_{n\to\infty}\beta^\textsc{int}(n)=0\), then for any locality graph \(\mathcal{G}\), we have
\begin{align*}
\lim_{n \to \infty}\frac{\delta\ensuremath{\mathbb{E}}[T_n]}{\ln n} = 1,
\end{align*}
where \(T_n\) is the time taken by the epidemic to go from a cumulative
of \(n\) infections in the system to \(0\).
\label{cor:graph-hitting}
\end{corollary}
Corollary~\ref{cor:graph-hitting} implies that if the per-person
infectiousness functions go to zero asymptotically, i.e., if the
(non-pharmaceutical) precautions get arbitrarily more stringent as the
number of cases increases, then the mean hitting times have the asymptote
\(\frac{\ln n}{\delta}\) independent of the locality graph.

\section{Spectral Radius of Sum of Symmetric and Diagonal Matrices}
\label{appendix:weyl-proof}

In this appendix, we prove a special case of Weyl's inequality which
suffices for the purposes of this paper.
We state this formally in Claim~\ref{claim:weyl-special}.
\begin{claim}
Let \(P\) be any nonnegative symmetric matrix and
\(Q\) be any nonnegative diagonal matrix.
Then
\begin{align*}
\rho(P) + \min_i Q_{ii} \le \rho(P+Q) \le \rho(P) + \max_i Q_{ii},
\end{align*}
where \(\rho(\cdot)\) denotes the spectral radius.
\label{claim:weyl-special}
\end{claim}
\begin{IEEEproof}
Recall that the spectral radius of a matrix is the maximum absolute
value of the eigenvalues of the matrix.
For symmetric matrices, the eigenvalues are all real, and
since \(P\) and \(Q\) are nonnegative, the Perron-Frobenius theorem ensures
that there is a positive eigenvalue which has the maximum absolute value.
Thus we have
\begin{align*}
\rho(P+Q) &= \max_{\lVert \mathbf{x} \rVert=1}{\mathbf{x}^\top (P+Q) \mathbf{x}}
= \max_{\lVert \mathbf{x} \rVert=1}\left(\mathbf{x}^\top P \mathbf{x} + \mathbf{x}^\top Q \mathbf{x}\right).
\end{align*}
Let \(\tilde{\mathbf{x}}\) be the unit vector \(\mathbf{x}\) which maximizes
\(\mathbf{x}^\top P \mathbf{x}\), i.e.,
\(\rho(P)=\max_{\lVert \mathbf{x} \rVert=1}\mathbf{x}^\top P \mathbf{x}
=\tilde{\mathbf{x}}^\top P \tilde{\mathbf{x}}\).
This gives
\begin{align*}
\max_{\lVert \mathbf{x} \rVert=1}\left(\mathbf{x}^\top P \mathbf{x} + \mathbf{x}^\top Q \mathbf{x}\right)
&\ge \tilde{\mathbf{x}}^\top P \tilde{\mathbf{x}} + \tilde{\mathbf{x}}^\top Q \tilde{\mathbf{x}} \\
&\ge \rho(P) + \min_i Q_{ii},
\end{align*}
where the second inequality follows since \(\min_iQ_{ii}\) is
the least value of \(\mathbf{x}^\top Q \mathbf{x}\) subject to \(\lVert \mathbf{x} \rVert=1\) since \(Q\) is a diagonal matrix.
This proves the lower bound of Claim~\ref{claim:weyl-special}.

For the upper bound, we have
\begin{align*}
\max_{\lVert \mathbf{x} \rVert=1}\left(\mathbf{x}^\top P \mathbf{x} +
\mathbf{x}^\top Q \mathbf{x}\right)
&\le
\max_{\lVert \mathbf{x} \rVert=1} \mathbf{x}^\top P \mathbf{x}
+\max_{\lVert \mathbf{x} \rVert=1} \mathbf{x}^\top Q \mathbf{x} \\
&\le \rho(P) + \max_i Q_{ii},
\end{align*}
which concludes the proof.
\end{IEEEproof}


Local Maxima of Quadratic Boolean Functions

Abstract: How many strict local maxima can a real quadratic function on $\{0,1\}^n$ have? Holzman conjectured a maximum of $n \choose \lfloor n/2 \rfloor$. The aim of this paper is to prove this conjecture. Our approach is via a generalization of Sperner's theorem that may be of independent interest.

\section{Introduction}
Let $\Theta$ be a real quadratic function (polynomial of total degree $\le 2$) in $n$ variables $x_1,\ldots x_n$. A \textit{strict local maximum} (or just \textit{local maximum}) of $\Theta$ on the discrete cube $Q_n=\{0,1\}^n$ is a point whose value is strictly larger than all of its neighbors.
As we are only concerned with the value of $\Theta$ on $Q_n$, we may assume when convenient that all terms are of degree 2, as the constant term is irrelevant, and we can replace $x_i$ with $x_i^2$ if necessary.
In this paper, we prove the following conjecture attributed to Ron Holzman (see \cite[p.~3]{problem}):
\begin{thm1}
Let $\Theta$ be a quadratic function on $Q_n$. Then $\Theta$ has at most $n \choose \lfloor n/2 \rfloor$ local maxima.
\end{thm1}
This bound is attained for example when $\Theta=-(x_1+\ldots +x_n-\lfloor n/2 \rfloor)^2$.

From this, we can deduce the following:
\begin{cor2}
A (possibly degenerate) parallelepiped in $\mathbb{R}^n$ can have at most $n \choose \lfloor n/2 \rfloor$ vertices that are strictly closer to the origin than all of their neighbors.
\end{cor2}
\begin{proof}
Let $\Theta$ be the form $-\sum x_i^2$; we are counting strict local maxima of $\Theta$ on the parallelepiped. As being a strict local maximum is clearly an open condition, we may perturb the sides so that the parallelepiped is not degenerate. There is an affine transformation $\tau$ taking this parallelepiped to $Q_n$, so composing $\Theta$ with $\tau^{-1}$, we are done by Theorem 1.
\end{proof}
[We remark in passing that Corollary 2 implies the Littlewood-Offord theorem of Kleitman \cite{kleitman}. Indeed, the theorem is equivalent to showing that the number of vertices of a parallelepiped with all side lengths at least $2$ that can land in the interior of a disc of radius $1$ is at most $n \choose n/2$. The result follows by noting that a vertex landing inside the disc must have all neighbors outside of the disc, hence farther from the disc's center.]

Let $[n]=\{1,2,\ldots n\}$, and let $\Delta$ denote symmetric set difference. We define the upper $i$th level of a family of subsets $\mathcal{F}$ of $[n]$ as $$\mathcal{F}^{i+}=\{A \subseteq [n] : i \not\in A, A \cup \{i\} \in \mathcal{F}\},$$ and the lower $i$th level as $$\mathcal{F}^{i-}=\{A \subseteq [n] : i \not\in A, A \in \mathcal{F}\}.$$
Finally, for a subset $S \subseteq [n]$, we define $\mathcal{F}\Delta S$ be the family of sets $A \Delta S$ for all $A \in \mathcal{F}$.

We will find that a key step is to prove the following combinatorial result:
\begin{thm3}
Given $S_i \subseteq [n]$ for $i=1,2,\ldots, n$,  and a family of subsets $\mathcal{F}$ such that, for each $i$, no element of $(\mathcal{F}\Delta S_i)^{i+}$ contains an element of $(\mathcal{F} \Delta S_i)^{i-}$, then $|\mathcal{F}| \le {n \choose\lfloor n/2\rfloor}$.
\end{thm3}
Theorem 3 is perhaps interesting in its own right, because it gives a generalization of Sperner's theorem (which is the case when all $S_i=\emptyset$).

At the end of the paper, we analyze the cases of when the form attains the maximum number of local maxima. It turns out our method allows us not only to deduce the structure of the quadratic function when we attain equality, but also when we are within $\frac{1}{n}{n \choose \lfloor n/2 \rfloor}$ of the optimal solution $n \choose \lfloor n/2 \rfloor$. We do not know how close this bound of $\frac{1}{n}{n \choose \lfloor n/2 \rfloor}$ is to being optimal.

This paper is self-contained. See \cite{bela} for general background on set systems and Sperner's theorem.
\section{Proof}
 We frequently view the discrete cube as the family of all subsets of $[n]$ in the obvious way (using the $x_i$ as indicator functions). Assuming all terms of $\Theta$ are of degree 2 (so that it is a quadratic form), we have its associated symmetric matrix $(q_{ij})$, where $\Theta(x_1,\ldots, x_n)=\sum_{i,j} q_{ij}x_ix_j$.

There are $2^n$ graph automorphisms one gets by taking some subset $S$ of $[n]$, and replacing each $A \subseteq [n]$ by $A\Delta S$: we preserve the quadratic form by replacing $x_i$ by $1-x_i$ for all $i \in S$. When we apply such an automorphism we will say we are ``changing the origin", or ``changing the base", since this is how one can view such an action geometrically (after suitable changes of signs).

\subsection{Proof that Theorem 3 implies Theorem 1}
By perturbing the form slightly, we may assume all $q_{ij}$ are nonzero.
We note first that changing the origin to $B=(b_1,\ldots, b_n)$ has the effect on the off-diagonal entries of $(q_{ij})$ of flipping the signs in the $i$th row and column for all $i$ with $b_i=1$ (so leaving unchanged any off-diagonal $q_{ij}$ with $b_i=b_j=1$). The behaviour of the diagonal entries is more complicated, and does not need to be considered.

The difference between the value of $\Theta$ on the $x_i=1$ plane and the $x_i=0$ plane as a function of the remaining coordinates is given by the linear function $2\sum_{j \ne i} q_{ij}x_i+q_{ii}$. Changing the origin to $S_i$, where $S_i$ is the set of all $j \ne i$ with $q_{ij}$ positive, we can assume $q_{ij}<0$ for all $j \ne i$. In this new coordinate system associated to $S_i$, we cannot have $B$ in the $x_i=1$ plane containing $C$ in the $x_i=0$ plane, with both $B,C$ local maxima. This is because $B$ being a local maximum means we must have $2\sum_{j \ne i} q_{ij}b_j+q_{ii}>0$ and $C$ being a strict local maximum means $2\sum_{j \ne i} q_{ij}c_j+q_{ii}<0$, so we get $2\sum_{j \ne i} q_{ij} (b_j-c_j)>0$, which is clearly false.

Also, $B$ containing $C$ in the $S_i$-coordinate system is equivalent in the original coordinate system to the statement $B \Delta S_i \supseteq C \Delta S_i$. Hence we have reduced to Theorem 3.
\subsection{Proof of Theorem 3}
Inspired by Kleitman's proof of the Littlewood-Offord problem \cite{kleitman} (or see \cite[Ch.4]{bela} for general background), we seek a ``symmetric quasichain decomposition" of $[n]$ (described below), where a ``quasichain" will be a family with some property $P$ which implies at most one member of $\mathcal{F}$ lies inside it. The heart of this proof is the definition of a ``quasichain", which allows this method to go through. The definition is rather surprising and seems contrived, however as we will see, once we have this definition the proof is straightforward.

A ``symmetric quasichain decomposition" in this case will then be a decomposition of the $n$-cube inductively built up from the $1$-cube by taking the quasichain decomposition of the $k$-cube, duplicating each quasichain with $k+1$ added to each set, then removing precisely one set from each duplicate and adding it to the original in such a way that the new families formed remain quasichains. It is not hard to prove (or see \cite[p.~17-20]{bela}) that this process will result in exactly $n \choose \lfloor n/2 \rfloor$ quasichains, as required.

For sets $B,C \subseteq [n]$, we write $B \supseteq_{S_i} C$ to mean $B \Delta S_i \supseteq C \Delta S_i$.

We define a \textit{quasichain} to be a colored tournament (with colors in $[n]$) on a family of subsets $\mathcal{G}=\{G_1,\ldots G_k\}$ of $[n]$, such that

\begin{enumerate}[i)]
\item Whenever there is a directed edge from $G_x$ to $G_y$ of color $i$, then $i \in G_x\Delta S_i$, $i \not \in G_y\Delta S_i$, and $ G_x \supseteq_{S_i} G_y$.
\item For any subset of the colors (including the empty set), if we swap the direction of edges associated to those colors, then the resulting tournament is acyclic (or equivalently transitive).
\end{enumerate}

It is easy to check that the acyclicity condition is equivalent to saying that no triangle has 3 distinct colors, any monochromatic triangle is acyclic, and any triangle with 2 distinct colors has the 2 edges with the same color either both leaving, or both entering, the same vertex.

Note that a quasichain does \textit{not} contain all possible information about $\supseteq_{S_i}$ contaiment between its various members, but rather remembers only one such containment for every pair (just enough information to guarantee that at most one element from the pair can be a local maximum from the condition in the theorem).

We write $G_x \to^i G_y$ when there is an edge from $G_x$ to $G_y$ of color $i$. Sometimes we will reduce to the case $i \not \in S_i$, in which case $G_x \to^i G_y$ implies $i \in G_x$, $i \not\in G_y$, and $G_x \supseteq_{S_i} G_y$.
\begin{proof}
Note that for a fixed family $\mathcal{F}$, the hypothesis of the theorem is easily checked to be invariant under base-change by an arbitrary subset $A$ (i.e. taking $F \to \mathcal{F}\Delta A$ and $S_i \to S_i \Delta A$). It is also invariant replacing $S_i$ by $S_i^c$ for any $i$, so in particular we may assume that $i \not\in S_i$ for all $i$. Also note that given a quasichain $\mathcal{G}$, it remains a quasichain after replacing $S_i$ by $S_i^c$ if one swaps the directions of all $i$-colored edges (this is the reason we need the acyclicity condition in the induction hypothesis, so that complementing the $S_i$ preserves the property of being a quasichain).

If we have a quasichain $\mathcal{G}$, then base-changing to $A$ followed by complementing every $S_i$ for which  $i \in S_i$ has the following effect: each $S_i$ is changed to $S_i\Delta A$ if $i \not\in A$ or $(S_i \Delta A)^c$ otherwise, $G_i$ turns into $G_i\Delta S_i$, and the direction of all $i$-colored arrows are swapped if $i \in A$. (We remark for motivation that this net effect is equivalent to what happens when we base-change by $A$ in the quadratic form case, where $S_j=\{i \ne j : q_{ij}>0\}$, as the complementation is ``built in" to the definition of $S_j$).

Given $S_1,\ldots, S_n$, assume by induction we have a symmetric quasichain decomposition for $Q_{n-1}$ (using colors in $[n-1]$) associated to the sets $S_i \cap \{1,\ldots, n-1\}$ for $i=1,\ldots, n-1$.  We will produce from this a symmetric quasichain decomposition for $Q_n$ (using colors in $[n]$) associated to the sets $S_i$ for $i=1,\ldots, n$. By base-changing with resect to $\{i : n \in S_i\}$, and complementing as described above, we can assume without loss of generality that $i \not \in S_i$ and $n \not\in S_i$, for $i=1,\ldots,n$.

Note that if we treat a quasichain $\mathcal{C}$ in $Q_{n-1}$  as a quasichain in $Q_n$, then it remains a quasichain (obviously), and if we add $n$ to each set in $\mathcal{C}$ (denoted $\mathcal{C}+n$), then this is also a quasichain. By the standard symmetric quasichain construction discussed previously, it suffices to show that there exists an element of $\mathcal{C}+n$ which we can remove from it and add to $\mathcal{C}$ such that the two newly constructed directed graphs are quasichains.

As $\mathcal{C}$ is acyclic, it has a maximal element $A$. A subgraph of a quasichain is clearly a quasichain, so $\mathcal{C}+n-\{A+n\}$ is a quasichain (here minus means we remove $A+n$ from the quasichain). Thus it suffices to show that $\mathcal{C}+\{A+n\}$ is in fact a quasichain once we appropriately color edges containing $A+n$.

If $A \supseteq_{S_i} B$, then since $n \not\in S_i$, we have $A+n \supseteq_{S_i} A \supseteq_{S_i} B$, so by transitivity of $\supseteq_{S_i}$, we have $A+n \supseteq_{S_i} B$. Thus if $A \to^i B$, then $i\not\in B$, and $i \in A$, so clearly $i \in A+n$, and we may set $A+n \to^i B$.
Also, as both $n \not\in S_n$ and $n \not\in A$, we may also set $A+n \to^n A$.

Thus it suffices to show that the newly constructed graph satisfies the acyclicity condition. After swapping some directions associated to a subset of the colors, we have a tournament $H$, with vertices $x$, $y$ corresponding to $A$, $A+n$ respectively. For all $z$ then, we have either $x \to z$, $y\to z$, or $z\to x$, $z \to y$. If we have a cycle, then identifying $x$ and $y$ yields a cycle in the original graph (since $x$ and $y$ have the same incoming/outgoing edges, this identification is well-defined), which is a contradiction.
\end{proof}
\tikzset
{
	e1/.style=
	{
		red
	},
	e2/.style=
	{
		blue
	},
	e3/.style=
	{
		black
	},
	e4/.style=
	{
		purple
	},
	e5/.style=
	{
		orange
	},
}
\section{Analysis of the quadratic form close to equality}

From now on, we are working with the $S_j$ associated to a quadratic form $\Theta$ (recall we defined $S_j=\{i \ne j : q_{ij}>0\}$). Then $i \not \in S_i$, $i \in S_j$ if and only if $j \in S_i$, and these properties are invariant under base-change. Base-change by $S_1$ so that $S_1=\emptyset$. We will show that if all $S_i$ are not the empty set (i.e. in this coordinate system there is an off-diagonal entry which is positive), then we are bounded away from the optimal solution by a factor of $\frac{1}{n}$. Indeed, suppose without loss of generality $S_2$ contains 3. Then $S_3$ contains 2, so the intersections with $\{1,2,3\}$ of $S_1,S_2,S_3$ are $\emptyset, \{3\},\{2\}$ respectively. The first three stages yield the quasichain decomposition below (in bold lines):

\begin{tikzpicture}[->,>=stealth',node distance=3cm,
  thick,main node/.style={circle,draw,font=\sffamily\Large\bfseries}]

  \node[main node] (0) {$\emptyset$};
  \node[main node] (1) [right of=0] {1};
  \node[main node] (12) [below of=0] {12};
  \node[main node] (13) [right of=12] {13};
  \node[main node] (3) [right of=1] {3};
  \node[main node] (123) [below of=3] {123};
  \node[main node] (2) [right of=3] {2};
  \node[main node] (23) [below of=2] {23};

  \path[every node/.style={rectangle,draw, fill=white, font=\sffamily\small, pos=0.2}]
	(1)	edge[e1] node {1} (0)
	(12)	edge[e1] node {1} (0)
		edge[e2] node {2} (1)
		edge[e2] node {2} (13)
	(13)	edge[e3] node {3} (1)
		edge[e1] node {1} (0);
    \path[every node/.style={rectangle,draw, fill=white, font=\sffamily\small, pos=0.2}]
	(3)	edge[e3,dashed] node {3} (2)
	(123)	edge[e1] node {1} (3)
		edge[e1,dashed] node {1} (2)
		edge[e1,dashed] node {1} (23)
	(23)	edge[e2,dashed] node {2} (3)
		edge[e3] node {3} (2);
\end{tikzpicture}

Using the dotted lines, we see that we can ``glue" together two of these quasichains to make a single quasichain. We want to understand the ``evolution" of this quasichain as it goes through the symmetric chain algorithm. We know that a 2-quasichain after $k$ steps becomes $k+1 \choose \lfloor (k+1)/2 \rfloor$ quasichains. As it evolves into a 4-quasichain plus two 2-quasichains after two steps, if $g(k)$ is the number of quasichains the 4-quasichain evolves into after $k$ steps, it satisfies
$${k+3 \choose \lfloor (k+3)/2 \rfloor}=2{k+1 \choose \lfloor (k+1)/2 \rfloor}+g(k).$$
After we reach $n$-dimensions therefore, these two 4-quasichains will have evolved to
$$2g(n-3)=2{n \choose \lfloor n/2 \rfloor}-4{n-2 \choose \lfloor (n-2)/2 \rfloor}.$$
The difference between the actual bound and this is
$$4{n-2 \choose \lfloor (n-2)/2 \rfloor}-{n \choose \lfloor n/2 \rfloor},$$
which is equal to $$\frac{1}{n-c}{n \choose \lfloor n/2 \rfloor}$$
where $c$ is 0 or 1 depending on whether $n$ is odd or even respectively.

If every $S_i$ is in fact empty, then the condition the $S_i$ create is precisely the normal antichain condition, so the family creates an actual antichain.
Thus we have the following:
\begin{thm4}
If the number of local maxima of a quadratic function on $Q_n$ is greater than $(1-\frac{1}{n-c}){n\choose n/2}$, where $c=0,1$ if $n$ is odd/even respectively, then there is an automorphism of $Q_n$ such that after applying it, the local maxima form an antichain.
\end{thm4}

\section{Acknowledgements}
I would like to thank Imre Leader for helpful conversations. I would also like to thank Trinity College, Cambridge for providing me with financial support.