Competitive epidemic networks with multiple survival-of-the-fittest outcomes
Extracted source text · arXiv 2111.06538
% autosam.tex
% Annotated sample file for the preparation of LaTeX files
% for the final versions of papers submitted to or accepted for
% publication in AUTOMATICA.
% See also the Information for Authors.
% Make sure that the zip file that you send contains all the
% files, including the files for the figures and the bib file.
% Output produced with the elsart style file does not imitate the
% AUTOMATICA style. The style file is generic for all Elsevier
% journals and the output is laid out for easy copy editing. The
% final document is produced from the source file in the
% AUTOMATICA style at Elsevier.
% You may use the style file autart.cls to obtain a two-column
% document (see below) that more or less imitates the printed
% Automatica style. This may helpful to improve the formatting
% of the equations, tables and figures, and also serves to check
% whether the paper satisfies the length requirements.
% Please note: Authors must not create their own macros.
% For further information regarding the preparation of LaTeX files
% for Elsevier, please refer to the "Full Instructions to Authors"
% from Elsevier's anonymous ftp server on ftp.elsevier.nl in the
% directory pub/styles, or from the internet (CTAN sites) on
% ftp.shsu.edu, ftp.dante.de and ftp.tex.ac.uk in the directory
% tex-archive/macros/latex/contrib/supported/elsevier.
%\documentclass{elsart} % The use of LaTeX2e is preferred.
\documentclass[5p,sort&compress]{elsarticle}
% \documentclass[twocolumn]{autart} % Enable this line and disable the
% preceding line to obtain a two-column
% document whose style resembles the
% printed Automatica style.
% \newcounter{part} %Need this to fix cleveref package
\usepackage{amsmath} % assumes amsmath package installed
\usepackage{amssymb} % assumes amsmath package installed
\usepackage{graphicx} % Include this line if your
% document contains figures,
% Additions from previous document:
\usepackage{tabulary}
% \usepackage{cleveref}
\usepackage[english]{babel}
\usepackage{blindtext}
\usepackage[makeroom]{cancel}
\usepackage{amsfonts}
\usepackage{amsthm} %This is for proofs
%\usepackage[pdftex]{graphicx}
%\usepackage[dvips]{epsfig} % or this line, depending on which
% you prefer.
% declare the path(s) where your graphic files are
\graphicspath{{../pdf/}{../jpeg/}}
% and their extensions so you won't have to specify these with
% every instance of \includegraphics
\DeclareGraphicsExtensions{.pdf,.jpeg,.png}
%\usepackage{mcode}
%\usepackage[framed,numbered,autolinebreaks]{mcode}
%\lstset{breakatwhitespace=false}
% correct bad hyphenation here
\usepackage{pgf,tikz}
\usepackage{tabularx}
\usepackage{float}
% \usepackage{cite}
\usepackage{subcaption}
\usepackage{enumitem} % To reference numbered items
\usepackage{bbm} % This is for \mathbb for lower case letters
\usepackage{url}
\usepackage[strict]{changepage}
\usepackage{graphicx}% Include figure files
\usepackage{dcolumn}% Align table columns on decimal point
\usepackage{bm}% bold math
\usepackage{hyperref}
\renewcommand{\eqref}[1]{Eq.~(\ref{#1})} %Modified equation reference
\newcommand{\vect}[1]{\boldsymbol{#1}}
\newcommand{\mat}[1]{\boldsymbol{#1}}
\newcommand{\vt}[1]{\boldsymbol{#1}}
\newcommand{\wt}[1]{\widetilde{#1}}
\newcommand{\wh}[1]{\widehat{#1}}
\DeclareMathOperator{\sgn}{\text{sgn}}
\DeclareMathOperator{\sig}{\text{sig}}
\DeclareMathOperator{\intr}{\mathrm{Int}}
\DeclareMathOperator{\diag}{\mathrm{diag}}
\newtheorem{theorem}{Theorem}
\newtheorem{lemma}{Lemma}
\newtheorem{proposition}{Proposition}
\newtheorem{assumption}{Assumption}
\newdefinition{remark}{Remark}
%\usepackage{lipsum}
% \usepackage{subfig,tikz,pgfplots,xurl}
% \pgfplotsset{compat=newest, yticklabel style={
% /pgf/number format/fixed},
% scaled y ticks=false,
% colormap={CM}{rgb255(0cm)=(255,255,255);rgb255(2.5cm)=(156,156,255);rgb255(5cm)=(0,0,255)}}
\definecolor{mygreen}{RGB}{72,160,66}
\definecolor{myblue}{RGB}{20,155,204}
\definecolor{myyellow}{RGB}{190,170,0}
\definecolor{myviolet}{RGB}{195,8,255}
\definecolor{myred}{RGB}{204,0,0}
\definecolor{myblue}{RGB}{0,66,255}
\newcommand{\seb}[1]{%
{\leavevmode\color{blue}#1}%
}
\begin{document}
\begin{frontmatter}
\title{Competitive epidemic networks with multiple survival-of-the-fittest outcomes\tnoteref{t1,t2}} % Title, preferably not more
\tnotetext[t1]{M. Ye is supported by the Western Australian Government through the Premier's Science Fellowship Program and the Defence Science Centre. The work of A.J., S.G, and K.H.J. is supported in part by the Knut and Alice Wallenberg Foundation, Swedish Research Council under Grant 2016-00861, and a Distinguished Professor Grant.}
% than 10 words.
% \thanks[footnoteinfo]{This paper was not presented at any IFAC
% meeting. Corresponding author M. Ye (email: \texttt{mengbin.ye@curtin.edu.au}). M. Ye is supported by the Western Australian Government through the Premier's Science Fellowship Program and the Defence Science Centre. The work of A.J., S.G, and K.H.J. is supported in part by the Knut and Alice Wallenberg Foundation, Swedish Research Council under Grant 2016-00861, and a Distinguished Professor Grant.}
\author[CUR]{Mengbin Ye\corref{cor1}}
\author[ANU]{Brian D.O. Anderson}
\author[KTH]{Axel Janson}
\author[RIC]{Sebin Gracy}
\author[KTH]{Karl H. Johansson}
\cortext[cor1]{Corresponding author. Email: \texttt{mengbin.ye@curtin.edu.au}}
% \affiliation[CUR]{
% organisation={Centre for Optimisation and Decision Science, Curtin University},
% city={Perth},
% country={Australia}} % Please supply
\address[CUR]{{Centre for Optimisation and Decision Science, Curtin University, Perth, Australia}} % Please supply
% \affiliation[ANU]{
% organisation={School of Engineering, Australian National University},
% city={Canberra},
% country={Australia}}
\address[ANU]{{School of Engineering, Australian National University, Canberra, Australia}}
% full addresses
% \affiliation[KTH]{
% organisation={Division of Decision and Control Systems, School of Electrical Engineering and Computer Science, KTH Royal Institute of Technology, and Digital Futures},
% city={Stockholm},
% country={Sweden}}
\address[KTH]{{Division of Decision and Control Systems, School of Electrical Engineering and Computer Science, KTH Royal Institute of Technology, and Digital Futures, Stockholm, Sweden}}
% here.
% \affiliation[RIC]{organisation={Department of Electrical and Computer Engineering, Rice University},
% city={TX},
% country={USA}} % here.
\address[RIC]{{Department of Electrical and Computer Engineering, Rice University, TX, USA}}
\begin{keyword} % Five to ten keywords,
susceptible-infected-susceptible (SIS); bivirus; stability of nonlinear systems; monotone systems%Cicero; Catiline; orations. % chosen from the IFAC
\end{keyword}
\begin{abstract}
We use a deterministic model to study two competing viruses spreading over a two-layer network in the Susceptible--Infected--Susceptible (SIS) framework, and address a central problem of identifying the winning virus in a ``survival-of-the-fittest'' battle. Existing sufficient conditions ensure that the same virus always wins regardless of initial states. For networks with an arbitrary but finite number of nodes, there exists a necessary and sufficient condition that guarantees local exponential stability of the two equilibria corresponding to each virus winning the battle, meaning that either of the viruses can win, depending on the initial states. However, establishing existence and finding examples of networks with more than three nodes that satisfy such a condition has remained unaddressed. In this paper, we address both issues for networks with an arbitrary but finite number of nodes. We do this by proving that given almost any network layer of one virus, there exists a network layer for the other virus such that the resulting two-layer network satisfies the aforementioned condition.
% {\color{blue}A key consequence of our finding is the establishment of a strong connection between the stability of the equilibrium point corresponding to a given virus and the degree (interpreted in terms of quantity) to which it infects a population of individuals.}
To operationalize our findings, a four-step procedure is developed to reliably and consistently design one of the network layers, when given the other layer. Conclusions from numerical case studies, including a real-world mobility network that captures the commuting patterns for people between $107$ provinces in Italy, extend on the theoretical result and its consequences.
\end{abstract}
\end{frontmatter}
\section{Introduction}\label{sec:intro}
Mathematical models of epidemics have been studied extensively for over two centuries, providing insight into the process by which infectious diseases and viruses spread across human or other biological populations~\citep{hethcote2000mathematics,anderson1991_virusbook}. Models utilizing health compartments are classical, where each individual in a large population may be susceptible to the virus (S), infected with the virus and able to infect others (I), or removed with permanent immunity through recovery or death (R). Different diseases or viruses are modeled by including different compartments and specifying the possible transitions between the compartments. Two classical frameworks are Susceptible--Infected--Removed (SIR) and Susceptible--Infected--Susceptible (SIS), while further compartments can be added to reflect latent or incubation periods for the disease, or otherwise provide a more realistic description of the epidemic process. Moving beyond single populations, network models of meta-populations have also been widely studied, where each node in the network represents a large population and links between nodes represent the potential for the virus to spread between populations
% \bibliography{references,MYE_ANU}
% \end{document}
Recently, increasing attention has been directed to network models of epidemics involving two or more viruses~\citep{wang2019coevolution}. Depending on the problem scenario, the viruses may be cooperative; being infected with one virus makes an individual more vulnerable to infection from another virus~\citep{newman2013interacting,cai2015avalanche,gracy2022modeling}. Alternatively, viruses may be competitive, whereby being infected with one virus can provide an individual with partial or complete protection from also being infected with another virus.
% For competitive models centered on the SIR framework, the literature often focuses on comparing the outbreak sizes, by characterizing the final number of removed individuals for the different viruses~\citep{newman2005threshold,poletto2013host,karrer2011competing,miller2013cocirculation,funk2010interacting,ahn2006epidemic}.
For competitive models utilizing the SIS framework, a central question is whether each virus will persist over time or become extinct~\citep{sahneh2014competitive,liu2019bivirus,castillo1989epidemiological,wei2013competing,watkins2016optimal,santos2015bi,carlos2,yang2017bi,van2014domination,santos2015bivirus_conference,pare2021multi,janson2020networked,wang2012dynamics,ye2022bivirus_survey}. If a particular virus persists while others become extinct, it is said to have won the ``survival-of-the-fittest'' battle, and is also referred to as achieving a state of ``competitive exclusion''~\citep{carlos2,ackleh2005competitive}. An important problem is to identify the winning virus for the given initial states. It is also crucial to understand when multiple viruses may persist in the meta-population, resulting in a state of ``coexistence''.
Our work considers a popular model for competing epidemics, namely two viruses in the SIS framework, described as a deterministic continuous-time dynamical system~\citep{carlos2,sahneh2014competitive,santos2015bi,liu2019bivirus,ye2022_bivirus}. The two viruses, termed virus~$1$ and virus~$2$, spread across a two-layer meta-population network; each layer represents the possibly distinct topologies for virus~$1$ and virus~$2$. In each population, individuals belong to one of three mutually exclusive compartments: infected by virus~$1$, or infected by virus~$2$, or not infected by either of the viruses. The competing nature implies that an individual infected by virus~$1$ cannot be infected by virus~$2$, and vice versa. An infected individual that recovers from either virus will do so with no immunity, and then becomes susceptible again to infection from either virus.
Existing literature on bivirus networks has identified a variety of scenarios %and conditions
that specify the winning virus in the survival-of-the-fittest battle, regardless of the initial state~\citep{sahneh2014competitive,liu2019bivirus,santos2015bi,santos2015bivirus_conference,pare2021multi,janson2020networked}. In this paper, however, we address a key yet relatively unexplored question: \textit{are there networks such that either virus can prevail in the survival-of-the-fittest battle?} For a 3-node graph, with tree structure, \citep{carlos2} presented a necessary and sufficient condition for either of the viruses to prevail, depending on the initial states. However, the question has remained unanswered for networks with four or more nodes and general topology structure; the complexity arising from the coupled spreading dynamics of multiple nodes and two viruses makes it nontrivial to extend the approach in~\citep{carlos2}.
The main contribution of this paper is to show that for any given finite number of nodes, and supposing that the network layer corresponding to one of the viruses has an arbitrary structure, one can systematically construct the network layer corresponding to the other virus such that either virus can survive in the resulting bivirus network, depending on the initial states.
% there exist bivirus networks where at least one network layer has essentially arbitrary structure, for which either virus can survive depending on the network's initial state.
% Our epidemic spreading process is described by a deterministic continuous-time dynamical system~\citep{carlos2,sahneh2014competitive,santos2015bi,liu2019bivirus,ye2022_bivirus}.
The main results are based on novel control-theoretic arguments, and begin by recalling that under a certain necessary and sufficient condition on the infection and recovery rates of the epidemic dynamics, the two equilibria associated with either virus winning the survival battle are both locally exponentially stable~\citep{ye2022_bivirus} (this condition extends the condition presented in~\citep{carlos2}). This ensures that there are initial states for which \textit{either} of the viruses can win the battle. While it is straightforward to check whether a given bivirus network satisfies the condition, the converse problems of \textit{existence} and \textit{design} of such networks are significantly more challenging.
% In \citep{carlos2}, a three node example is presented, but to the best of our knowledge, no example with more than three nodes has been recorded in the literature.
The reason why the demonstration of the existence of bivirus networks with more than three nodes satisfying the aforementioned condition has remained an elusive challenge is that the condition is expressed implicitly using complex nonlinear functions of the infection and recovery rates. Further, there have been no simple procedures to design or create the two network layers to satisfy the condition (a numerical example of which would resolve the existence question).
We prove that, given almost any network layer of one virus, there always exists a network layer of the second virus such that the resulting bivirus network %satisfies the necessary and sufficient condition stated above.
satisfies the aforementioned necessary and sufficient condition.
We subsequently operationalize the theoretical results by developing a robust four-step procedure, starting with an essentially arbitrary network layer, to construct the other network layer to satisfy the condition. This allows one to generate bivirus networks that have two possible survival-of-the-fittest outcomes. Numerical examples involving small synthetic networks and a real-world large scale network are presented to demonstrate the procedure, and they show that the bivirus network model can exhibit a rich and complex set of dynamical phenomena, verifying the theoretical findings in \citep{carlos2}, including the presence, on occasions, of an unstable equilibrium where, in each population, both viruses coexist. Taken as a whole, our work offers insight into bivirus networks and the complex survival-of-the-fittest battles that unfold over them. \vspace{-6pt}
% We detail this in the discussions concluding this paper, and how our findings extend the existing literature.
\subsection*{Paper Outline}
The paper unfolds as follows: We conclude this section by collecting most of the notations and certain preliminaries required in the sequel. The bivirus network model is detailed in Section~\ref{sec:model}, where we also formulate the problem of interest. The main results are presented in Section~\ref{sec:results}; the proofs have been relegated to the Appendix. Two case studies that illustrate the construction procedure and the resulting diverse limiting behaviour are provided in Section~\ref{sec:simulations}. Finally, conclusions and potential future work are given in Section~\ref{sec:conclusions}.
% Mathematical models describing the spreading of infectious diseases and contagions are fundamental to understanding the dynamics of epidemic outbreaks in biological and human populations~\citep{review}. Problems concerning two (or more) competing contagions have attracted increasing attention in the past decade~\citep{sahneh2014competitive,liu2019bivirus,castillo1989epidemiological,wei2013competing,watkins2016optimal,santos2015bi,carlos1,carlos2,newman2005threshold,funk2010interacting,karrer2011competing}. Besides the study of infectious diseases with different variants in biological and human populations, there are several other applications such as the spreading of ideas or behaviors in social networks~\citep{trpevski2010model}, or that of computer viruses~\citep{wei2012competing}. One of the most popular frameworks considers two competing contagions, termed virus $1$ and virus $2$, spreading across a population of individuals (nodes) through a network which in general has two layers that represent the possibly distinct contact network topologies for virus $1$ and virus $2$.
% % Since the viruses are competing, a node infected by one virus cannot be infected by the other virus
% In such a scenario, a node is infected by virus 1, or infected by virus 2, or not infected by either of the viruses. Note that the competing feature implies that a node infected virus 1 cannot be infected by virus 2, and vice versa. The Susceptible--Infected--Susceptible (SIS) paradigm has received extensive attention in the two competing contagion setting; a node infected with either virus can recover with no immunity and then become susceptible to infection from either virus~\citep{ahn2006epidemic,wang2012dynamics,granell2013dynamical,sahneh2014competitive,santos2015bi}.
% % Assuming both viruses are initially present in the network, which we term ``positive initial states,
% We say the network has ``positive initial states'' if both viruses are present at every node in the network. Assuming positive initial states, fundamental questions focus on identifying conditions involving the recovery rates and infection rates (captured through the two-layer network) under which i) both viruses die out, ii) one virus persists and the other disappears (survival of the fittest), or iii) both viruses persist in the network (coexisting equilibrium). The first scenario has been rigorously studied in \citep{sahneh2014competitive,watkins2016optimal,liu2019bivirus}, and the third scenario has also been extensively investigated in \citep{castillo1989epidemiological,sahneh2014competitive,liu2019bivirus,pare2021multi,janson2020networked}. %\seb{see \cite[Theorem~1]{watkins2016optimal}, \cite[Theorem~1]{liu2019bivirus}, and \cite[Theorems~6 and~7]{liu2019bivirus}, \cite[Theorem~6]{pare2021multi}, \cite[Theorem~5]{janson2020networked}, respectively}.
% When considering survival of the fittest outcomes, all existing results establish sufficient conditions that ensure the \textit{same} virus, say virus $1$, survives for all positive initial states and virus $2$ dies out~\citep{sahneh2014competitive,santos2015bi,liu2019bivirus,pare2021multi,janson2020networked}. Thus, virus $2$ never wins a survival of the fittest battle when both viruses are initially present in the population.
% In this work, we present new possibilities for survival of the fittest outcomes in SIS epidemic networks with two competing contagions, which we refer to as \emph{bivirus networks}. Specifically, we provide a systematic method that allows one to construct a bivirus network where \textit{either} of the viruses can win a survival of the fittest contest, and the actual winner in a particular case depends on the positive initial state in a nontrivial way. The epidemic model is captured by a deterministic continuous-time system, so in the context of dynamical systems, our result ensures the survival of the fittest equilibria for both viruses are locally exponentially stable, and each equilibrium has a region of attraction with non-zero Lebesgue measure. As a consequence, we prove that the bivirus network model exhibits a far richer and more complex set of dynamical phenomena than established in the existing literature.
\subsection*{Notation and Preliminaries}
We use $I$ to denote the identity matrix, with dimension to be understood from the context. Let $A$ be a square matrix, with eigenvalues $\lambda_i$. We use $\rho(A) = \max_{i} \vert \lambda_i \vert$ and $\sigma(A) = \max_i \mathfrak{Re}(\lambda_i)$ to denote the spectral radius and the spectral abscissa of $A$, respectively. If $\sigma(A) < 0$, we say $A$ is Hurwitz. The matrix $A$ is reducible if and only if there is a permutation matrix $P$ such that $P^{\top}AP$ is block upper triangular; otherwise $A$ is said to be irreducible.
% Given a square matrix $A$, $\rho(A)$ denotes the spectral radius.
For two vectors $x = \{x_i\}$ and $y = \{y_i\}$ of the same dimension, we write $x \leq y \Leftrightarrow x_i \leq y_i$ for all~$i$, and $x < y \Leftrightarrow x_i < y_i$ for all~$i$. We use $\vect 0_n$ and $\vect 1_n$ to denote the all-$0$ and all-$1$ column vectors of dimension $n$. We define the set \[\Delta = \{(x, y) \in \mathbb R^n_{\geq 0} \times \mathbb R^n_{\geq 0} : \vect 0_n \leq x + y \leq \vect 1_n \},\]
and its interior by $\intr(\Delta)$.
In this paper, we consider two-layer directed networks represented by the graph $\mathcal{G} = (\mathcal{V}, \mathcal{E}_A, \mathcal{E}_B)$, where $\mathcal{V} = \{1, \hdots, n\}$ is the set of nodes, and $\mathcal{E}_A \subseteq\mathcal{V} \times \mathcal{V}$ and $\mathcal{E}_B\subseteq\mathcal{V} \times \mathcal{V}$ are the ordered set of edges of the first and second layer, respectively. Associated with $\mathcal{E}_A$ and $\mathcal{E}_B$ are the nonnegative adjacency matrices $A =\{a_{ij}\}$ and $B = \{b_{ij}\}$, respectively, that capture the edge weights. We define $a_{ij} > 0$ and $b_{ij} > 0$ if and only if $(j,i) \in \mathcal E_A$ and $(j,i) \in \mathcal E_B$, respectively, where $(j,i)$ is the directed edge from node $j$ to node $i$. A layer is strongly connected if and only if there is a path from any node $i$ to any other node $j$, which corresponds to the associated adjacency matrix being irreducible~\citep{berman1979nonnegative_matrices}.
\section{Bivirus Network Model}\label{sec:model}
% \vspace{-6pt}
Following the convention in the literature~\citep{sahneh2014competitive}, we consider two viruses spreading over a two-layer network represented by the graph $\mathcal{G} = (\mathcal{V}, \mathcal{E}_A, \mathcal{E}_B)$, where $\mathcal{E}_A$ and $\mathcal{E}_B$ determine the spreading topology for virus~$1$ and virus~$2$, respectively. Each node represents a well-mixed population of individuals with a large and constant size; a well-mixed population means any two individuals in the population can interact with the same positive probability. Fig.~\ref{fig:epidemic_schematic} shows a schematic of the compartment transitions, and the two-layer network structure.
We define $x_i(t) \in [0, 1]$ and $y_i(t) \in [0, 1]$, $t\in \mathbb{R}_+$, as the fraction of individuals in population $i \in \mathcal{V}$ infected with virus~$1$ and virus~$2$, respectively.
% ~\footnote{In some bivirus literature, node $i$ is taken to be a single individual, and $x_i$ and $y_i$ are the probabilities that individual $i$ is infected with virus~$1$ and virus~$2$, respectively. While the modeling context differs, the resulting system equations are identical to that in \eqref{eq:bivirus_dynamics}{\color{blue}, except that the diagonal entries of $A$ and $B$ may be zero, as an individual cannot infect themselves. Nonetheless,} the dynamical properties studied and the results presented in this paper are equally applicable to this alternative interpretation of the bivirus network model, {\color{blue}and our method works even if all (or some) of the diagonal entries are zero.}}.
In accordance with \citep{sahneh2014competitive,liu2019bivirus,santos2015bi}, the dynamics at node $i \in \mathcal{V}$ are given by
\begin{subequations}\label{eq:bivirus_node}
\begin{align}
\dot x_i(t) & = - x_i(t) + (1-x_i(t)-y_i(t))\sum_{j=1}^n a_{ij} x_j(t) \\
\dot y_i(t) & = - y_i(t) + (1-x_i(t)-y_i(t))\sum_{j=1}^n b_{ij} y_j(t),
\end{align}
\end{subequations}
with $a_{ij} \geq 0$ and $b_{ij} \geq 0$ being infection rate parameters. In fact, individuals in population~$j$ infected with virus~$1$ (resp. virus~$2$) can infect susceptible individuals in population~$i$ if and only if $(j,i) \in \mathcal{E}_A$ (resp. $\mathcal{E}_B$) at a rate $a_{ij}$ (resp. $b_{ij}$). By defining $x(t) = [x_1(t), \hdots, x_n(t)]^\top$ and $y(t) = [y_1(t), \hdots, y_n(t)]^\top$, we obtain the following bivirus dynamics for the meta-population network:
\begin{subequations}\label{eq:bivirus_dynamics}
\begin{align}
&\dot x(t) = - x(t) + (I-X(t)-Y(t))Ax(t) \label{eq:virus1_dynamics} \\
&\dot y(t) = - y(t) + (I-X(t)-Y(t))By(t), \label{eq:virus2_dynamics}
\end{align}
\end{subequations}
where $X = \diag(x_1, \hdots, x_n)$, and $Y = \diag(y_1, \hdots, y_n)$. The system in \eqref{eq:bivirus_dynamics} has state variable $(x(t), y(t))$, and is in fact a mean-field approximation of a coupled Markov process that captures the SIS bivirus contagion process~\citep{sahneh2014competitive,santos2014bi,liu2019bivirus}. Note that we have taken the recovery rates for both viruses to be equal to unity for every population for the purposes of clarity. Importantly, this can actually be done without loss of generality when examining the stability properties of equilibria for the bivirus system (see \cite[Lemma~3.7]{ye2022_bivirus}). It is known from \cite[Lemma~8]{liu2019bivirus} that $\Delta$ is a positive invariant set for the bivirus dynamics in \eqref{eq:bivirus_dynamics}.
% , where $\vect 0_n$ and $\vect 1_n$ are the all-$0$ and all-$1$ column vectors of dimension $n$~\footnote{This implies that if the system \eqref{eq:bivirus_dynamics} has initial states $(x(0),y(0)) \in \Delta$, then $(x(t), y(t)) \in \Delta$ for all $t\geq 0$.}.
%}.
% For two vectors $x = \{x_i\}$ and $y = \{y_i\}$ of the same dimension, the vector inequalities are entry-wise: $x \leq y \Leftrightarrow x_i \leq y_i$ for all~$i$, and $x < y \Leftrightarrow x_i < y_i$ for all~$i$.
Given that $x_i$ and $y_i$ represent the fraction of population~$i$ infected with virus~$1$ and virus~$2$, respectively, we naturally consider \eqref{eq:bivirus_dynamics} exclusively in $\Delta$, so that $x_i(t)$ and $y_i(t)$ retain their physical meaning in the context of the model for all $t\geq 0$.
We place the following standing assumption on the network topology.
\begin{assumption}\label{assm:strong_connect}
The matrices $A$ and $B$ are irreducible, which is equivalent to both layers of $\mathcal{G}$ being, separately, strongly connected.
\end{assumption}
% We suppose that both layers are strongly connected, which is equivalent to both $A$ and $B$ being irreducible matrices~\citep{godsil2001algebraic}. Note that a layer is strongly connected if and only if there is a path from any node $i$ to any other node $j$ that traverses just the edges of the layer, and for undirected networks, connectivity and strongly connectivity are equivalent --
In the epidemiological context, this implies that there exists an infection pathway for the virus from any node to any other node. Strong connectivity is a standard assumption for \eqref{eq:bivirus_dynamics} (see~\citep{ye2022_bivirus,liu2019bivirus,pare2021multi}) and sometimes assumed without explicit statement~\citep{sahneh2014competitive} or is inherent from the problem formulation~\citep{carlos2}.
% Our method works even if all (or some) of the diagonal entries are zero, and whether $A$ or $B$ have the same or different zero and nonzero entry patterns. We also use the term ``network'', because it is convenient to associate $A$ and $B$ with layers in a two-layer network during analysis and exposition.
\begin{figure}
\centering
\subfloat[]{\def\svgwidth{0.55\linewidth}
\input{transitions_bivirus_small.pdf_tex}\label{fig:transitions_bivirus}}
\hfill
\subfloat[]{\def\svgwidth{0.6\linewidth}
\input{two_layer_small.pdf_tex}\label{fig:two_layer}}
\caption{Schematic of the compartment transitions and two-layer infection network. (a) Each individual exists in one of three health states: Susceptible ($S$), Infected with virus 1 ($I$, orange), or Infected with virus $2$, ($I$, purple). Arrows represent possible transitions between compartments. (b) The two-layer network through which the viruses can spread between populations (nodes). Note that the edge sets of the two layers do not need to match, so that virus $1$ can spread between two nodes but virus $2$ cannot, and vice versa. }
\label{fig:epidemic_schematic}
\end{figure}
The second standing assumption of the paper is now stated, and as we will explain below, is in place due to our interest in survival-of-the-fittest outcomes.
\begin{assumption}\label{assm:rho}
There holds $\rho(A) > 1$ and $\rho(B) > 1$.
\end{assumption}
There is always the healthy equilibrium $(x = \vect 0_n, y = \vect 0_n)$, where both viruses are extinct, and under Assumption~\ref{assm:rho}, it is an unstable equilibrium (in fact, a repeller such that all trajectories starting in its neighborhood move away from it)~\citep{liu2019bivirus}. With irreducible $A$ and $B$, there can be at most three \textit{types} of equilibria. There can be two ``survival-of-the-fittest'' equilibria $(\bar x, \vect 0_n)$ and $(\vect 0_n, \bar y)$, where $\vect 0_n < \bar x < \vect 1_n$ and $\vect 0_n < \bar y < \vect 1_n$~\citep{liu2019bivirus} (also referred to as boundary equilibria elsewhere in the literature~\cite{ye2022_bivirus}. Assumption~\ref{assm:rho} is relevant here: the necessary and sufficient conditions for $(\bar x, \vect 0_n)$ and $(\vect 0_n, \bar y)$ to exist are $\rho(A) > 1$ and $\rho(B) > 1$, respectively, see~\cite[Theorem~2 and Theorem~3]{liu2019bivirus}.
%\cite[Theorem~3]{liu2019bivirus}
Moreover, $\bar x$ and $\bar y$ correspond to the unique endemic equilibrium of the classical SIS model considering only virus~$1$ and only virus~$2$, respectively~\citep{fall2007epidemiological,Lajmanovich1976,janson2020networked,liu2019bivirus}. These two separate single virus systems are given by
\begin{subequations}\label{eq:single_SIS}
\begin{align}
\dot x(t)& =-x(t)+(I-X(t))Ax(t),\label{eq:v1} \\
\dot y(t)& =-y(t)+(I-Y(t))By(t).\label{eq:v2}
\end{align}
\end{subequations}
In the sequel, we provide a brief summary of the single virus system dynamics, including results useful for our theoretical analysis.
The third type of equilibrium involves \textit{coexistence} of both viruses, and any such equilibrium $(\tilde x, \tilde y)$ must necessarily satisfy $\tilde x > \vect 0_n$, $\tilde y > \vect 0_n$ and $\tilde x + \tilde y < \vect 1_n$~\citep{ye2022_bivirus}. Assumption~\ref{assm:rho} is the necessary condition for existence of a coexistence equilibrium, but it is not sufficient~\citep{ye2022_bivirus}. Bivirus systems can have a unique coexistence equilibrium which can be stable or unstable (uniqueness has only been established for $n\leq 3$)~\citep{carlos2,ye2022_bivirus}, or multiple (including an infinite number)~\citep{ye2022_bivirus,liu2019bivirus,anderson2022_bivirus_PH,doshi2022convergence}, or none~\citep{santos2015bi,ye2022_bivirus,carlos2}.
Next, we remark that recent results show that for a `generic' bivirus network\footnote{See \citep{ye2022_bivirus,ye2022bivirus_survey} for details on technical definitions of `generic' and `almost all').}, convergence to a stable equilibrium (of which there can be multiple) occurs for `almost all' initial conditions~\citep{ye2022_bivirus,ye2022bivirus_survey}. Hence, the key question is as follows: to which equilibrium does convergence occur? We are now ready to formulate the problem to be studied, which deals with bivirus networks with at least two \textit{stable} attractive equilibria.
% and additional details on \eqref{eq:bivirus_dynamics}.
{\bf Problem formulation.} In this paper, we study scenarios where either of the viruses can win the survival-of-the-fittest battle, under Assumptions~\ref{assm:strong_connect} and \ref{assm:rho}. Such scenarios are uncovered by examining the stability properties of the two equilibria $(\bar x, \vect 0_n)$ and $(\vect 0_n, \bar y)$ for the network dynamics in \eqref{eq:bivirus_dynamics}. Namely, we seek to study bivirus networks with conditions on $A$ and $B$ that ensure both $(\bar x, \vect 0_n)$ and $(\vect 0_n, \bar y)$ are locally exponentially stable. In such a scenario, there exist open sets $U \in \intr(\Delta)$ and $W \in \intr(\Delta)$, with non-zero Lebesgue measure and $U\cap W = \emptyset$, such that $\lim_{t\to\infty} (x(t), y(t)) = (\bar x, \vect 0_n)$ for all $(x(0), y(0)) \in U$ and $\lim_{t\to\infty} (x(t), y(t)) = (\vect 0_n, \bar y)$ for all $(x(0), y(0)) \in W$. In context, the winner of a survival-of-the-fittest battle depends on the initial conditions.
% initial state in $U$, virus~$1$ will win the survival-of-the-fittest battle.
% If $(\bar x, \vect 0_n)$ is locally exponentially stable, then $\lim_{t\to\infty} (x(t), y(t)) = (\bar x, \vect 0_n)$ for all $(x(0), y(0))$ in some open set $U \in \intr(\Delta)$ with non-zero Lebesgue measure, where $\intr(\cdot)$ denotes the interior of the set. In context, for every initial state in $U$, virus~$1$ will win the survival-of-the-fittest battle. If $(\bar x, \vect 0_n)$ is unstable, then for almost all $(x(0), y(0))$, virus~$1$ will not emerge as the winner of the battle~\footnote{Unstable equilibria can have stable manifolds, but such manifolds always have zero Lebesgue measure.}. The same is true for virus~$2$, if we instead consider $(\vect 0_n, \bar y)$. Thus, this paper will study bivirus networks with conditions on $A$ and $B$ that ensure both $(\bar x, \vect 0_n)$ and $(\vect 0_n, \bar y)$ are locally exponentially stable.
% This paper identifies a necessary and sufficient condition for the desired stability properties, and then present a procedure for generating $A$ and $B$ that satisfy such conditions.
The local exponential stability and instability of $(\bar x, \vect 0_n)$ and $(\vect 0_n, \bar y)$ can be characterized by analysis of the Jacobian of the right hand side of \eqref{eq:bivirus_dynamics}, evaluated at the two equilibria. Let $\bar X = \diag(\bar x_1, \hdots, \bar x_n)$ and $\bar Y = \diag(\bar y_1, \hdots, \bar y_n)$. We recall the following result of \cite[Theorem~3.10]{ye2022_bivirus}.
\begin{proposition}\label{prop:boundary_stablility_cond}
Consider \eqref{eq:bivirus_dynamics} under Assumption~\ref{assm:strong_connect}. Then the following hold:
\begin{enumerate}
\item \label{ineq:1} The equilibrium $(\bar x, \vect 0_n)$ is locally exponentially stable if and only if $\rho((I-\bar X)B)<1$.
\item \label{ineq:2} The equilibrium $({\bf{0}}_n,\bar y)$ is locally exponentially stable if and only if $\rho((I-\bar Y)A)<1$.
\end{enumerate}
\end{proposition}
% , which states that the stability and also instability of $(\bar x, \vect 0_n)$ and $(\vect 0_n, \bar y)$ are determined precisely by the value of $\rho((I-\bar X)B)$ and $\rho((I-\bar Y)A)$, respectively. Specifically,
% \begin{enumerate}
% \item \label{ineq:1} The equilibrium $(\bar x, \vect 0_n)$ is locally exponentially stable if and only if $\rho((I-\bar X)B)<1$.
% \item \label{ineq:2} The equilibrium $({\bf{0}}_n,\bar y)$ is locally exponentially stable if and only if $\rho((I-\bar Y)A)<1$.
% \end{enumerate}
The equilibria $(\bar x, \vect 0_n)$ and $(\vect 0_n,\bar y)$ are unstable if the corresponding inequality in the proposition are reversed. Notice that these inequalities involve $\bar X$ and $\bar Y$ which are a nonlinear function of $A$ and $B$, respectively. In other words, $\rho((I-\bar X)B)$ depends on $B$ explicitly and $A$ implicitly, and hence the stability property of $(\bar x, \vect 0_n)$ is tied to the complex interplay between the $A$ and $B$ matrices, or equivalently, between the edge set and edge weights of the two layers. The same is true for $(\vect 0_n, \bar y)$. Thus, if one were provided $A$ and $B$, it is straightforward to check if the conditions hold, as there are iterative algorithms to compute $\bar x$ and $\bar y$, e.g.~\cite[Theorem~4.3]{mei2017epidemics_review} or \cite[Theorem~5]{vanMeighem2009_virus}. However, the inverse problems of existence and design are significantly more difficult to address. First, for an arbitrary number of nodes, proving the \textit{existence} of a bivirus system satisfying the above inequalities has remained an elusive challenge; firstly, is not automatically guaranteed that there exist $A$ and $B$ which satisfy one let alone both of conditions for local exponential stability given above. Second, no methods have been developed for designing bivirus networks with multiple survival-of-the-fittest outcomes. In the rest of this paper, we comprehensively address both of these issues.
The existing literature has identified sufficient conditions on $A$ and $B$ such that one survival-of-the-fittest equilibrium is locally stable and the other unstable, see ~\citep{santos2015bi,santos2015bivirus_conference,janson2020networked,sahneh2014competitive,liu2019bivirus,carlos2}. Note that in such a scenario, one can still have (multiple) locally stable coexistence equilibria~\citep{anderson2022_bivirus_PH}. Stronger sufficient conditions on $A$ and $B$ have been identified that ensure one of $(\bar x, \vect 0_n)$ and $(\vect 0_n, \bar y)$ is in fact globally stable in $\intr(\Delta)$ and the other unstable~\citep{santos2015bi,ye2022_bivirus}. Sufficient conditions on $A$ and $B$ can also be identified for both survival equilibria to be unstable~\citep{sahneh2014competitive,janson2020networked,carlos2}, and hence convergence must occur to a coexistence equilibrium (which may or may not be unique~\citep{anderson2022_bivirus_PH}). For many of the conditions discussed, it is straightforward to i) prove there exist $A$ and $B$ that satisfy each of them, and ii) design one network layer, given the other layer, to meet these conditions. In contrast, existence and design of network topology to ensure both survival-of-the-fittest equilibria are locally stable is nontrivial, as we explained above, and has not been addressed in the literature to the best of our knowledge.
% Assuming networks endowed with an arbitrary topology, for survival-of-the-fittest battles, Regions~I--III (colored in blue) highlight the outcomes recorded in the existing literature, whereas Region~IV (colored in red) depicts the novel outcome presented in this paper.
% The spectral radii of $(I-\bar X)B$ and $(I-\bar Y)A$, denoted by $\rho_1$ and $\rho_2$, respectively, are depicted on the $y$ and $x$-axis. The local stability properties of $(\bar x, \vect 0_n)$ and $(\vect 0_n, \bar y)$ are precisely determined by $\rho_1$ and $\rho_2$, respectively~\cite[Theorem~3.10]{ye2022_bivirus}. %(see the Supplemental Material for details).
%In the literature, different sufficient conditions on $A$ and $B$ are given that place the bivirus network into Region~I or III, where virus~2 and virus~1 win the survival of the fittest battle, respectively~\citep{santos2015bi,santos2015bivirus_conference,janson2020networked,sahneh2014competitive,liu2019bivirus}.
% In fact, global stability of a specific survival-of-the-fittest equilibrium is secured in \citep{santos2015bi,santos2015bivirus_conference}. Sufficient conditions can also be identified for the bivirus network to be in Region II, where both survival equilibria are unstable~\citep{sahneh2014competitive,janson2020networked,carlos2}, and hence convergence must occur to a coexistence equilibrium (which may or may not be unique). }
\begin{remark}
Our paper considers \eqref{eq:bivirus_dynamics} in the context of a meta-population model.
% , where we find it useful for analysis and exposition to associate $A$ and $B$ with a two-layer network that we interpret as capturing the infection topology of the two viruses. Individuals in population~$i$ infected with virus~$1$ (resp. virus~$2$) can infect susceptible individuals in population~$j$ if and only if $(j,i) \in \mathcal{E}_A$ (resp. $\mathcal{E}_B$) at a rate $a_{ji}$ (resp. $b_{ji}$).
In some literature~\citep{sahneh2014competitive,liu2019bivirus}, node~$i$ is taken to be a single individual, and $x_i$ and $y_i$ are the probabilities that individual~$i$ is infected with virus~$1$ and virus~$2$, respectively. In other literature~\citep{carlos2}, the nodes may represent groups of individuals split according to some demographic characteristics, e.g. male or female.
Depending on the modelling context, the diagonal entries of $A$ and $B$ may be zero (e.g. an individual cannot infect themselves), or $A$ and $B$ may be constrained to have the same zero and nonzero entry pattern (the two layers have the same topologies, but possibly different edge weights).
Irrespective of the context, the dynamics are as given in \eqref{eq:bivirus_dynamics}, and the results in this paper are \textit{equally applicable} to various alternative physical/epidemiological interpretations of the model. This is because all of the aforementioned modelling frameworks are equivalent, see \citep{pare2018analysis}.
\end{remark}
\section{Main Results}\label{sec:results}
The main theoretical results of this work are presented in two parts.
% We first recall the necessary and sufficient condition for both $(\bar x, \vect 0_n)$ and $(\vect 0_n, \bar y)$ to be locally exponentially stable.
First, we present an existence result which states that given almost any $A$ matrix, a corresponding $B$ matrix can be found to satisfy the desired stability condition. Second, we detail the four-step procedure for finding such a $B$ matrix, given a $A$ matrix. %(in the interest of maintaining symmetry with the previous phrase).
% Finally, we present numerical examples for small synthetic networks and a real-world large-scale network to highlight the findings.
\subsection{Preliminaries on matrix theory and single virus SIS systems}
We recall relevant results from matrix theory and properties of the single SIS network model, required for deriving the main theoretical results. We say that a square matrix $A$ is a nonnegative (positive) matrix if all of its entries are nonnegative (positive). A nonnegative matrix $A$ is irreducible if and only if whenever $y=Ax$, with $x\geq {\bf{0}}_n$, $y$ always has a nonzero entry in at least one position where $x$ has a zero entry. If $A$ is nonnegative and irreducible, then by the Perron--Frobenius Theorem~\citep{horn1994topics_matrix}, $\sigma(A) = \rho(A)$ is a simple eigenvalue, and we call it the Perron--Frobenius eigenvalue of $A$. The associated eigenvector can be chosen to have all positive entries, and up to a scaling, there is no other eigenvector with this property. We say that $A$ is a Metzler matrix if all of its off-diagonal entries are nonnegative. By applying the Perron--Frobenius Theorem~\citep{horn1994topics_matrix} to a Metzler and irreducible $A$, similar conclusions on $\sigma(A)$ and the corresponding eigenvector can be drawn. A square matrix $A$ is an $M$-matrix if $-A$ is Metzler and all eigenvalues of $A$ have positive real parts except for any at the origin. If $A$ has eigenvalues with strictly positive real parts, we call it a nonsingular $M$-matrix, and a singular $M$-matrix otherwise~\citep{horn1994topics_matrix}.
Some properties of $M$-matrices and Metzler matrices, relevant to our theoretical results, are detailed as follows:
\begin{enumerate}
% \item For Metzler $A$, $s(A)$ depends monotonically on any entry of $A$.
\item For a (singular) $M$-matrix $F$, and any positive diagonal $D$, $DF$ is also a (singular) $M$-matrix.
\item Let $F$ be an irreducible singular $M$-matrix. Then, for any nonnegative nonzero diagonal $D$, $F+D$ is an irreducible nonsingular $M$-matrix.
\item Let $B$ be nonnegative irreducible and $D$ positive diagonal. Then for the Metzler matrix $-D+B$, there holds i) $\sigma(-D+B) > 0 \Leftrightarrow \rho(D^{-1}B) > 1$, ii) $\sigma(-D+B) = 0 \Leftrightarrow \rho(D^{-1}B) = 1$ and iii) $\sigma(-D+B) < 0 \Leftrightarrow \rho(D^{-1}B) < 1$.
\item
For an irreducible nonnegative matrix $B$ and a positive diagonal matrix $D$ with $d_{ii}<1$ $\forall i$, there holds $\rho(B)>\rho((I-D)B)$ and $\rho(B)>\rho(DB)$.
\item
For a nonsingular irreducible $M$-matrix $F$, $F^{-1}$ is a positive matrix.
\end{enumerate}
%Details are given in \cite[Theorem~4.31]{qu2009cooperative_book} and \cite[Chapter 6, Theorem 2.3 and Theorem 4.6]{berman1979nonnegative_matrices}.
The first two results are easily proved from the property that all the principal minors of an $M$-matrix are positive in the nonsingular case and nonnegative in the singular case, see \cite[Theorem~4.31]{qu2009cooperative_book} and \cite[Chapter 6, Theorem 2.3 and Theorem 4.6]{berman1979nonnegative_matrices}. The third result
%can also be found in
is due to
\cite[Proposition~1]{liu2019bivirus}. The fourth is a consequence of \cite[Chapter 2, Corollary 1.5(b)]{berman1979nonnegative_matrices} and the irreducibility of both $(I-D)B$ and $DB$, which sum to $B$. The fifth is a consequence of \cite[Chapter 6, Theorem 2.7]{berman1979nonnegative_matrices}.
% We %finish
% conclude these remarks on matrix theory by presenting a result on the perturbation of an eigenvalue for a matrix, restricting to %that applying for
% real eigenvalues.
We now recall results for the single virus system in \eqref{eq:v1}, but obviously the same results will hold for \eqref{eq:v2}. The limiting behavior of \eqref{eq:v1} can be fully characterized by $\rho(A)$, see e.g.~\citep{Lajmanovich1976,mei2017epidemics_review,ye2021_PH_TAC}. Specifically, if $\rho(A) \leq 1$, then $\lim_{t\to\infty} x(t) = \vect 0_n$ for all $x(0) \in [0, 1]^n$. We call $\vect 0_n$ the healthy equilibrium. If $\rho(A) > 1$, then $\lim_{t\to\infty} x(t) = \bar x$ for all $x(0) \in [0, 1]^n \setminus \{\vect 0_n\}$, where $\vect 0_n < \bar x < \vect 1_n$ is the unique non-zero (endemic) equilibrium which is exponentially stable. Note that the equilibrium equation yields:
\begin{equation}\label{eq:equi_A}
[-I + (I - \bar X) A]\bar x = \mathbf{0}_n,
\end{equation}
with $\bar X = \diag(\bar x)$. The following result characterises properties of the matrix on the left of \eqref{eq:equi_A}.
\begin{lemma}\label{lem:useful}
Consider the single virus system in \eqref{eq:v1}, and suppose that $\rho(A) > 1$ and $A$ is irreducible. With respect to \eqref{eq:equi_A}, the following hold:
\begin{enumerate}
\item The matrix $-I + (I-\bar X)A$ is a singular irreducible Metzler matrix;
\item $\sigma(-I + (I-\bar X)A) = 0$ is a simple eigenvalue with an associated unique (up to scaling) left eigenvector $u^\top$ and right eigenvector $\bar x$, with all entries positive, i.e. $u^\top \gg \vect 0_n$ and $\bar x \gg \vect 0_n$.
\end{enumerate}
\end{lemma}
\begin{proof}
Regarding the first statement, observe that $\vect 0_n \ll \bar x \ll \vect 1_n$ guarantees that $(I-\bar X)$ is a positive diagonal matrix, and hence $(I-\bar X)A$ is irreducible precisely when $A$ is irreducible. It is also nonnegative. Thus, $-I + (I-\bar X)A$ is an irreducible Metzler matrix.
% The equilibrium equation is
% \begin{equation}\label{eq:1}
% [-I + (I-\bar X)A]\bar x = \vect 0_n,
% \end{equation}
\eqref{eq:equi_A} implies that $\bar x$ is a null vector of the matrix $-I + (I-\bar X)A$, which accordingly is a singular matrix. Regarding the second statement, the conclusions immediately follow by viewing \eqref{eq:equi_A} in light of the properties of Metzler matrices detailed above.
\end{proof}
% \subsection{Necessary and sufficient condition for stability}\label{ssec:ns_cond}
% The local exponential stability and instability of $(\bar x, \vect 0_n)$ and $(\vect 0_n, \bar y)$ can be characterized by analysis of the Jacobian of the right hand side of \eqref{eq:bivirus_dynamics}, evaluated at the two equilibria. Let $\bar X = \diag(\bar x_1, \hdots, \bar x_n)$ and $\bar Y = \diag(\bar y_1, \hdots, \bar y_n)$. We recall the result of \cite[Theorem~3.10]{ye2022_bivirus}, which states that the stability and also instability of $(\bar x, \vect 0_n)$ and $(\vect 0_n, \bar y)$ are determined precisely by the value of $\rho((I-\bar X)B)$ and $\rho((I-\bar Y)A)$, respectively. Specifically,
% \begin{enumerate}
% \item \label{ineq:1} The equilibrium $(\bar x, \vect 0_n)$ is locally exponentially stable if and only if $\rho((I-\bar X)B)<1$.
% \item \label{ineq:2} The equilibrium $({\bf{0}}_n,\bar y)$ is locally exponentially stable if and only if $\rho((I-\bar Y)A)<1$.
% \end{enumerate}
% Notice that these inequalities involve $\bar X$ and $\bar Y$ which are a nonlinear function of $A$ and $B$, respectively. In other words, $\rho((I-\bar X)B)$ depends on $B$ explicitly and $A$ implicitly, and hence the stability property of $(\bar x, \vect 0_n)$ is tied to the complex interplay between the $A$ and $B$ matrices. The same is true for $(\vect 0_n, \bar y)$. Thus, if one were provided $A$ and $B$, it is straightforward to check if the conditions hold, as there are iterative algorithms to compute $\bar x$ and $\bar y$, e.g.~\cite[Theorem~4.3]{mei2017epidemics_review} or \cite[Theorem~5]{vanMeighem2009_virus}. However, the inverse problems of existence and design are significantly more difficult to address. First, for an arbitrary number of nodes, proving the \textit{existence} of a bivirus system satisfying the above inequalities has remained an elusive challenge one; it is not automatically guaranteed that there exist $A$ and $B$ which satisfy one let alone both of conditions $1$ and $2$ above. Second, no methods have been developed for designing bivirus networks with multiple survival-of-the-fittest outcomes. In the rest of this paper, we comprehensively address both of these issues.
% % show it is always possible to find a $B$ matrix, given an essentially arbitrary $A$, which ensures both the survival-of-the-fittest equilibria are locally exponentially stable, and present a design method.
\subsection{Existence of two stable survival equilibria}\label{ssec:main_thm}
We now present the main theoretical result of this paper, showing that given almost any $A$ matrix, one can find a $B$ matrix (with $\rho(B)>1$) such that the two spectral radius inequalities in Proposition~\ref{prop:boundary_stablility_cond} are satisfied.
% To begin, consider $A$ with $\rho(A) > 1$. Recall that the single virus system in \eqref{eq:v1} has the unique endemic equilibrium $\vect 0_n < \bar x < \vect 1_n$. This implies that
% \begin{equation}\label{eq:equi_A}
% [I - (I - \bar X) A]\bar x = \mathbf{0}_n,
% \end{equation}
% or that $\bar x$ is a positive right eigenvector for the matrix $(I - \bar X) A$ associated with the simple eigenvalue at $1$, according to the Perron--Frobenius Theorem~\footnote{Note that $(I-\bar X)A$ is irreducible and nonnegative precisely because $A$ is irreducible and nonnegative, and $(I-\bar X)$ is positive diagonal.}.
Given $A$ with $\rho(A) > 1$, let $u^\top$ and $\bar x$ be the eigenvectors stated in Lemma~\ref{lem:useful}, normalised to satisfy $u^\top\bar x = 1$. Let $B'$ be any other nonnegative and irreducible matrix such that
\begin{equation}
[I - (I - \bar X) B']\bar x = \mathbf{0}_n, \label{eq:equi_B'}
\end{equation}
which similarly implies that $\bar x$ is a positive right eigenvector for $-I+(I - \bar X) B'$ associated to the simple eigenvalue at the origin. Let $v^\top$ be the associated left eigenvector, normalised to satisfy $v^\top \bar x = 1$. Notice that our definition of $B'$ implies that $A$ and $B'$ define the infection matrix for two separate single virus systems in \eqref{eq:v1} and \eqref{eq:v2} that have the same endemic equilibrium.
% By the Perron--Frobenius Theorem, let $u^\top$ and $v^\top$, respectively, be the positive left eigenvector of $(I - \bar X) A$ and $(I - \bar X) B'$ associated with the simple eigenvalue at $1$, normalized to satisfy $u^\top \bar x = v^\top \bar x = 1$.
We require that $u$ and $v$ be linearly independent, and this can be straightforwardly achieved by selecting an appropriate $B'$ when given $A$.
% The existence of $u^\top$, $v^\top$, their linear independence, and detailed arguments in applying the Perron--Frobenius Theorem are provided in Appendix~\ref{app:main_proof} and Lemma~\ref{lem:useful}.
Indeed, we present Lemma~\ref{cor:main_paper} in the sequel, showing a procedure to select $B'$, when given $A$, to ensure the linear independence of $u$ and $v$. The main result follows, with proof in \ref{app:main_proof}.
% We now present the main result, which shows that for a given $A$, one can construct $B$ from $B'$ in order to satisfy the conditions outlined in Section~\ref{ssec:ns_cond} for local exponential stability of the two survival-of-the-fittest equilibria.
% For the purpose of maintaining clear exposition, we shall assume that $A$ and $B'$ are positive matrices. Positivity of $A$ implies that every node $i$ has an edge to every other node $j$ (including a self-loop) in the edge set $\mathcal{E}_A$ thus resulting in the layer $\mathcal{E}_A$ being fully connected, although the edge weights are allowed to be different and therefore the $\mathcal{E}_A$ layer in general has directed edges. However, we can in fact relax this requirement to allow for $A$ to be irreducible but not necessarily positive, corresponding to the $\mathcal{E}_A$ layer being strongly connected but not necessarily fully connected. This is detailed in Appendix~\ref{app:main_proof}.
\begin{theorem} \label{thm:doubly_stable_method}
Suppose that $A$ and $B'$ are irreducible nonnegative matrices, with $\rho(A) > 1$ and $\rho(B^\prime) > 1$, that satisfy \eqref{eq:equi_A} and \eqref{eq:equi_B'}, respectively.
% \begin{align}
% [I - (I - \bar X) A]\bar x &= \mathbf{0}_n \label{eq:equi_A} \\
% [I - (I - \bar X) B']\bar x &= \mathbf{0}_n, \label{eq:equi_B'}
% \end{align}
Suppose further that $u^\top$ and $v^\top$, as defined above, are linearly independent. Then there exists $\delta x \in \mathbb{R}^n$ with arbitrarily small Euclidean norm and satisfying
\begin{align}
u^{\top}[\bar X(I -\bar X)^{-1}] \delta x &> 0 \label{eq:deltax_1} \\
v^{\top}[\bar X(I -\bar X)^{-1}] \delta x &< 0. \label{eq:deltax_2}
\end{align}
Furthermore, there exists $\delta B \in \mathbb{R}^{n\times n}$ such that $B^\prime + \delta B$ is an irreducible nonnegative matrix, and $\delta B$ also satisfies
\begin{equation}\label{eq:delta_B}
\delta B \bar x=[(I- \bar X)^{-2}-B']\delta x.
\end{equation}
Then, with $B := B' + \delta B$, for the bivirus network in \eqref{eq:bivirus_dynamics}, both the survival-of-the-fittest equilibria $(\bar x, \vect 0_n)$ and $(\vect 0_n, \bar y)$ are locally exponentially stable, and $\bar y = \bar x + \delta x+o(\delta)$.
\end{theorem}
Provided $\delta x$ and $\delta B$ are sufficiently small, the resulting bivirus network in \eqref{eq:bivirus_dynamics} is such that either virus~$1$ or virus~$2$ may %actually
win a survival-of-the-fittest battle, depending on whether the initial states $(x(0), y(0))$ are in the region of attraction for $(\bar x, \vect 0_n)$ or $(\vect 0_n, \bar y)$, respectively. Our result does not exclude other limiting behavior, such as converging to a coexistence equilibrium where every population~$i$ has individuals infected with virus~$1$ and virus~$2$. This is because the regions of attraction for $(\bar x, \vect 0_n)$ and $(\vect 0_n, \bar y)$ together cannot cover all of $\intr(\Delta)$~\citep{chiang2015stability}, since there will be points in $\intr(\Delta)$ which are on the boundary of one or both regions of attraction (and thus cannot be part of the region). Indeed, there exist numerical examples where both $(\bar x, \vect 0_n)$ and $(\vect 0_n, \bar y)$ locally exponentially stable, and there are also multiple locally exponentially stable coexistence equilibria~\citep{anderson2022_bivirus_PH}.
% In Theorem~\ref{thm:doubly_stable_method}, we require $A$ and $B^\prime$ to be irreducible nonnegative matrices such that, if they define the infection matrix for two separate single virus systems in \eqref{eq:v1} and \eqref{eq:v2}, then the two systems have the same endemic equilibrium. However, we further require that the left positive eigenvectors $u^\top$ and $v^\top$ be linearly independent. In the next subsection, we present one method of selecting $B'$ and $\delta x$ and $\delta B$ (although there may be other approaches).
% Obviously, given $A$, there are an infinite number of $B^\prime$ matrices that satisfy such requirements. Clearly, there can be many ways of selecting $B^\prime$ and hence one can always find a suitable $B'$ for Theorem~\ref{thm:doubly_stable_method}. In the next subsection, we propose a specific procedure to select $B^\prime$.
% Lemma~\ref{cor:main_paper} shows a simple procedure to obtain a $B^\prime$ with the desired properties when given $A$, and forms the basis of the four step procedure outlined in the main paper.
% A key assumption in the Theorem hypothesis above is that the vectors $u$ and $v$ are linearly independent. The following lemma demonstrates that this is a reasonable assumption, in the sense that if we are given a particular positive matrix $A$ and thus a unique $\bar x$, then there exists an infinite number of $B^\prime$ matrices fulfilling \eqref{eq:equi_B'} with $u$ and $v$ linearly independent. Indeed, the particular choice of $B^\prime$ presented in the following lemma is what is presented in the main paper.
% \begin{theorem} \label{thm:doubly_stable_method}
% Suppose that $A$ and $B'$ are positive matrices, with $\rho(A) > 1$ and $\rho(B^\prime) > 1$, such that
% \begin{align}
% [I - (I - \bar X) A]\bar x &= \mathbf{0}_n \label{eq:equi_A} \\
% [I - (I - \bar X) B']\bar x &= \mathbf{0}_n, \label{eq:equi_B'}
% \end{align}
% where $\mathbf{1}_n \gg \bar x \gg \mathbf{0}_n$ is the unique endemic equilibrium of the single virus system \eqref{eq:single_virus}. Let $u^\top$ and $v^\top$, respectively, be the positive left eigenvector of $I - (I - \bar X) A$ and $I - (I - \bar X) B'$ associated with the simple eigenvalue at zero and normalized to satisfy $u^\top \bar x = v^\top \bar x = 1$, with existence assured by Lemma~\ref{lem:useful}. Suppose further that $u^\top$ and $v^\top$ are linearly independent. Then there exists $\delta x \in \mathbb{R}^n$ with arbitrarily small Euclidean norm and satisfying
% \begin{align}
% u^{\top}[\bar X(I -\bar X)^{-1}] \delta x &> 0 \label{eq:deltax_1} \\
% v^{\top}[\bar X(I -\bar X)^{-1}] \delta x &< 0. \label{eq:deltax_2}
% \end{align}
% Given such a $\delta x$ with suitable norm there exists a $\delta B \in \mathbb{R}^{n\times n}$ such that $B^\prime + \delta B$ is a positive matrix and also satisfies
% \begin{equation}\label{eq:delta_B}
% \delta B \bar x=[(I- \bar X)^{-2}-B']\delta x.
% \end{equation}
% Then, with $B := B' + \delta B$, the bivirus system in \eqref{eq:bivirus_dynamics} is such that both the survival of the fittest equilibria $(\bar x, \vect 0_n)$ and $(\vect 0_n, \bar y)$ are locally exponentially stable, and $\bar y = \bar x + \delta x+o(\delta)$.
% \end{theorem}
\subsection{Systematic construction procedure}\label{ssec:procedure}
To begin, we provide a specific method for constructing a suitable $B'$, with proof given in \ref{app:main_proof}.
% Starting with almost any given $A$ matrix (with spectral radius greater than 1) defining the contact layer for virus $1$, we construct in four steps a $B$ matrix defining the contact layer for virus $2$, so that the resulting bivirus system has the desired stability properties at $(\bar x, \vect 0_n)$ and $(\vect 0_n, \bar y)$.
Let $e_i$ be the $i$-th basis vector, with $1$ in the $i$-th entry and $0$ elsewhere.
\begin{lemma}\label{cor:main_paper}
Let $A$ be an irreducible nonnegative matrix fulfilling \eqref{eq:equi_A} for some $\bar{x}$ such that $\mathbf{1}_n > \bar x > \mathbf{0}_n$. For a fixed but arbitrary $i \in \mathcal{V}$, let $z^\top \neq \vect 0_n$ be chosen to satisfy $z^\top \bar x = 0$ and the $j$-th entry $z_j < 0$ only if $a_{ij} > 0$. Then, there exists a sufficiently small $\epsilon$ such that $B' := A + \epsilon e_i z^\top$ is an irreducible nonnegative matrix. Moreover, $B'$ fulfills the conditions in the hypothesis of Theorem~\ref{thm:doubly_stable_method}: $\rho(B') > 1$, \eqref{eq:equi_B'} is satisfied, and $u$ and $v$ are linearly independent.
\end{lemma}
%% RESULTS
% We now present a systematic method for constructing bivirus systems \eqref{eq:bivirus_dynamics} with multiple survival of the fittest outcomes. In particular, given almost any particular $A$ matrix with spectral radius greater than 1 defining the contact layer for virus $1$, we show how to construct a $B$ matrix defining the contact layer for virus $2$ so that both viruses can win a survival of the fittest battle, depending on the initial states. The idea is to set $B$ equal to $A$ plus small perturbations to its entries, with the perturbations strategically designed to ensure $(\bar x, 0)$ and $(0, \bar y)$ are locally exponentially stable (in the sense of Lyapunov's indirect method).
A procedure to systematically construct a bivirus network according to Theorem~\ref{thm:doubly_stable_method} is now presented.
{\bf Step 1.} Consistent with Theorem~\ref{thm:doubly_stable_method}, we begin by assuming that we are given an irreducible nonnegative matrix $A$ with spectral radius greater than 1.
% Positivity of $A$ implies that every node $i$ has an edge to every other node $j$ (including a self-loop) in the edge set $\mathcal{E}_A$, although the edge weights are allowed to be different and therefore the $\mathcal{E}_A$ layer in general has directed edges. The assumption that $A$ is positive makes for clearer exposition, but as we demonstrate in the sequel, this can be relaxed to allow for $A$ to be irreducible but not necessarily positive, corresponding to the $\mathcal{E}_A$ layer being strongly connected but not fully connected.
% Because we are given $A$, we are therefore also given $\bar x$ (see below Proposition~\ref{prop:boundary_stablility_cond}).
% (which can be computed using iterative algorithms, see e.g.~\cite[Theorem~4.3]{mei2017epidemics_review} or \cite[Theorem~5]{vanMeighem2009_virus}).
Construct the matrix $B^\prime = A + \epsilon e_i z^\top$ according to Lemma~\ref{cor:main_paper}.
{\bf Step 2.} With $u^\top$ and $v^\top$ as defined in Section~\ref{ssec:main_thm}, set $F = (I- \bar X)^{-2}-B'$ and $\tilde u^\top = u^{\top}\bar X(I -\bar X)^{-1}F^{-1}$ and $\tilde v^\top = v^{\top}\bar X(I -\bar X)^{-1}F^{-1}$. Note that $F$ is invertible and $F^{-1}$ is a positive matrix, as detailed in Appendix~\ref{app:main_proof}. Select two integers $j$ and $k$ for which $\tilde u_j/\tilde u_k > \tilde v_j/\tilde v_k$. This is possible since $u^\top$ and $v^\top$ (and thus $\tilde u^{\top}$ and $\tilde v^{\top}$ also) are linearly independent. Select $\alpha > 0$ to satisfy
\begin{equation*}
% \frac{\alpha \tilde u_j}{\tilde u_k} > 1 > \frac{\alpha \tilde v_j}{\tilde v_k},
\alpha \tilde u_j/\tilde u_k > 1 > \alpha \tilde v_j/\tilde v_k,
\end{equation*}
noting that such an $\alpha$ can always be found. Identify one positive entry in each of the $j$th row and $k$th row of $B'$, say $b_{jp}^\prime$ and $b_{kq}^\prime$. Set $\beta \in (0, b_{kq}^\prime \bar x_q)$. Finally, define the vector $s \in \mathbb R^n$ which has zeros in every entry except $s_k = -\beta$ and $s_j = \alpha\beta$. Compute $\delta x = F^{-1}s$.
% % :
% % \begin{subequations}\label{eq:inequalities}
% % \begin{align}
% % u^\top \bar X(I-\bar X)^{-1} \delta x & > 0\label{eq:ineq1} \\
% % v^\top \bar X(I-\bar X)^{-1} \delta x & < 0\label{eq:ineq2}.
% % \end{align}
% % \end{subequations}
% Since a solution is guaranteed by Theorem~\ref{thm:doubly_stable_method} and Lemma~\ref{cor:main_paper}, solutions can be computed easily using standard linear programming methods.
{\bf Step 3.} To obtain $\delta B$, set all of its entries to be equal to zero, except that $\delta b_{kq} = -\beta/\bar x_q$ and $\delta b_{jp} = \alpha \beta/\bar x_p$. Then, set $B = B^\prime + \delta B$.
% Given $\delta x$ computed above, and with $\bar x$ and $B^\prime$ known, find a solution $\delta B \in \mathbb R^{n\times n}$ of the linear matrix equation in \eqref{eq:delta_B}.
% % \begin{equation}\label{eq:deltaB_equality}
% % \delta B\bar x = \left((I-\bar X)^{-2} - B^\prime\right)\delta x.
% % \end{equation}
% Then, set $B = B^\prime + \delta B$, and check whether $B$ is an irreducible nonegative matrix. If not, proceed to Step 4.
{\bf Step 4.} (If necessary). Check that the resulting $B$ satisfies the necessary and sufficient condition for local stability outlined in Proposition~\ref{prop:boundary_stablility_cond}, and if not, iterate Step~1--3 with different choices of $z^\top$, $\epsilon$, $\alpha$, and $\beta$. The theoretical analysis uses arguments centred on perturbation methods (see Appendix~\ref{app:main_proof}), and the $\delta x$ and $\delta B$ must be sufficiently small. The design choices of the construction method are $z^\top$, $\epsilon$, $\alpha$, and $\beta$, and hence one may need to adjust/tune these values in order to obtain a suitable $B$.
% The design choices of the method are
% one may needed to run several iterations of the first three steps and try different $z^\top$, $\epsilon$, $\beta$, and $\alpha$ in order for the resulting $B$ to
Nonetheless, existence of such $B$ is guaranteed by Theorem~\ref{thm:doubly_stable_method}.
% In summary, Then, $B$ is equal to $B'$ except the following entries: $b_{kq} = b'_{kq}-\beta/\bar x_q$ and $b'_{jp} = a_{jp}+\alpha\beta/\bar x_p$ for the indices $j,k,p,q$ identified in Step~2.
With $z^\top$, $\epsilon$, $\alpha$, and $\beta$ as the design choices, there are numerous potential options which give rise to different suitable $B$. For instance, since $\bar x > \vect 0_n$, $z$ must have at least one positive and one negative entry in order to satisfy $z^\top \bar x = 0$, and so one straightforward implementation is to set $z_k = 1$ and $z_j = -\bar x_k/\bar x_j$, for arbitrary $k,j$. For the selected index $j$, we need $\epsilon < \min_{\{l\in \mathcal{V}: a_{lj} > 0\}} a_{lj}/z_j$ to ensure that $B'$ is nonnegative.
% Similarly, we need $\epsilon< \min_{j\in\mathcal{V}} a_{ij}$ to ensure $B'$ is nonnegative.
Then, $B'$ is equal to $A$ except for the following entries: for the particular choice of $e_i$, $b'_{im} = a_{im} +\epsilon z_m$ for any $z_m\neq 0$. Next, $B$ is equal to $B'$ except the following entries: $b_{kq} = b'_{kq}-\beta/\bar x_q$ and $b'_{jp} = a_{jp}+\alpha\beta/\bar x_p$ for the indices $j,k,p,q$ identified in Step~2.
% Note that due to perturbation-based approach to the development of Theorem~\ref{thm:doubly_stable_method}, one may needed to run several iterations of the construction procedure, and try out different $z^\top$, $\epsilon$, $\beta$, and $\alpha$ in order to obtain a suitable $B$ matrix which ensures the two survival-of-the-fittest equilibria are locally exponentially stable, but existence of such $B$ is guaranteed by Theorem~\ref{thm:doubly_stable_method}.
% {\color{red}We select $B' = A + \epsilon e_1 z^\top$, with $\epsilon = 0.5$ and $z^\top = [-1, 1, 0, 0, 0]$. Note that $z^\top \bar x = 0$ as required, but the choice of $z$ is not unique. Since $\bar x > \vect 0_n$, $z$ must have at least one positive and one negative entry, and so one straightforward method is to set $z_k = 1$ and $z_j = -z_k\bar x_k/\bar x_j$, for arbitrary $k,j$. Selecting $e_i$ (in this case $e_1$) implies that we obtain $B'$ by perturbing the $(i,j)$ and $(i,k)$-th entries of $A$ via the term $\epsilon e_i z^\top$ --- we thus need $\epsilon< \min_{j\in\mathcal{V}} a_{ij}$ to ensure $B'$ is nonnegative. This completes Step~$1$ of the procedure.}
If $A$ is a positive matrix, corresponding to an all-to-all connected virus~$1$ layer, then a more straightforward approach can be taken. We set $B'= A + \epsilon \vect 1_n z^\top$, with $z^\top \bar x = 0$ and $\epsilon$ sufficiently small to guarantee $B'$ is a positive matrix. Then, solve \eqref{eq:deltax_1} and \eqref{eq:deltax_2} for $\delta x$ using standard linear programming methods. Next, compute a solution $\delta B$ for \eqref{eq:delta_B} and apply a scaling constant to decrease the entries of $\delta B$ to ensure that $B = B'+\delta B$ remains a positive matrix. The challenge occurs when $A$ and $B'$ are not positive matrices, because any $\delta B$ satisfying \eqref{eq:delta_B} must have both positive and negative entries. This can be problematic if we obtain a solution $\delta B$ that has a negative entry where $B'$ has a zero entry but we also require $B$ to be nonnegative irreducible. The above four-step procedure resolves this issue, by producing a $\delta B$ whose single negative entry is in the same position corresponding to a positive entry in $B'$, and the former is smaller in magnitude than the latter.
% However, recall that Theorem~\ref{thm:doubly_stable_method} states that there always exists a solution $\delta B$ to \eqref{eq:delta_B} with $B = B'+\delta B$ nonnegative and irreducible. In [Appendix~\ref{app:main_proof} Step~1], we outline one specific procedure (but by no means the only procedure) to obtain a desired $\delta B$. We also require the solutions $\delta x$ and $\delta B$ to have ``sufficiently small'' Euclidean norm. This is straightforward to guarantee: if the $\delta x$ and $\delta B$ obtained in the first iteration are not ``sufficiently small'', one can simply apply a scaling constant that decreases the magnitude of the entries of $\delta x$, which in turn decreases $\delta B$, until the desired result is obtained.
In order to apply the four-step construction procedure, one requires knowledge of the infection matrix $A$, from which one can compute the endemic equilibrium $\bar x$ associated with the single virus system \eqref{eq:v1} (see below Proposition~\ref{prop:boundary_stablility_cond}). It is important to stress that only knowledge of the single virus system is needed, as opposed to knowledge of any bivirus system. From knowledge of $A$ and $\bar x$, one would construct a suitable $B^\prime$, and subsequently compute $\delta x$ and $\delta B$ as necessary.
% It is also important to note that our procedure is centralized, and a decentralized approach would certainly be of interest as a future direction of research.
\begin{figure*} [!htb]
\centering
\subfloat[]{\includegraphics[width= 0.3\textwidth]{Figures/different_initconds_3_1_v2.pdf}\label{fig:2a}}
\hfill
\subfloat[]{\includegraphics[width= 0.3\textwidth]{Figures/different_initconds_virus1wins.pdf}\label{fig:2b}}
\hfill
\subfloat[]{\includegraphics[width= 0.3\textwidth]{Figures/different_initconds_virus2wins.pdf}\label{fig:2c}}
\hfill
\\
\subfloat[]{\includegraphics[width= 0.3\textwidth]{Figures/different_turnoverrates.pdf}\label{fig:2d}}
\hfill
\subfloat[]{\includegraphics[width= 0.34\textwidth]{Figures/winner_graph.pdf}\label{fig:2e}}
\hfill
\subfloat[]{\includegraphics[width= 0.34\textwidth]{Figures/winner_graph_virus1faster.pdf}\label{fig:2f}}
\caption{The dynamics of the two-node case study of \eqref{eq:bivirus_dynamics}. In (a), the trajectories $(x_1(t), y_1(t))$ are shown for two different initial states (blue and red); virus 1 and virus 2 win the survival-of-the-fittest battle in the blue and red trajectories, respectively. In (b) and (c), the time evolution of $(x(t), y(t))$ is shown for the blue and red initial states in (a), respectively. In (d), we show the trajectories $(x_1(t), y_1(t))$ for virus $1$ and virus $2$ of the same speed (green, $\gamma = 1$) and virus 1 that is $1.2$ times faster relative to virus 2 (purple, $\gamma = 1.2$), for different initial states. The winning virus for different initial states is recorded when (e) virus 1 and virus 2 are the same speed and (f) when virus 1 is faster than virus 2, with $\gamma = 1.2$. Note the line where the boundaries of the two regions meet forms part of the stable manifold of the unstable coexistence equilibrium. } \label{fig:2}
% \vspace{15pt}
% \subfloat[]{\includegraphics[width= 0.4\textwidth]{Figures/PRE_5node_1_v2.pdf}\label{fig:irred_1wins}}
% \hspace{33pt}
% \subfloat[]{\includegraphics[width= 0.4\textwidth]{Figures/PRE_5node_2_v2.pdf}\label{fig:irred_2wins}}
% \caption{The dynamics of the $n = 5$ node example (note the logarithmic scale of time, $t$, along the horizontal axis). In (a) and (b), the time evolution of $(x(t), y(t))$ shows two different initial states yielding two different survival-of-the-fittest outcomes.} \label{fig:irred}
\end{figure*}
% \subsection{Case studies}
\section{Simulation Case Studies}\label{sec:simulations}
We now present two case studies to illustrate the procedure and the diverse limiting behavior that can be observed, including different survival-of-the-fittest outcomes. Full code at \url{https://github.com/lepamacka/bivirus_code} and \url{https://github.com/mengbin-ye/bivirus}.
% For the sake of clarity and simplicity, we first present a detailed case study of a network with two nodes, in Fig.~\ref{fig:2} and then another case study of a network with five nodes, in Fig.~\ref{fig:irred}.
\subsection{Two-node case study}
We consider a setting involving a two-node network, with each layer of the graph being complete. More specifically, we used the following matrices, obtained with the four-step procedure (note that all numerical values are reported at most to four decimal points):
%
\begin{align}
A &=
\begin{bmatrix}
3.2 & 2 \\
2 & 3.2 \\
\end{bmatrix}
,
\,\,\,\,\,\,
B =
\begin{bmatrix}
4.2 & 0.312 \\
6.1318 & 2.2 \\
\end{bmatrix}
%,
%\,\,\,
%D = I
%,
%\,\,\,
%E = I
.
\end{align}
%
The two single virus systems defined using the $A$ and $B$ above (see \eqref{eq:v1} and \eqref{eq:v2}) have the following two endemic equilibria $\bar{x} = [0.8077, 0.8077]^\top$ and $\bar{y} = [0.7801, 0.8699]^\top$,
% \begin{align}
% \bar{x}
% =
% \begin{bmatrix}
% 0.8077 \\
% 0.8077
% \end{bmatrix}
% ,
% \,\,
% \bar{y}
% =
% \begin{bmatrix}
% 0.7801 \\
% 0.8699
% \end{bmatrix},
% \end{align}
respectively. These define two survival-of-the-fittest equilibria $(\bar x, \vect 0_n)$ and $(\vect 0_n, \bar y)$ for the bivirus system in \eqref{eq:bivirus_dynamics}. We then obtain $\rho((I-\bar{Y})A) = 0.9276$ and $\rho((I-\bar{X})B) = 0.9436$,
%
% \begin{align}
% \rho((I-\bar{Y})A) &= 0.9276 \\
% \rho((I-\bar{X})B) &= 0.9436,
% \end{align}
which establishes that each survival-of-the-fittest equilibrium is locally exponentially stable, due to Proposition~\ref{prop:boundary_stablility_cond}. For $n = 2$, one can analytically compute coexistence equilibria, see~\citep{ye2022_bivirus}. We used Maple to analytically identify a unique coexistence equilibrium $(\Tilde{x}, \Tilde{y})$:
%
\begin{align}
\Tilde{x}
=
\begin{bmatrix}
0.5467 &
0.4180
\end{bmatrix}^\top
,
\,\,
\Tilde{y}
=
\begin{bmatrix}
0.2418 &
0.4101
\end{bmatrix}^\top
.
\end{align}
%
The Jacobian matrix of \eqref{eq:bivirus_dynamics} at this coexistence equilibrium has three negative real eigenvalues of $-5.4373$, $-3.8924$ and $-0.7507$ and one unstable eigenvalue of $0.0321$ (see \citep{ye2022_bivirus,ye2022bivirus_survey} for expressions of the Jacobian matrix).
% is
% %
% \begin{equation*}
% J(\Tilde{x}, \Tilde{y})
% =
% \begin{bmatrix}
% -2.9088 & 0.4229 & -2.5855 & 0 \\
% 0.3439 & -2.8808 & 0 & -2.4310 \\
% -1.1436 & 0 & -1.2555 & 0.0660 \\
% 0 & -2.3849 & 1.0543 & -3.0067
% \end{bmatrix}
% ,
% \end{equation*}
% %
% The largest real part of any eigenvalue of $J(\tilde x, \tilde y)$ is $\sigma(J(\Tilde{x},\Tilde{y})) = 0.0321$,
% %
% % \begin{equation}
% % \sigma(J(\Tilde{x},\Tilde{y}) = 0.0321,
% % \end{equation}
% %
% making the coexistence equilibrium unstable. The other eigenvalues of $J(\tilde x, \tilde y)$ are $-5.4373, -3.8924$ and $-0.7507$.
Fig.~\ref{fig:2a} shows the phase portrait for two initial states in $\intr(\Delta)$ that are close together: Initial state 1, $x(0) = [0.1, 0.1]^\top$ and $y(0) = [0.05, 0.05]^\top$, and Initial state 2, $x(0) = [0.09, 0.09]^\top$ and $y(0) = [0.06, 0.06]^\top$. Different survival-of-the-fittest outcomes occur, with either virus~1 (blue) or virus~2 (red) winning. Figs.~\ref{fig:2b} and \ref{fig:2c} show the time evolution of the blue and red trajectories in Fig.~\ref{fig:2a}, respectively. It is notable that there is a rapid initial transient that takes the system to a point very close to a curve that connects $(\bar x, \vect 0_n)$ to $(\vect 0_n, \bar y)$ and passes through the unstable coexistence equilibrium (magenta cross), followed by a slower convergence to the two survival equilibria.
% \textbf{Initial states}: The blue trajectory in Fig.~\ref{fig:2a} (and the time plot in Fig.~\ref{fig:2b}) has initial states $(x(0), y(0))$ with $x(0) = [0.1, 0.1]^\top$ and $y(0) = [0.05, 0.05]^\top$. This is ``Initial state~1''. The red trajectory in Fig.~\ref{fig:2a} (and the time plot in Fig.~\ref{fig:2c}) has initial states $(x(0), y(0))$ with $x(0) = [0.09, 0.09]^\top$ and $y(0) = [0.06, 0.06]^\top$. This is ``Initial state~2''. The unique coexistence equilibrium $(\Tilde{x}, \Tilde{y})$ of the system is denoted in Fig.~\ref{fig:2a} (magenta cross)
Separating the time-scales of the two viruses can change the shape of the regions of attraction for $(\bar x, \vect 0_n)$ and $(\vect 0_n, \bar y)$, but the local exponential stability property is unchanged, and thus both regions will always have non-zero Lebesgue measure. Time-scale separation can be easily achieved by introducing a parameter $\gamma > 0$ and modifying \eqref{eq:virus1_dynamics} to be
\begin{equation}\label{eq:virus1_faster}
\dot x(t) = \gamma\Big(- x(t) + (I-X(t)-Y(t))Ax(t)\Big).
\end{equation}
Adjusting $\gamma$ allows study of scenarios of interest where virus~1 has much faster or slower dynamics relative to virus~2. Fig.~\ref{fig:2d} shows the trajectories for the two viruses having the same speed (green) and virus 1 being faster than virus 2 (purple, $\gamma = 1.2$). We set ``Initial state~1" (square symbol) to be $x(0) = [0.09, 0.09]^\top$ and $y(0) = [0.06, 0.06]^\top$, ``Initial state~2" (circle symbol) as $x(0) = [0.25, 0.25]^\top$ and $y(0) = [0.05, 0.05]^\top$, and ``Initial state~3" ({\Large$*$} symbol) as $x(0) = [0.05, 0.05]^\top$ and $y(0) = [0.2, 0.2]^\top$.
% These initial states are then simulated using $\gamma=1$ (green line) and $\gamma=1.2$ (purple line).
The unique coexistence equilibrium (magenta cross) obviously remains unchanged for any positive $\gamma$. Thus, from the same initial condition, the virus that survives may depend on the relative speeds of the two viruses, but there are always two nontrivial regions of attraction for the two stable equilibria.
% Fig.~\ref{fig:2e} indicates the initial states that lead to virus~1 or virus~2 winning the survival-of-the-fittest battle, for initial states constrained to satisfy $x_i(0)+y_i(0) = 0.01$ for $i = 1,2$.
In Fig.~\ref{fig:2e}, we create a $150\times 150$ grid of initial states, imposing a constraint that $x_i(0)+y_i(0) = 0.01$ for $i = 1,2$. For each point on this grid, we simulated the system over a large time window and recorded the particular equilibrium point reached. The figure thus divides the phase plane into two regions of attraction, for initial states that resulted in virus~1 or virus~2 winning the survival-of-the-fittest battle. Fig.~\ref{fig:2f} is generated using the exact same procedure as Fig.~\ref{fig:2e}, except we change the timescale for virus 1 by setting $\gamma=1.2$, resulting in a marked shift in the regions of attraction.It appears that as the dynamics of one virus becomes faster, the region of attraction increases in size, which accords with intuition.
% Fig.~\ref{fig:2f} maps out the same region, but with virus~$1$ having the faster dynamics relative to virus~$2$. Consistent with the above, we see that adjusting the relative dynamics changes the shape of the region for which virus~$1$ or virus~$2$ wins the survival battle. It appears that as the dynamics of one virus becomes faster, the region of attraction increases in size, which accords with intuition.
% Note that in this case study, the coexistence equilibrium $(\tilde x, \tilde y)$ is in fact unstable, as the associated Jacobian has one eigenvalue with positive real part.
% This is a separate and notable conclusion because to the best of our knowledge, this is the first instance of an \textit{unstable} coexistence equilibrium for the system \eqref{eq:bivirus_dynamics} reported in the literature.
It is known that the region of attraction for an equilibrium forms an open set~\citep{chiang2015stability}, and in our case study there are two locally stable equilibria (the two survival-of-the-fittest equilibria) and two unstable equilibria (the healthy equilibrium and the coexistence equilibrium). Thus, the boundaries of the regions of attraction for $(\bar x, \vect 0_n)$ and $(\vect 0_n, \bar y)$ do not belong to the region of attraction of either, and if the system is initialized at a common point of the two boundaries, then necessarily the trajectories do not converge to either stable equilibrium. In fact, the common boundary of the two regions of attraction forms the stable manifold of the coexistence equilibrium $(\tilde x, \tilde y)$, which has zero Lebesgue measure~\citep{chiang2015stability}. Initial states on this manifold would lead to convergence to $(\tilde x, \tilde y)$, providing a third outcome of the battle, namely coexistence, which is unlikely to be encountered in practice but is not impossible.
% where nodes~$1$ and $2$ each have individuals infected with both virus~$1$ and virus~$2$, different from an outcome where only one virus wins the survival battle.
% Since stable manifolds of unstable equilibria have zero Lebesgue measure~\citep{chiang2015stability}, this third outcome is unlikely to be encountered in practice, but is not impossible.
Certain trajectories may appear to converge to the unstable equilibrium, but after some time end up moving on to one of the survival-of-the-fittest equilibria.
% \subsubsection*{Initial states}
% In Figs.~\ref{fig:2d}--\ref{fig:2f}, different timescales are used for virus~$1$, as defined $\gamma$ in \eqref{eq:virus1_faster}.
% % \begin{equation}
% % \dot{x}(t) = \gamma(-x(t) + (I-X(t)-Y(t))Ax(t)).
% % \end{equation}
% The two timescales used are $\gamma=1$ and $\gamma=1.2$ (green and purple lines in Fig.~\ref{fig:2d}, respectively).
% The three initial states $(x(0), y(0))$ in Fig.~\ref{fig:2d} are defined as follows. For ``Initial state~1" (square symbol) we set $x(0) = [0.09, 0.09]^\top$ and $y(0) = [0.06, 0.06]^\top$. For ``Initial state~2" (circle symbol) we set $x(0) = [0.25, 0.25]^\top$ and $y(0) = [0.05, 0.05]^\top$. For ``Initial state~3" ({\Large$*$} symbol) we set $x(0) = [0.05, 0.05]^\top$ and $y(0) = [0.2, 0.2]^\top$. These initial states are then simulated using $\gamma=1$ (green line) and $\gamma=1.2$ (purple line). The unique coexistence equilibrium of the system is also denoted in Fig.~\ref{fig:2d} (magenta cross), and it obviously remains unchanged for any positive $\gamma$.
% {\color{red}Talk about the hypersurface which is the attractive manifold for the unstable coexisting equilibrium}.
% We next present a case study with $n = 5$ nodes, with details of the setup reported in Appendix~\ref{app:3node}. For two different sets of initial states, Fig.~\ref{fig:irred_1wins} and Fig.~\ref{fig:irred_2wins} show that virus~$1$ and virus~$2$ win the survival-of-the-fittest battle, respectively. Notice the logarithmic scale of the $x$-axis. A detailed step-through of the construction procedure is given in Appendix~\ref{app:3node} for this five node example, illustrating the choices and computation of e.g. $z$ and $\beta,\alpha$.
\subsection{Real-world network case study}
In this section, we present a case study involving a real-world network topology. We consider a mobility network reported in Ref.~\citep{parino2021modelling}, capturing commuting patterns for people between $n=107$ provinces in Italy. The original network $\bar{\mathcal{G}}$, with associated adjacency $\bar A$, is a complete directed graph, i.e., $\bar A$ is a positive matrix but it is not symmetric. Due to differences in commuting patterns, journeys between some provinces were highly frequent, whereas journeys between some other provinces were virtually nonexistent save for a small number of individuals, so the largest and smallest entries of $\bar A$ differed by several orders of magnitude.
% Let $\bar A$ be the adjacency matrix associated with the original mobility network $\bar{\mathcal{G}}$.
For computational convenience, we first normalize this matrix so that the row sums are equal to $2$, i.e. $\bar A \vect 1_n = 2\vect 1_n$.
% Note that this does not affect the validity of our approach, as our proposed construction procedure can be applied for any set of edge weights.
Then, we obtain the matrix $A$ by setting each entry as $a_{ij} =
\bar a_{ij}$ if $\bar a_{ij} \geq \kappa$, and $a_{ij} = 0$ otherwise,
% \begin{equation}
% a_{ij} = \begin{cases}
% \bar a_{ij} & \text{if } \bar a_{ij} \geq \kappa, \\
% 0 & \text{if } \bar a_{ij} < \kappa
% \end{cases}
% \end{equation}
where the scalar $\kappa > 0$ acts as a threshold. By using $\kappa = 5\times 10^{-5}$, we obtained an $A$ matrix that was nonnegative irreducible but not positive (and thus the graph associated with $A$ is strongly connected but not complete). We normalized $A$ to satisfy $A\vect 1_n = 2\vect 1_n$, and then set $A$ to be the adjacency matrix associated with the network layer of virus~$1$.
We followed the systematic construction procedure outlined in Section~\ref{ssec:procedure} to obtain $B$. First, note that $\bar x = 0.5\vect 1_n$ due to our normalization. We selected the $48$-th basis vector, i.e., $i = 48$ for the vector $e_i$. The vector $z$ (of dimension $107$) was a vector of zeros, except $z_{48} = 1$ and $z_{55} = -1$, and $\epsilon = 0.2346$. After following the four step construction procedure, we obtained $B = A$, except the following four entries were adjusted: $b_{48,48} = a_{48,48}+0.2346$, $b_{48,55} = a_{48,55} -0.2346$, $b_{48,69} = a_{48,69} - 0.0205$, $b_{55,100} = a_{55,100} + 5.0795\times 10^{-4}$.
% \begin{align*}
% &b_{48,48} = a_{48,48}+0.2346, \\
% &b_{48,55} = a_{48,55} -0.2346,\\
% &b_{48,69} = a_{48,69} - 0.0205,\\
% &b_{55,100} = a_{55,100} + 5.0795\times 10^{-4}.
% \end{align*}
We can compute that $\rho((I-\bar Y)A) = 0.9999914$ and $\rho((I-\bar X)B) = 0.9999964$, and hence $(\bar x, \vect 0_n)$ and $(\vect 0_n, \bar y)$ are locally exponentially stable. The network is shown in Fig.~\ref{fig:italy_network}, with the matrices $A$ and $B$ found in the online repository mentioned at the start of Section~\ref{sec:simulations}.
% Note that due to the large size of the network, and that some entries of $A$ differed by several orders of magnitude, we needed to run several iterations of the construction procedure, and try out different values of $\epsilon, \beta, \alpha$ in order to obtain a suitable $B$ matrix. Nonetheless, it was possible to obtain several different $B$ matrices which satisfied Theorem~\ref{thm:doubly_stable_method}.
We consider two sets of initial conditions. We first sample $p_i$ and $q_i$ from a uniform distribution $(0,1)$, for all $i \in \{1,\hdots, n\}$. For the first set of initial conditions, we set $x_i(0) = p_i/(p_i+q_i)$ and $y_i(0) = 0.1q_i/(p_i+q_i)$. This ensures that $x_i(0) + y_i(0) < 1$ as required, and the initial virus~$1$ infection level is ten times that of virus~$2$ at any node $i$. For the second set of initial conditions, we set $x_i(0) = p_i/(p_i+q_i)$ and $y_i(0) = 0.5q_i/(p_i+q_i)$. Hence, the initial virus~$1$ infection level is twice as large as that of virus~$2$ for any node $i$. Fig.~\ref{fig:italy_virus1_wins} corresponds to the first set of initial conditions, where virus~$1$ emerges as the winner of the survival-of-the-fittest battle. In contrast, Fig.~\ref{fig:italy_virus2_wins} corresponds to the second set of initial conditions, where virus $2$ wins the battle. Interestingly, virus~$2$ is still able to win the survival-of-the-fittest battle, even if initial infection levels satisfied $x_i(0) = 2 y_i(0)$ for all $i$.
% We consider the mobility network reported in \citep{parino2021modelling}. The network captures commuting patterns between $n=107$ provinces in Italy, which could be considered as a proxy for the interaction frequencies of individuals between provinces.
\begin{figure*}
\begin{minipage}{0.5\linewidth}
\subfloat[Virus~1 wins]{\includegraphics[width= 0.8\textwidth]{Figures/Italy_virus1_wins.pdf}\label{fig:italy_virus1_wins}}
\vfill
\subfloat[Virus~2 wins]{\includegraphics[width= 0.8\textwidth]{Figures/Italy_virus2_wins.pdf}\label{fig:italy_virus2_wins}}
\end{minipage}
\hfill
\begin{minipage}{0.45\linewidth}
\subfloat[Network of commuting patterns between Italian provinces]{\includegraphics[width= 0.9\textwidth]{Figures/Italy_network.png}\label{fig:italy_network}}
\end{minipage}
\caption{The dynamics of the $n = 107$ example for a mobility network of Italian provinces (note the logarithmic scale of time, $t$, along the horizontal axis). In (a) and (b), the time evolution of $(x(t), y(t))$ shows two different initial states yielding two different survival-of-the-fittest outcomes.} \label{fig:italy}
\end{figure*}
% \begin{figure}
% \centering
% \def\svgwidth{0.7\linewidth}
% \input{cool_figure.pdf_tex}
% \caption{Existing results (blue shaded regions) and new phenomena reported in this paper (red shaded region), characterized by $\rho_1$ and $\rho_2$, which are the spectral radii of $(I-\bar X)B$ and $(I-\bar Y)A$, respectively.
% % The equilibria $(\bar x, \vect 0_n)$ and $(\vect 0_n, \bar y)$ correspond to virus 1 and virus 2 winning a survival-of-the-fittest battle, respectively.
% % The (local) stability properties of the equilibria $(\bar x, \vect 0_n)$ and $(\vect 0_n, \bar y)$ ---which correspond to virus 1 and virus 2 winning a survival of the fittest battle, respectively--- are governed by $\rho_1$ and $\rho_2$, respectively.
% In Region~I, $(\bar x, \vect 0_n)$ and $(\vect 0_n, \bar y)$ are unstable and locally exponentially stable, respectively. In Region~II, $(\bar x, \vect 0_n)$ and $(\vect 0_n, \bar y)$ are both unstable. In Region~III, $(\bar x, \vect 0_n)$ and $(\vect 0_n, \bar y)$ are locally exponentially stable and unstable, respectively. In Region IV, $(\bar x, \vect 0_n)$ and $(\vect 0_n, \bar y)$ are \textit{both} locally exponentially stable. \vspace{-11pt}
% % All existing literature provide numerical examples or sufficient conditions on $A$ and $B$ which yield bivirus networks belonging to Regions~I--III. In this letter, we show how to systematically construct $A$ and $B$ that yield bivirus networks belonging in Region IV, where $(\bar x, \vect 0_n)$ and $(\vect 0_n, \bar y)$ are \textit{both} locally exponentially stable.
% }
% \label{fig:cool_figure}
% \end{figure}
% The \texttt{\textsc{matlab}} code for the automatic generation of bivirus networks for arbitrary $n$ nodes, and the proposed procedure are available at~\footnote{\url{https://github.com/lepamacka/bivirus_code}.}.
% We remark that our procedure is centralized, in the sense that a single designer with full knowledge of $A$ executes the four step method outlined.
% Clearly, a decentralized or distributed method would be of interest as future work.
% The computational complexity scales well with increasing network size, as the key computations rest on two linear matrix inequalities and an equality.
% \subsection{Discussions}
% The contributions in this paper are illustrated in Fig.~\ref{fig:cool_figure}. We begin by highlighting that the outcome for `generic' bivirus networks is convergence to a stable equilibrium for `almost all' initial conditions~\citep{ye2022_bivirus} (see the reference for details on technical definitions of `generic' and `almost all'). The key question, then, is as follows: to which equilibrium does convergence occur? Assuming networks endowed with an arbitrary topology, for survival-of-the-fittest battles, Regions~I--III (colored in blue) highlight the outcomes recorded in the existing literature, whereas Region~IV (colored in red) depicts the novel outcome presented in this paper. The spectral radii of $(I-\bar X)B$ and $(I-\bar Y)A$, denoted by $\rho_1$ and $\rho_2$, respectively, are depicted on the $y$ and $x$-axis. The local stability properties of $(\bar x, \vect 0_n)$ and $(\vect 0_n, \bar y)$ are precisely determined by $\rho_1$ and $\rho_2$, respectively~\cite[Theorem~3.10]{ye2022_bivirus}. %(see the Supplemental Material for details).
% The existing literature has identified sufficient conditions on $A$ and $B$ that result in the bivirus network exhibiting the behavior depicted in Region~I (resp. Region~III), where virus~$2$ (resp. virus~$1$) win the survival-of-the-fittest battle, see ~\citep{santos2015bi,santos2015bivirus_conference,janson2020networked,sahneh2014competitive,liu2019bivirus,carlos2}.
% %In the literature, different sufficient conditions on $A$ and $B$ are given that place the bivirus network into Region~I or III, where virus~2 and virus~1 win the survival of the fittest battle, respectively~\citep{santos2015bi,santos2015bivirus_conference,janson2020networked,sahneh2014competitive,liu2019bivirus}.
% In fact, global stability of a specific survival-of-the-fittest equilibrium is secured in \citep{santos2015bi,santos2015bivirus_conference}. Sufficient conditions can also be identified for the bivirus network to be in Region II, where both survival equilibria are unstable~\citep{sahneh2014competitive,janson2020networked,carlos2}, and hence convergence must occur to a coexistence equilibrium (which may or may not be unique).
% % For the particular case of a $3$-node network endowed with a specialized topology that disallows self-loops, a necessary and sufficient condition for local exponential stability of each of the survival-of-the-fittest equilibria, corresponding to Region~IV, was identified in \citep{carlos2}. However, to the best of our knowledge, the literature has not considered bivirus networks in Region~IV for networks with arbitrary but finite number of nodes endowed with an arbitrary topology on either layer.
% % The present paper addresses this gap by showing that there exist bivirus networks in Region~IV for arbitrary $n$, and then presents a procedure to obtain such a system.
% % Parenthetically, we note that both heterogeneous and homogeneous rates can give rise to an unstable coexistence equilibrium. (In more detail, we say virus~$1$ has homogeneous rates if $A = \alpha \hat A$ where $\alpha > 0$ is a constant and the entries of $\hat A$ are equal to $0$ or $1$ (and similarly for virus~$2$) --- the virus has heterogeneous rates otherwise.) We note that our construction method may promote the virus~$2$ layer to be defined by heterogeneous rates, even if virus~$1$ has homogeneous rates. A line of coexistence equilibrium can also exist, with homogeneous rates~\citep{liu2019bivirus} or with heterogeneous rates~\citep{ye2022_bivirus}. The zero patterns in $A$ and $B$ are typically irrelevant in drawing these conclusions, provided both are irreducible.
% % Network models, including those described by deterministic ordinary differential equations, have become increasingly of interest to examine epidemic spread over meta-populations where populations have distinct characteristics (e.g. spatial separation)~\citep{brockmann2013epidemic_propagate,della2020network,brauer2008mathematical}. As demonstrated in the real-world network case study, our results and findings are valid for large-scale networks. There has also been an increasing interest in understanding how multiple strains/lineages of a virus (such as gonorrhoea and drug-resistant gonorrhoea considered in \citep{carlos2}) spread and compete against one another, especially due to the attention placed on the multiple COVID-19 strains. While the model considered in this paper is not the only model of competitive epidemic spread, our results do serve to underscore the potentially diverse outcomes of survival-of-the-fittest battles for different virus strains.
% % As a final comment on our contributions, we point out that the two-node example involves positive $A$ and $B$ (corresponding to a complete directed network on each network layer), while the five-node example involves $A$ and $B$ which are nonnegative irreducible but not positive (the network layers are not complete, but are strongly connected). Moreover, the $A$ and $B$ have different zero-nonzero entry patterns, implying the network topologies of the two layers may include distinct infection paths. In the real-world case study, $A$ and $B$ are once again nonnegative irreducible but not positive, but now share the same zero-nonzero entry patterns. Finally, we record in Appendix~\ref{app:3node} another example where the matrices $A$ and $B$ have all zeros on their diagonals. Put simply, our results and construction procedure can be applied to a broad range of modeling contexts, and are not restrictive for the allowable $A$ and $B$ except requiring their irreducibility. We only assume that the dynamical system obeys \eqref{eq:bivirus_dynamics}, which is a general formulation.
% % In fact, the Supplemental Material record a necessary and sufficient condition, on which the four step method is built.
% % In summary, we explored a classical model for competing epidemic spreading across a networked population, using the deterministic SIS bivirus network model. It was shown to be possible to have bivirus networks where the winner of a survival of the fittest battle depends nontrivially on the initial state of the network. This significantly expands the known dynamical phenomena of the bivirus model. A systematic procedure was presented to generate such a bivirus network, given the infection matrix $A$ defining the network layer of virus 1. A key direction of future work is to extend this construction method to models of three or more competing viruses (multivirus networks)~\citep{janson2020networked}. Our work did not provide theoretical conclusions on the presence or stability properties of coexistence equilibria, although our example demonstrated a unique unstable coexistence equilibrium; this is another future focus.
\section{Conclusion}\label{sec:conclusions}
In summary, we explored a fundamental problem for competing epidemics spreading using the deterministic SIS bivirus network model.
% We recalled a necessary and sufficient condition on the two infection matrices $A$ and $B$, defining the network layers of virus~$1$ and virus~$2$, respectively, such that the winner of a survival-of-the-fittest battle depends nontrivially on the initial state of the bivirus network.
We provided a rigorous argument which demonstrated that for almost any $A$, there exists a $B$ such that the pair of matrices ($A, B$) satisfied a certain necessary and sufficient condition under which the winner of a survival-of-the-fittest battle depends nontrivially on the initial state of the bivirus network. Then, we presented a systematic procedure to generate such a bivirus network, and studied three numerical examples. This paper significantly expands the known dynamical phenomena of the bivirus model, but should be considered as just a first important step for the epidemic modeling community to explore the diverse new outcomes that are now unlocked for competing epidemic spreading models. A key direction of our future work is to investigate models of three or more competing viruses (multivirus networks)~\citep{janson2020networked}, and to explore how the regions of attraction might change as a function of the relative speeds of the different virus dynamics. Our work did not provide theoretical conclusions on the presence or stability properties of coexistence equilibria, although our example demonstrated a unique unstable coexistence equilibrium; deeper investigation of uniqueness, multiplicity and stability of coexistence equilibria is a current focus~\citep{anderson2022_bivirus_PH}.
% {\color{red}Here, we can maybe use simulations to additionally explore features of the bivirus model. Axel had some preliminary simulations showing that you can decrease or increase the region of attraction for the two viruses, while preserving the doubly stable boundary equilibria property.
% Depending on the length of the note at this point, we could also consider covering the following
% \begin{enumerate}
% % \item The idea behind how the 4 steps work, that we start with two neutrally stable boundary equilibria.
% % \item That $B^\prime$ and $A$ give you a line of equilibria that is locally exponentially stable.
% % \item Bivirus system is monotone, and therefore convergence generally occurs when the number of equilibria are finite. This means the region of attraction in the $n = 2$ example for the boundary equilibria cover almost all of $\intr(\Delta)$.
% \end{enumerate}
% Along with some large and fancy figures for the simulations (need Axel's help), abstract, references, and discussions (1--3 paragraphs), we should be around 4 pages, which is perfect. General length constraint is that the 5th page should only consist of references.
% }
%% DISCUSSIONS -- Maybe 1--3 paragraphs to discuss the results, important insights, and future work. We should mention that our method requires a centralised computation, which is obviously a drawback for study of networked systems. But it is systematic, and guaranteed to work. Should we flag extension to multi-virus systems?
% \begin{figure}
% \centering
% \input{figures/schema}
% \caption{Schematic of the co-evolutionary paradigm.}
% \label{fig:schematic}
% \end{figure}
% \begin{table}
% \centering
% \caption{Notation.}\label{tab:notation}
% \begin{tabular}{r| l r|l}
% $n$& population size&$\lambda$&infection probability\\
% $\mathcal E_I$& influence layer&$\mu$&recovery probability\\
% $\mathcal E_C(t)$& contact layer&$u(t)$ & policy interventions\\
% $d_i$& influence degree of $i$&$\beta$ & rationality\\
% $x_i(t)$ & behavior of $i$&$c$ & immediate cost\\
% $y_i(t)$ & health state of $i$&$\gamma$ & accumulation factor\\
% $z(t)$ & detected prevalence&$\quad f_i(t)$ & frustration function of $i$
% \end{tabular}
% \label{notation}
% \end{table}
\appendix
% \section{Preliminaries}\label{app:prelim}
% Here, we provide some notation and introduce useful linear algebra results. We then introduce the bivirus system dynamics and recall established results on its behaviour.
% {\color{red} Prior to doing so however, we indicate a result in linear algebra~\cite[pg. 15.2, Fact 3]{hogben2006handbook}. The reference actually simply attributes the result to a book by Stewart and Sun; it does not impose a requirement that the eigenvalue be simple. It is a perturbational equivalent of the result of \cite[Theorem~8]{magnus1998matrix}, although this particular reference only considers symmetric matrices.}
% \subsection*{Stability of dynamical system through Jacobian analysis}
% A general nonlinear system dynamical equation takes the form $\dot x(t)=f(x(t))$, and equilibria of this system are given by those $\bar x$ for which $f(\bar x)=0$. The associated Jacobian matrix is given by $J_f(\bar x)=\frac{\partial f}{\partial x}\vert_{x=\bar x}$. The equilibrium $\bar x$ is locally asymptotically stable (actually exponentially so) if and only if $\sigma(J_f(\bar x))<0$, and unstable if $\sigma(J_f(\bar x))>0$, see \cite[Theorem 4.15 and Corollary~4.3]{khalil2002nonlinear}.
% \subsection*{Bivirus system and known properties}
%Here, we introduce the bivirus system dynamics, and then recall some of its properties as established in the existing literature.
%We consider a meta-population of $n \geq 2$ nodes, captured by the set $\mathcal{V} = \{1, \hdots, n\}$. Each node represents a single well-mixed population of individuals, with large and constant size. There are two viruses spreading, termed virus 1 and virus 2 for convenience, across a two-layer contact network $\mathcal{G} = (\mathcal{V}, \mathcal{E}_A, \mathcal{E}_B, A, B)$. The edge sets $\mathcal{E}_A$ and $\mathcal{E}_B$ capture the spreading network for virus 1 and virus 2, respectively. In general, each network layer is assumed to be strongly connected, but the layers are allowed to be different. We maintain this assumption throughout the paper. The nonnegative matrix $A \in \mathbb{R}_{\geq 0}^{n\times n}$ has $(i,j)$th entry $a_{ij}$ defined as $a_{ij} > 0$ if and only if $(j,i) \in \mathcal{E}_A$. The nonnegative matrix $B$ is defined similarly using $\mathcal{E}_B$. Requiring the network layers to be separately strongly connected is equivalent to requiring $A$ and $B$ to be irreducible. The entries $a_{ij}$ and $b_{ij}$ of $A$ and $B$ represent the infection rate from node $j$ to node $i$, for virus 1 and virus 2, respectively. The healing rates of the nodes with respect to virus 1 and virus 2 are captured by positive diagonal matrices $D$ and $E$, respectively. These can be different for the two viruses, and different between nodes.
% Associated with each node $i\in\mathcal{V}$ are the states $x_i(t) \in [0, 1]$ and $y_i(t) \in [0,1]$, which represent the fraction of the population at node $i$ that is infected with virus 1 and virus 2, respectively. By collecting the states of all nodes in the two-layer network, infection fraction vectors are given as $x(t) = [x_1(t), \hdots, x_n(t)]^\top$ and $y(t) = [y_1(t), \hdots, y_n(t)]^\top$.
%%%% - Commented out 2022-07-24
% If we assume the general case with non-unit healing rates, then the dynamical equations in \eqref{eq:bivirus_dynamics} are replaced by
% \begin{subequations}\label{eq:bivirus_dynamics_general}
% \begin{align}
% &\dot x(t) = - Dx(t) + (I-X(t)-Y(t))Ax(t) \label{eq:virus1_dynamics_gen} \\
% &\dot y(t) = - Ey(t) + (I-X(t)-Y(t))By(t), \label{eq:virus2_dynamics_gen}
% \end{align}
% \end{subequations}
% where the positive diagonal matrices $D$ and $E$ capture the healing rates from virus~$1$ and virus~$2$, respectively.
% The Jacobian of the right side of \eqref{eq:bivirus_dynamics_general} is now presented, and will be used throughout our subsequent analysis. With $Q (x,y) = -D+(I-X-Y)A$ and $R(x,y) = -E+(I-X-Y)B$, the Jacobian is
% \begin{equation}\label{eq:jacob_bivirus}
% J(x,y)=\begin{bmatrix}
% Q(x,y)-{\rm{diag}}(Ax)&-{\rm{diag}}(Ax)\\
% -{\rm{diag}}(By)&R(x,y)-{\rm{diag}}(By)
% \end{bmatrix}.
% \end{equation}
%%%% - End comment out
% The Jacobian of the right side of \eqref{eq:bivirus_dynamics} is now presented, for subsequent use. With $Q (x,y) = -I+(I-X-Y)A$ and $R(x,y) = -I+(I-X-Y)B$, the Jacobian is
% \begin{equation}\label{eq:jacob_bivirus}
% J(x,y)\!=\!\begin{bmatrix}
% Q(x,y)\!-\!{\rm{diag}}(Ax)&-{\rm{diag}}(Ax)\\
% -{\rm{diag}}(By)&R(x,y)\!-\!{\rm{diag}}(By)
% \end{bmatrix}
% \end{equation}
% {\color{red}Having established that the set $\Delta$ is forward invariant, we are now interested in the equilibria of \eqref{eq:bivirus_dynamics_general}. In epidemiology, the basic reproduction number is defined as the number of secondary infection cases generated by a single infected individual infected, if the rest of the population is susceptible~\citep{hethcote2000mathematics}. Here, we define $\mathcal R_1 = \rho(D^{-1}A)$ and $\mathcal{R}_2 = \rho(E^{-1}B)$ as the effective reproduction number for virus 1 and virus 2, respectively. To begin, we first present the single virus SIS model, which occurs if for instance virus 2 is not present in any node at $t = 0$, viz. $y(0) = \vect 0_n$. Then \eqref{eq:virus1_dynamics_gen} reads as
% \begin{equation}\label{eq:single_virus}
% \dot{x}(t) = -Dx(t) + (I - X(t))Ax(t).
% \end{equation}
% The limiting behavior of the single virus dynamics can be fully characterized by $\mathcal{R}_1$, see e.g.~\citep{Lajmanovich1976,mei2017epidemics_review,ye2021_PH_TAC}. Specifically, if $\mathcal{R}_1 \leq 1$, then $\lim_{t\to\infty} x(t) = \vect 0_n$ for all $x(0) \in [0, 1]^n$. We call $\vect 0_n$ the healthy equilibrium. If $\mathcal{R}_1 > 1$, then $\lim_{t\to\infty} x(t) = \bar x$ for all $x(0) \in [0, 1]^n \setminus \{\vect 0_n\}$, where $\vect 0_n < \bar x < \vect 1_n$ is the unique non-zero equilibrium which is exponentially stable. The same conclusions hold if virus 2 is present and virus 1 is not, $x(0) = \vect 0_n$, but using the reproduction number $\mathcal{R}_2$.
% For the bivirus system \eqref{eq:bivirus_dynamics_general}, clearly there is always the healthy equilibrium $(x = \vect 0_n, y = \vect 0_n)$, where each population (node) has no fraction of individuals infected with either virus. Notice from \eqref{eq:bivirus_dynamics_general} that
% $$ (I - X(t) - Y(t))Ax(t) \leq (I - X(t))Ax(t),$$
% which means that any presence of virus 2 in the network serves to slow down the increase in $x(t)$ due to infection. Thus, if $\mathcal{R}_1 \leq 1$ and $x = \vect 0_n$ is the attractive equilibrium of \eqref{eq:single_virus} (where virus 2 is absent), then in the presence of virus~2 one will still have $\lim_{t\to\infty} x(t) = \vect 0_n$ for any $x(0) \in \Delta$. It follows that any equilibrium of the bivirus system with $\mathcal{R}^1 \leq 1$ is of the form $(x = \vect 0_n, y^*)$. Then, $y^*$ is either equal to the healthy equilibrium $\vect 0_n$ or equal to the unique non-zero equilibrium $\bar y$ associated with the single SIS dynamics for virus 2, according as $\mathcal{R}_2 \leq 1$ or $\mathcal{R}_2 > 1$.
% Also, given that we are interested in the survival of the fittest outcomes, we assume the initial states are in the set
% \begin{equation}
% \tilde \Delta = \{(x,y) \in \mathbb{R}^n_{> 0}\times \mathbb{R}^n_{> 0} : \vect 0_n \leq x+ y \leq \vect 1_n\}
% \end{equation}
% }
% {\color{red}We briefly report relevant results in the literature
% \begin{enumerate}
% \item The work in \citep{sahneh2014competitive} assumes different recovery and infection rates for the two viruses but uniform recovery and infection rates across nodes. I.e. $D=dI,E=eI$ for positive scalars $d,e$; and $A = a \tilde A$ and $B = b\tilde B$ for positive scalars $a, b$ with $\tilde A$ and $\tilde B$ having entries either equal to 0 or 1. Jacobian analysis is used to establish sufficient conditions on $A$ and $B$ which guarantee that $(\bar x, \vect 0_n)$ is locally exponentially stable and $(\vect 0_n, \bar y)$ is unstable. Thus, virus 1 wins a survival of the fittest battle (at least from initial states starting close to $(\bar x, \vect 0_n)$). Obviously, the opposite outcome, with virus 2 winning, is secured by exchanging the conditions on $A$ and $B$.
% \item In \citep{santos2014bi,santos2015bi}, sufficient conditions on $A$ and $B$ are given which, taken with the assumption of uniform recovery rates between viruses and nodes, i.e. $ D=E=I$, guarantee that $(\bar x, \vect 0_n)$ is globally stable for all initial states in~$\tilde \Delta$.
% \item In \cite[Corollary~2]{janson2020networked}, sufficient conditions on $D^{-1}A$ and $E^{-1}B$ are presented to ensure that $(\bar x, \vect 0_n)$ is locally exponentially stable and $(\vect 0_n, \bar y)$ is unstable.
% \end{enumerate}
% However, there has been no explicit example presented in the literature in which both $(\bar x, \vect 0_n)$ and $(\vect 0_n, \bar y)$ are locally exponentially stable, and hence the survival of the fittest outcome depends nontrivially on the initial states in $\tilde \Delta$. The main paper aims to address this gap.}
% \section{Unit recovery rates}\label{app:unit_rate}
% Here, we prove the claim in Section~\ref{sec:model} that the recovery rates of the bivirus networked system can be taken to be equal to 1 for all nodes, without loss of generality when studying (local) stability properties of equilibria.
% When recovery rates are not specified all to be 1, the general form of the bivirus equations is as given in \eqref{eq:bivirus_dynamics_general}. We associate with the set of equations \eqref{eq:bivirus_dynamics_general}, the following related set of equations
% \begin{align}\label{eq:normbivirus}
% \dot {\hat x}(t)&=-\hat x(t)+(I-\hat X(t)-\hat Y(t))(D^{-1}A)\hat x(t)\\\nonumber
% \dot {\hat y}(t)&=-\hat y(t)+(I-\hat X(t)-\hat Y(t))(E^{-1}B)\hat y(t)
% \end{align}
% In these equations, the nodes have unit recovery rates, and $\hat A=D^{-1}A, \hat B=E^{-1}B$ serve as the scaled infection matrices, and they are irreducible precisely when $A,B$ are irreducible. Thus the set \eqref{eq:normbivirus} defines a bivirus system differing from the original one \eqref{eq:bivirus_dynamics_general}. It is in no way straightforward to relate the precise trajectories of the two sets, but there is a close connection between the equilibria of the two systems, including, crucially, their stability properties:
% \begin{proposition}
% Consider the two bivirus systems in \eqref{eq:bivirus_dynamics_general} and \eqref{eq:normbivirus}. If $(\bar x,\bar y)$ is an equilibrium of one system, it is an equilibrium of the other. Moreover, if an equilibrium is locally stable for one system, it is locally stable for the other, and if it is unstable for one system, it is unstable for the other.
% \end{proposition}
% \begin{proof}
% It is immediate to observe that an equilibrium of one equation set is also an equilibrium of the other equation set.
% To demonstrate the result involving the (local) stability properties of the equilibria, we analyse the Jacobian of \eqref{eq:bivirus_dynamics_general} and \eqref{eq:normbivirus}.
% % As detailed in the preliminaries above, the (local) stability properties of a nonlinear dynamical system can be determined by the the eigenvalues of the Jacobian matrices evaluated at the equilibria. We appeal to the properties of Metzler and $M$-matrices detailed above.
% The Jacobian matrix $J(x,y)$ of the right side of \eqref{eq:bivirus_dynamics_general} is shown in \eqref{eq:jacob_bivirus}. Define the block diagonal matrix $$P=\begin{bmatrix}I & \vect 0 \\ \vect 0 & -I\end{bmatrix}.$$
% Then, it can be easily verified that
% % \begin{equation}
% % PJ(x,y)P=\begin{bmatrix}
% % -D+(I-X-Y)A-{\rm{diag}}(Ax)&{\rm{diag}}(Ax)\\
% % {\rm{diag}}(By)&-E+(I-X-Y)B-{\rm{diag}}(By)
% % \end{bmatrix}
% % \end{equation}
% $PJ(x,y)P$ is a Metzler matrix, and is related to $J(x,y)$ by the similarity transformation via the matrix $P$. Consider an equilibrium $(\bar x, \bar y)$ of \eqref{eq:bivirus_dynamics_general}, and for convenience write $\bar J = J(\bar x, \bar y)$. Suppose that $(\bar x, \bar y)$ is locally exponentially stable, which holds if and only if $\sigma(\bar J) < 0$, i.e. all eigenvalues of $\bar J$ are in the open left half plane. This implies that $\sigma(P\bar JP) < 0$, i.e. all of its eigenvalues are in the open left half plane and hence, using the Metzler property, $-P\bar JP$ is a nonsingular $M$-matrix. Now it can be easily verified that, for the Jacobian of the right of \eqref{eq:normbivirus}, denoted $\hat J(x, y)$, there holds
% $$P\hat J(x, y) P={\rm{diag}}(D^{-1},E^{-1})PJ(x,y)P$$
% for any $(x,y)$. It follows that $-P\hat J(\bar x, \bar y)P$ is also a nonsingular $M$-matrix, and hence $\sigma(\hat J(\bar x, \bar y)) < 0$. Consequently, the equilibrium $(\bar x, \bar y)$ of \eqref{eq:normbivirus} is also locally exponentially stable. The converse statement, concerning instability, also holds. Both negations also must then imply one another, so that an equilibrium of one system fails to be stable if and only if the same equilibrium of the other system fails to be stable.
% \end{proof}
% \section{Proof of necessary and sufficient conditions}\label{app:stability}
% We provide a direct proof for the claims in Section~\ref{ssec:ns_cond}. We do so %be
% by providing an explicit necessary and sufficient condition for the stability and instability of the equilibria $(\bar x,{\bf{0}}_n)$ and $({\bf{0}}_n,\bar y)$ for the system in \eqref{eq:bivirus_dynamics}.
% \begin{proposition} \label{thm:boundary_stability}
% Consider the bivirus system in \eqref{eq:bivirus_dynamics} where $A$ and $B$ are irreducible nonnegative matrices with $\rho(A)>1$ and $\rho(B)>1$. Suppose that $\bar x>{\bf{0}}_n$ and $\bar y>{\bf{0}}_n$ are the endemic equilibria associated with the two single virus systems in \eqref{eq:v1} and \eqref{eq:v2}, respectively. Then
% \begin{enumerate}
% \item
% $(\bar x,{\bf{0}}_n)$ is a locally stable equilibrium for the bivirus system if and only if $\rho((I-\bar X)B)<1$
% \item
% $(\bar x,{\bf{0}}_n)$ is an unstable equilibrium for the bivirus system if and only if $\rho((I-\bar X)B)>1$
% \item
% $({\bf{0}}_n,\bar y)$ is a locally stable equilibrium for the bivirus system if and only if $\rho((I-\bar Y)A)<1$
% \item
% $({\bf{0}}_n,\bar y)$ is an unstable equilibrium for the bivirus system if and only if $\rho((I-\bar Y)A)>1$
% \end{enumerate}
% \end{proposition}
% \begin{proof}
% We examine first the stability properties of the equilibrium $(\bar x,{\bf{0}}_n)$. Using the general expression for the Jacobian in \eqref{eq:jacob_bivirus}, it is evident that
% \begin{equation*}
% J(\bar x,{\bf{0}}_n)\!=\!\begin{bmatrix}
% -I+(I\!-\!\bar X)A-{\rm{diag}}(Ax)&-{\rm{diag}}(Ax)\\
% 0&-I+(I-\bar X)B
% \end{bmatrix}
% \end{equation*}
% The eigenvalues of this matrix comprise the union of the eigenvalue sets of the $11$ block entry, viz. $-I+(I-\bar X)A-{\rm{diag}}(Ax)$, and the $22$ block entry, viz. $-I+(I-\bar X)B$. The $11$ block entry is the same as the Jacobian of the single virus system in \eqref{eq:v1} evaluated at the endemic equilibrium $\bar x$, and accordingly it is Hurwitz and all of its eigenvalues have negative real part. Thus, the properties of the $22$ block determine the stability of the equilibrium $(\bar x,{\bf{0}}_n)$. From the preliminaries above, observe that for any nonnegative matrix $C$, there holds $\sigma (-I+C)<0$ if and only if $\rho(C)<1$. Thus, the first claim of the theorem follows immediately~\cite[Corollary~4.3]{khalil2002nonlinear}. The second, third and fourth claims are obtained similarly.
% \end{proof}
\section{Proof of Theorem~\ref{thm:doubly_stable_method} and Lemma~\ref{cor:main_paper}}\label{app:main_proof}
In order to prove the claim in Theorem~\ref{thm:doubly_stable_method}, we need the following result on eigenvalue perturbation of a matrix, useful for the subsequent proof.
\begin{lemma}\label{lem:perturb_eig}\cite[pg. 15.2, Fact 3]{hogben2006handbook}. Let $W \in \mathbb{R}^{n\times n}$ be a square matrix with left and right eigenvectors $a^\top, b$ corresponding to a real simple eigenvalue $\lambda$. Suppose that $W$ is perturbed by a small amount $\delta W \in \mathbb{R}^{n\times n}$. Then to first order in $\delta$, $\lambda$ is perturbed by an amount $\delta \lambda$ given by $\delta \lambda=(a^{\top}\delta Wb)/(a^{\top}b)$.
% \begin{equation}
% \delta \lambda=\frac{a^{\top}\delta Wb}{a^{\top}b}
% \end{equation}
\end{lemma}
\textbf{Proof of Theorem~\ref{thm:doubly_stable_method}}: There are three key steps to the proof. Step 1 deals with the existence claims. Step 2 establishes that the relation \eqref{eq:delta_B} ensures that the bivirus system in \eqref{eq:bivirus_dynamics}, with infection matrices $A$ and $B= B^\prime + \delta B$, has the survival-of-the-fittest equilibrium associated with virus 2 at $({\bf{0}}_n, \bar x+\delta x)$. Step 3 shows that the inequalities \eqref{eq:deltax_1} and \eqref{eq:deltax_2} satisfied by $\delta x$ cause both of the survival-of-the-fittest equilibiria to be locally stable, exploiting inequality conditions in Proposition~\ref{prop:boundary_stablility_cond}.
\textit{Step 1}. Since $\vect 0_n < \bar x < \vect 1_n$, $I-\bar X$ is a positive diagonal matrix and its inverse exists. Since $u,v$ are assumed to be linearly independent, the row vectors $u^{\top}[\bar X(I-\bar X)^{-1}]$ and $v^{\top}[\bar X(I-\bar X)^{-1}]$ are also linearly independent, and accordingly $\delta x$ exists satisfying \eqref{eq:deltax_1} and \eqref{eq:deltax_2} and its norm can be chosen arbitrarily by scaling. However, an additional requirement has to be met, viz. that \eqref{eq:delta_B} holds for some $\delta B$ such that $B'+\delta B$ is irreducible and nonnegative. This is straightforward if $B'$ is positive by scaling $\delta B$ to have its entries sufficiently small in magnitude, but not when $B'$ can have zero entries.
To proceed, set $F=(I-X)^{-2}-B'$ and observe that $F=[(I-X)^{-2}-(I-X)^{-1}]+[(I-X)^{-1}-B']$, i.e. $F$ is the sum of a diagonal positive matrix and an irreducible singular $M$-matrix. Hence it is an irreducible nonsingular $M$-matrix, and accordingly $F^{-1}$ is a positive matrix. The two vectors $\tilde u^{\top}:=u^{\top}\bar X(I-\bar X)^{-1}F^{-1}$ and $\tilde v^{\top}:=v^{\top}\bar X(I-\bar X)^{-1}F^{-1}$ are then both positive and linearly independent. Let
\begin{equation}\label{eq:sdef}
s=\delta B\bar x
\end{equation}
Finding $\delta x$ and $\delta B$ to satisfy \eqref{eq:deltax_1}, \eqref{eq:deltax_2} and \eqref{eq:delta_B} is then equivalent to finding $s$ and $\delta B$ to satisfy \eqref{eq:sdef} and
\begin{equation}\label{eq:sineq}
\tilde u^{\top}s >0\,,\quad \text{and }\quad \tilde v^{\top}s <0.
% \begin{split}
% \tilde u^{\top}s& >0\\ \tilde v^{\top}s& <0
% \end{split}
\end{equation}
We shall now show that these requirements can be fulfilled by choosing just two of the entries of $s$ to be nonzero, and likewise, just two of the entries of $\delta B$.
Because $\tilde u$ and $\tilde v$ are linearly independent, there is no nonzero $\mu$ for which $\tilde u=\mu \tilde v$. Thus, there must be two integers, say $j$ and $k$, for which $\tilde u_j/\tilde v_j\neq \tilde u_k/\tilde v_k$.
% \begin{equation*}
% % \frac{\tilde u_j}{\tilde v_j}\neq \frac{\tilde u_k}{\tilde v_k}
% \tilde u_j/\tilde v_j\neq \tilde u_k/\tilde v_k
% \end{equation*}
Without loss of generality (using renumbering if necessary) let us assume that $\tilde u_2/\tilde v_2>\tilde u_1/\tilde v_1$, or equivalently, $\tilde u_2/\tilde u_1>\tilde v_2/\tilde v_1$.
% \begin{equation}
% % \frac{\tilde u_2}{\tilde u_1}>\frac{\tilde v_2}{\tilde v_1}
% \tilde u_2/\tilde u_1>\tilde v_2/\tilde v_1
% \end{equation}
Let $\alpha > 0$ be such that
\begin{equation}\label{eq:alpha}
% \frac{\alpha\tilde u_2}{\tilde u_1}>1>\frac{\alpha\tilde v_2}{\tilde v_1}
\alpha\tilde u_2/\tilde u_1>1>\alpha\tilde v_2/\tilde v_1
\end{equation}
Let $\beta>0$ be a constant to be specified below, and choose $s=[-\beta, \alpha\beta, 0, \hdots, 0]^\top$.
% \begin{equation*}
% s=\begin{bmatrix}-\beta, & \alpha\beta, & 0, & \hdots, & 0
% \end{bmatrix}^\top
% \end{equation*}
Using \eqref{eq:alpha}, it is immediate that \eqref{eq:sineq} is satisfied. Now to specify $\delta B$, observe that the irreducibility of $B'$ guarantees that at least one entry of the first row and one entry of the second row are positive, say $b'_{1i}$ and $b'_{2j}$. (They may or may not be in the same column.) Choose $\beta$ such that $0< \beta<b'_{1i}\bar x_i $, and set all entries of $\delta B$ to zero except that
\begin{align}\label{eq:delta_B1}
\delta b_{1i}&=-\beta/\bar x_i\\
\delta b_{2j}&=\alpha\beta/\bar x_j \label{eq:delta_B2}
\end{align}
These two definitions ensure that $s=\delta B \bar x$ as required, that $B'+\delta B$ is a nonnegative matrix, and that it is also irreducible since it has the same zero entries as $B'$. To summarize, setting $\delta B$ using \eqref{eq:delta_B1} and \eqref{eq:delta_B2} ensures that $B'+\delta B$ is a nonnegative irreducible matrix, while we select the specific form of $s$ with first and second entry equal to $-\beta$ and $\alpha\beta$ to ensure that \eqref{eq:sineq} is satisfied for the particular choice of~$\delta B$.
% As already noted, \eqref{eq:sineq} holds.
% Solutions to the latter equation obviously exist because $\tilde u$ and $\tilde v$ are linearly independent, the solution set being formed by the intersection of two half-spaces. Since $\tilde u,\tilde v$ are positive vectors, any solution $s$ must have entries of both signs, and generally some entries will be positive for all solutions, other entries negative for all solutions and other entries again assuming negative or positive values for different solution vectors. This sign pattern is easily determinable from $\tilde u,\tilde v$. Now where the sign entries are not fixed, we will simply set then to be positive. Without loss of generality, assume that $s_i\geq 0$ for $i=1,2,\dots,m$ for some $m<n$, and $s_j<0$ for $j=m+1,\dots,n$.
% We now show how to construct specific values for the $s_i$ and for $\delta B$, respecting the sign pattern of the $s_i$. More precisely, set
% \begin{equation}
% \delta B=-\alpha I+C
% \end{equation}
% where $\alpha>0$ is smaller in magnitude than every nonzero diagonal entry of $B'$ (even though some diagonal entries may be zero), and $C$ is specified as follows:
% \begin{equation}
% c_{kk}=
% \begin{cases}
% \alpha, &\text{if $s_k>0$ (Case 1)}\\
% 0, &\text{if $s_k<0$ and $b'_{kk}>0$ (Case 2)} \\
% \alpha, &\text{if $s_k<0$ and $b'_{kk}=0$ (Case 3).}
% \end{cases}
% \end{equation}
% Corresponding to these three cases, we take $c_{kj}$ for all $j$ to be $c_{kj}=\bar c>0$ (Case 1), $c_{kj}=0$ (Case 2), and $c_{kj}\in(-b'_{kj},0)$ if $b'_{kj}>0$ and zero otherwise (Case 3). Note that in Case 3, because $B'$ is irreducible, for any $k$, there is always at least one $j$ such that $b'_{kj}$ is positive, and so at least one $c_{kj}$ will be negative. As noted, $\bar c$ is positive, and is available for subsequent adjustment.
% Now from the fact that $s=\delta B\bar x$, it is easily verified that the required sign constraints on $s$ are fulfilled. Further, $B=B'+\delta B$ is readily checked to have the same set of zero entries as $B'$, and thus is irreducible. By adjusting the value of $\bar c$, MORE STUFF NEEDED HERE.
% }
\textit{Step 2}. We must establish that the survival-of-the-fittest equilibria corresponding to $A$ and $B=B'+\delta B$ are $(\bar x,{\bf{0}}_n)$ and $({\bf{0}}_n, \bar y)$ with $\bar y=\bar x+\delta x+o(\delta)$. Since \eqref{eq:equi_A} holds, the claim for $(\bar x,{\bf{0}}_n)$ is immediate. Next, let $\delta X = \diag(\delta x)$, and observe that
\begin{align}
&\Big[I-(I-\bar X- \delta X)(B'+\delta B)\Big](\bar x+\delta x)\nonumber \\
&\qquad =\Big[I-(I-\bar X)B'\Big]\bar x + \delta XB'\bar x-(I-\bar X)(\delta B)\bar x \nonumber \\
& \qquad \qquad +\Big[I-(I-\bar X)B'\Big]\delta x +o(\delta),
\end{align}
where $o(\delta) = \delta XB'\delta x + \delta X\delta B(\delta x+\bar x)-(I-\bar X)\delta B\delta x$ consists of terms that are of higher order than $\delta$. The first term on the right is zero due to \eqref{eq:equi_B'}. Notice that $B'\bar x=(I-\bar X)^{-1}\bar x$ according to \eqref{eq:equi_B'}, and this is substituted into the second term, where we also use the fact that $\delta X(I-\bar X)^{-1}\bar x = (I-\bar X)^{-1}\bar X \delta x$. Finally, we use the constraint equation \eqref{eq:delta_B} to handle the third term. Hence, we obtain
\begin{align*}
\Big[I&-(I-\bar X- \delta X)\Big](B'+\delta B)(\bar x+\delta x) \nonumber \\
& =\delta X(I-\bar X)^{-1}\bar x-(I-\bar X)\Big[(I-\bar X)^{-2}-B'\Big]\delta x \nonumber \\
&\qquad \qquad +\Big[I-(I-\bar X)B'\Big]\delta x +o(\delta)\\
&=\bar X(I-\bar X)^{-1}\delta x-(I-\bar X)^{-1}\delta x+\delta x+o(\delta)\\
&=o(\delta).
\end{align*}
This establishes the claim for the equilibrium $({\bf{0}}_n,\bar y)$.
\textit{Step 3.} We must establish that both survival-of-the-fittest eqilibria are locally exponentially stable, i.e. that $\rho[(I-\bar X)B]<1$ and $\rho[(I-\bar Y)A]<1$.
Consider the effect of a small perturbation $\delta x$ in the entries of $\bar x$ on the Perron--Frobenius eigenvalue of the positive matrix $(I-\bar X)A$; we know the Perron--Frobenius eigenvalue is equal to 1. By Lemma~\ref{lem:perturb_eig} we have (to first order in $\delta$)
\begin{equation}
\rho[(I-\bar X-\delta X)A]=\rho[(I-\bar X)A]-u^{\top}\delta X A \bar x
\end{equation}
Now use the fact that $[(I-\bar X)^{-1}-A]\bar x={\bf{0}}_n$ to write \mbox{$\rho[(I-\bar X-\delta X)A]=1-u^{\top}\delta X (I-\bar X)^{-1} \bar x$}.
% \begin{equation}
% \rho[(I-\bar X-\delta X)A]=1-u^{\top}\delta X (I-\bar X)^{-1} \bar x.
% \end{equation}
From \eqref{eq:deltax_1}, we have that \mbox{$\rho[(I-\bar X-\delta X)A]<1$} as required.
The other survival-of-the-fittest equilibrium can be handled similarly. Using arguments like those above, it is evident that $\rho[(I-\bar X)(B'+\delta B)]<1$ if and only if
\begin{equation}\label{eq:4}
v^{\top}(I-\bar X)(\delta B)\bar x < 0
\end{equation}
Using the expression for $(\delta B)\bar x$ from \eqref{eq:delta_B}, we have that an equivalent condition to \eqref{eq:4} is $v^{\top}[(I-\bar X)^{-1}-(I-\bar X)B']\delta x<0$.
% \begin{equation}
% v^{\top}[(I-\bar X)^{-1}-(I-\bar X)B']\delta x<0
% \end{equation}
Recall that $v^{\top}$ is the positive left eigenvector of $I-(I-\bar X)B'$ corresponding to the zero eigenvalue, and so the equivalent condition is
\begin{equation}
v^{\top}[(I-\bar X)^{-1}-I]\delta x=v^{\top}(I-\bar X)^{-1}\bar X\delta x<0
\end{equation}
This is guaranteed by \eqref{eq:deltax_2}. \hfill \qed
\medskip
\textbf{Proof of Lemma~\ref{cor:main_paper}}: We postpone the proof that $\rho(B')>1$ to the end of the following argument.
Observe first that because $\bar x > \vect 0_n$, it follows that $z$ must have both positive and negative entries to satisfy $z^\top \bar x = 0$. Next, note that
\begin{equation}
[I-(I-\bar X) B'] \bar x = [I - (I-\bar X) (A + \epsilon e_i z^\top)] \bar x = \mathbf{0}_n.
\end{equation}
The irreducibility of $A$ implies that there exists a $k\in \mathcal{V}$ such that $a_{ik} > 0$. It follows that for sufficiently small $\epsilon > 0$, $B'=A + \epsilon e_i z^\top$ is nonnegative and irreducible since for any $j\in \mathcal{V}$, $z_j < 0$ only if $a_{ij} > 0$. Therefore $B'$ fulfills \eqref{eq:equi_B'}. We let $u^\top$ and $v^\top$ be positive left eigenvectors of $-I+(I-\bar X)A$ and $-I+(I-\bar X)B^\prime$, respectively, associated with the simple zero eigenvalue (see Lemma~\ref{lem:useful}). Notice that this also implies that $u^\top$ and $v^\top$ are positive left eigenvectors of the nonnegative irreducible matrices $(I-\bar X)A$ and $(I-\bar X)B^\prime$, respectively, associated with the Perron--Frobenius eigenvalue, which is equal to unity. We now need to prove that $u$ and $v$ are linearly independent.
% Next, since $(I-\bar X)A$ and $(I-\bar X)B'$ are positive matrices with spectral radii equal to unity, the existence of the left eigenvectors $u \gg \mathbf{0}_n$ for $(I-\bar X)A$ and $v \gg \mathbf{0}_n$ for $(I-\bar X)B'$ is guaranteed by the Perron-Frobenius Theorem, fulfilling \eqref{eq:lefteigvec_A} and \eqref{eq:lefteigvec_B'}.
Now, assume, to obtain a contradiction, that $u$ and $v$ are in fact linearly dependent. Then $u^{\top}$ must be a left eigenvector of $(I-\bar X)B'$ with eigenvalue 1. Observe however that this would imply
\begin{align*}
u^\top = u^\top (I-\bar X)B' &= u^\top (I-\bar X)(A + \epsilon e_i z^\top) \\
&= u^\top + u^\top (I-\bar X) \epsilon e_i z^\top \label{eq:3}
\end{align*}
Since $u^\top$ and $\vect 1_n$ are positive vectors, $(I-\bar X)$ is a positive diagonal matrix, and $z^\top \neq \vect 0_n$, it follows that $u^\top (I-\bar X) \epsilon e_i z^\top = u_i(1-\bar x_i)\epsilon z^\top \neq \vect 0_n.$
% \[u^\top (I-\bar X) \epsilon e_i z^\top = u_i(1-\bar x_i)\epsilon z^\top \neq \vect 0_n.\]
A contradiction is immediate. Lastly, the fact that $\bar X$ is positive definite with diagonal entries less than $1$ ensures that $\rho(B')>\rho((I-\bar X)B')=1$ (see Item~4 of the properties of $M$-matrices and Metzler matrices in Section~\ref{sec:results}).
% (see the start of Section~\ref{sec:results} \seb{a consequence of \cite[Chapter 2, Corollary 1.5(b)]{berman1979nonnegative_matrices} }).
\hfill \qed
% \textbf{Irreducible but not positive $A$ and $B'$}:
% The assumption that $A$ and $B^\prime$ are positive matrices was done for the sake of simplicity in presenting the theoretical proofs, and can be relaxed to ensure that the results can be applied in more general scenarios of bivirus networked systems. Indeed, the results can be applied to general strongly connected networks, where $A$ and $B^\prime$ are nonnegative and irreducible but not necessarily positive. Nothing in the proof of Theorem~\ref{thm:doubly_stable_method} is changed by relaxing $A$ and $B^\prime$ to be irreducible instead of positive, except we now need to ensure that $B = B^\prime + \delta B$ remains nonnegative and irreducible. This implies that $\delta B$ cannot have a negative entry in the $(i,j)$th position where $B^\prime$ has a corresponding $(i,j)$th entry equal to $0$. Thus, finding $\delta x$ and $\delta B$ which satisfies \eqref{eq:deltax_1}, \eqref{eq:deltax_2}, and \eqref{eq:delta_B} requires some trial and error, but a solution can still be assured. The four step procedure detailed in Section~\ref{ssec:procedure} provides a specific choice of $B^\prime$, which is $B^\prime = A + \epsilon \bar x z^\top$ (and detailed in Lemma~\ref{cor:main_paper} above). When $A$ is irreducible but not positive, this particular choice may yield a $B^\prime$ that is \textit{not} a nonnegative matrix. Nonetheless, for a given nonnegative and irreducible $A$, one can always find a nonnegative and irreducible $B^\prime$ with the properties detailed in Theorem~\ref{thm:doubly_stable_method}, but it may not be of the specific form $B^\prime = A + \epsilon {\bf{1}}_n z^\top$.
% \section{Details on the simulation case studies}\label{app:case_study}
% % \subsection{Details on the two-node case study}\label{app:2node}
% % %{\color{red}Provide details on the main simulation example, including
% % %\begin{enumerate}
% % % \item The $A$ and $B$ matrices. Eigenvalues of Jacobian at the two boundary equilibria
% % % \item Computing of the unstable coexisting equilibrium. Eigenvalues of the Jacobian.
% % %\end{enumerate}
% % %}
% % %
% % For the simulations with $n=2$ nodes we used the following matrices, obtained with the four-step procedure. Note that all numerical values are reported at most to four decimal points, and only the matrices $A$ and $B$ can be taken as precise.
% % %
% % \begin{align}
% % A &=
% % \begin{bmatrix}
% % 3.2 & 2 \\
% % 2 & 3.2 \\
% % \end{bmatrix}
% % ,
% % \,\,\,\,\,\,
% % B =
% % \begin{bmatrix}
% % 4.2 & 0.312 \\
% % 6.1318 & 2.2 \\
% % \end{bmatrix}
% % %,
% % %\,\,\,
% % %D = I
% % %,
% % %\,\,\,
% % %E = I
% % .
% % \end{align}
% % %
% % The two single virus systems, in \eqref{eq:v1} and \eqref{eq:v2}, defined using the $A$ and $B$ above, have the following two endemic equilibria $\bar{x} = [0.8077, 0.8077]^\top$ and $\bar{y} = [0.7801, 0.8699]^\top$,
% % % \begin{align}
% % % \bar{x}
% % % =
% % % \begin{bmatrix}
% % % 0.8077 \\
% % % 0.8077
% % % \end{bmatrix}
% % % ,
% % % \,\,
% % % \bar{y}
% % % =
% % % \begin{bmatrix}
% % % 0.7801 \\
% % % 0.8699
% % % \end{bmatrix},
% % % \end{align}
% % respectively. These define the two survival-of-the-fittest equilibria $(\bar x, \vect 0_n)$ and $(\vect 0_n, \bar y)$ for the bivirus system in \eqref{eq:bivirus_dynamics}. We then obtain $\rho((I-\bar{Y})A) = 0.9276$ and $\rho((I-\bar{X})B) = 0.9436$,
% % %
% % % \begin{align}
% % % \rho((I-\bar{Y})A) &= 0.9276 \\
% % % \rho((I-\bar{X})B) &= 0.9436,
% % % \end{align}
% % which establishes that each survival-of-the-fittest equilibrium is locally exponentially stable, due to the conditions stated in Section~\ref{ssec:ns_cond}. Furthermore, there is a unique coexistence equilibrium $(\Tilde{x}, \Tilde{y})$ in the system, calculated using Maple~\footnote{Full code found at \url{https://github.com/lepamacka/bivirus_code}.} as
% % %
% % \begin{align}
% % \Tilde{x}
% % =
% % \begin{bmatrix}
% % 0.5467 &
% % 0.4180
% % \end{bmatrix}^\top
% % ,
% % \,\,
% % \Tilde{y}
% % =
% % \begin{bmatrix}
% % 0.2418 &
% % 0.4101
% % \end{bmatrix}^\top
% % .
% % \end{align}
% % %
% % From \eqref{eq:jacob_bivirus}, we can numerically compute the Jacobian at this coexistence equilibrium.
% % % is
% % % %
% % % \begin{equation*}
% % % J(\Tilde{x}, \Tilde{y})
% % % =
% % % \begin{bmatrix}
% % % -2.9088 & 0.4229 & -2.5855 & 0 \\
% % % 0.3439 & -2.8808 & 0 & -2.4310 \\
% % % -1.1436 & 0 & -1.2555 & 0.0660 \\
% % % 0 & -2.3849 & 1.0543 & -3.0067
% % % \end{bmatrix}
% % % ,
% % % \end{equation*}
% % % %
% % The largest real part of any eigenvalue of $J(\tilde x, \tilde y)$ is $\sigma(J(\Tilde{x},\Tilde{y})) = 0.0321$,
% % %
% % % \begin{equation}
% % % \sigma(J(\Tilde{x},\Tilde{y}) = 0.0321,
% % % \end{equation}
% % %
% % making the coexistence equilibrium unstable. The other eigenvalues of $J(\tilde x, \tilde y)$ are $-5.4373, -3.8924$ and $-0.7507$.
% % % \subsubsection*{Initial states}
% % \textbf{Initial states}: The blue trajectory in Fig.~\ref{fig:2a} (and the time plot in Fig.~\ref{fig:2b}) has initial states $(x(0), y(0))$ with $x(0) = [0.1, 0.1]^\top$ and $y(0) = [0.05, 0.05]^\top$. This is ``Initial state~1''. The red trajectory in Fig.~\ref{fig:2a} (and the time plot in Fig.~\ref{fig:2c}) has initial states $(x(0), y(0))$ with $x(0) = [0.09, 0.09]^\top$ and $y(0) = [0.06, 0.06]^\top$. This is ``Initial state~2''. The unique coexistence equilibrium $(\Tilde{x}, \Tilde{y})$ of the system is denoted in Fig.~\ref{fig:2a} (magenta cross)
% % In Figs.~\ref{fig:2d}--\ref{fig:2f}, different timescales are used for virus~$1$, as defined $\gamma$ in \eqref{eq:virus1_faster}.
% % % \begin{equation}
% % % \dot{x}(t) = \gamma(-x(t) + (I-X(t)-Y(t))Ax(t)).
% % % \end{equation}
% % The two timescales used are $\gamma=1$ and $\gamma=1.2$ (green and purple lines in Fig.~\ref{fig:2d}, respectively).
% % The three initial states $(x(0), y(0))$ in Fig.~\ref{fig:2d} are defined as follows. For ``Initial state~1" (square symbol) we set $x(0) = [0.09, 0.09]^\top$ and $y(0) = [0.06, 0.06]^\top$. For ``Initial state~2" (circle symbol) we set $x(0) = [0.25, 0.25]^\top$ and $y(0) = [0.05, 0.05]^\top$. For ``Initial state~3" ({\Large$*$} symbol) we set $x(0) = [0.05, 0.05]^\top$ and $y(0) = [0.2, 0.2]^\top$. These initial states are then simulated using $\gamma=1$ (green line) and $\gamma=1.2$ (purple line). The unique coexistence equilibrium of the system is also denoted in Fig.~\ref{fig:2d} (magenta cross), and it obviously remains unchanged for any positive $\gamma$.
% % In Fig.~\ref{fig:2e}, we create a $150\times 150$ grid of initial states, imposing a constraint on that $x_i(0)+y_i(0) = 0.01$ for $i = 1,2$. For each point on this grid, we simulated the system over a large time window and recorded the particular equilibrium point reached. The figure thus divides the phase plane into two regions, for initial states that resulted in virus~1 or virus~2 winning the survival-of-the-fittest battle.
% % Fig.~\ref{fig:2f} is generated using the exact same procedure as Fig.~\ref{fig:2e}, except we change the timescale for virus 1. Whereas Fig.~\ref{fig:2e} uses $\gamma=1$, Fig.~\ref{fig:2f} uses $\gamma=1.2$, resulting in a marked shift in the regions of attraction.
% % %
% % %{\color{red}Need to provide
% % %\begin{enumerate}
% % % \item $\bar x$ and $\bar y$
% % % \item Jacobian eigenvalues for the two boundary equilibria
% % % \item Computation of the coexistence equilibrium, the Jacobian and its eigenvalues (to show instability).
% % % \item The scaling of the two viruses for Fig 2d--f.
% % %\end{enumerate}
% %}
% %
% \subsection{Details on five-node case study}\label{app:3node}
% %
% We provide a second example, with $n=5$ nodes, to demonstrate that our results are not restricted by the size of the network or any specific topology.
% Numerical values are either reported to four decimal points, or precisely (if less than four decimal points). With
% %
% \begin{equation}
% A =
% \begin{bmatrix}
% 1 & 0 & 0 & 0 & 1\\1 & 1 & 0 & 0 & 0\\0 & 1 & 1 & 0 & 0\\0 & 0 & 1 & 1 & 0\\0 & 0 & 0 & 1 & 1
% \end{bmatrix},
% \end{equation}
% %
% the single virus system \eqref{eq:v1} has the endemic equilibrium $\bar{x} = 0.5\vect 1_n$.
% % \begin{equation}
% % \bar{x}
% % =
% % \begin{bmatrix}
% % 0.6826 & 0.4863 & 0.4667
% % \end{bmatrix}
% % ^\top
% % .
% % \end{equation}
% %
% We select $B' = A + \epsilon e_1 z^\top$, with $\epsilon = 0.5$ and $z^\top = [-1, 1, 0, 0, 0]$. Note that $z^\top \bar x = 0$ as required, but the choice of $z$ is not unique. Since $\bar x > \vect 0_n$, $z$ must have at least one positive and one negative entry, and so one straightforward method is to set $z_k = 1$ and $z_j = -z_k\bar x_k/\bar x_j$, for arbitrary $k,j$. Selecting $e_i$ (in this case $e_1$) implies that we obtain $B'$ by perturbing the $(i,j)$ and $(i,k)$-th entries of $A$ via the term $\epsilon e_i z^\top$ --- we thus need $\epsilon< \min_{j\in\mathcal{V}} a_{ij}$ to ensure $B'$ is nonnegative. This completes Step~$1$ of the procedure.
% To start Step~$2$, we obtain $u^\top = 0.4.\vect 1_n^\top$ and $v^\top = [0.571, 0.571, 0.286, 0.286, 0.286]$, from which we can compute $\tilde u^\top = [0.180, 0.230, 0.200, 0.198, 0.193]$ and $\tilde v^\top = [0.182, 0.273, 0.182, 0.182, 0.182]$ following Step~$2$ (we omit showing $F$ for brevity). In our case, we can choose $j =3$ and $k = 2$, and the choice of $\alpha = 1.3768$ ensures that the Step~2 inequality $\alpha \tilde u_j/\tilde u_k > 1 > \alpha \tilde v_j/\tilde v_k$ holds. Finally, with Step~3, we pick $p = 2$ and $q = 1$, and set $\beta = 0.0325$, to get $\delta b_{21} = -0.0650$ and $\delta b_{32} = 0.0896$. The resulting $\delta B$ is then used to obtain:
% % Then steps~$2$--$4$ in the four-step procedure can be applied, where $\delta x$ and $\delta B$ are chosen so that $B$ is a non-negative irreducible matrix as follows.
% %
% \begin{equation}
% B =
% \begin{bmatrix}
% 0.5 & 0.5 & 0 & 0 & 1 \\ 0.9350 & 1 & 0 & 0 & 0 \\ 0 & 1.0896 & 1 & 0 & 0 \\ 0 & 0 & 1 & 1 & 0 \\ 0 & 0 & 0 & 1 & 1
% \end{bmatrix}
% .
% \end{equation}
% %
% The corresponding single virus system \eqref{eq:v2} has \mbox{$\bar{y} = [0.4987, 0.4884, 0.5104, 0.5034, 0.5011]^\top$} as the endemic equilibrium.
% %
% % \begin{equation}
% % \bar{y}
% % =
% % \begin{bmatrix}
% % 0.6824 & 0.4042 & 0.5335
% % \end{bmatrix}
% % ^\top
% % .
% % \end{equation}
% %
% The two single virus equilibria define the two survival-of-the-fittest equilibria $(\bar x, \vect 0_n)$ and $(\vect 0_n, \bar y)$ for the bivirus system in \eqref{eq:bivirus_dynamics}.
% This yields $\rho((I-\bar{Y})A) = 0.992$ and $\rho((I-\bar{X})B) = 0.9988$,
% %
% % \begin{align}
% % \rho((I-\bar{Y})A) &= 0.9629 \\
% % \rho((I-\bar{X})B) &= 0.9381
% % \end{align}
% %
% showing that each survival-of-the-fittest equilibrium is locally exponentially stable, due to the conditions stated in Section~\ref{ssec:ns_cond}.
% A second $n = 5$ node example obtained from the construction procedure is given by
% \begin{equation}
% A = \begin{bmatrix}0 & 0.5 & 0 & 0 & 1.5\\
% 2 & 0 & 0 & 0 & 0 \\
% 0 & 2 & 0 & 0 & 0 \\
% 0 & 0 & 2 & 0 & 0 \\
% 0 & 0 & 0 & 2 & 0
% \end{bmatrix}, B = \begin{bmatrix}
% 0 & 0.9453 & 0 & 0 & 1\\
% 2 & 0 & 0 & 0 & 0 \\
% 0 & 2.0854 & 0 & 0 & 0\\
% 0 & 0 & 2 & 0 & 0 \\
% 0 & 0 & 0 & 2 & 0
% \end{bmatrix}.
% \end{equation}
% % and using the procedure of Section~\ref{ssec:procedure} to construct
% % \begin{equation}
% % B = \begin{bmatrix}
% % 0 & 0.9453 & 0 & 0 & 1\\
% % 2 & 0 & 0 & 0 & 0 \\
% % 0 & 2.0854 & 0 & 0 & 0\\
% % 0 & 0 & 2 & 0 & 0 \\
% % 0 & 0 & 0 & 2 & 0
% % \end{bmatrix}.
% % \end{equation}
% Notice that in this example, all diagonal entries are zero, and $A$ and $B$ have the same zero-nonzero entry pattern. This contrasts the first $n = 5$ example reported above.
% Furthermore, there is a coexistence equilibrium $(\Tilde{x}, \Tilde{y})$ in the systems (which we used Maple to compute):
% %
% \begin{align}
% \Tilde{x}
% &=
% \begin{bmatrix}
% 0.2524 & 0.1898 & 0.1537
% \end{bmatrix}
% ^{\top}
% ,
% \\
% \Tilde{y}
% &=
% \begin{bmatrix}
% 0.4218 & 0.2319 & 0.3440
% \end{bmatrix}
% ^{\top}
% .
% \end{align}
%
%The Jacobian at this coexistence equilibrium is
%
%\begin{equation}
% J(\Tilde{x}, \Tilde{y})
% =
% \begin{bmatrix}
%
% \end{bmatrix}
% ,
%\end{equation}
%
% From \eqref{eq:jacob_bivirus}, one can easily compute the numerical value of the Jacobian at $(\tilde x, \tilde y)$, and we obtain that the largest real part of any eigenvalue of the Jacobian at $(\Tilde{x}, \Tilde{y})$ is $\sigma(J(\Tilde{x},\Tilde{y})) = 0.0228$.
%
% \begin{equation}
% \sigma(J(\Tilde{x},\Tilde{y})) = 0.0228.
% \end{equation}
%
% Thus, $(\Tilde{x}, \Tilde{y})$ is an unstable equilibrium. The other five eigenvalues of this Jacobian are $-0.9393, -1.8924, -3.0260$ and the complex pair $-1.1428 \pm 0.1340i$. The dynamics of the bivirus network system with $A$ and $B$ is depicted in Fig.~\ref{fig:irred} below, showing that with two different initial states that are close to each other, the system converges to different survival-of-the-fittest equilibria.
% \subsection*{Simulation figures for irreducible example}
% \subsection{Details on real-world case study}\label{app:italy}
% We consider the mobility network reported in \citep{parino2021modelling}. The network captures commuting patterns between $n=107$ provinces in Italy, which could be considered as a proxy for the interaction frequencies of individuals between provinces.
% The original network $\bar{\mathcal{G}}$ in \citep{parino2021modelling} is a complete directed graph, i.e., there exists an edge from every node~$i$ to every other node~$j$, although the weight of the edge from node~$i$ to node~$j$ is not necessarily the same as the weight from edge~$j$ to edge~$i$. Due to differences in commuting patterns, the largest edge weights are several orders of magnitude greater than the smallest. In other words, journeys between some provinces are highly frequent, whereas journeys between some other provinces may be virtually nonexistent save for a small number of individuals. Let $\bar A$ be the adjacency matrix associated with the original mobility network $\bar{\mathcal{G}}$. For computational convenience, we first normalize this matrix so that the row sums are equal to $2$, i.e. $\bar A \vect 1_n = 2\vect 1_n$. Note that this does not affect the validity of our approach, as our proposed construction procedure can be applied for any set of edge weights. Then, we obtain the matrix $A$ by setting each entry as $a_{ij} =
% \bar a_{ij}$ if $\bar a_{ij} \geq \kappa$, and $a_{ij} = 0$ otherwise,
% % \begin{equation}
% % a_{ij} = \begin{cases}
% % \bar a_{ij} & \text{if } \bar a_{ij} \geq \kappa, \\
% % 0 & \text{if } \bar a_{ij} < \kappa
% % \end{cases}
% % \end{equation}
% where the scalar $\kappa > 0$ acts as a threshold. We set $\kappa$ so that $A$ is not a positive matrix (and thus the graph associated with $A$ is not a complete directed graph), but $\kappa$ is sufficiently small so that $A$ is still irreducible (and thus the associated graph is strongly connected). We found that $\kappa = 5\times 10^{-5}$ was a suitable value. We normalized $A$ to satisfy $A\vect 1_n = 2\vect 1_n$, and then set $A$ to be the adjacency matrix associated with the network layer of virus~$1$.
% We followed the systematic construction procedure outlined in Section~\ref{ssec:procedure} to obtain $B$. First, note that $\bar x = 0.5\vect 1_n$ due to our normalization. We selected the $48$-th basis vector, i.e., $i = 48$ for the vector $e_i$. The vector $z$ was a vector of zeros, except $z_{48} = 1$ and $z_{55} = -1$, and $\epsilon = 0.2346$. After following the four step construction procedure, we obtained $B = A$, except the following four entries were adjusted: $b_{48,48} = a_{48,48}+0.2346$, $b_{48,55} = a_{48,55} -0.2346$, $b_{48,69} = a_{48,69} - 0.0205$, $b_{55,100} = a_{55,100} + 5.0795\times 10^{-4}$.
% % \begin{align*}
% % &b_{48,48} = a_{48,48}+0.2346, \\
% % &b_{48,55} = a_{48,55} -0.2346,\\
% % &b_{48,69} = a_{48,69} - 0.0205,\\
% % &b_{55,100} = a_{55,100} + 5.0795\times 10^{-4}.
% % \end{align*}
% We can compute that $\rho((I-\bar Y)A) = 0.9999914$ and $\rho((I-\bar X)B) = 0.9999964$, and hence $(\bar x, \vect 0_n)$ and $(\vect 0_n, \bar y)$ are locally exponentially stable.
% Note that due to the large size of the network, and that some entries of $A$ differed by several orders of magnitude, we needed to run several iterations of the construction procedure, and try out different values of $\epsilon, \beta, \alpha$ in order to obtain a suitable $B$ matrix. Nonetheless, it was possible to obtain several different $B$ matrices which satisfied Theorem~\ref{thm:doubly_stable_method}.
% % \newpage
% %\section*{Contribution Statement}
% % M.Y. and L.Z. contributed equally as leading authors. A.R. and M.C. contributed equally.
% % The \nocite command causes all entries in a bibliography to be printed out
% % whether or not they are actually referenced in the text. This is appropriate
% % for the sample file to show the different styles of references, but authors
% % most likely will not want to use it.
% %\nocite{*}
\bibliographystyle{IEEEtran}
\bibliography{references,MYE_ANU}% Produces the bibliography via BibTeX.
% %merlin.mbs apsrev4-1.bst 2010-07-25 4.21a (PWD, AO, DPC) hacked
% %Control: key (0)
% %Control: author (72) initials jnrlst
% %Control: editor formatted (1) identically to author
% %Control: production of article title (-1) disabled
% %Control: page (0) single
% %Control: year (1) truncated
% %Control: production of eprint (0) enabled
\end{document}
% Generated by IEEEtran.bst, version: 1.14 (2015/08/26)
\begin{thebibliography}{10}
\providecommand{\url}[1]{#1}
\csname url@samestyle\endcsname
\providecommand{\newblock}{\relax}
\providecommand{\bibinfo}[2]{#2}
\providecommand{\BIBentrySTDinterwordspacing}{\spaceskip=0pt\relax}
\providecommand{\BIBentryALTinterwordstretchfactor}{4}
\providecommand{\BIBentryALTinterwordspacing}{\spaceskip=\fontdimen2\font plus
\BIBentryALTinterwordstretchfactor\fontdimen3\font minus
\fontdimen4\font\relax}
\providecommand{\BIBforeignlanguage}[2]{{%
\expandafter\ifx\csname l@#1\endcsname\relax
\typeout{** WARNING: IEEEtran.bst: No hyphenation pattern has been}%
\typeout{** loaded for the language `#1'. Using the pattern for}%
\typeout{** the default language instead.}%
\else
\language=\csname l@#1\endcsname
\fi
#2}}
\providecommand{\BIBdecl}{\relax}
\BIBdecl
\bibitem{hethcote2000mathematics}
H.~W. Hethcote, ``{The Mathematics of Infectious Diseases},'' \emph{SIAM
Review}, vol.~42, no.~4, pp. 599--653, 2000.
\bibitem{anderson1991_virusbook}
R.~M. Anderson and R.~M. May, \emph{Infectious Diseases of Humans}.\hskip 1em
plus 0.5em minus 0.4em\relax Oxford University Press, 1991.
\bibitem{wang2019coevolution}
W.~Wang, Q.-H. Liu, J.~Liang, Y.~Hu, and T.~Zhou, ``Coevolution spreading in
complex networks,'' \emph{Physics Reports}, vol. 820, pp. 1--51, 2019.
\bibitem{newman2013interacting}
M.~E. Newman and C.~R. Ferrario, ``{Interacting Epidemics and Coinfection on
Contact Networks},'' \emph{PloS One}, vol.~8, no.~8, p. e71321, 2013.
\bibitem{cai2015avalanche}
W.~Cai, L.~Chen, F.~Ghanbarnejad, and P.~Grassberger, ``Avalanche outbreaks
emerging in cooperative contagions,'' \emph{Nature Physics}, vol.~11, no.~11,
pp. 936--940, 2015.
\bibitem{gracy2022modeling}
S.~Gracy, P.~E. Par{\'e}, J.~Liu, H.~Sandberg, C.~L. Beck, K.~H. Johansson, and
T.~Ba{\c{s}}ar, ``Modeling and analysis of a coupled {SIS} bi-virus model,''
\emph{Automatica, https://arxiv.org/pdf/2207.11414.pdf}, 2022, {N}ote: Under
Revision.
\bibitem{sahneh2014competitive}
F.~D. Sahneh and C.~Scoglio, ``Competitive epidemic spreading over arbitrary
multilayer networks,'' \emph{Physical Review E}, vol.~89, no.~6, p. 062817,
2014.
\bibitem{liu2019bivirus}
J.~Liu, P.~E. Par{\'e}, A.~Nedich, C.~Y. Tang, C.~L. Beck, and T.~Ba\c{s}ar,
``{Analysis and Control of a Continuous-Time Bi-Virus Model},'' \emph{IEEE
Transactions on Automatic Control}, vol.~64, no.~12, pp. 4891--4906, Dec.
2019.
\bibitem{castillo1989epidemiological}
C.~Castillo-Chavez, H.~W. Hethcote, V.~Andreasen, S.~A. Levin, and W.~M. Liu,
``Epidemiological models with age structure, proportionate mixing, and
cross-immunity,'' \emph{Journal of Mathematical Biology}, vol.~27, no.~3, pp.
233--258, 1989.
\bibitem{wei2013competing}
X.~Wei, N.~C. Valler, B.~A. Prakash, I.~Neamtiu, M.~Faloutsos, and
C.~Faloutsos, ``Competing memes propagation on networks: A network science
perspective,'' \emph{IEEE Journal on Selected Areas in Communications},
vol.~31, no.~6, pp. 1049--1060, 2013.
\bibitem{watkins2016optimal}
N.~J. Watkins, C.~Nowzari, V.~M. Preciado, and G.~J. Pappas, ``Optimal resource
allocation for competitive spreading processes on bilayer networks,''
\emph{IEEE Transactions on Control of Network Systems}, vol.~5, no.~1, pp.
298--307, 2016.
\bibitem{santos2015bi}
A.~Santos, J.~M. Moura, and J.~M. Xavier, ``Bi-virus sis epidemics over
networks: Qualitative analysis,'' \emph{IEEE Transactions on Network Science
and Engineering}, vol.~2, no.~1, pp. 17--29, 2015.
\bibitem{carlos2}
C.~Castillo-Chavez, W.~Huang, and J.~Li, ``Competitive exclusion and
coexistence of multiple strains in an {SIS STD} model,'' \emph{SIAM Journal
on Applied Mathematics}, vol.~59, no.~5, pp. 1790--1811, 1999.
\bibitem{yang2017bi}
L.-X. Yang, X.~Yang, and Y.~Y. Tang, ``A bi-virus competing spreading model
with generic infection rates,'' \emph{IEEE Transactions on Network Science
and Engineering}, vol.~5, no.~1, pp. 2--13, 2017.
\bibitem{van2014domination}
R.~van~de Bovenkamp, F.~Kuipers, and P.~Van~Mieghem, ``Domination-time dynamics
in susceptible-infected-susceptible virus competition on networks,''
\emph{Physical Review E}, vol.~89, no.~4, p. 042818, 2014.
\bibitem{santos2015bivirus_conference}
A.~Santos, J.~M. Moura, and J.~M. Xavier, ``{Sufficient Condition for Survival
of the Fittest in a Bi-virus Epidemics},'' in \emph{2015 49th Asilomar
Conference on Signals, Systems and Computers}.\hskip 1em plus 0.5em minus
0.4em\relax IEEE, 2015, pp. 1323--1327.
\bibitem{pare2021multi}
P.~E. Par{\'e}, J.~Liu, C.~L. Beck, A.~Nedi{\'c}, and T.~Ba{\c{s}}ar,
``Multi-competitive viruses over time-varying networks with mutations and
human awareness,'' \emph{Automatica}, vol. 123, p. 109330, 2021.
\bibitem{janson2020networked}
A.~Janson, S.~Gracy, P.~E. Par{\'e}, H.~Sandberg, and K.~H. Johansson,
``Networked multi-virus spread with a shared resource: Analysis and
mitigation strategies,'' \emph{arXiv preprint arXiv:2011.07569}, 2020.
\bibitem{wang2012dynamics}
Y.~Wang, G.~Xiao, and J.~Liu, ``Dynamics of competing ideas in complex social
systems,'' \emph{New Journal of Physics}, vol.~14, no.~1, p. 013015, 2012.
\bibitem{ye2022bivirus_survey}
M.~Ye and B.~D. Anderson, ``{Competitive Epidemic Spreading Over Networks},''
\emph{IEEE Control Systems Letters}, vol.~7, pp. 545--552, 2022.
\bibitem{ackleh2005competitive}
A.~S. Ackleh and L.~J. Allen, ``Competitive exclusion in sis and sir epidemic
models with total cross immunity and density-dependent host mortality,''
\emph{Discrete \& Continuous Dynamical Systems-B}, vol.~5, no.~2, p. 175,
2005.
\bibitem{ye2022_bivirus}
M.~Ye, B.~D.~O. Anderson, and J.~Liu, ``{Convergence and Equilibria Analysis of
a Networked Bivirus Epidemic Model},'' \emph{SIAM Journal of Control and
Optimization}, vol.~60, no.~2, pp. S323--S346, 2022, special Section:
Mathematical Modeling, Analysis, and Control of Epidemics.
\bibitem{berman1979nonnegative_matrices}
A.~Berman and R.~J. Plemmons, \emph{{Nonnegative Matrices in the Mathematical
Sciences}}, ser. Computer Science and Applied Mathematics.\hskip 1em plus
0.5em minus 0.4em\relax Academic Press: London, 1979.
\bibitem{santos2014bi}
A.~Santos, ``Bi-virus epidemics over large-scale networks: Emergent dynamics
and qualitative analysis,'' Ph.D. dissertation, Carnegie Mellon University,
2014.
\bibitem{fall2007epidemiological}
A.~Fall, A.~Iggidr, G.~Sallet, and J.-J. Tewa, ``Epidemiological models and
lyapunov functions,'' \emph{Mathematical Modelling of Natural Phenomena},
vol.~2, no.~1, pp. 62--83, 2007.
\bibitem{Lajmanovich1976}
A.~Lajmanovich and J.~A. Yorke, ``A deterministic model for gonorrhea in a
nonhomogeneous population,'' \emph{Math. Biosci.}, vol.~28, no.~3, pp.
221--236, 1976.
\bibitem{anderson2022_bivirus_PH}
\BIBentryALTinterwordspacing
B.~D.~O. Anderson and M.~Ye, ``{Equilibria analysis of a networked bivirus
epidemic model using Poincar\'e--Hopf and Manifold Theory },'' 2022.
[Online]. Available: \url{https://arxiv.org/abs/2210.11044}
\BIBentrySTDinterwordspacing
\bibitem{doshi2022convergence}
V.~Doshi, S.~Mallick \emph{et~al.}, ``{Convergence of Bi-Virus Epidemic Models
With Non-Linear Rates on Networks—A Monotone Dynamical Systems Approach},''
\emph{IEEE/ACM Transactions on Networking}, 2022.
\bibitem{mei2017epidemics_review}
W.~Mei, S.~Mohagheghi, S.~Zampieri, and F.~Bullo, ``On the dynamics of
deterministic epidemic propagation over networks,'' \emph{Annual Reviews in
Control}, vol.~44, pp. 116--128, 2017.
\bibitem{vanMeighem2009_virus}
P.~V. Mieghem, J.~Omic, and R.~Kooij, ``Virus spread in networks,''
\emph{IEEE/ACM Transactions on Networking}, vol.~17, no.~1, pp. 1--14, 2009.
\bibitem{pare2018analysis}
P.~E. Par{\'e}, J.~Liu, C.~L. Beck, B.~E. Kirwan, and T.~Ba{\c{s}}ar,
``Analysis, {E}stimation, and {V}alidation of {D}iscrete-time {E}pidemic
{P}rocesses,'' \emph{IEEE Trans. on Control Systems Technology}, vol.~28,
no.~1, pp. 79--93, 2020.
\bibitem{horn1994topics_matrix}
R.~A. Horn and C.~R. Johnson, \emph{Topics in matrix analysis}.\hskip 1em plus
0.5em minus 0.4em\relax Cambridge University Press, 1994.
\bibitem{qu2009cooperative_book}
Z.~Qu, \emph{{Cooperative Control of Dynamical Systems: Applications to
Autonomous Vehicles}}.\hskip 1em plus 0.5em minus 0.4em\relax Springer
Science \& Business Media, 2009.
\bibitem{ye2021_PH_TAC}
M.~Ye, J.~Liu, B.~D.~O. Anderson, and M.~Cao, ``{Applications of the
Poincar\'e--Hopf Theorem: Epidemic Models and Lotka--Volterra Systems},''
\emph{IEEE Transactions on Automatic Control}, vol.~67, no.~4, pp.
1609--1624, Apr. 2022.
\bibitem{chiang2015stability}
H.-D. Chiang and L.~F.~C. Alberto, \emph{{Stability Regions of Nonlinear
Dynamical Systems: Theory, Estimation, and Applications}}.\hskip 1em plus
0.5em minus 0.4em\relax Cambridge University Press, 2015.
\bibitem{parino2021modelling}
F.~Parino, L.~Zino, M.~Porfiri, and A.~Rizzo, ``Modelling and predicting the
effect of social distancing and travel restrictions on {COVID-19}
spreading,'' \emph{Journal of the Royal Society Interface}, vol.~18, no. 175,
p. 20200875, 2021.
\bibitem{hogben2006handbook}
L.~Hogben, \emph{Handbook of linear algebra}.\hskip 1em plus 0.5em minus
0.4em\relax CRC press, 2006.
\end{thebibliography}