
\documentclass[10pt]{article}

% amsmath package, useful for mathematical formulas
\usepackage{amsmath}
% amssymb package, useful for mathematical symbols
\usepackage{amssymb}

% graphicx package, useful for including eps and pdf graphics
% include graphics with the command \includegraphics
\usepackage{graphicx}
\usepackage{fixltx2e}
\usepackage{hyperref}

\graphicspath{ {figs/} }

% cite package, to clean up citations in the main text. Do not remove.
\usepackage{cite}

\usepackage{color} 

% Use doublespacing - comment out for single spacing
%\usepackage{setspace} 
%\doublespacing
% Text layout

\topmargin 0.0cm
\oddsidemargin 0.5cm
\evensidemargin 0.5cm
\textwidth 16cm 
\textheight 21cm

% Bold the 'Figure #' in the caption and separate it with a period
% Captions will be left justified
\usepackage[labelfont=bf,labelsep=period,justification=raggedright]{caption}

\newcommand{\alert}[1]{\{{\color{red}#1}\}}

\bibliographystyle{vancouver}

% Remove brackets from numbering in List of References
\makeatletter
\renewcommand{\@biblabel}[1]{\quad#1.}
\makeatother

% Leave date blank
\date{}

\pagestyle{myheadings}
%% ** EDIT HERE **

%% ** EDIT HERE **
%% PLEASE INCLUDE ALL MACROS BELOW

%% END MACROS SECTION\ref{�}

% Leave date blank
\date{}

\pagestyle{myheadings}

\usepackage{graphicx}

\newcommand{\beginsupplement}{%
        \setcounter{table}{0}
        \renewcommand{\thetable}{S\arabic{table}}%
        \setcounter{figure}{0}
        \renewcommand{\thefigure}{S\arabic{figure}}%
     }

\usepackage{color}

%% Include all macros below. Please limit the use of macros.

%% END MACROS SECTION


\begin{document}

% Title must be 150 characters or less
\begin{center}
{\Large\text{Electronic Supplementary Material for}}
\end{center}

\begin{center}
{\Large\textbf{Modeling the Heart as a Communication System}}
\end{center}

\begin{center}
Hiroshi Ashikaga*, Jos\'{e} Aguilar-Rodr\'{i}guez, Shai Gorsky, Elizabeth Lusczek, Fl\'{a}via Maria Darcie Marquitti, Brian Thompson, Degang Wu, Joshua Garland
\end{center}

\begin{center}
*To whom correspondence should be addressed. E-mail: hashika1@jhmi.edu
\end{center}

\newpage

\begin{center}
{\Large\textbf{Appendix S1. Sensitivity Analysis of Mutual Information in Cardiac Tissue}}
\end{center}

\beginsupplement

In this section, we build an analytical model to determine the sensitivity of mutual information to each parameter of the cardiac tissue using a simple model of unidirectional plane wave propagation. The analytical result should help the reader understand the numerical results in the paper.\\

\subsection*{Basic Cardiac Electrtophysiology}
The cardiac tissue is simulated as a 2-dimensional (2-D), isotropic lattice of an arbtrary size (Figure\ref{fig:yellowband}), where a vertical plane wave of excitation emerges from the left edge of the tissue at a constant inter-beat interval (basic cycle length, $BCL$), and travels toward the right edge with conduction velocity $CV$.

\begin{figure}[!ht]
	\begin{center}
	\includegraphics[clip,width=5.0cm]{yellowband.png}
	\end{center}
	\caption{\footnotesize{{\bf A 2-D Isotropic Excitable Tissue of an Arbitrary Size.} A vertical plane wave of excitationn (in yellow) emerges from the left edge of the tissue, travels toward the right edge with conduction velocity $CV$. $\lambda$ is the wavelength of the excitation wave. $\Delta x$ is the horizontal distance between two arbitrary points $X$ and $Y$ on the cardiac tissue.}}
	\label{fig:yellowband}
\end{figure}

We define the $BCL$ in terms of the diastolic interval $DI$ and the action potential duration $APD$ (Figure\ref{fig:bclapddi}A):

\begin{eqnarray}
BCL=DI_{i+1}+APD_{i}
\label{eq:bcl}
\end{eqnarray}
where $i$ is the beat number. In this analysis, we assume that $APD$ is determined only by the immediately preceding $DI$ ($APD$ restitution)\cite{Nolasco:1968aa}: 
\begin{eqnarray}
APD_{i}=f(DI_{i})
\label{eq:apdres}
\end{eqnarray}
Other factors could influence $APD$ in more complex models\cite{Berger:2004aa}.
\begin{figure}[!ht]
	\begin{center}
	\includegraphics[width=\textwidth]{bclapddi.png}
	\end{center}
	\caption{\footnotesize{{\bf Action Potential Duration (APD) Restitution.} {\it A. Basic cycle length (BCL)}. $BCL$ is the inter-beat interval. $APD$ is the action potential duration and $DI$ is the diastolic interval, where $BCL=DI_{i+1}+APD_{i}$. $i$ denotes the beat number. In our study the time series at each point in the cardiac tissue was coarse-grained to 1 during $APD$ (= excited) or 0 during $DI$ (= resting).  {\it B. APD restitution curve}. $APD$ is a function of the immediately preceding $DI$ ($APD_{i}=f(DI_{i})$). The dashed line represents $BCL=DI_{i+1}+APD_{i}$. The asterisk (*) denotes the stable fixed point when $BCL$ is constant and the slope of the restitution curve at the fixed point is less than one.}}
	\label{fig:bclapddi}
\end{figure}

When $BCL$ is constant and the slope of the restitution curve at the fixed point denoted by the asterisk (*) is less than one, that is, $df/dDI<1$, $APD$ and $DI$ converge to constant values (Figure\ref{fig:bclapddi}B). Therefore, the solution to the restitution function at a steady state is 
\begin{eqnarray}
APD=f(DI)
\label{eq:apdresfixed}
\end{eqnarray}
Similar to $APD$, $CV$ in cardiac tissue is a function of the preceding $DI$ and tends to decrease monotonically as $DI$ decreases\cite{2014zipes:aa}.
\begin{eqnarray}
CV_{i}=g(DI_{i})
\label{eq:cvres}
\end{eqnarray}
$CV$ is highest for fully recovered tissue, and there is a minimum DI for propagation at a finite $CV$.  $APD$ and $CV$ are related by the wavelength of the excitation wave $\lambda$:
\begin{eqnarray}
\lambda=APD\times CV
\label{eq:lambda}
\end{eqnarray}


\subsection*{Mutual Information in Cardiac Tissue}
At time $t=0$, the point $X$ in Figure \ref{fig:yellowband} is resting. The point $X$ becomes excited when the plane wave of excitation reaches the point $X$. Therefore, the electrophysiological behaviors of point $X$ over time can be described using a square wave (Figure \ref{fig:rect}). The point $X$ remains excited while the plane wave travels from left to right at the conduction velocity $CV$. From Equation \ref{eq:lambda}, the duration of excitement is
\begin{eqnarray}
\frac{\lambda}{CV}=APD
\label{eq:lambda2}
\end{eqnarray}

\begin{figure}[!ht]
	\begin{center}
	\includegraphics[clip,width=10.0cm]{rect.png}
	\end{center}
	\caption{\footnotesize{\bf Electrophysiological Behaviors of Two Arbitrary Points X and Y in Figure \ref{fig:yellowband}.} This figure illustarates the case where $\Delta x\geq\lambda$, but a similar analysis can be conducted in the case of $\Delta x<\lambda$. The values 0 and 1 represent the 'resting' and 'excited' states, respectively. At $t=0$, the point $X$ is resting. When the plane wave of excitation reaches the point $X$ at the conduction velocity $CV$ it becomes excited, remains excited for the duration of $APD$ (action potential duration), then becomes resting again. The point $Y$, which is located $\Delta{x}$ distal to the point $X$ with respect to the wave propagation, becomes excited $\Delta{x}/CV$ after the point $X$ becomes excited. The duration of excitation at the point Y is also $APD$. This time sequence repeats itself at the rate of $BCL$ (basic cycle length).}
	\label{fig:rect}
\end{figure}
 
When $\Delta x\geq\lambda$, the joint probability distribution $p(x,y)$ at the points $X$ and $Y$ is
\begin{align*}
	&p(X=1,Y=0)=p(X=0,Y=1)=\frac{APD}{BCL}=\frac{APD}{APD+DI}=\frac{1}{1+\frac{DI}{APD}}=\frac{1}{1+\frac{DI}{f(DI)}} 
	\\
	&p(X=1,Y=1)=0
	\\
	&p(X=0,Y=0)=1-\frac{2APD}{BCL}=1-\frac{2}{1+\frac{DI}{f(DI)}} 
\end{align*}

The marginal probabilities $p(x)$ and $p(y)$ at the points $X$ and $Y$ are
\begin{align*}
	&p(X=1)=p(Y=1)=\frac{APD}{BCL}=\frac{1}{1+\frac{DI}{f(DI)}} 
	\\
	&p(X=0)=p(Y=0)=1-\frac{APD}{BCL}=1-\frac{1}{1+\frac{DI}{f(DI)}} 
\end{align*}

Mutual information $I(X;Y)$ is defined as\cite{2006:CoverEIT}
\begin{eqnarray}
I(X;Y)=\sum_{x,y}p(x,y)\log_{2}\frac{p(x,y)}{p(x)p(y)}
\label{eq:mi01}
\end{eqnarray}

If we define a new variable $l$ such that
\begin{eqnarray}
l=\frac{APD}{BCL}=\frac{\lambda}{CV\times BCL}=\frac{1}{1+\frac{DI}{f(DI)}} 
\label{eq:el}
\end{eqnarray}

then the joint probability distribution $p(x,y)$ and the marginal probabilities $p(x)$ and $p(y)$ are
\begin{align*}
	&p(X=1,Y=0)=p(X=0,Y=1)=l
	\\
	&p(X=1,Y=1)=0
	\\
	&p(X=0,Y=0)=1-2l
	\\
	&p(X=1)=p(Y=1)=l
	\\
	&p(X=0)=p(Y=0)=1-l
\end{align*}

Note that $l$ is dependent only on $DI$. From Equation \ref{eq:mi01}, mutual information $I(X;Y)$ is

\begin{align}
I(X;Y) = &p(X=1,Y=0)\log_{2}\frac{p(X=1,Y=0)}{p(X=1)p(Y=0)}+p(X=0,Y=1)\log_{2}\frac{p(X=0,Y=1)}{p(X=0)p(Y=1)} \nonumber \\
 & +p(X=1,Y=1)\log_{2}\frac{p(X=1,Y=1)}{p(X=1)p(Y=1)}+p(X=0,Y=0)\log_{2}\frac{p(X=0,Y=0)}{p(X=0)p(Y=0)} \nonumber \\
= & l\log_{2}\frac{l}{l(1-l)}+l\log_{2}\frac{l}{l(1-l)}+0+(1-2l)\log_{2}\frac{1-2l}{(1-l)^2} \nonumber \\
= & -2(1-l)\log_{2}(1-l)+(1-2l)\log_{2}(1-2l) \label{eq:xlarge}
\end{align}

We define a new variable $d$ such that
\begin{eqnarray}
d=\frac{\frac{\Delta x}{CV}}{BCL}=\frac{\Delta x}{CV\times BCL}=\frac{\Delta x}{g(DI)\left[f(DI)+DI\right]}
\label{eq:dee}
\end{eqnarray}

Note $d$ is dependent only on $DI$ and $\Delta x$. When $\Delta x<\lambda$, the joint probability distribution $p(x,y)$ and the marginal probabilities $p(x)$ and $p(y)$ are

\begin{align*}
	&p(X=1,Y=0)=p(X=0,Y=1)=\frac{\frac{\Delta x}{CV}}{BCL}=d
	\\
	&p(X=1,Y=1)=\frac{APD-\frac{\Delta x}{CV}}{BCL}=l-d
	\\
	&p(X=0,Y=0)=1-\frac{APD+\frac{\Delta x}{CV}}{BCL}=1-l-d
	\\
	&p(X=1)=p(Y=1)=l
	\\
	&p(X=0)=p(Y=0)=1-l
\end{align*}

Therefore, mutual information $I(X;Y)$ is
\begin{align}
I(X;Y) = &p(X=1,Y=0)\log_{2}\frac{p(X=1,Y=0)}{p(X=1)p(Y=0)}+p(X=0,Y=1)\log_{2}\frac{p(X=0,Y=1)}{p(X=0)p(Y=1)} \nonumber \\
 & +p(X=1,Y=1)\log_{2}\frac{p(X=1,Y=1)}{p(X=1)p(Y=1)}+p(X=0,Y=0)\log_{2}\frac{p(X=0,Y=0)}{p(X=0)p(Y=0)} \nonumber \\
= & d\log_{2}\frac{d}{l(1-l)}+d\log_{2}\frac{d}{l(1-l)}+(l-d)\log_{2}\frac{l-d}{l^2}+(1-l-d)\log_{2}\frac{1-l-d}{(1-l)^2} \nonumber \\
= & 2d\log_{2}d-2l\log_{2}l-2(1-l)\log_{2}(1-l)+(l-d)\log_{2}(l-d)+(1-l-d)\log_{2}(1-l-d) \label{eq:xsmall}
\end{align}

To summarize,
\begin{equation*}
I(X;Y)=\left\{
	\begin{array}{l l}
		2(l-1)\log(1-l)+(1-2l)\log(1-2l) & \quad d\geq l \\
		2d\log_{2}d-2l\log_{2}l-2(1-l)\log_{2}(1-l)+(l-d)\log(l-d)+(1-l-d)\log(1-l-d) & \quad d<l\\
	\end{array}
\right.
\end{equation*}

\begin{figure}[!ht]
	\begin{center}
	\includegraphics[clip,width=10.0cm]{mutual_info.pdf}
	\end{center}
\caption{\footnotesize{\bf{Mutual Information Between Two Arbitrary Points as a Function of $d$ and $l$.}}}
\label{fig:mutual_info}
\end{figure}

From Equation \ref{eq:xlarge} and \ref{eq:xsmall}, as $DI$ increases, both $l$ and $d$ decrease. Accordingly, the mutual information between two arbitrary points at a distance $d$ becomes smaller (Figure \ref{fig:mutual_info}). This sensitivity of mutual information to $DI$ accounts for the lower average information sharing in the normal heartbeats in the cellular automata model compared to the reaction diffusion model in Figure 6 in the main paper. Figure \ref{fig:mutual_info} also illustrates the phenomenon of little information sharing when the two points are out of phase that is shown in the normal heartbeats in Figure 2 in the main paper.

%\section*{References}
% The bibtex filename
\bibliography{references}

\end{document}